@[to_additive]
theorem Inducing.continuousInv {G H : Type*} [Inv G] [Inv H] [TopologicalSpace G]
    [TopologicalSpace H] [ContinuousInv H] {f : G → H} (hf : Inducing f)
    (hf_inv : ∀ x, f x⁻¹ = (f x)⁻¹) : ContinuousInv G

{G : Type u_1}
{H : Type u_2}
[Neg G]
[Neg H]
[TopologicalSpace G]
[TopologicalSpace H]
[ContinuousNeg H]
{f : G → H}
(hf : Inducing f)
(hf_inv : ∀ (x : G), f (-x) = -f x)


/-- An algebra is isomorphic to the opposite of its opposite. -/
@[simps!]
def opOp : A ≃ₐ[R] Aᵐᵒᵖᵐᵒᵖ

(R : Type u_1)
(A : Type u_3)
[CommSemiring R]
[Semiring A]
[Algebra R A]

∀ (a : A), (AlgEquiv.opOp R A) a = MulOpposite.op (MulOpposite.op a)


theorem ClassGroup.integralRep_mem_nonZeroDivisors
    {I : FractionalIdeal R⁰ (FractionRing R)} (hI : I ≠ 0) :
    I.num ∈ (Ideal R)⁰


theorem fourierIntegral_real_eq_integral_exp_smul (f : ℝ → E) (w : ℝ) :
    𝓕 f w = ∫ v : ℝ, Complex.exp (↑(-2 * π * v * w) * Complex.I) • f v

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
(f : ℝ → E)
(w : ℝ)

Real.fourierIntegral f w = ∫ (v : ℝ), Complex.exp (↑(-2 * π * v * w) * Complex.I) • f v


theorem liftOn_mk {α : Type*} {f : M × S → α} (wd : ∀ (p p' : M × S), p ≈ p' → f p = f p')
    (m : M) (s : S) : liftOn (mk m s) f wd = f ⟨m, s⟩

(wd : ∀ (p p' : M × ↥S), p ≈ p' → f p = f p')

(LocalizedModule.mk m s).liftOn f wd = f (m, s)


/-- **Fundamental theorem of calculus-1**: if `f : ℝ → E` is integrable on `a..b` and `f x` has a
finite limit `c` almost surely at `b`, then `u ↦ ∫ x in a..u, f x` has derivative `c` at `b`. -/
theorem integral_hasDerivAt_of_tendsto_ae_right (hf : IntervalIntegrable f volume a b)
    (hmeas : StronglyMeasurableAtFilter f (𝓝 b)) (hb : Tendsto f (𝓝 b ⊓ ae volume) (𝓝 c)) :
    HasDerivAt (fun u => ∫ x in a..u, f x) c b

(hf : IntervalIntegrable f MeasureTheory.volume a b)

(hmeas : StronglyMeasurableAtFilter f (𝓝 b) MeasureTheory.volume)

(hb : Filter.Tendsto f (𝓝 b ⊓ MeasureTheory.ae MeasureTheory.volume) (𝓝 c))

HasDerivAt (fun u => ∫ (x : ℝ) in a..u, f x) c b


@[to_additive (attr := simp)]
theorem mul_lt_mul_iff_right [CovariantClass α α (swap (· * ·)) (· < ·)]
    [ContravariantClass α α (swap (· * ·)) (· < ·)] (a : α) {b c : α} :
    b * a < c * a ↔ b < c

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

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


lemma IsReal.isUnramified (h : IsReal w) : IsUnramified k w

(k : Type u_1)
[Field k]
{K : Type u_2}
[Field K]
[Algebra k K]
{w : NumberField.InfinitePlace K}
(h : w.IsReal)


theorem RelEmbedding.inter_preimage_minimals_eq (f : r ↪r s) (x : Set α) (y : Set β) :
    x ∩ f⁻¹' (minimals s ((f '' x) ∩ y)) = minimals r (x ∩ f ⁻¹' y)

{α : Type u_1}
{β : Type u_2}
{r : α → α → Prop}
{s : β → β → Prop}
(f : r ↪r s)
(x : Set α)
(y : Set β)

x ∩ ⇑f ⁻¹' minimals s (⇑f '' x ∩ y) = minimals r (x ∩ ⇑f ⁻¹' y)


theorem gameAdd_iff {rα rβ} {x y : α × β} :
    GameAdd rα rβ x y ↔ rα x.1 y.1 ∧ x.2 = y.2 ∨ rβ x.2 y.2 ∧ x.1 = y.1

{α : Type u_1}
{β : Type u_2}
{rα : α → α → Prop}
{rβ : β → β → Prop}
{x y : α × β}

Prod.GameAdd rα rβ x y ↔ rα x.1 y.1 ∧ x.2 = y.2 ∨ rβ x.2 y.2 ∧ x.1 = y.1


@[simp]
theorem subOneIntegralPowerBasis_gen [IsCyclotomicExtension {p ^ k} ℚ K]
    (hζ : IsPrimitiveRoot ζ ↑(p ^ k)) :
    hζ.subOneIntegralPowerBasis.gen =
      ⟨ζ - 1, Subalgebra.sub_mem _ (hζ.isIntegral (p ^ k).pos) (Subalgebra.one_mem _)⟩

{p : ℕ+}
{k : ℕ}
{K : Type u}
[Field K]
[CharZero K]
{ζ : K}
[hp : Fact (Nat.Prime ↑p)]
[IsCyclotomicExtension {p ^ k} ℚ K]
(hζ : IsPrimitiveRoot ζ ↑(p ^ k))

hζ.subOneIntegralPowerBasis.gen = ⟨ζ - 1, ⋯⟩


theorem isOpen_connectedComponent [LocallyConnectedSpace α] {x : α} :
    IsOpen (connectedComponent x)

{α : Type u}
[TopologicalSpace α]
[LocallyConnectedSpace α]
{x : α}


/-- The eigenspaces of a self-adjoint operator are mutually orthogonal. -/
theorem orthogonalFamily_eigenspaces :
    OrthogonalFamily 𝕜 (fun μ => eigenspace T μ) fun μ => (eigenspace T μ).subtypeₗᵢ

{𝕜 : Type u_1}
[RCLike 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{T : E →ₗ[𝕜] E}
(hT : T.IsSymmetric)

OrthogonalFamily 𝕜 (fun μ => ↥(Module.End.eigenspace T μ)) fun μ => (Module.End.eigenspace T μ).subtypeₗᵢ


/-- The sheaf hom on all basic opens, commuting with restrictions. -/
@[simps app]
def toΓSpecCBasicOpens :
    (inducedFunctor basicOpen).op ⋙ (structureSheaf (Γ.obj (op X))).1 ⟶
      (inducedFunctor basicOpen).op ⋙ ((TopCat.Sheaf.pushforward _ X.toΓSpecBase).obj X.𝒪).1

(r :
  (CategoryTheory.InducedCategory
      (TopologicalSpace.Opens (PrimeSpectrum ↑(AlgebraicGeometry.LocallyRingedSpace.Γ.obj (Opposite.op X))))
      PrimeSpectrum.basicOpen)ᵒᵖ)

X.toΓSpecCBasicOpens.app r = X.toΓSpecCApp (Opposite.unop r)


@[simp]
theorem constantCoeff_C (a : R) : constantCoeff R (C R a) = a

(PowerSeries.constantCoeff R) ((PowerSeries.C R) a) = a


/-- If a function `f` locally integrable on an open subset `U` of a finite-dimensional real
  manifold has zero integral when multiplied by any smooth function compactly supported
  in an open set `U`, then `f` vanishes almost everywhere in `U`. -/
theorem IsOpen.ae_eq_zero_of_integral_contDiff_smul_eq_zero {U : Set E} (hU : IsOpen U)
    (hf : LocallyIntegrableOn f U μ)
    (h : ∀ (g : E → ℝ), ContDiff ℝ ⊤ g → HasCompactSupport g → tsupport g ⊆ U →
        ∫ x, g x • f x ∂μ = 0) :
    ∀ᵐ x ∂μ, x ∈ U → f x = 0

(hf : MeasureTheory.LocallyIntegrableOn f U μ)

(h : ∀ (g : E → ℝ), ContDiff ℝ ⊤ g → HasCompactSupport g → tsupport g ⊆ U → ∫ (x : E), g x • f x ∂μ = 0)


lemma equiv_of_X_eq_of_Y_eq {P Q : Fin 3 → F} (hPz : P z ≠ 0) (hQz : Q z ≠ 0)
    (hx : P x * Q z ^ 2 = Q x * P z ^ 2) (hy : P y * Q z ^ 3 = Q y * P z ^ 3) : P ≈ Q

{F : Type v}
[Field F]
{P Q : Fin 3 → F}
(hPz : P z ≠ 0)
(hQz : Q z ≠ 0)
(hx : P x * Q z ^ 2 = Q x * P z ^ 2)
(hy : P y * Q z ^ 3 = Q y * P z ^ 3)


@[to_additive]
theorem mul_assoc : ∀ a b c : G, a * b * c = a * (b * c)

{G : Type u_1}
[AddSemigroup G]
(a b c : G)


theorem sInf_apply (hs : MeasurableSet s) : sInf m s = sInf (toOuterMeasure '' m) s

{α : Type u_1}
{m0 : MeasurableSpace α}
{s : Set α}
{m : Set (MeasureTheory.Measure α)}
(hs : MeasurableSet s)

(sInf m) s = (sInf (MeasureTheory.Measure.toOuterMeasure '' m)) s


/-- An arrow starting at the zero object is zero -/
theorem zero_of_from_zero {X : C} (f : 0 ⟶ X) : f = 0


@[simp]
theorem add_f_apply (f g : C ⟶ D) (i : ι) : (f + g).f i = f.f i + g.f i

{ι : Type u_1}
{V : Type u}
[CategoryTheory.Category.{v, u} V]
[CategoryTheory.Preadditive V]
{c : ComplexShape ι}
{C D : HomologicalComplex V c}
(f g : C ⟶ D)
(i : ι)


theorem monotone_int_of_le_succ {f : ℤ → α} (hf : ∀ n, f n ≤ f (n + 1)) : Monotone f

{α : Type u}
[Preorder α]
{f : ℤ → α}
(hf : ∀ (n : ℤ), f n ≤ f (n + 1))


@[simp]
theorem ratio_symm (e : X ≃ᵈ Y) : ratio e.symm = (ratio e)⁻¹

{X : Type u_1}
{Y : Type u_2}
[PseudoEMetricSpace X]
[PseudoEMetricSpace Y]
(e : X ≃ᵈ Y)

Dilation.ratio e.symm = (Dilation.ratio e)⁻¹


/-- If a module has a finite dimension, all bases are indexed by a finite set. -/
theorem Basis.finite_index_of_rank_lt_aleph0 {ι : Type*} {s : Set ι} (b : Basis s R M)
    (h : Module.rank R M < ℵ₀) : s.Finite

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


@[simp]
theorem eLpNorm_measure_zero {f : α → F} : eLpNorm f p (0 : Measure α) = 0

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


theorem mem_singleton : a ∈ #[b] ↔ a = b

∀ {α : Type u_1} {a b : α}, a ∈ #[b] ↔ a = b


lemma map_sup (f : LatticeHom α β) (L M : Sublattice α) : (L ⊔ M).map f = L.map f ⊔ M.map f

{α : Type u_2}
{β : Type u_3}
[Lattice α]
[Lattice β]
(f : LatticeHom α β)
(L M : Sublattice α)

Sublattice.map f (L ⊔ M) = Sublattice.map f L ⊔ Sublattice.map f M


@[to_additive (attr := simp)]
theorem iUnion_inv (s : ι → Set α) : (⋃ i, s i)⁻¹ = ⋃ i, (s i)⁻¹

{α : Type u_2}
{ι : Sort u_5}
[Inv α]
(s : ι → Set α)


@[simp]
theorem preimageHomeomorph_apply {s : Set B} (hb : s ⊆ e.baseSet) (p : proj ⁻¹' s) :
    e.preimageHomeomorph hb p = (⟨proj p, p.2⟩, (e p).2)

{B : Type u_2}
{F : Type u_3}
{Z : Type u_5}
[TopologicalSpace B]
[TopologicalSpace F]
{proj : Z → B}
[TopologicalSpace Z]
(e : Trivialization F proj)
{s : Set B}
(hb : s ⊆ e.baseSet)
(p : ↑(proj ⁻¹' s))

(e.preimageHomeomorph hb) p = (⟨proj ↑p, ⋯⟩, (↑e ↑p).2)


private lemma le_antisymm (a b : SignType) (_ : a ≤ b) (_ : b ≤ a) : a = b


theorem isOpen_coinduced {t : TopologicalSpace α} {s : Set β} {f : α → β} :
    IsOpen[t.coinduced f] s ↔ IsOpen (f ⁻¹' s)

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


theorem nontrivial_iff : Nontrivial α ↔ ∃ x y : α, x ≠ y


theorem min_def [K : LinearOrder β] (x y : β*) : min x y = map₂ min x y

{α : Type u}
{β : Type v}
{φ : Ultrafilter α}
[K : LinearOrder β]
(x y : (↑φ).Germ β)


/-- The mean value theorem on a convex set: if the derivative of a function is bounded by `C` on
`s`, then the function is `C`-Lipschitz on `s`. Version with `HasFDerivWithinAt` and
`LipschitzOnWith`. -/
theorem lipschitzOnWith_of_nnnorm_hasFDerivWithin_le {C : ℝ≥0}
    (hf : ∀ x ∈ s, HasFDerivWithinAt f (f' x) s x) (bound : ∀ x ∈ s, ‖f' x‖₊ ≤ C)
    (hs : Convex ℝ s) : LipschitzOnWith C f s


@[to_additive]
theorem IsOpen.mul_right (hs : IsOpen s) : IsOpen (s * t)

{α : Type u}
[TopologicalSpace α]
[AddGroup α]
[ContinuousConstVAdd αᵃᵒᵖ α]
{s t : Set α}
(hs : IsOpen s)


lemma gammaCDFReal_eq_integral {a r : ℝ} (ha : 0 < a) (hr : 0 < r) (x : ℝ) :
    gammaCDFReal a r x = ∫ x in Iic x, gammaPDFReal a r x

↑(ProbabilityTheory.gammaCDFReal a r) x = ∫ (x : ℝ) in Set.Iic x, ProbabilityTheory.gammaPDFReal a r x


protected theorem measurableSet (hf : AEFinStronglyMeasurable f μ) :
    MeasurableSet hf.sigmaFiniteSet

(hf : MeasureTheory.AEFinStronglyMeasurable f μ)


@[simp, norm_cast] lemma coe_natCast (n : ℕ) : (↑(↑n : ℚ≥0) : ℚ) = n


theorem isUpperSet_iInter {f : ι → Set α} (hf : ∀ i, IsUpperSet (f i)) : IsUpperSet (⋂ i, f i)

{α : Type u_1}
{ι : Sort u_4}
[LE α]
{f : ι → Set α}
(hf : ∀ (i : ι), IsUpperSet (f i))


@[simp, deprecated get_reverse (since := "2023-01-05")]
theorem nthLe_reverse (l : List α) (i : Nat) (h1 h2) :
    nthLe (reverse l) (length l - 1 - i) h1 = nthLe l i h2

(h1 : l.length - 1 - i < l.reverse.length)

l.reverse.nthLe (l.length - 1 - i) h1 = l.nthLe i h2


protected theorem IsSwap.isCycle : IsSwap f → IsCycle f

{α : Type u_2}
{f : Equiv.Perm α}
[DecidableEq α]


protected theorem subset (hs : IsStrongAntichain r s) (h : t ⊆ s) : IsStrongAntichain r t

{α : Type u_1}
{r : α → α → Prop}
{s t : Set α}
(hs : IsStrongAntichain r s)
(h : t ⊆ s)


theorem isAlgClosure_of_transcendence_basis [IsAlgClosed K] (hv : IsTranscendenceBasis R v) :
    IsAlgClosure (Algebra.adjoin R (Set.range v)) K

{R : Type u_1}
{K : Type u_3}
[CommRing R]
[Field K]
[Algebra R K]
{ι : Type u_4}
(v : ι → K)
[IsAlgClosed K]
(hv : IsTranscendenceBasis R v)

IsAlgClosure (↥(Algebra.adjoin R (Set.range v))) K


theorem pow_right_injective_iff_pow_injective {n : M} :
    (Function.Injective fun m : ℕ => n ^ m) ↔ Function.Injective (pow n)

(Function.Injective fun m => n ^ m) ↔ Function.Injective (Submonoid.pow n)


theorem Subtype.dense_iff {s : Set X} {t : Set s} : Dense t ↔ s ⊆ closure ((↑) '' t)

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

Dense t ↔ s ⊆ closure (Subtype.val '' t)


@[simp]
theorem aleph0_add_continuum : ℵ₀ + 𝔠 = 𝔠

Cardinal.aleph0 + Cardinal.continuum = Cardinal.continuum


@[simp]
theorem tensorTensorTensorComm_tmul (m : M) (n : N) (p : P) (q : Q) :
    tensorTensorTensorComm R A M N P Q ((m ⊗ₜ n) ⊗ₜ (p ⊗ₜ q)) = (m ⊗ₜ p) ⊗ₜ (n ⊗ₜ q)

(R : Type uR)
(A : Type uA)
{M : Type uM}
{N : Type uN}
{P : Type uP}
{Q : Type uQ}
[CommSemiring R]
[CommSemiring A]
[Algebra R A]
[AddCommMonoid M]
[Module R M]
[Module A M]
[IsScalarTower R A M]
[AddCommMonoid N]
[Module R N]
[AddCommMonoid P]
[Module R P]
[Module A P]
[IsScalarTower R A P]
[AddCommMonoid Q]
[Module R Q]
(m : M)
(n : N)
(p : P)
(q : Q)

(TensorProduct.AlgebraTensorModule.tensorTensorTensorComm R A M N P Q) ((m ⊗ₜ[R] n) ⊗ₜ[A] p ⊗ₜ[R] q) =
  (m ⊗ₜ[A] p) ⊗ₜ[R] n ⊗ₜ[R] q


theorem eval₂_comp {x : S} : eval₂ f x (p.comp q) = eval₂ f (eval₂ f x q) p

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

Polynomial.eval₂ f x (p.comp q) = Polynomial.eval₂ f (Polynomial.eval₂ f x q) p


@[simp]
theorem subtype_linear (s : AffineSubspace k P) [Nonempty s] :
    s.subtype.linear = s.direction.subtype

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


theorem eq_of_forall_ge_iff [PartialOrder α] {a b : α} (H : ∀ c, a ≤ c ↔ b ≤ c) : a = b

{α : Type u_2}
[PartialOrder α]
{a b : α}
(H : ∀ (c : α), a ≤ c ↔ b ≤ c)


@[simp]
theorem toSet_empty : toSet ∅ = ∅


theorem interior_mem_uniformity {s : Set (α × α)} (hs : s ∈ 𝓤 α) : interior s ∈ 𝓤 α

{α : Type ua}
[UniformSpace α]
{s : Set (α × α)}
(hs : s ∈ 𝓤 α)


theorem nfp_le_iff {a b} : nfp f a ≤ b ↔ ∀ n, f^[n] a ≤ b

{f : Ordinal.{u} → Ordinal.{u}}
{a b : Ordinal.{u}}

Ordinal.nfp f a ≤ b ↔ ∀ (n : ℕ), f^[n] a ≤ b


theorem Imp.swap {a b : Sort*} {c : Prop} : a → b → c ↔ b → a → c

{a : Sort u_1}
{b : Sort u_2}
{c : Prop}


protected theorem isOpenMap (h : X ≃ₜ Y) : IsOpenMap h

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


theorem tan_int_mul_pi_sub (x : ℂ) (n : ℤ) : tan (n * π - x) = -tan x

Complex.tan (↑n * ↑Real.pi - x) = -Complex.tan x


@[simp]
theorem onQuot_comap_eq {J : Ideal R} (hJ : J ≤ supp v) :
    (v.onQuot hJ).comap (Ideal.Quotient.mk J) = v

{R : Type u_1}
{Γ₀ : Type u_2}
[CommRing R]
[LinearOrderedCommMonoidWithZero Γ₀]
(v : Valuation R Γ₀)
{J : Ideal R}
(hJ : J ≤ v.supp)

Valuation.comap (Ideal.Quotient.mk J) (v.onQuot hJ) = v


@[simp]
theorem preimage_ball (h : α ≃ᵢ β) (x : β) (r : ℝ) :
    h ⁻¹' Metric.ball x r = Metric.ball (h.symm x) r

{α : Type u}
{β : Type v}
[PseudoMetricSpace α]
[PseudoMetricSpace β]
(h : α ≃ᵢ β)
(x : β)
(r : ℝ)

⇑h ⁻¹' Metric.ball x r = Metric.ball (h.symm x) r


@[simp]
theorem coe_apply : coeAlgHom F f = f


theorem graph_map_fst_eq_domain (f : E →ₗ.[R] F) :
    f.graph.map (LinearMap.fst R E F) = f.domain

{R : Type u_1}
[Ring R]
{E : Type u_2}
[AddCommGroup E]
[Module R E]
{F : Type u_3}
[AddCommGroup F]
[Module R F]
(f : E →ₗ.[R] F)

Submodule.map (LinearMap.fst R E F) f.graph = f.domain


@[simp] theorem prod_norm_equiv (f : WithLp ∞ (α × β)) : ‖WithLp.equiv ⊤ _ f‖ = ‖f‖

{α : Type u_2}
{β : Type u_3}
[SeminormedAddCommGroup α]
[SeminormedAddCommGroup β]
(f : WithLp ⊤ (α × β))


lemma W_iff' {Y Z : C} (g : Y ⟶ Z) :
    S.W g ↔ ∃ (X : C) (f : X ⟶ Y) (h : Z ⟶ X⟦(1 : ℤ)⟧)
      (_ : Triangle.mk f g h ∈ distTriang C), S.P X

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

(S : CategoryTheory.Triangulated.Subcategory C)

S.W g ↔
  ∃ X f h,
    ∃ (_ : CategoryTheory.Pretriangulated.Triangle.mk f g h ∈ CategoryTheory.Pretriangulated.distinguishedTriangles),
      S.P X


theorem perm_lookmap (f : α → Option α) {l₁ l₂ : List α}
    (H : Pairwise (fun a b => ∀ c ∈ f a, ∀ d ∈ f b, a = b ∧ c = d) l₁) (p : l₁ ~ l₂) :
    lookmap f l₁ ~ lookmap f l₂

(H : List.Pairwise (fun a b => ∀ c ∈ f a, ∀ d ∈ f b, a = b ∧ c = d) l₁)

(List.lookmap f l₁).Perm (List.lookmap f l₂)


@[simp]
theorem sized_iUnion {f : ι → Set (Finset α)} : (⋃ i, f i).Sized r ↔ ∀ i, (f i).Sized r

{α : Type u_1}
{ι : Sort u_2}
{r : ℕ}
{f : ι → Set (Finset α)}

Set.Sized r (⋃ i, f i) ↔ ∀ (i : ι), Set.Sized r (f i)


protected theorem BlockTriangular.det [DecidableEq α] [LinearOrder α] (hM : BlockTriangular M b) :
    M.det = ∏ a ∈ univ.image b, (M.toSquareBlock b a).det

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

M.det = ∏ a ∈ Finset.image b Finset.univ, (M.toSquareBlock b a).det


theorem IsSuffix.isInfix : l₁ <:+ l₂ → l₁ <:+: l₂

∀ {α : Type u_1} {l₁ l₂ : List α}, l₁ <:+ l₂ → l₁ <:+: l₂


theorem antidiagonal.fst_le {n : A} {kl : A × A} (hlk : kl ∈ antidiagonal n) : kl.1 ≤ n

{A : Type u_1}
[CanonicallyOrderedAddCommMonoid A]
[Finset.HasAntidiagonal A]
{n : A}
{kl : A × A}
(hlk : kl ∈ Finset.antidiagonal n)


theorem map_sub (e : M ≃SL[σ₁₂] M₂) (x y : M) : e (x - y) = e x - e y

{R : Type u_1}
[Ring R]
{R₂ : Type u_2}
[Ring R₂]
{M : Type u_3}
[TopologicalSpace M]
[AddCommGroup M]
[Module R M]
{M₂ : Type u_4}
[TopologicalSpace M₂]
[AddCommGroup M₂]
[Module R₂ M₂]
{σ₁₂ : R →+* R₂}
{σ₂₁ : R₂ →+* R}
[RingHomInvPair σ₁₂ σ₂₁]
[RingHomInvPair σ₂₁ σ₁₂]
(e : M ≃SL[σ₁₂] M₂)
(x y : M)


theorem pairwise_sUnion {r : α → α → Prop} {s : Set (Set α)} (h : DirectedOn (· ⊆ ·) s) :
    (⋃₀ s).Pairwise r ↔ ∀ a ∈ s, Set.Pairwise a r

(h : DirectedOn (fun x x_1 => x ⊆ x_1) s)

(⋃₀ s).Pairwise r ↔ ∀ a ∈ s, a.Pairwise r


/-- **Poisson's summation formula**, most general form. -/
theorem Real.tsum_eq_tsum_fourierIntegral {f : C(ℝ, ℂ)}
    (h_norm :
      ∀ K : Compacts ℝ, Summable fun n : ℤ => ‖(f.comp <| ContinuousMap.addRight n).restrict K‖)
    (h_sum : Summable fun n : ℤ => 𝓕 f n) (x : ℝ) :
    ∑' n : ℤ, f (x + n) = ∑' n : ℤ, 𝓕 f n * fourier n (x : UnitAddCircle)

(h_norm :
  ∀ (K : TopologicalSpace.Compacts ℝ),
    Summable fun n => ‖ContinuousMap.restrict (↑K) (f.comp (ContinuousMap.addRight ↑n))‖)

∑' (n : ℤ), f (x + ↑n) = ∑' (n : ℤ), 𝓕 ⇑f ↑n * (fourier n) ↑x


theorem mul_meas_ge_le_pow_eLpNorm (hp_ne_zero : p ≠ 0) (hp_ne_top : p ≠ ∞)
    (hf : AEStronglyMeasurable f μ) (ε : ℝ≥0∞) :
    ε * μ { x | ε ≤ (‖f x‖₊ : ℝ≥0∞) ^ p.toReal } ≤ eLpNorm f p μ ^ p.toReal

(hf : MeasureTheory.AEStronglyMeasurable f μ)

ε * μ {x | ε ≤ ↑‖f x‖₊ ^ p.toReal} ≤ MeasureTheory.eLpNorm f p μ ^ p.toReal


theorem coprime_prod_left_iff {t : Finset ι} {s : ι → ℕ} {x : ℕ} :
    Coprime (∏ i ∈ t, s i) x ↔ ∀ i ∈ t, Coprime (s i) x

{ι : Type u_1}
{t : Finset ι}
{s : ι → ℕ}
{x : ℕ}

(∏ i ∈ t, s i).Coprime x ↔ ∀ i ∈ t, (s i).Coprime x


@[simp]
theorem lcm_mul_left [NormalizedGCDMonoid α] (a b c : α) :
    lcm (a * b) (a * c) = normalize a * lcm b c

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


theorem innerDualCone_sUnion (S : Set (Set H)) :
    (⋃₀ S).innerDualCone = sInf (Set.innerDualCone '' S)

{H : Type u_5}
[NormedAddCommGroup H]
[InnerProductSpace ℝ H]
(S : Set (Set H))


@[simp]
theorem single_pow (a : Γ) (n : ℕ) (r : R) : single a r ^ n = single (n • a) (r ^ n)

{Γ : Type u_1}
{R : Type u_3}
[OrderedCancelAddCommMonoid Γ]
[Semiring R]
(a : Γ)
(n : ℕ)
(r : R)

(HahnSeries.single a) r ^ n = (HahnSeries.single (n • a)) (r ^ n)


/-- Construct a left unitor from specified limit cones.
-/
@[simps]
def BinaryFan.leftUnitor {X : C} {s : Cone (Functor.empty.{0} C)} (P : IsLimit s)
    {t : BinaryFan s.pt X} (Q : IsLimit t) : t.pt ≅ X

{s : CategoryTheory.Limits.Cone (CategoryTheory.Functor.empty C)}

{t : CategoryTheory.Limits.BinaryFan s.pt X}

(CategoryTheory.Limits.BinaryFan.leftUnitor P Q).inv =
  Q.lift
    (CategoryTheory.Limits.BinaryFan.mk (P.lift { pt := X, π := { app := fun x => x.as.elim, naturality := ⋯ } })
      (CategoryTheory.CategoryStruct.id { pt := X, π := { app := fun x => x.as.elim, naturality := ⋯ } }.pt))


theorem map_ratCast_smul [AddCommGroup M] [AddCommGroup M₂] {F : Type*} [FunLike F M M₂]
    [AddMonoidHomClass F M M₂] (f : F) (R S : Type*) [DivisionRing R] [DivisionRing S] [Module R M]
    [Module S M₂] (c : ℚ) (x : M) :
    f ((c : R) • x) = (c : S) • f x

{M : Type u_1}
{M₂ : Type u_2}
[AddCommGroup M]
[AddCommGroup M₂]
{F : Type u_3}
[FunLike F M M₂]
[AddMonoidHomClass F M M₂]
(f : F)
(R : Type u_4)
(S : Type u_5)
[DivisionRing R]
[DivisionRing S]
[Module R M]
[Module S M₂]
(c : ℚ)
(x : M)


@[simp] theorem singleton_sublist {a : α} {l} : [a] <+ l ↔ a ∈ l


theorem fderivWithin_sub (hxs : UniqueDiffWithinAt 𝕜 s x) (hf : DifferentiableWithinAt 𝕜 f s x)
    (hg : DifferentiableWithinAt 𝕜 g s x) :
    fderivWithin 𝕜 (fun y => f y - g y) s x = fderivWithin 𝕜 f s x - fderivWithin 𝕜 g s x

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


@[to_additive]
theorem isUnit_of_mul_isUnit_left [CommMonoid M] {x y : M} (hu : IsUnit (x * y)) : IsUnit x

{M : Type u_1}
[AddCommMonoid M]
{x y : M}
(hu : IsAddUnit (x + y))


/-- Semilinear maps `M →ₛₗ[f] N` identify to
morphisms `M ⟶ (ModuleCat.restrictScalars f).obj N`. -/
@[simps]
def semilinearMapAddEquiv {R : Type u₁} {S : Type u₂} [Ring R] [Ring S] (f : R →+* S)
    (M : ModuleCat.{v} R) (N : ModuleCat.{v} S) :
    (M →ₛₗ[f] N) ≃+ (M ⟶ (ModuleCat.restrictScalars f).obj N)

{R : Type u₁}
{S : Type u₂}
[Ring R]
[Ring S]
(f : R →+* S)
(M : ModuleCat R)
(N : ModuleCat S)
(g : ↑M →ₛₗ[f] ↑N)
(a : ↑M)

((ModuleCat.semilinearMapAddEquiv f M N) g) a = g a


theorem Chain.iff_mem {a : α} {l : List α} :
    Chain R a l ↔ Chain (fun x y => x ∈ a :: l ∧ y ∈ l ∧ R x y) a l

{α : Type u}
{R : α → α → Prop}
{a : α}
{l : List α}

List.Chain R a l ↔ List.Chain (fun x y => x ∈ a :: l ∧ y ∈ l ∧ R x y) a l


@[simp]
theorem CokernelCofork.π_ofπ {X Y P : C} (f : X ⟶ Y) (π : Y ⟶ P) (w : f ≫ π = 0) :
    Cofork.π (CokernelCofork.ofπ π w) = π

CategoryTheory.Limits.Cofork.π (CategoryTheory.Limits.CokernelCofork.ofπ π w) = π


theorem ncard_image_le (hs : s.Finite := by toFinite_tac) : (f '' s).ncard ≤ s.ncard

{α : Type u_1}
{β : Type u_2}
{s : Set α}
{f : α → β}
(hs : s.Finite := by toFinite_tac)


theorem natCast_zmod_eq_zero_iff_dvd (a b : ℕ) : (a : ZMod b) = 0 ↔ b ∣ a


@[simp, norm_cast]
theorem natCast_im (n : ℕ) : (n : ℍ[R]).im = 0


theorem supp_map (h : q.IsUniform) {α β : Type u} (g : α → β) (x : F α) :
    supp (g <$> x) = g '' supp x

{F : Type u → Type u}
[q : QPF F]
(h : QPF.IsUniform)
{α β : Type u}
(g : α → β)
(x : F α)

Functor.supp (g <$> x) = g '' Functor.supp x


/-- Any non-zero natural number `m` is greater than
(b+2)^((number of digits in the base (b+2) representation of m) - 1)
-/
theorem base_pow_length_digits_le' (b m : ℕ) (hm : m ≠ 0) :
    (b + 2) ^ (digits (b + 2) m).length ≤ (b + 2) * m

(b + 2) ^ ((b + 2).digits m).length ≤ (b + 2) * m


theorem card_uIcc : (uIcc f g).card = ∏ i ∈ f.support ∪ g.support, (uIcc (f i) (g i)).card

{ι : Type u_1}
{α : ι → Type u_2}
[DecidableEq ι]
[(i : ι) → DecidableEq (α i)]
[(i : ι) → Lattice (α i)]
[(i : ι) → Zero (α i)]
[(i : ι) → LocallyFiniteOrder (α i)]
(f g : Π₀ (i : ι), α i)

(Finset.uIcc f g).card = ∏ i ∈ f.support ∪ g.support, (Finset.uIcc (f i) (g i)).card


theorem lsub_lt_ord_lift {ι} {f : ι → Ordinal} {c : Ordinal}
    (hι : Cardinal.lift.{v, u} #ι < c.cof)
    (hf : ∀ i, f i < c) : lsub.{u, v} f < c

{ι : Type u}
{f : ι → Ordinal.{max u v}}
{c : Ordinal.{max u v}}
(hι : Cardinal.lift.{v, u} #ι < c.cof)
(hf : ∀ (i : ι), f i < c)


@[simp]
theorem comm_tmul (m : M) (n : N) : (TensorProduct.comm R M N) (m ⊗ₜ n) = n ⊗ₜ m

(R : Type u_1)
[CommSemiring R]
(M : Type u_4)
(N : Type u_5)
[AddCommMonoid M]
[AddCommMonoid N]
[Module R M]
[Module R N]
(m : M)
(n : N)

(TensorProduct.comm R M N) (m ⊗ₜ[R] n) = n ⊗ₜ[R] m


/-- If `c ∈ [a, b]`, then the distance between `a` and `c` is less than or equal to
that of `a` and `b`  -/
theorem abs_sub_left_of_mem_uIcc (h : c ∈ [[a, b]]) : |c - a| ≤ |b - a|

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


@[simp] theorem isOpen_compl_iff : IsOpen sᶜ ↔ IsClosed s

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


lemma measurableSet_mutuallySingularSetSlice (κ η : Kernel α γ) (a : α) :
    MeasurableSet (mutuallySingularSetSlice κ η a)

[hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ]

MeasurableSet (κ.mutuallySingularSetSlice η a)


@[reassoc]
lemma homologySequenceδ_naturality :
    (F.shift n₀).map φ.hom₃ ≫ F.homologySequenceδ T' n₀ n₁ h =
      F.homologySequenceδ T n₀ n₁ h ≫ (F.shift n₁).map φ.hom₁

{T T' : CategoryTheory.Pretriangulated.Triangle C}

CategoryTheory.CategoryStruct.comp ((F.shift n₀).map φ.hom₃) (F.homologySequenceδ T' n₀ n₁ h) =
  CategoryTheory.CategoryStruct.comp (F.homologySequenceδ T n₀ n₁ h) ((F.shift n₁).map φ.hom₁)


@[to_additive]
theorem pairwise_disjoint_Ico_mul_zpow :
    Pairwise (Disjoint on fun n : ℤ => Ico (a * b ^ n) (a * b ^ (n + 1)))

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

Pairwise (Disjoint on fun n => Set.Ico (a + n • b) (a + (n + 1) • b))


@[to_additive]
theorem iCondIndepFun.condIndepFun_prod_range_succ {f : ℕ → Ω → β}
    (hf_Indep : iCondIndepFun m' hm' (fun _ => m) f μ) (hf_meas : ∀ i, Measurable (f i)) (n : ℕ) :
    CondIndepFun m' hm' (∏ j ∈ Finset.range n, f j) (f n) μ

{f : ℕ → Ω → β}

(hf_Indep : ProbabilityTheory.iCondIndepFun m' hm' (fun x => m) f μ)

ProbabilityTheory.CondIndepFun m' hm' (∏ j ∈ Finset.range n, f j) (f n) μ


@[reassoc (attr := simp)]
theorem p_comp {P Q : Karoubi C} (f : Hom P Q) : P.p ≫ f.f = f.f

{P Q : CategoryTheory.Idempotents.Karoubi C}

CategoryTheory.CategoryStruct.comp P.p f.f = f.f


theorem isSeparator_def (G : C) :
    IsSeparator G ↔ ∀ ⦃X Y : C⦄ (f g : X ⟶ Y), (∀ h : G ⟶ X, h ≫ f = h ≫ g) → f = g

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

CategoryTheory.IsSeparator G ↔
  ∀ ⦃X Y : C⦄ (f g : X ⟶ Y),
    (∀ (h : G ⟶ X), CategoryTheory.CategoryStruct.comp h f = CategoryTheory.CategoryStruct.comp h g) → f = g


theorem isGLB_u_image {s : Set β} {b : β} (h : IsGLB s b) : IsGLB (u '' s) (u b)

{α : Type u}
{β : Type v}
[Preorder α]
[Preorder β]
{l : α → β}
{u : β → α}
(gc : GaloisConnection l u)
{s : Set β}
{b : β}
(h : IsGLB s b)


/-- An equivalent expression of `Subgroup.FG` in terms of `Set.Finite` instead of `Finset`. -/
@[to_additive "An equivalent expression of `AddSubgroup.fg` in terms of `Set.Finite` instead of
`Finset`."]
theorem Subgroup.fg_iff (P : Subgroup G) :
    Subgroup.FG P ↔ ∃ S : Set G, Subgroup.closure S = P ∧ S.Finite

{G : Type u_3}
[AddGroup G]
(P : AddSubgroup G)

P.FG ↔ ∃ S, AddSubgroup.closure S = P ∧ S.Finite


@[simp]
lemma norm_toLp (f : α → E) (hf : Memℒp f p μ) : ‖hf.toLp f‖ = ENNReal.toReal (eLpNorm f p μ)

{α : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup E]
(f : α → E)
(hf : MeasureTheory.Memℒp f p μ)

‖MeasureTheory.Memℒp.toLp f hf‖ = (MeasureTheory.eLpNorm f p μ).toReal


theorem sum_restrict_disjointed_spanningSets (μ ν : Measure α) [SigmaFinite ν] :
    sum (fun n ↦ μ.restrict (disjointed (spanningSets ν) n)) = μ

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

(MeasureTheory.Measure.sum fun n => μ.restrict (disjointed (MeasureTheory.spanningSets ν) n)) = μ


theorem right_div_gcd_ne_zero {p q : R} (hq : q ≠ 0) : q / GCDMonoid.gcd p q ≠ 0

{R : Type u_1}
[EuclideanDomain R]
[GCDMonoid R]
{p q : R}
(hq : q ≠ 0)


@[simp] lemma ofIsColimitCokernelCofork_f' (hg : S.g = 0) (c : CokernelCofork S.f)
    (hc : IsColimit c) : (ofIsColimitCokernelCofork S hg c hc).f' = S.f

(c : CategoryTheory.Limits.CokernelCofork S.f)

(hc : CategoryTheory.Limits.IsColimit c)

(CategoryTheory.ShortComplex.LeftHomologyData.ofIsColimitCokernelCofork S hg c hc).f' = S.f


theorem exists_mem_of_ne_nil (l : List α) (h : l ≠ []) : ∃ x, x ∈ l

{α : Type u_1}
(l : List α)
(h : l ≠ [])


/-- Given a category of complexes with objects in `Vᵒᵖ`, there is a natural equivalence between its
opposite category and a category of complexes with objects in `V`. -/
@[simps]
def unopEquivalence : (HomologicalComplex Vᵒᵖ c)ᵒᵖ ≌ HomologicalComplex V c.symm

(HomologicalComplex.unopEquivalence V c).functor = HomologicalComplex.unopFunctor V c


@[simp]
theorem divX_one : divX (1 : R[X]) = 0


@[simp]
theorem summable_star_iff : (Summable fun b ↦ star (f b)) ↔ Summable f

{α : Type u_1}
{β : Type u_2}
[AddCommMonoid α]
[TopologicalSpace α]
[StarAddMonoid α]
[ContinuousStar α]
{f : β → α}

(Summable fun b => star (f b)) ↔ Summable f


/-- To prove something for an arbitrary simple function, it suffices to show
that the property holds for (multiples of) characteristic functions and is closed under
addition (of functions with disjoint support).

It is possible to make the hypotheses in `h_add` a bit stronger, and such conditions can be added
once we need them (for example it is only necessary to consider the case where `g` is a multiple
of a characteristic function, and that this multiple doesn't appear in the image of `f`) -/
@[elab_as_elim]
protected theorem induction {α γ} [MeasurableSpace α] [AddMonoid γ] {P : SimpleFunc α γ → Prop}
    (h_ind :
      ∀ (c) {s} (hs : MeasurableSet s),
        P (SimpleFunc.piecewise s hs (SimpleFunc.const _ c) (SimpleFunc.const _ 0)))
    (h_add : ∀ ⦃f g : SimpleFunc α γ⦄, Disjoint (support f) (support g) → P f → P g → P (f + g))
    (f : SimpleFunc α γ) : P f

{P : MeasureTheory.SimpleFunc α γ → Prop}

(h_ind :
  ∀ (c : γ) {s : Set α} (hs : MeasurableSet s),
    P
      (MeasureTheory.SimpleFunc.piecewise s hs (MeasureTheory.SimpleFunc.const α c)
        (MeasureTheory.SimpleFunc.const α 0)))

(h_add :
  ∀ ⦃f g : MeasureTheory.SimpleFunc α γ⦄, Disjoint (Function.support ↑f) (Function.support ↑g) → P f → P g → P (f + g))


@[to_additive]
lemma prod_div_prod_mem_mulSpan (ht : t ⊆ s) (hu : u ⊆ s) :
    (∏ a in t, a) / ∏ a in u, a ∈ mulSpan s

{α : Type u_1}
[AddCommGroup α]
[DecidableEq α]
[Fintype α]
{s t u : Finset α}
(ht : t ⊆ s)
(hu : u ⊆ s)


@[simp]
theorem decompose_symm_add (x y : ⨁ i, ℳ i) :
    (decompose ℳ).symm (x + y) = (decompose ℳ).symm x + (decompose ℳ).symm y

{ι : Type u_1}
{M : Type u_3}
{σ : Type u_4}
[DecidableEq ι]
[AddCommMonoid M]
[SetLike σ M]
[AddSubmonoidClass σ M]
(ℳ : ι → σ)
[DirectSum.Decomposition ℳ]
(x y : ⨁ (i : ι), ↥(ℳ i))

(DirectSum.decompose ℳ).symm (x + y) = (DirectSum.decompose ℳ).symm x + (DirectSum.decompose ℳ).symm y


@[simp]
theorem coprod_inr (f : M →ₗ[R] M₃) (g : M₂ →ₗ[R] M₃) : (coprod f g).comp (inr R M M₂) = g

{R : Type u}
{M : Type v}
{M₂ : Type w}
{M₃ : Type y}
[Semiring R]
[AddCommMonoid M]
[AddCommMonoid M₂]
[AddCommMonoid M₃]
[Module R M]
[Module R M₂]
[Module R M₃]
(f : M →ₗ[R] M₃)
(g : M₂ →ₗ[R] M₃)


theorem dvd_mul_gcd_iff_dvd_mul : x ∣ n * gcd x m ↔ x ∣ n * m


@[simp]
theorem smul_apply {f : ArithmeticFunction R} {g : ArithmeticFunction M} {n : ℕ} :
    (f • g) n = ∑ x ∈ divisorsAntidiagonal n, f x.fst • g x.snd

{R : Type u_1}
{M : Type u_2}
[Zero R]
[AddCommMonoid M]
[SMul R M]
{f : ArithmeticFunction R}
{g : ArithmeticFunction M}
{n : ℕ}

(f • g) n = ∑ x ∈ n.divisorsAntidiagonal, f x.1 • g x.2


theorem monotone_iterate_of_id_le (h : id ≤ f) : Monotone fun m => f^[m]

{α : Type u_1}
[Preorder α]
{f : α → α}
(h : id ≤ f)


theorem mem_connectedComponent {x : α} : x ∈ connectedComponent x

{α : Type u}
[TopologicalSpace α]
{x : α}


@[simp]
theorem gcd_insert [DecidableEq β] {b : β} :
    (insert b s : Finset β).gcd f = GCDMonoid.gcd (f b) (s.gcd f)

{α : Type u_2}
{β : Type u_3}
[CancelCommMonoidWithZero α]
[NormalizedGCDMonoid α]
{s : Finset β}
{f : β → α}
[DecidableEq β]
{b : β}

(insert b s).gcd f = gcd (f b) (s.gcd f)


theorem zero_of_target_iso_zero {X Y : C} (f : X ⟶ Y) (i : Y ≅ 0) : f = 0


theorem IsPreirreducible.isPreconnected {s : Set α} (H : IsPreirreducible s) : IsPreconnected s

{α : Type u}
[TopologicalSpace α]
{s : Set α}
(H : IsPreirreducible s)


theorem le_inf_support_mul {degt : A → T} (degtm : ∀ {a b}, degt a + degt b ≤ degt (a + b))
    (f g : R[A]) :
    f.support.inf degt + g.support.inf degt ≤ (f * g).support.inf degt

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

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

(degtm : ∀ {a b : A}, degt a + degt b ≤ degt (a + b))


/-- `fib n` is a strong divisibility sequence,
  see https://proofwiki.org/wiki/GCD_of_Fibonacci_Numbers -/
theorem fib_gcd (m n : ℕ) : fib (gcd m n) = gcd (fib m) (fib n)

Nat.fib (m.gcd n) = (Nat.fib m).gcd (Nat.fib n)


theorem map_map₂_distrib {n : γ → δ} {m' : α' → β' → δ} {n₁ : α → α'} {n₂ : β → β'}
    (h_distrib : ∀ a b, n (m a b) = m' (n₁ a) (n₂ b)) :
    (map₂ m f g).map n = map₂ m' (f.map n₁) (g.map n₂)

{m : α → β → γ}

(h_distrib : ∀ (a : α) (b : β), n (m a b) = m' (n₁ a) (n₂ b))

Filter.map n (Filter.map₂ m f g) = Filter.map₂ m' (Filter.map n₁ f) (Filter.map n₂ g)


/-- The functor `G : C ⥤ D` exhibits `(C, J)` as a dense subsite of `(D, K)`
if `G` is cover-dense, locally fully-faithful,
and `S` is a cover of `C` if and only if the image of `S` in `D` is a cover. -/
class IsDenseSubsite : Prop where
  isCoverDense' : G.IsCoverDense K := by infer_instance
  isLocallyFull' : G.IsLocallyFull K := by infer_instance
  isLocallyFaithful' : G.IsLocallyFaithful K := by infer_instance
  functorPushforward_mem_iff : ∀ {X : C} {S : Sieve X}, S.functorPushforward G ∈ K _ ↔ S ∈ J _

{J : CategoryTheory.GrothendieckTopology C}

{K : CategoryTheory.GrothendieckTopology D}

[self : CategoryTheory.Functor.IsDenseSubsite J K G]

CategoryTheory.Sieve.functorPushforward G S ∈ K.sieves (G.obj X) ↔ S ∈ J.sieves X


@[reassoc] -- Porting note (#10618): simp can prove these
theorem prod.diag_map {X Y : C} (f : X ⟶ Y) [HasBinaryProduct X X] [HasBinaryProduct Y Y] :
    diag X ≫ prod.map f f = f ≫ diag Y

CategoryTheory.Limits.diag X ≫ CategoryTheory.Limits.prod.map f f = f ≫ CategoryTheory.Limits.diag Y


theorem log_eq_one_iff {b n : ℕ} : log b n = 1 ↔ n < b * b ∧ 1 < b ∧ b ≤ n

Nat.log b n = 1 ↔ n < b * b ∧ 1 < b ∧ b ≤ n


/-- A monomorphism is injective. -/
theorem ker_eq_bot_of_cancel {f : M →ₛₗ[τ₁₂] M₂}
    (h : ∀ u v : ker f →ₗ[R] M, f.comp u = f.comp v → u = v) : ker f = ⊥

(h : ∀ (u v : ↥(LinearMap.ker f) →ₗ[R] M), f.comp u = f.comp v → u = v)


theorem mem_pointwise_smul_iff_inv_smul_mem₀ {a : α} (ha : a ≠ 0) (S : Submonoid M) (x : M) :
    x ∈ a • S ↔ a⁻¹ • x ∈ S

{α : Type u_1}
{M : Type u_3}
[Monoid M]
[GroupWithZero α]
[MulDistribMulAction α M]
{a : α}
(ha : a ≠ 0)
(S : Submonoid M)
(x : M)

x ∈ a • S ↔ a⁻¹ • x ∈ S


@[deprecated get_rotate (since := "2023-01-13")]
theorem nthLe_rotate (l : List α) (n k : ℕ) (hk : k < (l.rotate n).length) :
    (l.rotate n).nthLe k hk =
      l.nthLe ((k + n) % l.length) (mod_lt _ (length_rotate l n ▸ k.zero_le.trans_lt hk))

{α : Type u}
(l : List α)
(n k : ℕ)
(hk : k < (l.rotate n).length)

(l.rotate n).nthLe k hk = l.nthLe ((k + n) % l.length) ⋯


@[simp] theorem getElem_mkArray (n : Nat) (v : α) (h : i < (mkArray n v).size) :
    (mkArray n v)[i] = v

{α : Type u_1}
{i : Nat}
(n : Nat)
(v : α)
(h : i < (mkArray n v).size)


@[mono]
theorem toAddSubmonoid_strictMono : StrictMono (toAddSubmonoid : Subsemiring R → AddSubmonoid R)


/-- A subring contains the ring's 1. -/
protected theorem one_mem : (1 : R) ∈ s


lemma fib_strictMonoOn : StrictMonoOn fib (Set.Ici 2)


theorem not_imp_iff_and_not : ¬(a → b) ↔ a ∧ ¬b


@[to_additive (attr := simp)]
theorem _root_.Subgroup.inclusion_range {H K : Subgroup G} (h_le : H ≤ K) :
    (inclusion h_le).range = H.subgroupOf K

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

(AddSubgroup.inclusion h_le).range = H.addSubgroupOf K


@[simp] theorem sub_const {l₁ l₂ : LinearCombo} : (l₁ - l₂).const = l₁.const - l₂.const


@[simp] theorem ite_eq_true_distrib (p : Prop) [h : Decidable p] (t f : Bool) :
    (ite p t f = true) = ite p (t = true) (f = true)

((if p then t else f) = true) = if p then t = true else f = true


/-- A simplification of `padicValNat` when one input is prime, by analogy with
`padicValRat_def`. -/
theorem padicValNat_def [hp : Fact p.Prime] {n : ℕ} (hn : 0 < n) :
    padicValNat p n = (multiplicity p n).get (multiplicity.finite_nat_iff.2 ⟨hp.out.ne_one, hn⟩)

{p : ℕ}
[hp : Fact (Nat.Prime p)]
{n : ℕ}
(hn : 0 < n)

padicValNat p n = (multiplicity p n).get ⋯


@[to_additive]
lemma units_sInf {s : Set (Submonoid M)} : (sInf s).units = ⨅ S ∈ s, S.units

{M : Type u_1}
[AddMonoid M]
{s : Set (AddSubmonoid M)}


lemma exists_subset_bijOn : ∃ s' ⊆ s, BijOn f s' (f '' s)

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


/-- Induct on two ereals by performing case splits on the sign of one whenever the other is
infinite. This version eliminates some cases by assuming that `P x y` implies `P (-x) y` for all
`x`, `y`. -/
@[elab_as_elim]
lemma induction₂_neg_left {P : EReal → EReal → Prop} (neg_left : ∀ {x y}, P x y → P (-x) y)
    (top_top : P ⊤ ⊤) (top_pos : ∀ x : ℝ, 0 < x → P ⊤ x)
    (top_zero : P ⊤ 0) (top_neg : ∀ x : ℝ, x < 0 → P ⊤ x) (top_bot : P ⊤ ⊥)
    (zero_top : P 0 ⊤) (zero_bot : P 0 ⊥)
    (pos_top : ∀ x : ℝ, 0 < x → P x ⊤) (pos_bot : ∀ x : ℝ, 0 < x → P x ⊥)
    (coe_coe : ∀ x y : ℝ, P x y) : ∀ x y, P x y

(neg_left : ∀ {x y : EReal}, P x y → P (-x) y)


/-- A `Set` of a subsingleton type has cardinality at most one. -/
theorem ncard_le_one_of_subsingleton [Subsingleton α] (s : Set α) : s.ncard ≤ 1

{α : Type u_1}
[Subsingleton α]
(s : Set α)


@[simp]
theorem walkingParallelPairOpEquiv_counitIso_zero :
    walkingParallelPairOpEquiv.counitIso.app (op zero) = Iso.refl (op zero)

CategoryTheory.Limits.walkingParallelPairOpEquiv.counitIso.app
    (Opposite.op CategoryTheory.Limits.WalkingParallelPair.zero) =
  CategoryTheory.Iso.refl (Opposite.op CategoryTheory.Limits.WalkingParallelPair.zero)


theorem isSupported_zero : IsSupported 0 s


lemma sub (hxy₁ : x₁ ≡ y₁ [SMOD U]) (hxy₂ : x₂ ≡ y₂ [SMOD U]) : x₁ - x₂ ≡ y₁ - y₂ [SMOD U]

{R : Type u_1}
[Ring R]
{M : Type u_3}
[AddCommGroup M]
[Module R M]
{U : Submodule R M}
{x₁ x₂ y₁ y₂ : M}
(hxy₁ : x₁ ≡ y₁ [SMOD U])
(hxy₂ : x₂ ≡ y₂ [SMOD U])


/-- **Fundamental theorem of calculus-1**, strict derivative in left endpoint for a locally finite
measure.

Let `f` be a measurable function integrable on `a..b`. Let `(la, la')` be a pair of
`intervalIntegral.FTCFilter`s around `a`. Suppose that `f` has a finite limit `c` at `la' ⊓ ae μ`.

Then `∫ x in v..b, f x ∂μ - ∫ x in u..b, f x ∂μ = -∫ x in u..v, c ∂μ + o(∫ x in u..v, (1:ℝ) ∂μ)`
as `u` and `v` tend to `la`.
-/
theorem measure_integral_sub_integral_sub_linear_isLittleO_of_tendsto_ae_left
    (hab : IntervalIntegrable f μ a b) (hmeas : StronglyMeasurableAtFilter f la' μ)
    (hf : Tendsto f (la' ⊓ ae μ) (𝓝 c)) (hu : Tendsto u lt la) (hv : Tendsto v lt la) :
    (fun t => ((∫ x in v t..b, f x ∂μ) - ∫ x in u t..b, f x ∂μ) + ∫ _ in u t..v t, c ∂μ) =o[lt]
      fun t => ∫ _ in u t..v t, (1 : ℝ) ∂μ

(hf : Filter.Tendsto f (la' ⊓ MeasureTheory.ae μ) (𝓝 c))

(fun t => ∫ (x : ℝ) in v t..b, f x ∂μ - ∫ (x : ℝ) in u t..b, f x ∂μ + ∫ (x : ℝ) in u t..v t, c ∂μ) =o[lt] fun t =>
  ∫ (x : ℝ) in u t..v t, 1 ∂μ


theorem IsPrimitiveRoot.arg {n : ℕ} {ζ : ℂ} (h : IsPrimitiveRoot ζ n) (hn : n ≠ 0) :
    ∃ i : ℤ, ζ.arg = i / n * (2 * Real.pi) ∧ IsCoprime i n ∧ i.natAbs < n

∃ i, ζ.arg = ↑i / ↑n * (2 * Real.pi) ∧ IsCoprime i ↑n ∧ i.natAbs < n


@[simp] protected theorem add_sub_cancel (a b : Int) : a + b - b = a


@[to_additive]
lemma Filter.tendsto_const_div_iff {G : Type*} [CommGroup G] [TopologicalSpace G] [ContinuousDiv G]
    (b : G) {c : G} {f : α → G} {l : Filter α} :
    Tendsto (fun k : α ↦ b / f k) l (𝓝 (b / c)) ↔ Tendsto f l (𝓝 c)

{α : Type u}
{G : Type u_1}
[AddCommGroup G]
[TopologicalSpace G]
[ContinuousSub G]
(b : G)
{c : G}
{f : α → G}
{l : Filter α}

Filter.Tendsto (fun k => b - f k) l (𝓝 (b - c)) ↔ Filter.Tendsto f l (𝓝 c)


@[simp]
theorem nsmul_pow_two_powHalf (n : ℕ) : 2 ^ n * powHalf n = 1


@[simp]
theorem withBot_comp (f : SupHom β γ) (g : SupHom α β) :
    (f.comp g).withBot = f.withBot.comp g.withBot

{α : Type u_3}
{β : Type u_4}
{γ : Type u_5}
[SemilatticeSup α]
[SemilatticeSup β]
[SemilatticeSup γ]
(f : SupHom β γ)
(g : SupHom α β)


theorem coeff_homogeneousComponent (d : σ →₀ ℕ) :
    coeff d (homogeneousComponent n φ) = if d.degree = n then coeff d φ else 0

{σ : Type u_1}
{R : Type u_3}
[CommSemiring R]
(n : ℕ)
(φ : MvPolynomial σ R)
(d : σ →₀ ℕ)

MvPolynomial.coeff d ((MvPolynomial.homogeneousComponent n) φ) = if d.degree = n then MvPolynomial.coeff d φ else 0


theorem pow_apply (f : M →ₗ[R] M) (n : ℕ) (m : M) : (f ^ n) m = f^[n] m

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


theorem surjective_to_subsingleton [na : Nonempty α] [Subsingleton β] (f : α → β) :
    Surjective f

{α : Sort u}
{β : Sort v}
[na : Nonempty α]
[Subsingleton β]
(f : α → β)


theorem lift_comp_residue {R S : Type*} [CommRing R] [LocalRing R] [Field S] (f : R →+* S)
    [IsLocalRingHom f] : (lift f).comp (residue R) = f

{R : Type u_4}
{S : Type u_5}
[CommRing R]
[LocalRing R]
[Field S]
(f : R →+* S)
[IsLocalRingHom f]

(LocalRing.ResidueField.lift f).comp (LocalRing.residue R) = f


/-- Given an integrable function `f` with values in `ℝ≥0`, there exists an upper semicontinuous
function `g ≤ f` with integral arbitrarily close to that of `f`. Formulation in terms of
`integral`.
Auxiliary lemma for Vitali-Carathéodory theorem `exists_lt_lower_semicontinuous_integral_lt`. -/
theorem exists_upperSemicontinuous_le_integral_le (f : α → ℝ≥0)
    (fint : Integrable (fun x => (f x : ℝ)) μ) {ε : ℝ} (εpos : 0 < ε) :
    ∃ g : α → ℝ≥0,
      (∀ x, g x ≤ f x) ∧
      UpperSemicontinuous g ∧
      Integrable (fun x => (g x : ℝ)) μ ∧ (∫ x, (f x : ℝ) ∂μ) - ε ≤ ∫ x, ↑(g x) ∂μ

(fint : MeasureTheory.Integrable (fun x => ↑(f x)) μ)

∃ g,
  (∀ (x : α), g x ≤ f x) ∧
    UpperSemicontinuous g ∧
      MeasureTheory.Integrable (fun x => ↑(g x)) μ ∧ ∫ (x : α), ↑(f x) ∂μ - ε ≤ ∫ (x : α), ↑(g x) ∂μ


/-- An auxiliary type for the proof of Urysohn's lemma: a pair of a closed set `C` and its
open neighborhood `U`, together with the assumption that `C` satisfies the property `P C`. The
latter assumption will make it possible to prove simultaneously both versions of Urysohn's lemma,
in normal spaces (with `P` always true) and in locally compact spaces (with `P = IsCompact`).
We put also in the structure the assumption that, for any such pair, one may find an intermediate
pair inbetween satisfying `P`, to avoid carrying it around in the argument. -/
structure CU {X : Type*} [TopologicalSpace X] (P : Set X → Prop) where
  /-- The inner set in the inductive construction towards Urysohn's lemma -/
  protected C : Set X
  /-- The outer set in the inductive construction towards Urysohn's lemma -/
  protected U : Set X
  protected P_C : P C
  protected closed_C : IsClosed C
  protected open_U : IsOpen U
  protected subset : C ⊆ U
  protected hP : ∀ {c u : Set X}, IsClosed c → P c → IsOpen u → c ⊆ u →
    ∃ v, IsOpen v ∧ c ⊆ v ∧ closure v ⊆ u ∧ P (closure v)

{X : Type u_2}
[TopologicalSpace X]
{P : Set X → Prop}
(self : Urysohns.CU P)


@[to_additive]
theorem UniformGroup.mk' {α} [UniformSpace α] [Group α]
    (h₁ : UniformContinuous fun p : α × α => p.1 * p.2) (h₂ : UniformContinuous fun p : α => p⁻¹) :
    UniformGroup α

(h₁ : UniformContinuous fun p => p.1 + p.2)


@[simp]
theorem ceil_le : ⌈a⌉₊ ≤ n ↔ a ≤ n

{α : Type u_2}
[LinearOrderedSemiring α]
[FloorSemiring α]
{a : α}
{n : ℕ}

⌈a⌉₊ ≤ n ↔ a ≤ ↑n


@[simp]
theorem append_get_eq [Append α] (a b : Part α) (hab : Dom (a ++ b)) : (a ++ b).get hab =
    a.get (left_dom_of_append_dom hab) ++ b.get (right_dom_of_append_dom hab)

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


theorem ContDiffOn.one_of_succ {n : ℕ} (h : ContDiffOn 𝕜 (n + 1) f s) : ContDiffOn 𝕜 1 f s

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


theorem bijective_of_isScalarTower [Algebra.IsAlgebraic K L]
    [Field R] [Algebra K R] [Algebra L R] [IsScalarTower K L R] (f : R →ₐ[K] L) :
    Function.Bijective f

{K : Type u_1}
{L : Type u_2}
{R : Type u_3}
[CommRing K]
[Field L]
[Algebra K L]
[NoZeroSMulDivisors K L]
[Algebra.IsAlgebraic K L]
[Field R]
[Algebra K R]
[Algebra L R]
[IsScalarTower K L R]
(f : R →ₐ[K] L)


theorem index_center_le_pow [Finite (commutatorSet G)] [Group.FG G] :
    (center G).index ≤ Nat.card (commutatorSet G) ^ Group.rank G

(G : Type u_1)
[Group G]
[Finite ↑(commutatorSet G)]
[Group.FG G]

(Subgroup.center G).index ≤ Nat.card ↑(commutatorSet G) ^ Group.rank G


theorem diff_mem_measurableCylinders (hs : s ∈ measurableCylinders α)
    (ht : t ∈ measurableCylinders α) :
    s \ t ∈ measurableCylinders α

(hs : s ∈ MeasureTheory.measurableCylinders α)

(ht : t ∈ MeasureTheory.measurableCylinders α)

s \ t ∈ MeasureTheory.measurableCylinders α


@[simp]
theorem coe_bot [Bot β] : ⇑(⊥ : SupHom α β) = ⊥

{α : Type u_3}
{β : Type u_4}
[Sup α]
[SemilatticeSup β]
[Bot β]


@[simp]
theorem Finset.univ_pi_univ {α : Type*} {β : α → Type*} [DecidableEq α] [Fintype α]
    [∀ a, Fintype (β a)] :
    (Finset.univ.pi fun a : α => (Finset.univ : Finset (β a))) = Finset.univ

{α : Type u_2}
{β : α → Type u_3}
[DecidableEq α]
[Fintype α]
[(a : α) → Fintype (β a)]

(Finset.univ.pi fun a => Finset.univ) = Finset.univ


theorem IsUpperSet.null_frontier (hs : IsUpperSet s) : volume (frontier s) = 0

{ι : Type u_1}
[Fintype ι]
{s : Set (ι → ℝ)}
(hs : IsUpperSet s)


/-- This version imposes `ι` and `E` to live in the same universe, so you should instead use
`continuous_equivFun_basis` which gives the same result without universe restrictions. -/
private theorem continuous_equivFun_basis_aux [T2Space E] {ι : Type v} [Fintype ι]
    (ξ : Basis ι 𝕜 E) : Continuous ξ.equivFun

{𝕜 : Type u}
[hnorm : NontriviallyNormedField 𝕜]
{E : Type v}
[AddCommGroup E]
[Module 𝕜 E]
[TopologicalSpace E]
[TopologicalAddGroup E]
[ContinuousSMul 𝕜 E]
[CompleteSpace 𝕜]
[T2Space E]
{ι : Type v}
[Fintype ι]
(ξ : Basis ι 𝕜 E)


@[simp]
theorem forget_obj_left {f} : ((forget X).obj f).left = (f : C)

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

((CategoryTheory.MonoOver.forget X).obj f).left = f.obj.left


@[simp]
lemma map_ofHom (f : X ⟶ Y) (L : C ⥤ D) (hL : W.IsInvertedBy L) [W.ContainsIdentities] :
    (ofHom W f).map L hL = L.map f

{C : Type u_1}
{D : Type u_2}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Category.{u_4, u_2} D]
(W : CategoryTheory.MorphismProperty C)
{X Y : C}
(f : X ⟶ Y)
(L : CategoryTheory.Functor C D)
(hL : W.IsInvertedBy L)
[W.ContainsIdentities]

(CategoryTheory.MorphismProperty.RightFraction.ofHom W f).map L hL = L.map f


@[to_additive (attr := simp)]
theorem mulSupport_mulSingle_of_ne (h : b ≠ 1) : mulSupport (mulSingle a b) = {a}

{A : Type u_1}
{B : Type u_2}
[DecidableEq A]
[Zero B]
{a : A}
{b : B}
(h : b ≠ 0)


@[simp, norm_cast]
theorem coe_subset {s₁ s₂ : Finset α} : (s₁ : Set α) ⊆ s₂ ↔ s₁ ⊆ s₂

↑s₁ ⊆ ↑s₂ ↔ s₁ ⊆ s₂


theorem iInf_iUnion (s : ι → Set α) (f : α → β) : ⨅ a ∈ ⋃ i, s i, f a = ⨅ (i) (a ∈ s i), f a

{α : Type u_1}
{β : Type u_2}
{ι : Sort u_4}
[CompleteLattice β]
(s : ι → Set α)
(f : α → β)

⨅ a ∈ ⋃ i, s i, f a = ⨅ i, ⨅ a ∈ s i, f a


theorem two_mul_count_bool_eq_ite (hl : Chain' (· ≠ ·) l) (b : Bool) :
    2 * count b l =
      if Even (length l) then length l else
      if Option.some b == l.head? then length l + 1 else length l - 1

(hl : List.Chain' (fun x x_1 => x ≠ x_1) l)

2 * List.count b l =
  if Even l.length then l.length else if (some b == l.head?) = true then l.length + 1 else l.length - 1


@[simp]
theorem prod_top : s ×ˢ (⊤ : UpperSet β) = ⊤

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
(s : UpperSet α)


@[to_additive]
theorem sSup_mul : sSup (s * t) = sSup s * sSup t

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

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


theorem map_iUnion_fin_meas_set_eq_sum (T : Set α → β) (T_empty : T ∅ = 0)
    (h_add : FinMeasAdditive μ T) {ι} (S : ι → Set α) (sι : Finset ι)
    (hS_meas : ∀ i, MeasurableSet (S i)) (hSp : ∀ i ∈ sι, μ (S i) ≠ ∞)
    (h_disj : ∀ᵉ (i ∈ sι) (j ∈ sι), i ≠ j → Disjoint (S i) (S j)) :
    T (⋃ i ∈ sι, S i) = ∑ i ∈ sι, T (S i)

(h_add : MeasureTheory.FinMeasAdditive μ T)

(hS_meas : ∀ (i : ι), MeasurableSet (S i))

(h_disj : ∀ i ∈ sι, ∀ j ∈ sι, i ≠ j → Disjoint (S i) (S j))


theorem isTorsion_iff_isTorsion_nat [AddCommMonoid M] :
    AddMonoid.IsTorsion M ↔ Module.IsTorsion ℕ M


{R : Type r}
[CommRing R]
(W : WeierstrassCurve R)
(m : ℕ)


theorem diagonal_subset_iff {s} : diagonal α ⊆ s ↔ ∀ x, (x, x) ∈ s

Set.diagonal α ⊆ s ↔ ∀ (x : α), (x, x) ∈ s


@[simp]
theorem cast_zero : (cast (0 : ZMod n) : R) = 0

{n : ℕ}
{R : Type u_1}
[AddGroupWithOne R]


lemma eventually_atTop_le_nat {b : ℝ} (hb : b ∈ Set.Ioo 0 1) (hf : GrowsPolynomially f) :
    ∃ c > 0, ∀ᶠ (n : ℕ) in atTop, ∀ u ∈ Set.Icc (b * n) n, f u ≤ c * f n

(hf : AkraBazziRecurrence.GrowsPolynomially f)

∃ c > 0, ∀ᶠ (n : ℕ) in Filter.atTop, ∀ u ∈ Set.Icc (b * ↑n) ↑n, f u ≤ c * f ↑n


theorem le_mul_of_one_le_right [PosMulMono α] (ha : 0 ≤ a) (h : 1 ≤ b) : a ≤ a * b

{α : Type u_1}
{a b : α}
[MulOneClass α]
[Zero α]
[Preorder α]
[PosMulMono α]
(ha : 0 ≤ a)
(h : 1 ≤ b)


/-- The functor `Arrow (Arrow C) ⥤ Square C` which sends
a morphism `Arrow.mk f ⟶ Arrow.mk g` to the commutative square
with `f` on the top side and `g` on the bottom side. -/
@[simps!]
def fromArrowArrowFunctor' : Arrow (Arrow C) ⥤ Square C

(f : CategoryTheory.Arrow (CategoryTheory.Arrow C))

(CategoryTheory.Square.fromArrowArrowFunctor'.obj f).X₄ = f.right.right


@[simp]
theorem _root_.Finsupp.toAList_lookupFinsupp (f : α →₀ M) : f.toAList.lookupFinsupp = f

{α : Type u_1}
{M : Type u_2}
[Zero M]
(f : α →₀ M)


theorem leibniz_iff_X (D : MvPolynomial σ R →ₗ[R] A) (h₁ : D 1 = 0) :
    (∀ p q, D (p * q) = p • D q + q • D p) ↔ ∀ s i, D (monomial s 1 * X i) =
    (monomial s 1 : MvPolynomial σ R) • D (X i) + (X i : MvPolynomial σ R) • D (monomial s 1)

{σ : 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]
(D : MvPolynomial σ R →ₗ[R] A)
(h₁ : D 1 = 0)

(∀ (p q : MvPolynomial σ R), D (p * q) = p • D q + q • D p) ↔
  ∀ (s : σ →₀ ℕ) (i : σ),
    D ((MvPolynomial.monomial s) 1 * MvPolynomial.X i) =
      (MvPolynomial.monomial s) 1 • D (MvPolynomial.X i) + MvPolynomial.X i • D ((MvPolynomial.monomial s) 1)


theorem char_is_prime (p : ℕ) [CharP R p] : p.Prime

(R : Type u_1)
[Ring R]
[NoZeroDivisors R]
[Nontrivial R]
[Finite R]
(p : ℕ)
[CharP R p]


@[gcongr]
protected theorem add (h₁ : a ≡ b [ZMOD n]) (h₂ : c ≡ d [ZMOD n]) : a + c ≡ b + d [ZMOD n]

{n a b c d : ℤ}
(h₁ : a ≡ b [ZMOD n])
(h₂ : c ≡ d [ZMOD n])


@[to_additive (attr := simp)]
theorem smul_Lp_const [IsFiniteMeasure μ] (c : Mᵈᵐᵃ) (a : E) :
    c • Lp.const p μ a = Lp.const p μ a

[MeasureTheory.SMulInvariantMeasure M α μ]

c • (MeasureTheory.Lp.const p μ) a = (MeasureTheory.Lp.const p μ) a


lemma eq_of_mul_eq_one (h : u * v = 1) : u = v


/-- A prime power divides `n!` iff it is at most the sum of the quotients `n / p ^ i`.
  This sum is expressed over the set `Ico 1 b` where `b` is any bound greater than `log p n` -/
theorem pow_dvd_factorial_iff {p : ℕ} {n r b : ℕ} (hp : p.Prime) (hbn : log p n < b) :
    p ^ r ∣ n ! ↔ r ≤ ∑ i ∈ Ico 1 b, n / p ^ i

{p n r b : ℕ}
(hp : Nat.Prime p)
(hbn : Nat.log p n < b)

p ^ r ∣ n ! ↔ r ≤ ∑ i ∈ Finset.Ico 1 b, n / p ^ i


/-- Change of variable formula for differentiable functions (one-variable version): if a function
`f` is injective and differentiable on a measurable set `s ⊆ ℝ`, then the Bochner integral of a
function `g : ℝ → F` on `f '' s` coincides with the integral of `|(f' x)| • g ∘ f` on `s`. -/
theorem integral_image_eq_integral_abs_deriv_smul {s : Set ℝ} {f : ℝ → ℝ} {f' : ℝ → ℝ}
    (hs : MeasurableSet s) (hf' : ∀ x ∈ s, HasDerivWithinAt f (f' x) s x)
    (hf : InjOn f s) (g : ℝ → F) : ∫ x in f '' s, g x = ∫ x in s, |f' x| • g (f x)

∫ (x : ℝ) in f '' s, g x = ∫ (x : ℝ) in s, |f' x| • g (f x)


/-- The functor that exhibits `SimplexCategory` as skeleton
of `NonemptyFinLinOrd` -/
@[simps obj map]
def skeletalFunctor : SimplexCategory ⥤ NonemptyFinLinOrd

SimplexCategory.skeletalFunctor.obj a = NonemptyFinLinOrd.of (Fin (a.len + 1))


theorem union_eq_compl_compl_inter_compl (s t : Set α) : s ∪ t = (sᶜ ∩ tᶜ)ᶜ


@[simp]
theorem Ici_disjoint_Iic : Disjoint (Ici a) (Iic b) ↔ ¬a ≤ b

Disjoint (Set.Ici a) (Set.Iic b) ↔ ¬a ≤ b


theorem cyclotomic_comp_X_add_one_isEisensteinAt [hp : Fact p.Prime] :
    ((cyclotomic p ℤ).comp (X + 1)).IsEisensteinAt 𝓟

((Polynomial.cyclotomic p ℤ).comp (Polynomial.X + 1)).IsEisensteinAt (Submodule.span ℤ {↑p})


theorem closure_range : closure (range ι) = univ

{α : Type u_1}
[UniformSpace α]
(pkg : AbstractCompletion α)


@[simp] theorem extract_all (as : Array α) : as.extract 0 as.size = as


/-- `rpow` version of `Multiset.prod_map_pow` for `ℝ≥0`. -/
lemma multiset_prod_map_rpow {ι} (s : Multiset ι) (f : ι → ℝ≥0) (r : ℝ) :
    (s.map (f · ^ r)).prod = (s.map f).prod ^ r

{ι : Type u_1}
(s : Multiset ι)
(f : ι → ℝ≥0)
(r : ℝ)

(Multiset.map (fun x => f x ^ r) s).prod = (Multiset.map f s).prod ^ r


theorem PiToModule.fromEnd_apply (f : Module.End R M) (w : ι → R) :
    PiToModule.fromEnd R b f w = f (Fintype.total R R b w)

{ι : Type u_1}
[Fintype ι]
{M : Type u_2}
[AddCommGroup M]
(R : Type u_3)
[CommRing R]
[Module R M]
(b : ι → M)
(f : Module.End R M)
(w : ι → R)

((PiToModule.fromEnd R b) f) w = f (((Fintype.total R R) b) w)


@[to_additive] lemma le_mabs : a ≤ |b|ₘ ↔ a ≤ b ∨ a ≤ b⁻¹

{α : Type u_1}
[AddGroup α]
[LinearOrder α]
{a b : α}


@[to_additive (attr := simp)]
theorem isComplement'_bot_right : IsComplement' H ⊥ ↔ H = ⊤

{G : Type u_1}
[Group G]
{H : Subgroup G}


lemma StrictAnti.not_bddAbove_range [NoMinOrder α] [SuccOrder β] [IsSuccArchimedean β]
    (hf : StrictAnti f) : ¬ BddAbove (Set.range f)

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Nonempty α]
[Preorder β]
{f : α → β}
[NoMinOrder α]
[SuccOrder β]
[IsSuccArchimedean β]
(hf : StrictAnti f)


@[simp, norm_cast] lemma coe_nnratCast (s : S) (q : ℚ≥0) : ((q : s) : K) = q

{K : Type u}
[DivisionRing K]
{S : Type u_1}
[SetLike S K]
[h : SubfieldClass S K]
(s : S)
(q : ℚ≥0)


@[to_additive]
theorem div_lt_iff_lt_mul' : a / b < c ↔ a < b * c

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


@[simp]
theorem sum_card_slice : (∑ r ∈ Iic (Fintype.card α), (𝒜 # r).card) = 𝒜.card

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

∑ r ∈ Finset.Iic (Fintype.card α), (𝒜 # r).card = 𝒜.card


lemma tilted_absolutelyContinuous (μ : Measure α) (f : α → ℝ) : μ.tilted f ≪ μ

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


@[simp]
theorem not_inl_le_inr [LE α] [LE β] {a : α} {b : β} : ¬inl b ≤ inr a

{α : Type u_1}
{β : Type u_2}
[LE α]
[LE β]
{a : α}
{b : β}


/-- Alias of `one_le_mul'` for unification. -/
theorem one_le_mul₀ (ha : 1 ≤ a) (hb : 1 ≤ b) : 1 ≤ a * b

{α : Type u_1}
[LinearOrderedCommGroupWithZero α]
{a b : α}
(ha : 1 ≤ a)
(hb : 1 ≤ b)


theorem arg_eq_zero_iff {z : ℂ} : arg z = 0 ↔ 0 ≤ z.re ∧ z.im = 0


@[simp (high), reassoc]
theorem glue_condition (i j : D.J) : D.t i j ≫ D.f j i ≫ D.ι j = D.f i j ≫ D.ι i

(D : AlgebraicGeometry.Scheme.GlueData)
(i j : D.J)


@[simp]
theorem cocone_naturality_components (j j' : J) (f : j ⟶ j') (x : F.obj j) :
    (coconeMorphism F j') (F.map f x) = (coconeMorphism F j) x

{J : Type v}
[CategoryTheory.SmallCategory J]
(F : J ⥤ RingCat)
(j j' : J)
(f : j ⟶ j')
(x : ↑(F.obj j))

(RingCat.Colimits.coconeMorphism F j') ((F.map f) x) = (RingCat.Colimits.coconeMorphism F j) x


lemma op_comp_isSheaf [Functor.IsContinuous.{t} F J K] (G : Sheaf K A) :
    Presheaf.IsSheaf J (F.op ⋙ G.val)

(J : CategoryTheory.GrothendieckTopology C)

(K : CategoryTheory.GrothendieckTopology D)

CategoryTheory.Presheaf.IsSheaf J (F.op.comp G.val)


theorem Basis.exchange (hIX : M.Basis I X) (hJX : M.Basis J X) (he : e ∈ I \ J) :
    ∃ f ∈ J \ I, M.Basis (insert f (I \ {e})) X

{α : Type u_1}
{M : Matroid α}
{I X J : Set α}
{e : α}
(hIX : M.Basis I X)
(hJX : M.Basis J X)
(he : e ∈ I \ J)


@[simp]
theorem mclosure_iUnion_range_of :
    Submonoid.closure (⋃ i, Set.range (of : M i →* CoprodI M)) = ⊤

{ι : Type u_1}
{M : ι → Type u_2}
[(i : ι) → Monoid (M i)]

Submonoid.closure (⋃ i, Set.range ⇑Monoid.CoprodI.of) = ⊤


/-- A filter is `NeBot` if it is not equal to `⊥`, or equivalently the empty set does not belong to
the filter. Bourbaki include this assumption in the definition of a filter but we prefer to have a
`CompleteLattice` structure on `Filter _`, so we use a typeclass argument in lemmas instead. -/
class NeBot (f : Filter α) : Prop where
  /-- The filter is nontrivial: `f ≠ ⊥` or equivalently, `∅ ∉ f`. -/
  ne' : f ≠ ⊥

{α : Type u}
{f : Filter α}
[self : f.NeBot]


lemma floorDiv_def (f : ∀ i, π i) (a : α) : f ⌊/⌋ a = fun i ↦ f i ⌊/⌋ a

{ι : Type u_1}
{α : Type u_2}
{π : ι → Type u_4}
[OrderedAddCommMonoid α]
[(i : ι) → OrderedAddCommMonoid (π i)]
[(i : ι) → SMulZeroClass α (π i)]
[(i : ι) → FloorDiv α (π i)]
(f : (i : ι) → π i)
(a : α)


theorem mul_single_one_apply [MulOneClass G] (f : MonoidAlgebra k G) (r : k) (x : G) :
    (HMul.hMul (β := MonoidAlgebra k G) f (single 1 r)) x = f x * r

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

(f * MonoidAlgebra.single 1 r) x = f x * r


/-- See `himp_le` for a stronger version in Boolean algebras. -/
theorem Codisjoint.himp_le_of_right_le (hac : Codisjoint a c) (hba : b ≤ a) : c ⇨ b ≤ a

{α : Type u_2}
[GeneralizedHeytingAlgebra α]
{a b c : α}
(hac : Codisjoint a c)
(hba : b ≤ a)


lemma pow_eq_zero_of_le : ∀ {m n} (hmn : m ≤ n) (ha : a ^ m = 0), a ^ n = 0

{M₀ : Type u_2}
[MonoidWithZero M₀]
{a : M₀}
{m n : ℕ}
(hmn : m ≤ n)
(ha : a ^ m = 0)


@[to_additive (attr := gcongr)]
lemma zpow_le_zpow (ha : 1 ≤ a) (h : m ≤ n) : a ^ m ≤ a ^ n

{α : Type u_1}
[OrderedAddCommGroup α]
{m n : ℤ}
{a : α}
(ha : 0 ≤ a)
(h : m ≤ n)


protected theorem max_le {a b c : Int} : max a b ≤ c ↔ a ≤ c ∧ b ≤ c


@[simp, norm_cast]
theorem coe_sup (f g : CauSeq α abs) : ⇑(f ⊔ g) = (f : ℕ → α) ⊔ g

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


theorem le_and : ∀ {x y z : Bool}, x ≤ y → x ≤ z → x ≤ (y && z)


theorem le_iInf_add_iInf {ι ι' : Sort*} [Nonempty ι] [Nonempty ι'] {f : ι → ℝ≥0} {g : ι' → ℝ≥0}
    {a : ℝ≥0} (h : ∀ i j, a ≤ f i + g j) : a ≤ (⨅ i, f i) + ⨅ j, g j

{ι : Sort u_1}
{ι' : Sort u_2}
[Nonempty ι]
[Nonempty ι']
{f : ι → ℝ≥0}
{g : ι' → ℝ≥0}
{a : ℝ≥0}
(h : ∀ (i : ι) (j : ι'), a ≤ f i + g j)


theorem mem_toSubtype_iff {p : β → Prop} {f : α → β} {a : α} {b : Subtype p} :
    b ∈ toSubtype p f a ↔ ↑b = f a

{α : Type u_1}
{β : Type u_2}
{p : β → Prop}
{f : α → β}
{a : α}
{b : Subtype p}


theorem LinearEquiv.isUnit_det (f : M ≃ₗ[R] M') (v : Basis ι R M) (v' : Basis ι R M') :
    IsUnit (LinearMap.toMatrix v v' f).det

{R : Type u_1}
[CommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
{M' : Type u_3}
[AddCommGroup M']
[Module R M']
{ι : Type u_4}
[DecidableEq ι]
[Fintype ι]
(f : M ≃ₗ[R] M')
(v : Basis ι R M)
(v' : Basis ι R M')

IsUnit ((LinearMap.toMatrix v v') ↑f).det


/-- `fun a ↦ Prod.mk a b` as a relation embedding. -/
@[simps]
def prodLexMkRight (r : α → α → Prop) {b : β} (h : ¬s b b) : r ↪r Prod.Lex r s

{α : Type u_1}
{β : Type u_2}
{s : β → β → Prop}
(r : α → α → Prop)
{b : β}
(h : ¬s b b)
(a : α)

(RelEmbedding.prodLexMkRight r h) a = (a, b)


/-- See also `Subspace.dualAnnihilator_iInf_eq` for vector subspaces when `ι` is finite. -/
theorem iSup_dualAnnihilator_le_iInf {ι : Sort*} (U : ι → Submodule R M) :
    ⨆ i : ι, (U i).dualAnnihilator ≤ (⨅ i : ι, U i).dualAnnihilator

{R : Type u}
{M : Type v}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
{ι : Sort u_1}
(U : ι → Submodule R M)

⨆ i, (U i).dualAnnihilator ≤ (⨅ i, U i).dualAnnihilator


theorem exp_log (hx : 0 < x) : exp (log x) = x


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

(hf : MeasureTheory.AEStronglyMeasurable f μ)


@[simp]
theorem iInf_iInf_eq_left {b : β} {f : ∀ x : β, x = b → α} : ⨅ x, ⨅ h : x = b, f x h = f b rfl

{α : Type u_1}
{β : Type u_2}
[CompleteLattice α]
{b : β}
{f : (x : β) → x = b → α}


theorem toOuterMeasure_trim_eq_trim_toOuterMeasure (μ : Measure α) (hm : m ≤ m0) :
    @Measure.toOuterMeasure _ m (μ.trim hm) = @OuterMeasure.trim _ m μ.toOuterMeasure

{α : Type u_1}
{m m0 : MeasurableSpace α}
(μ : MeasureTheory.Measure α)
(hm : m ≤ m0)


theorem continuous_toLoop (i : N) : Continuous (@toLoop N X _ x _ i)

{N : Type u_1}
{X : Type u_2}
[TopologicalSpace X]
{x : X}
[DecidableEq N]
(i : N)


theorem encard_le_card (h : s ⊆ t) : s.encard ≤ t.encard

{α : Type u_1}
{s t : Set α}
(h : s ⊆ t)


@[simp]
theorem range_fst : NonUnitalRingHom.srange (fst R S) = ⊤

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

NonUnitalRingHom.srange (NonUnitalRingHom.fst R S) = ⊤


/-- Constructs an isomorphism of Boolean rings from a ring isomorphism between them. -/
@[simps]
def Iso.mk {α β : BoolRing.{u}} (e : α ≃+* β) : α ≅ β


theorem tendsto_nhds_unique' [T2Space X] {f : Y → X} {l : Filter Y} {a b : X} (_ : NeBot l)
    (ha : Tendsto f l (𝓝 a)) (hb : Tendsto f l (𝓝 b)) : a = b

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[T2Space X]
{f : Y → X}
{l : Filter Y}
{a b : X}

l.NeBot → Filter.Tendsto f l (𝓝 a) → Filter.Tendsto f l (𝓝 b) → a = b


theorem isRat_ofScientific_of_true [DivisionRing α] :
    {m e : ℕ} → {n : ℤ} → {d : ℕ} →
    IsRat (mkRat m (10 ^ e) : α) n d → IsRat (OfScientific.ofScientific m true e : α) n d

{α : Type u_1}
[DivisionRing α]
{m e : ℕ}
{n : ℤ}
{d : ℕ}

Mathlib.Meta.NormNum.IsRat (↑(mkRat (↑m) (10 ^ e))) n d →
  Mathlib.Meta.NormNum.IsRat (OfScientific.ofScientific m true e) n d


@[simp]
theorem toAffineIsometry_toAffineMap : f.toAffineIsometry.toAffineMap = f.toLinearMap.toAffineMap

{𝕜 : Type u_1}
{V : Type u_2}
{V₂ : Type u_5}
[NormedField 𝕜]
[SeminormedAddCommGroup V]
[NormedSpace 𝕜 V]
[SeminormedAddCommGroup V₂]
[NormedSpace 𝕜 V₂]
(f : V →ₗᵢ[𝕜] V₂)


theorem zero_div_subset (s : Set α) : 0 / s ⊆ 0

{α : Type u_2}
[GroupWithZero α]
(s : Set α)


theorem eval₂_mul_C' (h : Commute (f a) x) : eval₂ f x (p * C a) = eval₂ f x p * f a

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

Polynomial.eval₂ f x (p * Polynomial.C a) = Polynomial.eval₂ f x p * f a


/-- `n` is not divisible by `a` iff it is between `a * k` and `a * (k + 1)` for some `k`. -/
lemma not_dvd_iff_between_consec_multiples (n : ℕ) {a : ℕ} (ha : 0 < a) :
    (∃ k : ℕ, a * k < n ∧ n < a * (k + 1)) ↔ ¬a ∣ n

(∃ k, a * k < n ∧ n < a * (k + 1)) ↔ ¬a ∣ n


theorem eLpNorm'_congr_ae {f g : α → F} (hfg : f =ᵐ[μ] g) : eLpNorm' f q μ = eLpNorm' g q μ

{α : Type u_1}
{F : Type u_3}
{m0 : MeasurableSpace α}
{q : ℝ}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup F]
{f g : α → F}
(hfg : f =ᵐ[μ] g)

MeasureTheory.eLpNorm' f q μ = MeasureTheory.eLpNorm' g q μ


theorem evaln_mono : ∀ {k₁ k₂ c n x}, k₁ ≤ k₂ → x ∈ evaln k₁ c n → x ∈ evaln k₂ c n

{k₁ k₂ : ℕ}
{c : Nat.Partrec.Code}
{n x : ℕ}

k₁ ≤ k₂ → x ∈ Nat.Partrec.Code.evaln k₁ c n → x ∈ Nat.Partrec.Code.evaln k₂ c n


theorem card_Icc : (Icc a b).card = ∏ i, (Icc (a i) (b i)).card

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

(Finset.Icc a b).card = ∏ i : ι, (Finset.Icc (a i) (b i)).card


@[simp]
theorem map_cos : map f (cos A) = cos A'

{A : Type u_1}
{A' : Type u_2}
[Ring A]
[Ring A']
[Algebra ℚ A]
[Algebra ℚ A']
(f : A →+* A')

(PowerSeries.map f) (PowerSeries.cos A) = PowerSeries.cos A'


theorem transitive_le [Preorder α] : Transitive (@LE.le α _)


/-- The cokernel of `g.unop` is the opposite of `kernel g`. -/
@[simps!]
def cokernelUnopOp : Opposite.op (cokernel g.unop) ≅ kernel g

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Abelian C]
{A B : Cᵒᵖ}
(g : A ⟶ B)

(CategoryTheory.cokernelUnopOp g).inv =
  (CategoryTheory.Limits.cokernel.desc g.unop (CategoryTheory.Limits.kernel.ι g).unop ⋯).op


theorem mul_single_coeff_add [NonUnitalNonAssocSemiring R] {r : R} {x : HahnSeries Γ R} {a : Γ}
    {b : Γ} : (x * single b r).coeff (a + b) = x.coeff a * r

{Γ : Type u_1}
{R : Type u_3}
[OrderedCancelAddCommMonoid Γ]
[NonUnitalNonAssocSemiring R]
{r : R}
{x : HahnSeries Γ R}
{a b : Γ}

(x * (HahnSeries.single b) r).coeff (a + b) = x.coeff a * r


theorem div_two_sub_self (a : α) : a / 2 - a = -(a / 2)

{α : Type u_2}
[LinearOrderedField α]
(a : α)


/--
(1 + X + X^2 + ...) * (1 - X) = 1.

Note that the power series `1 + X + X^2 + ...` is written as `mk 1` where `1` is the constant
function so that `mk 1` is the power series with all coefficients equal to one.
-/
theorem mk_one_mul_one_sub_eq_one : (mk 1 : S⟦X⟧) * (1 - X) = 1

PowerSeries.mk 1 * (1 - PowerSeries.X) = 1


/-- Construct an equivalence of rings from homomorphisms in both directions, which are inverses.
-/
@[simps]
def ofHomInv' {R S F G : Type*} [NonUnitalNonAssocSemiring R] [NonUnitalNonAssocSemiring S]
    [FunLike F R S] [FunLike G S R]
    [NonUnitalRingHomClass F R S] [NonUnitalRingHomClass G S R] (hom : F) (inv : G)
    (hom_inv_id : (inv : S →ₙ+* R).comp (hom : R →ₙ+* S) = NonUnitalRingHom.id R)
    (inv_hom_id : (hom : R →ₙ+* S).comp (inv : S →ₙ+* R) = NonUnitalRingHom.id S) :
    R ≃+* S

(hom_inv_id : (↑inv).comp ↑hom = NonUnitalRingHom.id R)

(inv_hom_id : (↑hom).comp ↑inv = NonUnitalRingHom.id S)

(RingEquiv.ofHomInv' hom inv hom_inv_id inv_hom_id).symm a = inv a


theorem cast_tprod {i j} (h : i = j) (a : Fin i → M) :
    cast R M h (tprod R a) = tprod R (a ∘ Fin.cast h.symm)

(R : Type u_1)
(M : Type u_2)
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
{i j : ℕ}
(h : i = j)
(a : Fin i → M)

(TensorPower.cast R M h) ((PiTensorProduct.tprod R) a) = (PiTensorProduct.tprod R) (a ∘ Fin.cast ⋯)


/-- The conductor of the trivial character is 1. -/
lemma conductor_one (hn : n ≠ 0) : conductor (1 : DirichletCharacter R n) = 1

{R : Type u_1}
[CommMonoidWithZero R]
{n : ℕ}
(hn : n ≠ 0)


theorem num_mul_den_eq_num_iff_eq {x y : K} :
    x * algebraMap A K (den A y) = algebraMap A K (num A y) ↔ x = y

{A : Type u_4}
[CommRing A]
[IsDomain A]
[UniqueFactorizationMonoid A]
{K : Type u_5}
[Field K]
[Algebra A K]
[IsFractionRing A K]
{x y : K}

x * (algebraMap A K) ↑(IsFractionRing.den A y) = (algebraMap A K) (IsFractionRing.num A y) ↔ x = y


/-- A subfield `t` includes `closure s` if and only if it includes `s`. -/
@[simp]
theorem closure_le {s : Set K} {t : Subfield K} : closure s ≤ t ↔ s ⊆ t

{K : Type u}
[DivisionRing K]
{s : Set K}
{t : Subfield K}


theorem norm_eq_one_of_not_module_finite (h : ¬Module.Finite R S) (x : S) : norm R x = 1

{R : Type u_1}
{S : Type u_2}
[CommRing R]
[Ring S]
[Algebra R S]
(h : ¬Module.Finite R S)
(x : S)


theorem card_singleton_inter [DecidableEq α] : ({a} ∩ s).card ≤ 1

{α : Type u_1}
{s : Finset α}
{a : α}
[DecidableEq α]


theorem digits_eq_nil_iff_eq_zero {b n : ℕ} : digits b n = [] ↔ n = 0


@[to_additive (attr := simp)]
theorem isComplement'_top_left : IsComplement' ⊤ H ↔ H = ⊥

{G : Type u_1}
[Group G]
{H : Subgroup G}


theorem edist_congr {w x y z : α} (hl : edist w x = 0) (hr : edist y z = 0) :
    edist w y = edist x z

{α : Type u}
[PseudoEMetricSpace α]
{w x y z : α}
(hl : edist w x = 0)
(hr : edist y z = 0)


theorem one_eq_mrange : (1 : AddSubmonoid R) = AddMonoidHom.mrange (Nat.castAddMonoidHom R)

1 = AddMonoidHom.mrange (Nat.castAddMonoidHom R)


theorem exists₃_congr {p q : ∀ a b, γ a b → Prop} (h : ∀ a b c, p a b c ↔ q a b c) :
    (∃ a b c, p a b c) ↔ ∃ a b c, q a b c

{p q : (a : α) → (b : β a) → γ a b → Prop}

(h : ∀ (a : α) (b : β a) (c : γ a b), p a b c ↔ q a b c)


/-- One implication of the portmanteau theorem:
Weak convergence of finite measures implies that the limsup of the measures of any closed set is
at most the measure of the closed set under the limit measure.
-/
theorem FiniteMeasure.limsup_measure_closed_le_of_tendsto {Ω ι : Type*} {L : Filter ι}
    [MeasurableSpace Ω] [TopologicalSpace Ω] [HasOuterApproxClosed Ω]
    [OpensMeasurableSpace Ω] {μ : FiniteMeasure Ω}
    {μs : ι → FiniteMeasure Ω} (μs_lim : Tendsto μs L (𝓝 μ)) {F : Set Ω} (F_closed : IsClosed F) :
    (L.limsup fun i => (μs i : Measure Ω) F) ≤ (μ : Measure Ω) F

{μs : ι → MeasureTheory.FiniteMeasure Ω}

Filter.limsup (fun i => ↑(μs i) F) L ≤ ↑μ F


protected theorem coe_pow (x : S) (n : ℕ) : (↑(x ^ n : S) : L) = (x : L) ^ n

{K : Type u_1}
{L : Type u_2}
[Field K]
[Field L]
[Algebra K L]
(S : IntermediateField K L)
(x : ↥S)
(n : ℕ)


lemma antidiagonal_eq_image' (n : ℕ) :
    antidiagonal n = (range (n + 1)).image fun i ↦ (n - i, i)

Finset.antidiagonal n = Finset.image (fun i => (n - i, i)) (Finset.range (n + 1))


@[simp]
theorem counitAlgHom_comp (f : F) :
    (counitAlgHom R B).comp (f : A →ₐ[R] B) = counitAlgHom R A

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

(Bialgebra.counitAlgHom R B).comp ↑f = Bialgebra.counitAlgHom R A


@[simp]
theorem coe_evalRingHom (r : R) : (evalRingHom r : R[X] → R) = eval r

⇑(Polynomial.evalRingHom r) = Polynomial.eval r


@[simp]
theorem reindex_comp_tprod (e : ι ≃ ι₂) :
    (reindex R s e).compMultilinearMap (tprod R) =
    (domDomCongrLinearEquiv' R R s _ e).symm (tprod R)

{ι : Type u_1}
{ι₂ : Type u_2}
{R : Type u_4}
[CommSemiring R]
{s : ι → Type u_7}
[(i : ι) → AddCommMonoid (s i)]
[(i : ι) → Module R (s i)]
(e : ι ≃ ι₂)

(↑(PiTensorProduct.reindex R s e)).compMultilinearMap (PiTensorProduct.tprod R) =
  (MultilinearMap.domDomCongrLinearEquiv' R R s (PiTensorProduct R fun i => s (e.symm i)) e).symm
    (PiTensorProduct.tprod R)


theorem Multiset.sum_smul_sum {s : Multiset R} {t : Multiset M} :
    s.sum • t.sum = ((s ×ˢ t).map fun p : R × M ↦ p.fst • p.snd).sum

{R : Type u_5}
{M : Type u_6}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{s : Multiset R}
{t : Multiset M}

s.sum • t.sum = (Multiset.map (fun p => p.1 • p.2) (s ×ˢ t)).sum


lemma cfcHom_nonneg_iff {a : A} (ha : p a) {f : C(spectrum R a, R)} :
    0 ≤ cfcHom ha f ↔ 0 ≤ f

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


@[simp]
lemma stalkMap_id (X : LocallyRingedSpace.{u}) (x : X) :
    (𝟙 X : X ⟶ X).stalkMap x = 𝟙 (X.presheaf.stalk x)

AlgebraicGeometry.LocallyRingedSpace.Hom.stalkMap (𝟙 X) x = 𝟙 (X.presheaf.stalk x)


theorem StrictMonoOn.cmp_map_eq (hf : StrictMonoOn f s) (hx : x ∈ s) (hy : y ∈ s) :
    cmp (f x) (f y) = cmp x y

{α : Type u}
{β : Type v}
[LinearOrder α]
[LinearOrder β]
{f : α → β}
{s : Set α}
{x y : α}
(hf : StrictMonoOn f s)
(hx : x ∈ s)
(hy : y ∈ s)


/-- `Matrix.diagonal` as an `AlgHom`. -/
@[simps]
def diagonalAlgHom : (n → α) →ₐ[R] Matrix n n α

{n : Type u_3}
(R : Type u_7)
{α : Type v}
[Fintype n]
[DecidableEq n]
[CommSemiring R]
[Semiring α]
[Algebra R α]
(d : n → α)

(Matrix.diagonalAlgHom R) d = Matrix.diagonal d


@[simp]
theorem compRight_apply (B : BilinForm R M) (f : M →ₗ[R] M) (v w) : B.compRight f v w = B v (f w)

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
(B : LinearMap.BilinForm R M)
(f : M →ₗ[R] M)
(v w : M)


lemma injective_stoneCechUnit_of_t35Space [T35Space X] :
    Function.Injective (stoneCechUnit : X → StoneCech X)

{X : Type u}
[TopologicalSpace X]
[T1Space X]
[T35Space X]


@[simp]
theorem nonempty_sum : Nonempty (α ⊕ β) ↔ Nonempty α ∨ Nonempty β


/-- Two constant continuous maps with nonempty domain are homotopic if and only if their values are
joined by a path in the codomain. -/
@[simp]
theorem ContinuousMap.homotopic_const_iff [Nonempty Y] :
    (ContinuousMap.const Y x₀).Homotopic (ContinuousMap.const Y x₁) ↔ Joined x₀ x₁

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
{x₀ x₁ : X}
[Nonempty Y]


theorem corec_def (f : α → β) (g : α → α) (a : α) : corec f g a = map f (iterate g a)

{α : Type u}
{β : Type v}
(f : α → β)
(g : α → α)
(a : α)

Stream'.corec f g a = Stream'.map f (Stream'.iterate g a)


theorem isBigO_norm_norm : ((fun x => ‖f' x‖) =O[l] fun x => ‖g' x‖) ↔ f' =O[l] g'

{α : Type u_1}
{E' : Type u_6}
{F' : Type u_7}
[SeminormedAddCommGroup E']
[SeminormedAddCommGroup F']
{f' : α → E'}
{g' : α → F'}
{l : Filter α}


theorem translationNumber_eq_of_tendsto_aux {τ' : ℝ} (h : Tendsto f.transnumAuxSeq atTop (𝓝 τ')) :
    τ f = τ'

(h : Filter.Tendsto f.transnumAuxSeq Filter.atTop (𝓝 τ'))


theorem vecMulVec_eq [Mul α] [AddCommMonoid α] [Unique ι] (w : m → α) (v : n → α) :
    vecMulVec w v = col ι w * row ι v

{m : Type u_2}
{n : Type u_3}
{α : Type v}
(ι : Type u_6)
[Mul α]
[AddCommMonoid α]
[Unique ι]
(w : m → α)
(v : n → α)

Matrix.vecMulVec w v = Matrix.col ι w * Matrix.row ι v


theorem naturality_apply {X Y : C} (i : G.obj X ⟶ G.obj Y) (x) :
    ℱ'.1.map i.op (α.app _ x) = α.app _ (ℱ.map i.op x)

{K : CategoryTheory.GrothendieckTopology D}

{ℱ : CategoryTheory.Functor Dᵒᵖ (Type v)}

ℱ'.val.map i.op (α.app (Opposite.op Y) x) = α.app (Opposite.op X) (ℱ.map i.op x)


@[simp]
theorem id_left : (𝟙 X : CommaMorphism X X).left = 𝟙 X.left

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

(CategoryTheory.CategoryStruct.id X).left = CategoryTheory.CategoryStruct.id X.left


theorem le_of_not_ge {a b : α} : ¬a ≥ b → a ≤ b

¬a ≥ b → a ≤ b


theorem restrictSupport_mono {s t : Set (σ →₀ ℕ)} (h : s ⊆ t) :
    restrictSupport R s ≤ restrictSupport R t

{σ : Type u}
(R : Type v)
[CommSemiring R]
{s t : Set (σ →₀ ℕ)}
(h : s ⊆ t)

MvPolynomial.restrictSupport R s ≤ MvPolynomial.restrictSupport R t


lemma map'_eq_hom₁ (F : ComposableArrows C 1) : F.map' 0 1 = F.hom

(F : CategoryTheory.ComposableArrows C 1)


/-- A half-braiding on `X : C` is a family of isomorphisms `X ⊗ U ≅ U ⊗ X`,
monoidally natural in `U : C`.

Thinking of `C` as a 2-category with a single `0`-morphism, these are the same as natural
transformations (in the pseudo- sense) of the identity 2-functor on `C`, which send the unique
`0`-morphism to `X`.
-/
-- @[nolint has_nonempty_instance] -- Porting note(#5171): This linter does not exist yet.
structure HalfBraiding (X : C) where
  β : ∀ U, X ⊗ U ≅ U ⊗ X
  monoidal : ∀ U U', (β (U ⊗ U')).hom =
      (α_ _ _ _).inv ≫
        ((β U).hom ▷ U') ≫ (α_ _ _ _).hom ≫ (U ◁ (β U').hom) ≫ (α_ _ _ _).inv := by
    aesop_cat
  naturality : ∀ {U U'} (f : U ⟶ U'), (X ◁ f) ≫ (β U').hom = (β U).hom ≫ (f ▷ X) := by
    aesop_cat

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

(self.β (U ⊗ U')).hom = (α_ X U U').inv ≫ (self.β U).hom ▷ U' ≫ (α_ U X U').hom ≫ U ◁ (self.β U').hom ≫ (α_ U U' X).inv


@[simp]
theorem apply_one (F : Homotopy f₀ f₁) (x : X) : F (1, x) = f₁ x

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
{f₀ f₁ : C(X, Y)}
(F : f₀.Homotopy f₁)
(x : X)


/-- A monoid homomorphism (a bundled morphism of a type that implements `MonoidHomClass`) from a
topological group to a topological monoid is continuous provided that it is continuous at one. See
also `uniformContinuous_of_continuousAt_one`. -/
@[to_additive
  "An additive monoid homomorphism (a bundled morphism of a type that implements
  `AddMonoidHomClass`) from an additive topological group to an additive topological monoid is
  continuous provided that it is continuous at zero. See also
  `uniformContinuous_of_continuousAt_zero`."]
theorem continuous_of_continuousAt_one {M hom : Type*} [MulOneClass M] [TopologicalSpace M]
    [ContinuousMul M] [FunLike hom G M] [MonoidHomClass hom G M] (f : hom)
    (hf : ContinuousAt f 1) :
    Continuous f

{G : Type w}
[TopologicalSpace G]
[AddGroup G]
[TopologicalAddGroup G]
{M : Type u_1}
{hom : Type u_2}
[AddZeroClass M]
[TopologicalSpace M]
[ContinuousAdd M]
[FunLike hom G M]
[AddMonoidHomClass hom G M]
(f : hom)
(hf : ContinuousAt (⇑f) 0)


protected theorem inter {s' t'} (h : e.IsImage s t) (h' : e.IsImage s' t') :
    e.IsImage (s ∩ s') (t ∩ t')

{X : Type u_1}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
{e : PartialHomeomorph X Y}
{s : Set X}
{t : Set Y}
{s' : Set X}
{t' : Set Y}
(h : e.IsImage s t)
(h' : e.IsImage s' t')


theorem surjective_unpair : Surjective unpair


/-- Precomposing by an isomorphism does not change the image subobject. -/
theorem imageSubobject_iso_comp [HasEqualizers C] {X' : C} (h : X' ⟶ X) [IsIso h] (f : X ⟶ Y)
    [HasImage f] : imageSubobject (h ≫ f) = imageSubobject f

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

CategoryTheory.Limits.imageSubobject (h ≫ f) = CategoryTheory.Limits.imageSubobject f


/-- A set `s` is nonempty if the product of some function over `s` is not equal to `1`. -/
@[to_additive "A set `s` is nonempty if the sum of some function over `s` is not equal to `0`."]
theorem nonempty_of_finprod_mem_ne_one (h : ∏ᶠ i ∈ s, f i ≠ 1) : s.Nonempty

{α : Type u_1}
{M : Type u_5}
[CommMonoid M]
{f : α → M}
{s : Set α}
(h : ∏ᶠ (i : α) (_ : i ∈ s), f i ≠ 1)


theorem eq_empty_of_isEmpty [IsEmpty α] (s : Set α) : s = ∅


theorem incMatrix_apply_mul_incMatrix_apply_of_not_adj (hab : a ≠ b) (h : ¬G.Adj a b) :
    G.incMatrix R a e * G.incMatrix R b e = 0

{R : Type u_1}
{α : Type u_2}
(G : SimpleGraph α)
[MulZeroOneClass R]
{a b : α}
{e : Sym2 α}
(hab : a ≠ b)
(h : ¬G.Adj a b)

SimpleGraph.incMatrix R G a e * SimpleGraph.incMatrix R G b e = 0


@[continuity]
theorem continuous_toFun (t : τ) : Continuous (ϕ.toFun t)

{τ : Type u_1}
[AddCommGroup τ]
[TopologicalSpace τ]
[TopologicalAddGroup τ]
{α : Type u_2}
[TopologicalSpace α]
(ϕ : Flow τ α)
(t : τ)


theorem lowerClosure_min (h : s ⊆ t) (ht : IsLowerSet t) : ↑(lowerClosure s) ⊆ t

{α : Type u_1}
[Preorder α]
{s t : Set α}
(h : s ⊆ t)
(ht : IsLowerSet t)


@[simp]
theorem id_onTerm : ((LHom.id L).onTerm : L.Term α → L.Term α) = id

(FirstOrder.Language.LHom.id L).onTerm = id


@[to_additive]
theorem contMDiffOn_one [One M'] : ContMDiffOn I I' n (1 : M → M') 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 : ℕ∞}
[One M']


/-- The left adjoint of evaluation. -/
@[simps]
def evaluationLeftAdjoint (c : C) : D ⥤ C ⥤ D

[∀ (a b : C), CategoryTheory.Limits.HasCoproductsOfShape (a ⟶ b) D]

∀ {X Y : C} (f : X ⟶ Y),
  ((CategoryTheory.evaluationLeftAdjoint D c).obj d).map f =
    CategoryTheory.Limits.Sigma.desc fun g =>
      CategoryTheory.Limits.Sigma.ι (fun x => d) (CategoryTheory.CategoryStruct.comp g f)


@[simp]
theorem logb_lt_logb_iff (hx : 0 < x) (hy : 0 < y) : logb b x < logb b y ↔ x < y


theorem _root_.ClosedEmbedding.integral_map {β} [TopologicalSpace α] [BorelSpace α]
    [TopologicalSpace β] [MeasurableSpace β] [BorelSpace β] {φ : α → β} (hφ : ClosedEmbedding φ)
    (f : β → G) : ∫ y, f y ∂Measure.map φ μ = ∫ x, f (φ x) ∂μ

{α : Type u_1}
{G : Type u_5}
[NormedAddCommGroup G]
[NormedSpace ℝ G]
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{β : Type u_7}
[TopologicalSpace α]
[BorelSpace α]
[TopologicalSpace β]
[MeasurableSpace β]
[BorelSpace β]
{φ : α → β}
(hφ : ClosedEmbedding φ)
(f : β → G)

∫ (y : β), f y ∂MeasureTheory.Measure.map φ μ = ∫ (x : α), f (φ x) ∂μ


@[to_additive]
theorem hasProd_of_isLUB [CanonicallyLinearOrderedCommMonoid α] [TopologicalSpace α]
    [OrderTopology α] {f : ι → α} (b : α) (hf : IsLUB (Set.range fun s ↦ ∏ i ∈ s, f i) b) :
    HasProd f b

(hf : IsLUB (Set.range fun s => ∏ i ∈ s, f i) b)


theorem symm_bijective : Function.Bijective (Homotopy.symm : Homotopy p₀ p₁ → Homotopy p₁ p₀)

{X : Type u}
[TopologicalSpace X]
{x₀ x₁ : X}
{p₀ p₁ : Path x₀ x₁}


@[to_additive]
theorem smul_subset_smul_right : s₁ ⊆ s₂ → s₁ • t ⊆ s₂ • t

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

s₁ ⊆ s₂ → s₁ • t ⊆ s₂ • t


@[to_additive]
theorem norm_div_rev (a b : E) : ‖a / b‖ = ‖b / a‖

{E : Type u_6}
[SeminormedAddGroup E]
(a b : E)


theorem ofReal_setIntegral_one {X : Type*} {_ : MeasurableSpace X} (μ : Measure X)
    [IsFiniteMeasure μ] (s : Set X) : ENNReal.ofReal (∫ _ in s, (1 : ℝ) ∂μ) = μ s

∀ {x : MeasurableSpace X} (μ : MeasureTheory.Measure X) [inst : MeasureTheory.IsFiniteMeasure μ] (s : Set X),
  ENNReal.ofReal (∫ (x : X) in s, 1 ∂μ) = μ s


theorem image_univ_of_surjective {ι : Type*} {f : ι → β} (H : Surjective f) : f '' univ = univ

{β : Type u_2}
{ι : Type u_6}
{f : ι → β}
(H : Function.Surjective f)


theorem sub_toAdd {n} (x y : BitVec n) : x - y = x + - y


theorem CovBy.of_image (f : α ↪o β) (h : f a ⋖ f b) : a ⋖ b

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
{a b : α}
(f : α ↪o β)
(h : f a ⋖ f b)


/-- A triangulated category is a pretriangulated category which satisfies
the octahedron axiom (TR 4), see https://stacks.math.columbia.edu/tag/05QK -/
class IsTriangulated : Prop where
  /-- the octahedron axiom (TR 4) -/
  octahedron_axiom :
    ∀ {X₁ X₂ X₃ Z₁₂ Z₂₃ Z₁₃ : C}
      {u₁₂ : X₁ ⟶ X₂} {u₂₃ : X₂ ⟶ X₃} {u₁₃ : X₁ ⟶ X₃} (comm : u₁₂ ≫ u₂₃ = u₁₃)
      {v₁₂ : X₂ ⟶ Z₁₂} {w₁₂ : Z₁₂ ⟶ X₁⟦(1 : ℤ)⟧} (h₁₂ : Triangle.mk u₁₂ v₁₂ w₁₂ ∈ distTriang C)
      {v₂₃ : X₃ ⟶ Z₂₃} {w₂₃ : Z₂₃ ⟶ X₂⟦(1 : ℤ)⟧} (h₂₃ : Triangle.mk u₂₃ v₂₃ w₂₃ ∈ distTriang C)
      {v₁₃ : X₃ ⟶ Z₁₃} {w₁₃ : Z₁₃ ⟶ X₁⟦(1 : ℤ)⟧} (h₁₃ : Triangle.mk u₁₃ v₁₃ w₁₃ ∈ distTriang C),
      Nonempty (Octahedron comm h₁₂ h₂₃ h₁₃)

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

[self : CategoryTheory.IsTriangulated C]

(comm : CategoryTheory.CategoryStruct.comp u₁₂ u₂₃ = u₁₃)

{v₁₂ : X₂ ⟶ Z₁₂}

{w₁₂ : Z₁₂ ⟶ (CategoryTheory.shiftFunctor C 1).obj X₁}

(h₁₂ : CategoryTheory.Pretriangulated.Triangle.mk u₁₂ v₁₂ w₁₂ ∈ CategoryTheory.Pretriangulated.distinguishedTriangles)

{v₂₃ : X₃ ⟶ Z₂₃}

{w₂₃ : Z₂₃ ⟶ (CategoryTheory.shiftFunctor C 1).obj X₂}

(h₂₃ : CategoryTheory.Pretriangulated.Triangle.mk u₂₃ v₂₃ w₂₃ ∈ CategoryTheory.Pretriangulated.distinguishedTriangles)

{v₁₃ : X₃ ⟶ Z₁₃}

{w₁₃ : Z₁₃ ⟶ (CategoryTheory.shiftFunctor C 1).obj X₁}

(h₁₃ : CategoryTheory.Pretriangulated.Triangle.mk u₁₃ v₁₃ w₁₃ ∈ CategoryTheory.Pretriangulated.distinguishedTriangles)

Nonempty (CategoryTheory.Triangulated.Octahedron comm h₁₂ h₂₃ h₁₃)


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

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


@[simp]
theorem isRightRegular_star_iff [Mul R] [StarMul R] {x : R} :
    IsRightRegular (star x) ↔ IsLeftRegular x

{R : Type u}
[Mul R]
[StarMul R]
{x : R}


protected theorem image_eq_preimage (e : M₁ ≃SL[σ₁₂] M₂) (s : Set M₁) : e '' s = e.symm ⁻¹' s

{R₁ : Type u_1}
{R₂ : Type u_2}
[Semiring R₁]
[Semiring R₂]
{σ₁₂ : R₁ →+* R₂}
{σ₂₁ : R₂ →+* R₁}
[RingHomInvPair σ₁₂ σ₂₁]
[RingHomInvPair σ₂₁ σ₁₂]
{M₁ : Type u_4}
[TopologicalSpace M₁]
[AddCommMonoid M₁]
{M₂ : Type u_6}
[TopologicalSpace M₂]
[AddCommMonoid M₂]
[Module R₁ M₁]
[Module R₂ M₂]
(e : M₁ ≃SL[σ₁₂] M₂)
(s : Set M₁)


lemma map_eq_of_map_eq {X Y : C}
    (φ₁ φ₂ : W.LeftFraction X Y) {E : Type*} [Category E]
    (L₁ : C ⥤ D) (L₂ : C ⥤ E) [L₁.IsLocalization W] [L₂.IsLocalization W]
    (h : φ₁.map L₁ (Localization.inverts L₁ W) = φ₂.map L₁ (Localization.inverts L₁ W)) :
    φ₁.map L₂ (Localization.inverts L₂ W) = φ₂.map L₂ (Localization.inverts L₂ W)

{C : Type u_1}
{D : Type u_2}
[CategoryTheory.Category.{u_4, u_1} C]
[CategoryTheory.Category.{u_6, u_2} D]
{W : CategoryTheory.MorphismProperty C}
{X Y : C}
(φ₁ φ₂ : W.LeftFraction X Y)
{E : Type u_3}
[CategoryTheory.Category.{u_5, u_3} E]
(L₁ : CategoryTheory.Functor C D)
(L₂ : CategoryTheory.Functor C E)
[L₁.IsLocalization W]
[L₂.IsLocalization W]
(h : φ₁.map L₁ ⋯ = φ₂.map L₁ ⋯)


@[simp]
theorem lift_inj {a b : Cardinal.{u}} : lift.{v, u} a = lift.{v, u} b ↔ a = b

Cardinal.lift.{v, u} a = Cardinal.lift.{v, u} b ↔ a = b


@[simp]
theorem abs_abs (z : ℂ) : |Complex.abs z| = Complex.abs z


/-- The inclusion of the Moore complex in the alternating face map complex
is a homotopy equivalence -/
@[simps]
def homotopyEquivNormalizedMooreComplexAlternatingFaceMapComplex {A : Type*} [Category A]
    [Abelian A] {Y : SimplicialObject A} :
    HomotopyEquiv ((normalizedMooreComplex A).obj Y) ((alternatingFaceMapComplex A).obj Y)

{A : Type u_2}
[CategoryTheory.Category.{u_3, u_2} A]
[CategoryTheory.Abelian A]
{Y : CategoryTheory.SimplicialObject A}

AlgebraicTopology.DoldKan.homotopyEquivNormalizedMooreComplexAlternatingFaceMapComplex.inv =
  AlgebraicTopology.DoldKan.PInftyToNormalizedMooreComplex Y


theorem eq_bot_of_finrank_one (h : finrank F S = 1) [Module.Free F S] : S = ⊥

(h : FiniteDimensional.finrank F ↥S = 1)


@[simp]
theorem liftRingHom_apply_div' {L : Type*} [Field L] (φ : K[X] →+* L) (hφ : K[X]⁰ ≤ L⁰.comap φ)
    (p q : K[X]) : liftRingHom φ hφ (algebraMap _ _ p) / liftRingHom φ hφ (algebraMap _ _ q) =
      φ p / φ q

{K : Type u}
[CommRing K]
[IsDomain K]
{L : Type u_1}
[Field L]
(φ : K[X] →+* L)
(hφ : K[X]⁰ ≤ Submonoid.comap φ L⁰)
(p q : K[X])

(RatFunc.liftRingHom φ hφ) ((algebraMap K[X] (RatFunc K)) p) /
    (RatFunc.liftRingHom φ hφ) ((algebraMap K[X] (RatFunc K)) q) =
  φ p / φ q


/-- If `L₁ : C₁ ⥤ D₁` is a localization functor for `W₁ : MorphismProperty C₁`, then if we
transport this functor `L₁` via equivalences `C₁ ≌ C₂` and `D₁ ≌ D₂` to get a functor
`L₂ : C₂ ⥤ D₂`, then `L₂` is also a localization functor for
a suitable `W₂ : MorphismProperty C₂`. -/
lemma of_equivalences (L₁ : C₁ ⥤ D₁) (W₁ : MorphismProperty C₁) [L₁.IsLocalization W₁]
    (L₂ : C₂ ⥤ D₂) (W₂ : MorphismProperty C₂)
    (E : C₁ ≌ C₂) (E' : D₁ ≌ D₂) [CatCommSq E.functor L₁ L₂ E'.functor]
    (hW₁ : W₁ ≤ W₂.isoClosure.inverseImage E.functor) (hW₂ : W₂.IsInvertedBy L₂) :
    L₂.IsLocalization W₂

(W₁ : CategoryTheory.MorphismProperty C₁)

(W₂ : CategoryTheory.MorphismProperty C₂)

[CategoryTheory.CatCommSq E.functor L₁ L₂ E'.functor]


@[to_additive]
theorem prod_univ_five [CommMonoid β] (f : Fin 5 → β) :
    ∏ i, f i = f 0 * f 1 * f 2 * f 3 * f 4

{β : Type u_2}
[AddCommMonoid β]
(f : Fin 5 → β)


theorem integral_comp_L1_comm (L : E →L[𝕜] F) (φ : X →₁[μ] E) :
    ∫ x, L (φ x) ∂μ = L (∫ x, φ x ∂μ)

{X : Type u_1}
{E : Type u_3}
{F : Type u_4}
[MeasurableSpace X]
{μ : MeasureTheory.Measure X}
{𝕜 : Type u_5}
[RCLike 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[NormedSpace ℝ F]
[CompleteSpace F]
[NormedSpace ℝ E]
[CompleteSpace E]
(L : E →L[𝕜] F)
(φ : ↥(MeasureTheory.Lp E 1 μ))

∫ (x : X), L (↑↑φ x) ∂μ = L (∫ (x : X), ↑↑φ x ∂μ)


@[reassoc (attr := simp)]
lemma rotateHomotopyEquiv_comm₃ :
    (rotateHomotopyEquiv φ).hom ≫ (triangle (inr φ)).mor₃ = -φ⟦1⟧'

(CochainComplex.mappingCone.rotateHomotopyEquiv φ).hom ≫
    (CochainComplex.mappingCone.triangle (CochainComplex.mappingCone.inr φ)).mor₃ =
  -(CategoryTheory.shiftFunctor (CochainComplex C ℤ) 1).map φ


theorem intentClosure_swap (t : Set β) : intentClosure (swap r) t = extentClosure r t

{α : Type u_2}
{β : Type u_3}
(r : α → β → Prop)
(t : Set β)

intentClosure (Function.swap r) t = extentClosure r t


protected theorem Adj.ne' {G : SimpleGraph V} {a b : V} (h : G.Adj a b) : b ≠ a

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


/-- `ContDiffBump` is `𝒞ⁿ` in all its arguments. -/
protected nonrec theorem _root_.ContDiffAt.contDiffBump {c g : X → E} {f : ∀ x, ContDiffBump (c x)}
    {x : X} (hc : ContDiffAt ℝ n c x) (hr : ContDiffAt ℝ n (fun x => (f x).rIn) x)
    (hR : ContDiffAt ℝ n (fun x => (f x).rOut) x) (hg : ContDiffAt ℝ n g x) :
    ContDiffAt ℝ n (fun x => f x (g x)) x

ContDiffAt ℝ n (fun x => ↑(f x) (g x)) x


/-- `AnalyticAt.comp` for functions on product spaces -/
theorem AnalyticAt.comp₂ {h : F × G → H} {f : E → F} {g : E → G} {x : E}
    (ha : AnalyticAt 𝕜 h (f x, g x)) (fa : AnalyticAt 𝕜 f x)
    (ga : AnalyticAt 𝕜 g x) :
    AnalyticAt 𝕜 (fun x ↦ h (f x, g x)) x

{𝕜 : Type u_2}
[NontriviallyNormedField 𝕜]
{E : Type u_3}
{F : Type u_4}
{G : Type u_5}
{H : Type u_6}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
[NormedAddCommGroup H]
[NormedSpace 𝕜 H]
{h : F × G → H}
{f : E → F}
{g : E → G}
{x : E}
(ha : AnalyticAt 𝕜 h (f x, g x))
(fa : AnalyticAt 𝕜 f x)
(ga : AnalyticAt 𝕜 g x)


@[simp]
theorem coe_pointwise_smul (m : R') (S : Subalgebra R A) : ↑(m • S) = m • (S : Set A)

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[Semiring A]
[Algebra R A]
{R' : Type u_3}
[Semiring R']
[MulSemiringAction R' A]
[SMulCommClass R' R A]
(m : R')
(S : Subalgebra R A)


@[simp]
theorem leftComm_tmul (m : M) (n : N) (p : P) : leftComm R M N P (m ⊗ₜ (n ⊗ₜ p)) = n ⊗ₜ (m ⊗ₜ p)

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

(TensorProduct.leftComm R M N P) (m ⊗ₜ[R] n ⊗ₜ[R] p) = n ⊗ₜ[R] m ⊗ₜ[R] p


@[simp, norm_cast] lemma coe_eq_empty : L = (∅ : Set α) ↔ L = ⊥

{α : Type u_2}
[Lattice α]
{L : Sublattice α}

↑L = ∅ ↔ L = ⊥


/-- The power basis `1, root g, ..., root g ^ (d - 1)` for `AdjoinRoot g`,
where `g` is a monic polynomial of degree `d`. -/
@[simps]
def powerBasis' (hg : g.Monic) : PowerBasis R (AdjoinRoot g)

{R : Type u}
[CommRing R]
{g : R[X]}
(hg : g.Monic)

(AdjoinRoot.powerBasis' hg).dim = g.natDegree


@[simp]
theorem coe_top : ((⊤ : NonUnitalStarSubalgebra R A) : Set A) = Set.univ

{R : Type u}
{A : Type v}
[CommSemiring R]
[StarRing R]
[NonUnitalSemiring A]
[StarRing A]
[Module R A]
[IsScalarTower R A A]
[SMulCommClass R A A]
[StarModule R A]


@[to_additive (attr := simp)]
theorem add_apply (x : E) : (p + q) x = p x + q x

{E : Type u_4}
[Group E]
(p q : GroupSeminorm E)
(x : E)


@[trans]
theorem IsBigO.trans_isEquivalent {f : α → β₂} {g₁ g₂ : α → β} (h : f =O[l] g₁) (h₂ : g₁ ~[l] g₂) :
    f =O[l] g₂

{α : Type u_1}
{β : Type u_2}
{β₂ : Type u_3}
[NormedAddCommGroup β]
[Norm β₂]
{l : Filter α}
{f : α → β₂}
{g₁ g₂ : α → β}
(h : f =O[l] g₁)
(h₂ : g₁ ~[l] g₂)


theorem norm_sub (h : SameRay ℝ x y) : ‖x - y‖ = |‖x‖ - ‖y‖|

{E : Type u_1}
[SeminormedAddCommGroup E]
[NormedSpace ℝ E]
{x y : E}
(h : SameRay ℝ x y)


theorem transnumAuxSeq_def : f.transnumAuxSeq = fun n : ℕ => (f ^ (2 ^ n : ℕ)) 0 / 2 ^ n

f.transnumAuxSeq = fun n => (f ^ 2 ^ n) 0 / 2 ^ n


/-- The type of `1`-hypercovers of an object `S : C` in a category equipped with a
Grothendieck topology `J`. This can be constructed from a covering of `S` and
a covering of the fibre products of the objects in this covering (see `OneHypercover.mk'`). -/
structure OneHypercover (S : C) extends PreOneHypercover.{w} S where
  mem₀ : toPreOneHypercover.sieve₀ ∈ J S
  mem₁ (i₁ i₂ : I₀) ⦃W : C⦄ (p₁ : W ⟶ X i₁) (p₂ : W ⟶ X i₂) (w : p₁ ≫ f i₁ = p₂ ≫ f i₂) :
    toPreOneHypercover.sieve₁ p₁ p₂ ∈ J W

{J : CategoryTheory.GrothendieckTopology C}


theorem mul_apply_right (f g : MonoidAlgebra k G) (x : G) :
    (f * g) x = g.sum fun a b => f (x * a⁻¹) * b

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

(f * g) x = Finsupp.sum g fun a b => f (x * a⁻¹) * b


theorem degree_eq_one_of_irreducible_of_root (hi : Irreducible p) {x : R} (hx : IsRoot p x) :
    degree p = 1

{R : Type u}
[CommRing R]
[IsDomain R]
{p : R[X]}
(hi : Irreducible p)
{x : R}
(hx : p.IsRoot x)


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

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

(S : CategoryTheory.Triangulated.Subcategory C)

(T : CategoryTheory.Pretriangulated.Triangle C)

(hT : T ∈ CategoryTheory.Pretriangulated.distinguishedTriangles)


theorem Monic.mul_right_ne_zero (hp : Monic p) {q : R[X]} (hq : q ≠ 0) : p * q ≠ 0

{R : Type u}
[Semiring R]
{p : R[X]}
(hp : p.Monic)
{q : R[X]}
(hq : q ≠ 0)


theorem Adhesive.isPullback_of_isPushout_of_mono_left [Adhesive C] (H : IsPushout f g h i)
    [Mono f] : IsPullback f g h i

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


@[simp]
theorem preimage_mul_const_Ioo_of_neg (a b : α) {c : α} (h : c < 0) :
    (fun x => x * c) ⁻¹' Ioo a b = Ioo (b / c) (a / c)

{α : Type u_1}
[LinearOrderedField α]
(a b : α)
{c : α}
(h : c < 0)

(fun x => x * c) ⁻¹' Set.Ioo a b = Set.Ioo (b / c) (a / c)


theorem restrict_Ioi_eq_restrict_Ici : μ.restrict (Ioi a) = μ.restrict (Ici a)

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[MeasureTheory.NoAtoms μ]
[PartialOrder α]
{a : α}

μ.restrict (Set.Ioi a) = μ.restrict (Set.Ici a)


@[simp]
theorem neighborSet_snd_subgraphOfAdj {v w : V} (hvw : G.Adj v w) :
    (G.subgraphOfAdj hvw).neighborSet w = {v}

{V : Type u}
{G : SimpleGraph V}
{v w : V}
(hvw : G.Adj v w)


/-- Promote `AdjoinRoot.quotAdjoinRootEquivQuotPolynomialQuot` to an alg_equiv.  -/
@[simps!]
noncomputable def quotEquivQuotMap (f : R[X]) (I : Ideal R) :
    (AdjoinRoot f ⧸ Ideal.map (of f) I) ≃ₐ[R]
      (R ⧸ I)[X] ⧸ Ideal.span ({Polynomial.map (Ideal.Quotient.mk I) f} : Set (R ⧸ I)[X])

(a : (R ⧸ I)[X] ⧸ Ideal.span {Polynomial.map (Ideal.Quotient.mk I) f})

(AdjoinRoot.quotEquivQuotMap f I).symm a = (AdjoinRoot.quotAdjoinRootEquivQuotPolynomialQuot I f).symm a


{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}


@[to_additive]
theorem apply_abs_le_mul_of_one_le' {β : Type*} [MulOneClass β] [Preorder β]
    [CovariantClass β β (· * ·) (· ≤ ·)] [CovariantClass β β (swap (· * ·)) (· ≤ ·)] {f : α → β}
    {a : α} (h₁ : 1 ≤ f a) (h₂ : 1 ≤ f (-a)) : f |a| ≤ f a * f (-a)

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

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


theorem map_fract (f : F) (hf : StrictMono f) (a : α) : fract (f a) = f (fract a)

{F : Type u_1}
{α : Type u_2}
{β : Type u_3}
[LinearOrderedRing α]
[LinearOrderedRing β]
[FloorRing α]
[FloorRing β]
[FunLike F α β]
[RingHomClass F α β]
(f : F)
(hf : StrictMono ⇑f)
(a : α)


@[to_additive] lemma prod_reverse (l : List M) : prod l.reverse = prod l

{M : Type u_4}
[CommMonoid M]
(l : List M)


/-- Construct an object of the category `(F ↓ Δ)` from a cocone on `F`. This is part of an
    equivalence, see `Cocone.equivStructuredArrow`. -/
@[simps]
def Cocone.toStructuredArrow (F : J ⥤ C) : Cocone F ⥤ StructuredArrow F (const J)

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

(CategoryTheory.Limits.Cocone.toStructuredArrow F).obj c = CategoryTheory.StructuredArrow.mk c.ι


@[simp]
theorem coeSubtype : (subtype s : s → A) = ((↑) : s → A)

{S : Type u_1}
{R : Type u_2}
{A : Type u_3}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[Module R A]
[SetLike S A]
[NonUnitalSubsemiringClass S A]
[hSR : SMulMemClass S R A]
(s : S)

⇑(NonUnitalSubalgebraClass.subtype s) = Subtype.val


theorem measure_diff_left (h : AEDisjoint μ s t) : μ (s \ t) = μ s

{α : Type u_2}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s t : Set α}
(h : MeasureTheory.AEDisjoint μ s t)


theorem append_stream_head_tail (s : Stream' α) : [head s] ++ₛ tail s = s


theorem lt_of_lt_of_incomp {α : Sort u} {lt : α → α → Prop} [IsStrictWeakOrder α lt]
    [DecidableRel lt] : ∀ {a b c}, lt a b → ¬lt b c ∧ ¬lt c b → lt a c

{α : Sort u}
{lt : α → α → Prop}
[IsStrictWeakOrder α lt]
[DecidableRel lt]
{a b c : α}


lemma epi₂ (h : T.mor₃ = 0) : Epi T.mor₂

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

(T : CategoryTheory.Pretriangulated.Triangle C)

(hT : T ∈ CategoryTheory.Pretriangulated.distinguishedTriangles)


/-- A fundamental solution has positive `x`. -/
theorem x_pos {a : Solution₁ d} (h : IsFundamental a) : 0 < a.x

{d : ℤ}
{a : Pell.Solution₁ d}
(h : Pell.IsFundamental a)


lemma toLowerSet_le_iff {a b : α} : toLowerSet a ≤ toLowerSet b ↔ a ≤ b

Topology.WithLowerSet.toLowerSet a ≤ Topology.WithLowerSet.toLowerSet b ↔ a ≤ b


/-- An integral domain in which there is an irreducible element `p`
such that every nonzero element is associated to a power of `p` is a unique factorization domain.
See `DiscreteValuationRing.ofHasUnitMulPowIrreducibleFactorization`. -/
theorem toUniqueFactorizationMonoid : UniqueFactorizationMonoid R

(hR : DiscreteValuationRing.HasUnitMulPowIrreducibleFactorization R)


@[simp]
theorem ceil_sub_one (a : α) : ⌈a - 1⌉ = ⌈a⌉ - 1

{α : Type u_2}
[LinearOrderedRing α]
[FloorRing α]
(a : α)


@[to_additive]
theorem map_iSup {ι : Sort*} (f : M →ₙ* N) (s : ι → Subsemigroup M) :
    (iSup s).map f = ⨆ i, (s i).map f

{M : Type u_1}
{N : Type u_2}
[Add M]
[Add N]
{ι : Sort u_5}
(f : AddHom M N)
(s : ι → AddSubsemigroup M)

AddSubsemigroup.map f (iSup s) = ⨆ i, AddSubsemigroup.map f (s i)


@[simp]
theorem symm_refl : (RingEquiv.refl R).symm = RingEquiv.refl R


theorem quot_mk_eq_mk [Monoid α] (a : α) : Quot.mk Setoid.r a = Associates.mk a


@[simp]
theorem map_refl : map (OrderIso.refl α) = OrderIso.refl _

LowerSet.map (OrderIso.refl α) = OrderIso.refl (LowerSet α)


theorem map₂_comm (f : α → α → β) (comm : ∀ a₁ a₂, f a₁ a₂ = f a₂ a₁) :
    map₂ f xs ys = map₂ f ys xs

(f : α → α → β)

(comm : ∀ (a₁ a₂ : α), f a₁ a₂ = f a₂ a₁)

Mathlib.Vector.map₂ f xs ys = Mathlib.Vector.map₂ f ys xs


/-- Induction principle on a type with a `PredOrder` for all elements below a given element `m`. -/
@[elab_as_elim]
theorem Pred.rec {P : α → Prop} {m : α} (h0 : P m) (h1 : ∀ n, n ≤ m → P n → P (pred n)) ⦃n : α⦄
    (hmn : n ≤ m) : P n

{α : Type u_1}
[Preorder α]
[PredOrder α]
[IsPredArchimedean α]
{P : α → Prop}
{m : α}
(h0 : P m)
(h1 : ∀ n ≤ m, P n → P (Order.pred n))
⦃n : α⦄
(hmn : n ≤ m)


theorem image_Ioc (e : α ↪o β) (he : OrdConnected (range e)) (x y : α) :
    e '' Ioc x y = Ioc (e x) (e y)

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
(e : α ↪o β)
(he : (Set.range ⇑e).OrdConnected)
(x y : α)


@[simp]
theorem nonempty_prod : Nonempty (α × β) ↔ Nonempty α ∧ Nonempty β


@[simp]
theorem whiskerLeft (X : C) {Y Z : C} (f : Y ⟶ Z) : X ◁ f = Limits.prod.map (𝟙 X) f

CategoryTheory.MonoidalCategory.whiskerLeft X f = CategoryTheory.Limits.prod.map (CategoryTheory.CategoryStruct.id X) f


private theorem map_teichmullerFun (f : R →+* S) (r : R) :
    map f (teichmullerFun p r) = teichmullerFun p (f r)

(p : ℕ)
{R : Type u_1}
{S : Type u_2}
[hp : Fact (Nat.Prime p)]
[CommRing R]
[CommRing S]
(f : R →+* S)
(r : R)

(WittVector.map f) (WittVector.teichmullerFun p r) = WittVector.teichmullerFun p (f r)


@[simp]
lemma measure_compl_nullSet (h : μ ⟂ₘ ν) : ν h.nullSetᶜ = 0

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ ν : MeasureTheory.Measure α}
(h : μ ⟂ₘ ν)