theorem ContinuousAt.fin_insertNth {n} {π : Fin (n + 1) → Type*} [∀ i, TopologicalSpace (π i)]
    (i : Fin (n + 1)) {f : X → π i} {x : X} (hf : ContinuousAt f x)
    {g : X → ∀ j : Fin n, π (i.succAbove j)} (hg : ContinuousAt g x) :
    ContinuousAt (fun a => i.insertNth (f a) (g a)) x

[(i : Fin (n + 1)) → TopologicalSpace (π i)]

{g : X → (j : Fin n) → π (i.succAbove j)}


theorem preimage_frontier_subset_frontier_preimage (hf : IsOpenMap f) {s : Set Y} :
    f ⁻¹' frontier s ⊆ frontier (f ⁻¹' s)

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


@[simp]
theorem pred_lt_iff : pred a < b ↔ a ≤ b

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


/-- If `M` and `N` are linearly disjoint, if `M` is flat,
if any two elements of `↥(M ⊓ N)` are commutative, then the rank of `↥(M ⊓ N)` is at most one. -/
theorem rank_inf_le_one_of_commute_of_flat_left [Module.Flat R M]
    (hc : ∀ (m n : ↥(M ⊓ N)), Commute m.1 n.1) : Module.rank R ↥(M ⊓ N) ≤ 1

(hc : ∀ (m n : ↥(M ⊓ N)), Commute ↑m ↑n)


theorem DifferentiableWithinAt.clog {f : E → ℂ} {s : Set E} {x : E}
    (h₁ : DifferentiableWithinAt ℂ f s x) (h₂ : f x ∈ slitPlane) :
    DifferentiableWithinAt ℂ (fun t => log (f t)) s x

{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
{f : E → ℂ}
{s : Set E}
{x : E}
(h₁ : DifferentiableWithinAt ℂ f s x)
(h₂ : f x ∈ Complex.slitPlane)

DifferentiableWithinAt ℂ (fun t => Complex.log (f t)) s x


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

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


@[to_additive]
theorem subset_mul_right {s : Finset α} (t : Finset α) (hs : (1 : α) ∈ s) : t ⊆ s * t

{α : Type u_2}
[DecidableEq α]
[AddZeroClass α]
{s : Finset α}
(t : Finset α)
(hs : 0 ∈ s)


@[fun_prop]
theorem HasFDerivWithinAt.smul_const (hc : HasFDerivWithinAt c c' s x) (f : F) :
    HasFDerivWithinAt (fun y => c y • f) (c'.smulRight f) s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{x : E}
{s : Set E}
{𝕜' : Type u_6}
[NontriviallyNormedField 𝕜']
[NormedAlgebra 𝕜 𝕜']
[NormedSpace 𝕜' F]
[IsScalarTower 𝕜 𝕜' F]
{c : E → 𝕜'}
{c' : E →L[𝕜] 𝕜'}
(hc : HasFDerivWithinAt c c' s x)
(f : F)


@[simp]
theorem abs_ofNat [LinearOrderedRing α] (n : ℕ) [n.AtLeastTwo] :
    |(no_index (OfNat.ofNat n : α))| = OfNat.ofNat n

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


theorem fract_inv_num_lt_num_of_pos {q : ℚ} (q_pos : 0 < q) : (fract q⁻¹).num < q.num


theorem measure_iUnion_fintype_le [Fintype ι] (μ : F) (s : ι → Set α) :
    μ (⋃ i, s i) ≤ ∑ i, μ (s i)

{α : Type u_1}
{ι : Type u_2}
{F : Type u_3}
[FunLike F (Set α) ℝ≥0∞]
[MeasureTheory.OuterMeasureClass F α]
[Fintype ι]
(μ : F)
(s : ι → Set α)


@[simp]
theorem cardinal_mk_of_infinite [Infinite R] : #{ x : A // IsAlgebraic R x } = #R

(R A : Type u)
[CommRing R]
[CommRing A]
[IsDomain A]
[Algebra R A]
[NoZeroSMulDivisors R A]
[Infinite R]


theorem down_mk {α : Type*} [AddRightCancelSemigroup α] [One α] (i j : α) (h : j + 1 = i) :
    (down α).Rel i j

{α : Type u_2}
[AddRightCancelSemigroup α]
[One α]
(i j : α)
(h : j + 1 = i)


@[to_additive addIndex_mono]
theorem index_mono {K K' V : Set G} (hK' : IsCompact K') (h : K ⊆ K') (hV : (interior V).Nonempty) :
    index K V ≤ index K' V

{G : Type u_1}
[AddGroup G]
[TopologicalSpace G]
[TopologicalAddGroup G]
{K K' V : Set G}
(hK' : IsCompact K')
(h : K ⊆ K')
(hV : (interior V).Nonempty)

MeasureTheory.Measure.haar.addIndex K V ≤ MeasureTheory.Measure.haar.addIndex K' V


theorem ContinuousOn.cpow_const {b : ℂ} (hf : ContinuousOn f s)
    (h : ∀ a : α, a ∈ s → f a ∈ slitPlane) : ContinuousOn (fun x => f x ^ b) s

{α : Type u_1}
[TopologicalSpace α]
{f : α → ℂ}
{s : Set α}
{b : ℂ}
(hf : ContinuousOn f s)
(h : ∀ a ∈ s, f a ∈ Complex.slitPlane)


@[simp] theorem fourierIntegral_convergent_iff {μ : Measure V} {f : V → E} (w : V) :
    Integrable (fun v : V ↦ 𝐞 (- ⟪v, w⟫) • f v) μ ↔ Integrable f μ

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
{V : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MeasurableSpace V]
[BorelSpace V]
{μ : MeasureTheory.Measure V}
{f : V → E}
(w : V)

MeasureTheory.Integrable (fun v => Real.fourierChar (-⟪v, w⟫_ℝ) • f v) μ ↔ MeasureTheory.Integrable f μ


/-- If a function `g` is bounded along the positive orbit of `x` under `f`,
then the difference between Birkhoff averages of `g`
along the orbit of `f x` and along the orbit of `x`
tends to zero.

See also `tendsto_birkhoffAverage_apply_sub_birkhoffAverage'`. -/
theorem tendsto_birkhoffAverage_apply_sub_birkhoffAverage {f : α → α} {g : α → E} {x : α}
    (h : Bornology.IsBounded (range (g <| f^[·] x))) :
    Tendsto (fun n ↦ birkhoffAverage 𝕜 f g n (f x) - birkhoffAverage 𝕜 f g n x) atTop (𝓝 0)

(h : Bornology.IsBounded (Set.range fun x_1 => g (f^[x_1] x)))

Filter.Tendsto (fun n => birkhoffAverage 𝕜 f g n (f x) - birkhoffAverage 𝕜 f g n x) Filter.atTop (𝓝 0)


theorem msb_eq_true_iff_two_mul_ge (x : BitVec w) : x.msb = true ↔ 2 * x.toNat ≥ 2^w


theorem isQuotient_explicitCokernelπ {X Y : SemiNormedGrp.{u}} (f : X ⟶ Y) :
    NormedAddGroupHom.IsQuotient (explicitCokernelπ f)


@[simp] theorem lsum_comp_lsingle (f : α → M →ₗ[R] N) (i : α) :
    Finsupp.lsum S f ∘ₗ lsingle i = f i

{α : Type u_1}
{M : Type u_2}
{N : Type u_3}
{R : Type u_5}
(S : Type u_6)
[Semiring R]
[Semiring S]
[AddCommMonoid M]
[Module R M]
[AddCommMonoid N]
[Module R N]
[Module S N]
[SMulCommClass R S N]
(f : α → M →ₗ[R] N)
(i : α)

(Finsupp.lsum S) f ∘ₗ Finsupp.lsingle i = f i


theorem integrable_process (μ : Measure Ω) [IsFiniteMeasure μ] (hs : ∀ n, MeasurableSet[ℱ n] (s n))
    (n : ℕ) : Integrable (process s n) μ

{Ω : Type u_1}
{m0 : MeasurableSpace Ω}
{ℱ : MeasureTheory.Filtration ℕ m0}
{s : ℕ → Set Ω}
(μ : MeasureTheory.Measure Ω)
[MeasureTheory.IsFiniteMeasure μ]
(hs : ∀ (n : ℕ), MeasurableSet (s n))
(n : ℕ)

MeasureTheory.Integrable (MeasureTheory.BorelCantelli.process s n) μ


theorem map_ofNat [AddMonoidWithOne G] [AddMonoidWithOne H] [AddConstMapClass F G H 1 1]
    (f : F) (n : ℕ) [n.AtLeastTwo] :
    f (OfNat.ofNat n) = f 0 + OfNat.ofNat n

{F : Type u_1}
{G : Type u_2}
{H : Type u_3}
[FunLike F G H]
[AddMonoidWithOne G]
[AddMonoidWithOne H]
[AddConstMapClass F G H 1 1]
(f : F)
(n : ℕ)
[n.AtLeastTwo]


@[simp]
theorem map_refl : s.map (Embedding.refl _) = s

Finset.map (Function.Embedding.refl α) s = s


theorem StableUnderBaseChange.pullback_map [HasPullbacks C] {P : MorphismProperty C}
    (hP : StableUnderBaseChange P) [P.IsStableUnderComposition] {S X X' Y Y' : C} {f : X ⟶ S}
    {g : Y ⟶ S} {f' : X' ⟶ S} {g' : Y' ⟶ S} {i₁ : X ⟶ X'} {i₂ : Y ⟶ Y'} (h₁ : P i₁) (h₂ : P i₂)
    (e₁ : f = i₁ ≫ f') (e₂ : g = i₂ ≫ g') :
    P (pullback.map f g f' g' i₁ i₂ (𝟙 _) ((Category.comp_id _).trans e₁)
        ((Category.comp_id _).trans e₂))

(e₁ : f = CategoryTheory.CategoryStruct.comp i₁ f')

(e₂ : g = CategoryTheory.CategoryStruct.comp i₂ g')

P (CategoryTheory.Limits.pullback.map f g f' g' i₁ i₂ (CategoryTheory.CategoryStruct.id S) ⋯ ⋯)


theorem distinctConstantsTheory_mono {s t : Set α} (h : s ⊆ t) :
    L.distinctConstantsTheory s ⊆ L.distinctConstantsTheory t

{L : FirstOrder.Language}
{α : Type u'}
{s t : Set α}
(h : s ⊆ t)


lemma galAction_isPretransitive [Fact (p.Splits (algebraMap F E))] (hp : Irreducible p) :
    MulAction.IsPretransitive p.Gal (p.rootSet E)

[Fact (Polynomial.Splits (algebraMap F E) p)]

MulAction.IsPretransitive p.Gal ↑(p.rootSet E)


theorem hasFiniteCoproducts_of_opposite [HasFiniteProducts Cᵒᵖ] : HasFiniteCoproducts C


theorem biUnion_sigma (s : Set ι) (t : ∀ i, Set (α i)) (f : Sigma α → Set β) :
    ⋃ ij ∈ s.sigma t, f ij = ⋃ i ∈ s, ⋃ j ∈ t i, f ⟨i, j⟩

{ι : Type u_1}
{α : ι → Type u_3}
{β : Type u_6}
(s : Set ι)
(t : (i : ι) → Set (α i))
(f : Sigma α → Set β)


lemma Antitone.image_Icc_subset (h : Antitone f) : f '' Icc a b ⊆ Icc (f b) (f a)

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


/-- If the `LSeries` of `f` is summable at `s`, then `f = O(n^(re s))`. -/
lemma LSeriesSummable.isBigO_rpow {f : ℕ → ℂ} {s : ℂ} (h : LSeriesSummable f s) :
    f =O[atTop] fun n ↦ (n : ℝ) ^ s.re


theorem coe_bot : ((⊥ : NonUnitalSubsemiring R) : Set R) = {0}

{R : Type u}
[NonUnitalNonAssocSemiring R]


theorem total_apply (l : α →₀ R) : Finsupp.total α M R v l = l.sum fun i a => a • v i

{α : Type u_1}
{M : Type u_2}
(R : Type u_5)
[Semiring R]
[AddCommMonoid M]
[Module R M]
{v : α → M}
(l : α →₀ R)

(Finsupp.total α M R v) l = l.sum fun i a => a • v i


@[simp]
theorem inclusion_self {S : NonUnitalStarSubalgebra R A} :
    inclusion (le_refl S) = NonUnitalAlgHom.id R S

{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]
{S : NonUnitalStarSubalgebra R A}

NonUnitalAlgHomClass.toNonUnitalAlgHom (NonUnitalStarSubalgebra.inclusion ⋯) = NonUnitalAlgHom.id R ↥S


@[simp]
theorem xor_zero (n : ℕ) : n ^^^ 0 = n


protected theorem UniformInducing.injective [T0Space α] {f : α → β} (h : UniformInducing f) :
    Injective f

{α : Type u}
{β : Type v}
[UniformSpace α]
[UniformSpace β]
[T0Space α]
{f : α → β}
(h : UniformInducing f)


@[to_additive]
theorem orderOf_dvd_lcm_mul (h : Commute x y):
    orderOf y ∣ Nat.lcm (orderOf x) (orderOf (x * y))

{G : Type u_1}
[AddMonoid G]
{x y : G}
(h : AddCommute x y)

addOrderOf y ∣ (addOrderOf x).lcm (addOrderOf (x + y))


/-- Expand the square -/
theorem norm_add_mul_self (x y : E) :
    ‖x + y‖ * ‖x + y‖ = ‖x‖ * ‖x‖ + 2 * re ⟪x, y⟫ + ‖y‖ * ‖y‖

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
(x y : E)

‖x + y‖ * ‖x + y‖ = ‖x‖ * ‖x‖ + 2 * RCLike.re ⟪x, y⟫_𝕜 + ‖y‖ * ‖y‖


nonrec theorem cosh_sq : cosh x ^ 2 = sinh x ^ 2 + 1


/-- An ordered cancellative monoid injects into its localization by sending `a` to `a / b`. -/
@[to_additive (attr := simps!) "An ordered cancellative monoid injects into its localization by
sending `a` to `a - b`."]
def mkOrderEmbedding (b : s) : α ↪o Localization s

{α : Type u_1}
[OrderedCancelAddCommMonoid α]
{s : AddSubmonoid α}
(b : ↥s)
(a : α)

(AddLocalization.mkOrderEmbedding b) a = (AddLocalization.addMonoidOf s).mk' a b


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

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

∑ x ∈ s, Function.update f i b x = ∑ x ∈ s, f x


/-- A derivation `D` belongs to the ideal range of the adjoint action iff it is of the form `ad x`
for some `x` in the Lie algebra `L`. -/
lemma mem_ad_idealRange_iff {D : LieDerivation R L L} :
    D ∈ (ad R L).idealRange ↔ ∃ x : L, ad R L x = D

{R : Type u_1}
{L : Type u_2}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
{D : LieDerivation R L L}

D ∈ (LieDerivation.ad R L).idealRange ↔ ∃ x, (LieDerivation.ad R L) x = D


theorem add_mod (a b n : Nat) : (a + b) % n = ((a % n) + (b % n)) % n


theorem singletonSubgraph_fst_le_subgraphOfAdj {u v : V} {h : G.Adj u v} :
    G.singletonSubgraph u ≤ G.subgraphOfAdj h

{V : Type u}
{G : SimpleGraph V}
{u v : V}
{h : G.Adj u v}


theorem range_map_nonempty (N : Submodule R M) :
    (Set.range (fun ϕ => Submodule.map ϕ N : (M →ₛₗ[σ₁₂] M₂) → Submodule R₂ M₂)).Nonempty

{R : Type u_1}
{R₂ : Type u_3}
{M : Type u_5}
{M₂ : Type u_7}
[Semiring R]
[Semiring R₂]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R₂ M₂]
{σ₁₂ : R →+* R₂}
[RingHomSurjective σ₁₂]
(N : Submodule R M)

(Set.range fun ϕ => Submodule.map ϕ N).Nonempty


theorem inner_gramSchmidtOrthonormalBasis_eq_zero {f : ι → E} {i : ι}
    (hi : gramSchmidtNormed 𝕜 f i = 0) (j : ι) : ⟪gramSchmidtOrthonormalBasis h f i, f j⟫ = 0

(h : FiniteDimensional.finrank 𝕜 E = Fintype.card ι)

⟪(gramSchmidtOrthonormalBasis h f) i, f j⟫_𝕜 = 0


theorem copy_eq (f : HeytingHom α β) (f' : α → β) (h : f' = f) : f.copy f' h = f

{α : Type u_2}
{β : Type u_3}
[HeytingAlgebra α]
[HeytingAlgebra β]
(f : HeytingHom α β)
(f' : α → β)
(h : f' = ⇑f)


theorem llcomp_apply' (f : Nₗ →ₗ[R] Pₗ) (g : M →ₗ[R] Nₗ) : llcomp R M Nₗ Pₗ f g = f ∘ₗ g

{R : Type u_1}
[CommSemiring R]
{M : Type u_5}
{Nₗ : Type u_10}
{Pₗ : Type u_11}
[AddCommMonoid M]
[AddCommMonoid Nₗ]
[AddCommMonoid Pₗ]
[Module R M]
[Module R Nₗ]
[Module R Pₗ]
(f : Nₗ →ₗ[R] Pₗ)
(g : M →ₗ[R] Nₗ)

((LinearMap.llcomp R M Nₗ Pₗ) f) g = f ∘ₗ g


/-- The algebra isomorphism `AdjoinRoot (minpoly R x) ≃ₐ[R] adjoin R x` -/
@[simps!]
def equivAdjoin (hx : IsIntegral R x) : AdjoinRoot (minpoly R x) ≃ₐ[R] adjoin R ({x} : Set S)

{R : Type u_1}
{S : Type u_2}
[CommRing R]
[CommRing S]
[IsDomain R]
[Algebra R S]
[IsDomain S]
[NoZeroSMulDivisors R S]
[IsIntegrallyClosed R]
{x : S}
(hx : IsIntegral R x)
(a : AdjoinRoot (minpoly R x))

(minpoly.equivAdjoin hx) a =
  (QuotientAddGroup.lift (Submodule.toAddSubgroup (Ideal.span {minpoly R x}))
      ↑(Polynomial.eval₂RingHom (algebraMap R ↥(Algebra.adjoin R {x})) ⟨x, ⋯⟩) ⋯)
    a


theorem Up.next {ub i} (h : i < ub) : Up ub (i+1) i


theorem whiskerLeft_dite {P : Prop} [Decidable P]
    (X : C) {Y Z : C} (f : P → (Y ⟶ Z)) (f' : ¬P → (Y ⟶ Z)) :
      X ◁ (if h : P then f h else f' h) = if h : P then X ◁ f h else X ◁ f' h

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.MonoidalCategory C]
{P : Prop}
[Decidable P]
(X : C)
{Y Z : C}
(f : P → (Y ⟶ Z))
(f' : ¬P → (Y ⟶ Z))

CategoryTheory.MonoidalCategory.whiskerLeft X (if h : P then f h else f' h) =
  if h : P then CategoryTheory.MonoidalCategory.whiskerLeft X (f h)
  else CategoryTheory.MonoidalCategory.whiskerLeft X (f' h)


@[to_additive]
lemma innerRegularWRT_isCompact_isClosed_measure_ne_top_of_group [h : InnerRegularCompactLTTop μ] :
    InnerRegularWRT μ (fun s ↦ IsCompact s ∧ IsClosed s) (fun s ↦ MeasurableSet s ∧ μ s ≠ ∞)

{G : Type u_2}
[MeasurableSpace G]
[TopologicalSpace G]
[BorelSpace G]
{μ : MeasureTheory.Measure G}
[AddGroup G]
[TopologicalAddGroup G]
[h : μ.InnerRegularCompactLTTop]

μ.InnerRegularWRT (fun s => IsCompact s ∧ IsClosed s) fun s => MeasurableSet s ∧ μ s ≠ ⊤


theorem le_div_iff_of_neg' (hc : c < 0) : a ≤ b / c ↔ b ≤ c * a

{α : Type u_2}
[LinearOrderedField α]
{a b c : α}
(hc : c < 0)


/-- Let `α` be an `AddCommGroup` with a `Lattice` structure. A norm on `α` is *solid* if, for `a`
and `b` in `α`, with absolute values `|a|` and `|b|` respectively, `|a| ≤ |b|` implies `‖a‖ ≤ ‖b‖`.
-/
class HasSolidNorm (α : Type*) [NormedAddCommGroup α] [Lattice α] : Prop where
  solid : ∀ ⦃x y : α⦄, |x| ≤ |y| → ‖x‖ ≤ ‖y‖

{α : Type u_1}
[NormedAddCommGroup α]
[Lattice α]
[self : HasSolidNorm α]
⦃x y : α⦄


@[simp]
theorem centralizer_eq_top_iff_subset {s : Set R} : centralizer s = ⊤ ↔ s ⊆ center R

Subring.centralizer s = ⊤ ↔ s ⊆ ↑(Subring.center R)


protected theorem nhds_eq (f : α →ᵤ[𝔖] β) :
    𝓝 f = ⨅ s ∈ 𝔖, ⨅ V ∈ 𝓤 β, 𝓟 {g | ∀ x ∈ s, (toFun 𝔖 f x, toFun 𝔖 g x) ∈ V}

{α : Type u_1}
(β : Type u_2)
[UniformSpace β]
(𝔖 : Set (Set α))
(f : α →ᵤ[𝔖] β)

𝓝 f = ⨅ s ∈ 𝔖, ⨅ V ∈ 𝓤 β, 𝓟 {g | ∀ x ∈ s, ((UniformOnFun.toFun 𝔖) f x, (UniformOnFun.toFun 𝔖) g x) ∈ V}


theorem valAux_mul (f g : PreTilt K v O hv p) :
    valAux K v O hv p (f * g) = valAux K v O hv p f * valAux K v O hv p g

{K : Type u₁}
[Field K]
{v : Valuation K ℝ≥0}
{O : Type u₂}
[CommRing O]
[Algebra O K]
{hv : v.Integers O}
{p : ℕ}
[hp : Fact (Nat.Prime p)]
[hvp : Fact (v ↑p ≠ 1)]
(f g : PreTilt K v O hv p)

PreTilt.valAux K v O hv p (f * g) = PreTilt.valAux K v O hv p f * PreTilt.valAux K v O hv p g


protected lemma lt_div_iff_mul_lt (hdn : d ∣ n) (a : ℕ) : a < n / d ↔ d * a < n


theorem fp_iff_derivBFamily (H : ∀ i hi, IsNormal (f i hi)) {a} :
    (∀ i hi, f i hi a = a) ↔ ∃ b, derivBFamily.{u, v} o f b = a

{f : (b : Ordinal.{u}) → b < o → Ordinal.{max u v} → Ordinal.{max u v}}

(H : ∀ (i : Ordinal.{u}) (hi : i < o), Ordinal.IsNormal (f i hi))

(∀ (i : Ordinal.{u}) (hi : i < o), f i hi a = a) ↔ ∃ b, o.derivBFamily f b = a


theorem reverse_eq_iff {l l' : List α} : l.reverse = l' ↔ l = l'.reverse


theorem nonunits_le_nonunits {A B : ValuationSubring K} : B.nonunits ≤ A.nonunits ↔ A ≤ B

{K : Type u}
[Field K]
{A B : ValuationSubring K}


@[simp]
theorem mapAlgEquiv_symm (e : A₁ ≃ₐ[R] A₂) : (mapAlgEquiv σ e).symm = mapAlgEquiv σ e.symm

{R : Type u}
(σ : Type u_1)
[CommSemiring R]
{A₁ : Type u_2}
{A₂ : Type u_3}
[CommSemiring A₁]
[CommSemiring A₂]
[Algebra R A₁]
[Algebra R A₂]
(e : A₁ ≃ₐ[R] A₂)

(MvPolynomial.mapAlgEquiv σ e).symm = MvPolynomial.mapAlgEquiv σ e.symm


lemma stabilizerMulEquiv_apply (g : (stabilizer (Perm α)ᵈᵐᵃ f)ᵐᵒᵖ) {a : α} {i : ι} (h : f a = i) :
    ((stabilizerMulEquiv f)) g i ⟨a, h⟩ = (mk.symm g.unop : Equiv.Perm α) a

(g : (↥(MulAction.stabilizer (Equiv.Perm α)ᵈᵐᵃ f))ᵐᵒᵖ)

↑(((DomMulAct.stabilizerMulEquiv f) g i) ⟨a, h⟩) = (DomMulAct.mk.symm ↑(MulOpposite.unop g)) a


@[simp, mfld_simps]
theorem restr_univ {e : PartialEquiv α β} : e.restr univ = e

{α : Type u_1}
{β : Type u_2}
{e : PartialEquiv α β}


theorem map_inf (f : F) {p q : Submodule R M} (hf : Injective f) :
    (p ⊓ q).map f = p.map f ⊓ q.map f

{R : Type u_1}
{R₂ : Type u_3}
{M : Type u_5}
{M₂ : Type u_7}
[Semiring R]
[Semiring R₂]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R₂ M₂]
{σ₁₂ : R →+* R₂}
[RingHomSurjective σ₁₂]
{F : Type u_9}
[FunLike F M M₂]
[SemilinearMapClass F σ₁₂ M M₂]
(f : F)
{p q : Submodule R M}
(hf : Function.Injective ⇑f)

Submodule.map f (p ⊓ q) = Submodule.map f p ⊓ Submodule.map f q


@[to_additive]
theorem lintegral_eq_tsum_of_ac (h : IsFundamentalDomain G s μ) (hν : ν ≪ μ) (f : α → ℝ≥0∞) :
    ∫⁻ x, f x ∂ν = ∑' g : G, ∫⁻ x in g • s, f x ∂ν

[MeasureTheory.VAddInvariantMeasure G α μ]

(h : MeasureTheory.IsAddFundamentalDomain G s μ)

(hν : ν ≪ μ)

(f : α → ℝ≥0∞)

∫⁻ (x : α), f x ∂ν = ∑' (g : G), ∫⁻ (x : α) in g +ᵥ s, f x ∂ν


@[to_additive isAddCyclic_of_card_nsmul_eq_zero_le]
theorem isCyclic_of_card_pow_eq_one_le : IsCyclic α

(hn : ∀ (n : ℕ), 0 < n → (Finset.filter (fun a => a ^ n = 1) Finset.univ).card ≤ n)


theorem Ioc_inter_Ioo_of_right_le (h : b₂ ≤ b₁) : Ioc a₁ b₁ ∩ Ioo a₂ b₂ = Ioo (max a₁ a₂) b₂

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

Set.Ioc a₁ b₁ ∩ Set.Ioo a₂ b₂ = Set.Ioo (max a₁ a₂) b₂


/-- If `R` has characteristic `0`, then so does Frac(R). -/
theorem charZero_of_isFractionRing [CharZero R] : CharZero K

(R : Type u_1)
{K : Type u_2}
[CommRing R]
[Field K]
[Algebra R K]
[IsFractionRing R K]
[CharZero R]


theorem eq_replicate_of_subsingleton [Subsingleton α] (a : α) {n : ℕ} (s : Sym α n) :
    s = replicate n a

{α : Type u_1}
[Subsingleton α]
(a : α)
{n : ℕ}
(s : Sym α n)


@[simp]
theorem ofStream_append (l : List α) (s : Stream' α) :
    ofStream (l ++ₛ s) = append (ofList l) (ofStream s)

{α : Type u}
(l : List α)
(s : Stream' α)


@[simp]
theorem mem_supported_vars (p : MvPolynomial σ R) : p ∈ supported R (↑p.vars : Set σ)

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


theorem cons_congr {s t : WSeq α} (a : α) (h : s ~ʷ t) : cons a s ~ʷ cons a t

{α : Type u}
{s t : Stream'.WSeq α}
(a : α)
(h : s ~ʷ t)

Stream'.WSeq.cons a s ~ʷ Stream'.WSeq.cons a t


/-- Note that the inequality can be strict; e.g., the inclusion of an Abelian subalgebra of a
simple algebra. -/
theorem map_bracket_le {I₁ I₂ : LieIdeal R L} : map f ⁅I₁, I₂⁆ ≤ ⁅map f I₁, map f I₂⁆

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

LieIdeal.map f ⁅I₁, I₂⁆ ≤ ⁅LieIdeal.map f I₁, LieIdeal.map f I₂⁆


theorem Ico_union_Ico' {a b c d : α} (hcb : c ≤ b) (had : a ≤ d) :
    Ico a b ∪ Ico c d = Ico (min a c) (max b d)

{α : Type u_2}
[LinearOrder α]
[LocallyFiniteOrder α]
{a b c d : α}
(hcb : c ≤ b)
(had : a ≤ d)

Finset.Ico a b ∪ Finset.Ico c d = Finset.Ico (min a c) (max b d)


theorem mk_eq_nat_iff_fintype {n : ℕ} : #α = n ↔ ∃ h : Fintype α, @Fintype.card α h = n

Cardinal.mk α = ↑n ↔ ∃ h, Fintype.card α = n


/-- If `A` and `B` are subalgebras of a commutative `R`-algebra `S`, both of them are
free `R`-algebras, then the rank of `A ⊔ B` is less than or equal to
the product of that of `A` and `B`. -/
theorem rank_sup_le_of_free [Module.Free R A] [Module.Free R B] :
    Module.rank R ↥(A ⊔ B) ≤ Module.rank R A * Module.rank R B

{R : Type u}
{S : Type v}
[CommRing R]
[CommRing S]
[Algebra R S]
(A B : Subalgebra R S)
[Module.Free R ↥A]
[Module.Free R ↥B]

Module.rank R ↥(A ⊔ B) ≤ Module.rank R ↥A * Module.rank R ↥B


@[to_additive]
theorem prod_mapDomain_index [CommMonoid N] {f : α → β} {s : α →₀ M} {h : β → M → N}
    (h_zero : ∀ b, h b 0 = 1) (h_add : ∀ b m₁ m₂, h b (m₁ + m₂) = h b m₁ * h b m₂) :
    (mapDomain f s).prod h = s.prod fun a m => h (f a) m

(h_add : ∀ (b : β) (m₁ m₂ : M), h b (m₁ + m₂) = h b m₁ + h b m₂)

(Finsupp.mapDomain f s).sum h = s.sum fun a m => h (f a) m


/-- An isomorphism of monads gives a natural isomorphism of the underlying functors.
-/
/- Porting note: removed
`@[simps (config := { rhsMd := semireducible })]`
and replaced with `@[simps]` in the two declarations below-/
@[simps!]
def MonadIso.toNatIso {M N : Monad C} (h : M ≅ N) : (M : C ⥤ C) ≅ N

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{M N : CategoryTheory.Monad C}
(h : M ≅ N)

(CategoryTheory.MonadIso.toNatIso h).inv = h.inv.toNatTrans


lemma predAbove_rev_left (p : Fin n) (i : Fin (n + 1)) :
    p.rev.predAbove i = (p.predAbove i.rev).rev


theorem isRight_iff : x.isRight ↔ ∃ y, x = Sum.inr y

∀ {α : Type u_1} {β : Type u_2} {x : α ⊕ β}, x.isRight = true ↔ ∃ y, x = Sum.inr y


@[simp]
theorem max_eq_right_iff : max a b = b ↔ a ≤ b


/-- The equivalence `(-.Elements)ᵒᵖ ≅ (yoneda, -)` of is actually a natural isomorphism of functors.
-/
theorem costructuredArrow_yoneda_equivalence_naturality {F₁ F₂ : Cᵒᵖ ⥤ Type v} (α : F₁ ⟶ F₂) :
    (map α).op ⋙ toCostructuredArrow F₂ = toCostructuredArrow F₁ ⋙ CostructuredArrow.map α

{F₁ F₂ : CategoryTheory.Functor Cᵒᵖ (Type v)}

(CategoryTheory.CategoryOfElements.map α).op.comp (CategoryTheory.CategoryOfElements.toCostructuredArrow F₂) =
  (CategoryTheory.CategoryOfElements.toCostructuredArrow F₁).comp (CategoryTheory.CostructuredArrow.map α)


@[simp] lemma fourierTransformCLM_apply (f : 𝓢(V, E)) :
    fourierTransformCLM 𝕜 f = 𝓕 f

(𝕜 : Type u_1)
[RCLike 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
[NormedSpace 𝕜 E]
[SMulCommClass ℂ 𝕜 E]
{V : Type u_3}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[FiniteDimensional ℝ V]
[MeasurableSpace V]
[BorelSpace V]
(f : SchwartzMap V E)

⇑((SchwartzMap.fourierTransformCLM 𝕜) f) = 𝓕 ⇑f


theorem toPMF_apply (x : α) : μ.toPMF x = μ {x}

{α : Type u_1}
[Countable α]
[MeasurableSpace α]
[MeasurableSingletonClass α]
(μ : MeasureTheory.Measure α)
[MeasureTheory.IsProbabilityMeasure μ]
(x : α)


theorem shift_neg_shift' (i : A) :
    f⟦-i⟧'⟦i⟧' = (shiftFunctorCompIsoId C (-i) i (neg_add_self i)).hom.app X ≫ f ≫
      (shiftFunctorCompIsoId C (-i) i (neg_add_self i)).inv.app Y

{C : Type u}
{A : Type u_1}
[CategoryTheory.Category.{v, u} C]
[AddGroup A]
[CategoryTheory.HasShift C A]
{X Y : C}
(f : X ⟶ Y)
(i : A)

(CategoryTheory.shiftFunctor C i).map ((CategoryTheory.shiftFunctor C (-i)).map f) =
  CategoryTheory.CategoryStruct.comp ((CategoryTheory.shiftFunctorCompIsoId C (-i) i ⋯).hom.app X)
    (CategoryTheory.CategoryStruct.comp f ((CategoryTheory.shiftFunctorCompIsoId C (-i) i ⋯).inv.app Y))


theorem card_lt_card {s t : Set α} [Fintype s] [Fintype t] (h : s ⊂ t) :
    Fintype.card s < Fintype.card t

{α : Type u}
{s t : Set α}
[Fintype ↑s]
[Fintype ↑t]
(h : s ⊂ t)


theorem IsMaxOn.hasLineDerivAt_eq_zero (h : IsMaxOn f s a) (hd : HasLineDerivAt ℝ f f' a b)
    (h' : ∀ᶠ t : ℝ in 𝓝 0, a + t • b ∈ s) : f' = 0

{E : Type u_1}
[AddCommGroup E]
[Module ℝ E]
{f : E → ℝ}
{s : Set E}
{a b : E}
{f' : ℝ}
(h : IsMaxOn f s a)
(hd : HasLineDerivAt ℝ f f' a b)
(h' : ∀ᶠ (t : ℝ) in 𝓝 0, a + t • b ∈ s)


theorem commute_X_pow (p : R[X]) (n : ℕ) : Commute (X ^ n) p

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


/--
If `M → N → P → 0` is a presentation of `P` over a local ring `(R, 𝔪, k)` with
`M` finite and `N` finite free, then injectivity of `k ⊗ M → k ⊗ N` implies that `P` is free.
-/
theorem free_of_lTensor_residueField_injective
    [Module.Finite R M] [Module.Finite R N] [Module.Free R N]
    (hf : Function.Injective (f.lTensor k)) :
    Module.Free R P

(hf : Function.Injective ⇑(LinearMap.lTensor (LocalRing.ResidueField R) f))


theorem IsCompact.prod {t : Set Y} (hs : IsCompact s) (ht : IsCompact t) :
    IsCompact (s ×ˢ t)

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
{s : Set X}
{t : Set Y}
(hs : IsCompact s)
(ht : IsCompact t)


theorem ker_eval {s : S} (hs : IsIntegral R s) :
    RingHom.ker ((Polynomial.aeval s).toRingHom : R[X] →+* S) =
    Ideal.span ({minpoly R s} : Set R[X])

{R : Type u_1}
{S : Type u_2}
[CommRing R]
[CommRing S]
[IsDomain R]
[Algebra R S]
[IsDomain S]
[NoZeroSMulDivisors R S]
[IsIntegrallyClosed R]
{s : S}
(hs : IsIntegral R s)

RingHom.ker (Polynomial.aeval s).toRingHom = Ideal.span {minpoly R s}


theorem getElem?_len_le : ∀ {l : List α} {n}, length l ≤ n → l[n]? = none


@[to_additive (attr := simp, norm_cast)]
theorem coe_iInf {ι : Sort*} (f : ι → Con M) : ⇑(iInf f) = ⨅ i, ⇑(f i)

{M : Type u_1}
[Add M]
{ι : Sort u_4}
(f : ι → AddCon M)


theorem iSup_of_empty [IsEmpty ι] (f : ι → α) : iSup f = ⊥

{α : Type u_1}
{ι : Sort u_5}
[CompleteLattice α]
[IsEmpty ι]
(f : ι → α)


@[simp]
theorem autCongr_refl : autCongr AlgEquiv.refl = MulEquiv.refl (A₁ ≃ₐ[R] A₁)

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

AlgEquiv.refl.autCongr = MulEquiv.refl (A₁ ≃ₐ[R] A₁)


theorem foldr_hom (f : β₁ → β₂) (g₁ : α → β₁ → β₁) (g₂ : α → β₂ → β₂) (l : List α) (init : β₁)
    (H : ∀ x y, g₂ x (f y) = f (g₁ x y)) : l.foldr g₂ (f init) = f (l.foldr g₁ init)

(f : β₁ → β₂)

(g₁ : α → β₁ → β₁)

(g₂ : α → β₂ → β₂)

(H : ∀ (x : α) (y : β₁), g₂ x (f y) = f (g₁ x y))

List.foldr g₂ (f init) l = f (List.foldr g₁ init l)


/-- The rank of a finite product of free modules is the sum of the ranks. -/
-- this result is not true without the freeness assumption
@[simp]
theorem rank_pi [Finite η] : Module.rank R (∀ i, φ i) =
    Cardinal.sum fun i => Module.rank R (φ i)

{R : Type u}
{η : Type u₁'}
{φ : η → Type u_1}
[Ring R]
[StrongRankCondition R]
[(i : η) → AddCommGroup (φ i)]
[(i : η) → Module R (φ i)]
[∀ (i : η), Module.Free R (φ i)]
[Finite η]

Module.rank R ((i : η) → φ i) = Cardinal.sum fun i => Module.rank R (φ i)


protected theorem ediv_emod_unique {a b r q : Int} (h : 0 < b) :
  a / b = q ∧ a % b = r ↔ r + b * q = a ∧ 0 ≤ r ∧ r < b


lemma map_def {s : Set β} : MeasurableSet[m.map f] s ↔ MeasurableSet[m] (f ⁻¹' s)

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

MeasurableSet s ↔ MeasurableSet (f ⁻¹' s)


@[mono]
theorem card_mono : Monotone (@card α)


theorem Coprime.gcd_mul_left_cancel (m : Nat) (H : Coprime k n) : gcd (k * m) n = gcd m n


@[to_additive]
protected lemma MulAction.bijective (g : α) : Function.Bijective (g • · : β → β)

{α : Type u_1}
{β : Type u_2}
[AddGroup α]
[AddAction α β]
(g : α)


/-- The Weierstrass curve over `R` induced by an admissible linear change of variables
$(X, Y) \mapsto (u^2X + r, u^3Y + u^2sX + t)$ for some $u \in R^\times$ and some $r, s, t \in R$. -/
@[simps]
def variableChange : WeierstrassCurve R

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

(W.variableChange C).a₁ = ↑C.u⁻¹ * (W.a₁ + 2 * C.s)


theorem hasBasis_compactConvergenceUniformity :
    HasBasis (𝓤 C(α, β)) (fun p : Set α × Set (β × β) => IsCompact p.1 ∧ p.2 ∈ 𝓤 β) fun p =>
      { fg : C(α, β) × C(α, β) | ∀ x ∈ p.1, (fg.1 x, fg.2 x) ∈ p.2 }

{α : Type u₁}
{β : Type u₂}
[TopologicalSpace α]
[UniformSpace β]

(𝓤 C(α, β)).HasBasis (fun p => IsCompact p.1 ∧ p.2 ∈ 𝓤 β) fun p => {fg | ∀ x ∈ p.1, (fg.1 x, fg.2 x) ∈ p.2}


/-- The inverse function is approximated linearly on `f '' s` by `f'.symm`. -/
theorem to_inv (hf : ApproximatesLinearOn f (f' : E →L[𝕜] F) s c) (hc : Subsingleton E ∨ c < N⁻¹) :
    ApproximatesLinearOn (hf.toPartialEquiv hc).symm (f'.symm : F →L[𝕜] E) (f '' s)
      (N * (N⁻¹ - c)⁻¹ * c)

(hc : Subsingleton E ∨ c < ‖↑f'.symm‖₊⁻¹)

ApproximatesLinearOn (↑(hf.toPartialEquiv hc).symm) (↑f'.symm) (f '' s) (‖↑f'.symm‖₊ * (‖↑f'.symm‖₊⁻¹ - c)⁻¹ * c)


theorem map_nsmul {X Y : C} {f : X ⟶ Y} {n : ℕ} : F.map (n • f) = n • F.map f

{C : Type u_1}
{D : Type u_2}
[CategoryTheory.Category.{u_4, u_1} C]
[CategoryTheory.Category.{u_5, u_2} D]
[CategoryTheory.Preadditive C]
[CategoryTheory.Preadditive D]
(F : CategoryTheory.Functor C D)
[F.Additive]
{X Y : C}
{f : X ⟶ Y}
{n : ℕ}


theorem DifferentiableAt.hasDerivAt (h : DifferentiableAt 𝕜 f x) : HasDerivAt f (deriv f x) x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : 𝕜 → F}
{x : 𝕜}
(h : DifferentiableAt 𝕜 f x)


@[simp]
theorem mem_mk' {s : Set R} {sm : Submonoid R} (hm : ↑sm = s) {sa : AddSubgroup R} (ha : ↑sa = s)
    {x : R} : x ∈ Subring.mk' s sm sa hm ha ↔ x ∈ s

{R : Type u}
[Ring R]
{s : Set R}
{sm : Submonoid R}
(hm : ↑sm = s)
{sa : AddSubgroup R}
(ha : ↑sa = s)
{x : R}


/-- An affine isometric equivalence between two normed vector spaces. -/
structure AffineIsometryEquiv extends P ≃ᵃ[𝕜] P₂ where
  norm_map : ∀ x, ‖linear x‖ = ‖x‖

{𝕜 : Type u_1}
{V : Type u_2}
{V₂ : Type u_5}
{P : Type u_10}
{P₂ : Type u_11}
[NormedField 𝕜]
[SeminormedAddCommGroup V]
[NormedSpace 𝕜 V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
[SeminormedAddCommGroup V₂]
[NormedSpace 𝕜 V₂]
[PseudoMetricSpace P₂]
[NormedAddTorsor V₂ P₂]
(self : P ≃ᵃⁱ[𝕜] P₂)
(x : V)


/-- A side of a right-angled triangle divided by the cosine of the adjacent angle equals the
hypotenuse. -/
theorem norm_div_cos_angle_add_of_inner_eq_zero {x y : V} (h : ⟪x, y⟫ = 0) (h0 : x ≠ 0 ∨ y = 0) :
    ‖x‖ / Real.cos (angle x (x + y)) = ‖x + y‖

{V : Type u_1}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
{x y : V}
(h : ⟪x, y⟫_ℝ = 0)
(h0 : x ≠ 0 ∨ y = 0)

‖x‖ / Real.cos (InnerProductGeometry.angle x (x + y)) = ‖x + y‖


theorem inv_image_trans_target : e'.symm '' (e.trans e').target = e'.source ∩ e.target

{X : Type u_1}
{Y : Type u_3}
{Z : Type u_5}
[TopologicalSpace X]
[TopologicalSpace Y]
[TopologicalSpace Z]
(e : PartialHomeomorph X Y)
(e' : PartialHomeomorph Y Z)

↑e'.symm '' (e.trans e').target = e'.source ∩ e.target


@[simp]
theorem eqToHom_op {X Y : C} (h : X = Y) : (eqToHom h).op = eqToHom (congr_arg op h.symm)

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

(CategoryTheory.eqToHom h).op = CategoryTheory.eqToHom ⋯


@[simp]
lemma pushforwardContinuousSheafificationCompatibility_hom_app_val (F : Dᵒᵖ ⥤ A) :
    ((G.pushforwardContinuousSheafificationCompatibility A J K).hom.app F).val =
    sheafifyLift J (whiskerLeft G.op <| toSheafify K F)
      ((presheafToSheaf K A ⋙ G.sheafPushforwardContinuous A J K).obj F).cond

(J : CategoryTheory.GrothendieckTopology C)

(K : CategoryTheory.GrothendieckTopology D)

[∀ (F : Cᵒᵖ ⥤ A), G.op.HasPointwiseRightKanExtension F]

((G.pushforwardContinuousSheafificationCompatibility A J K).hom.app F).val =
  CategoryTheory.sheafifyLift J (CategoryTheory.whiskerLeft G.op (CategoryTheory.toSheafify K F)) ⋯


theorem ae_le_of_forall_setLIntegral_le_of_sigmaFinite [SigmaFinite μ] {f g : α → ℝ≥0∞}
    (hf : Measurable f)
    (h : ∀ s, MeasurableSet s → μ s < ∞ → (∫⁻ x in s, f x ∂μ) ≤ ∫⁻ x in s, g x ∂μ) : f ≤ᵐ[μ] g

(h : ∀ (s : Set α), MeasurableSet s → μ s < ⊤ → ∫⁻ (x : α) in s, f x ∂μ ≤ ∫⁻ (x : α) in s, g x ∂μ)


@[simp] lemma toSubmodule_killingCompl :
    LieSubmodule.toSubmodule I.killingCompl = (killingForm R L).orthogonal I.toSubmodule

(R : Type u_1)
(L : Type u_3)
[CommRing R]
[LieRing L]
[LieAlgebra R L]
(I : LieIdeal R L)

↑(LieIdeal.killingCompl R L I) = (killingForm R L).orthogonal ↑I


/-- Each function of a family uniformly equicontinuous on `S` is uniformly continuous on `S`. -/
theorem UniformEquicontinuousOn.uniformContinuousOn {F : ι → β → α} {S : Set β}
    (h : UniformEquicontinuousOn F S) (i : ι) :
    UniformContinuousOn (F i) S

{ι : Type u_1}
{α : Type u_7}
{β : Type u_9}
[uα : UniformSpace α]
[uβ : UniformSpace β]
{F : ι → β → α}
{S : Set β}
(h : UniformEquicontinuousOn F S)
(i : ι)


theorem Nodup.inter_left [DecidableEq α] (t) : Nodup s → Nodup (s ∩ t)

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


@[simp]
theorem sigmaLuncurry_apply (f : ⨁ (i) (j), δ i j) (i : ι) (j : α i) :
    sigmaLuncurry R f ⟨i, j⟩ = f i j

[(i : ι) → (j : α i) → AddCommMonoid (δ i j)]

[(i : ι) → (j : α i) → Module R (δ i j)]

(f : DirectSum ι fun i => DirectSum (α i) fun j => δ i j)

((DirectSum.sigmaLuncurry R) f) ⟨i, j⟩ = (f i) j


/-- Applying `secondInter` twice returns the original point. -/
@[simp]
theorem Sphere.secondInter_secondInter (s : Sphere P) (p : P) (v : V) :
    s.secondInter (s.secondInter p v) v = p

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
(s : EuclideanGeometry.Sphere P)
(p : P)
(v : V)


@[simp] lemma image_add_left_Ico (a b c : α) : (Ico a b).image (c + ·) = Ico (c + a) (c + b)

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

Finset.image (fun x => c + x) (Finset.Ico a b) = Finset.Ico (c + a) (c + b)


theorem Multiset.Nodup.le_nsmul_iff_le {α : Type*} {s t : Multiset α} {n : ℕ} (h : s.Nodup)
    (hn : n ≠ 0) : s ≤ n • t ↔ s ≤ t

{α : Type u_1}
{s t : Multiset α}
{n : ℕ}
(h : s.Nodup)
(hn : n ≠ 0)


@[simp]
theorem snoc_comp_castSucc {n : ℕ} {α : Sort _} {a : α} {f : Fin n → α} :
    (snoc f a : Fin (n + 1) → α) ∘ castSucc = f

{n : ℕ}
{α : Type u_1}
{a : α}
{f : Fin n → α}


/-- The Hurwitz zeta function is differentiable everywhere except at `s = 1`. This is true
even in the delicate case `a = 0` and `s = 0` (where the completed zeta has a pole, but this is
cancelled out by the Gamma factor). -/
lemma differentiableAt_hurwitzZetaEven (a : UnitAddCircle) {s : ℂ} (hs' : s ≠ 1) :
    DifferentiableAt ℂ (hurwitzZetaEven a) s

DifferentiableAt ℂ (HurwitzZeta.hurwitzZetaEven a) s


@[simp] lemma coe_ofNat (n : ℕ) [n.AtLeastTwo] :
    (no_index (OfNat.ofNat n : α) : WithTop α) = OfNat.ofNat n

{α : Type u}
[AddMonoidWithOne α]
(n : ℕ)
[n.AtLeastTwo]


theorem denomsClearable_of_natDegree_le (N : ℕ) (a : R) (bu : bi * i b = 1) :
    ∀ f : R[X], f.natDegree ≤ N → DenomsClearable a b N f i

{R : Type u_1}
{K : Type u_2}
[Semiring R]
[CommSemiring K]
{i : R →+* K}
{b : R}
{bi : K}
(N : ℕ)
(a : R)
(bu : bi * i b = 1)
(f : R[X])


@[simp]
theorem mem_nonUnitalSubalgebraOfNonUnitalSubsemiring {x : R} {S : NonUnitalSubsemiring R} :
    x ∈ nonUnitalSubalgebraOfNonUnitalSubsemiring S ↔ x ∈ S

{R : Type u_1}
[NonUnitalNonAssocSemiring R]
{x : R}
{S : NonUnitalSubsemiring R}


theorem BijOn.congr (h₁ : BijOn f₁ s t) (h : EqOn f₁ f₂ s) : BijOn f₂ s t

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


@[simp] theorem map_coe : ⇑(map c f) = f ∘ c

{α : Type u}
{β : Type v}
[Preorder α]
[Preorder β]
(c : OmegaCompletePartialOrder.Chain α)
(f : α →o β)


theorem sin_add_pi (x : ℂ) : sin (x + π) = -sin x

Complex.sin (x + ↑Real.pi) = -Complex.sin x


protected theorem tsub_lt_tsub_left_of_le (hab : AddLECancellable (a - b)) (h₁ : b ≤ a)
    (h : c < b) : a - b < a - c

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


@[simp] theorem rotateRight_nil : ([] : List α).rotateRight n = []


@[simp]
theorem norm_eq_zero_iff [IsDomain R] [IsDomain S] [Module.Free R S] [Module.Finite R S] {x : S} :
    norm R x = 0 ↔ x = 0

{R : Type u_1}
{S : Type u_2}
[CommRing R]
[Ring S]
[Algebra R S]
[IsDomain R]
[IsDomain S]
[Module.Free R S]
[Module.Finite R S]
{x : S}


@[simp] theorem forgetMonoidal_μ (X Y : Comon_ C) : (forgetMonoidal C).μ X Y = 𝟙 (X.X ⊗ Y.X)

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

(Comon_.forgetMonoidal C).μ X Y = 𝟙 (X.X ⊗ Y.X)


@[simp]
theorem prod_group_smul (g : G) (w : NormalWord d) :
    (g • w).prod φ = of g * (w.prod φ)

{d : HNNExtension.NormalWord.TransversalPair G A B}

HNNExtension.NormalWord.ReducedWord.prod φ (g • w).toReducedWord =
  HNNExtension.of g * HNNExtension.NormalWord.ReducedWord.prod φ w.toReducedWord


theorem Chain'.init (h : Chain' R l) : Chain' R l.dropLast

{α : Type u}
{R : α → α → Prop}
{l : List α}
(h : List.Chain' R l)


theorem sup'_inf_distrib_left (f : ι → α) (a : α) :
    a ⊓ s.sup' hs f = s.sup' hs fun i ↦ a ⊓ f i

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

a ⊓ s.sup' hs f = s.sup' hs fun i => a ⊓ f i


theorem toFun_eq_coe (f : InfTopHom α β) : f.toFun = f

{α : Type u_3}
{β : Type u_4}
[Inf α]
[Top α]
[Inf β]
[Top β]
(f : InfTopHom α β)


@[simp]
theorem coeff_inj : p.coeff = q.coeff ↔ p = q


/-- Basic constructor of an equivalence between localized categories -/
lemma isEquivalence : G'.IsEquivalence

(W₁ : CategoryTheory.MorphismProperty C₁)

(W₂ : CategoryTheory.MorphismProperty C₂)

[CategoryTheory.Localization.Lifting L₁ W₁ G G']

[CategoryTheory.Localization.Lifting L₂ W₂ F F']


@[simp]
theorem _root_.SimpleGraph.simpleGraphOfStructure (G : SimpleGraph V) :
    @simpleGraphOfStructure V G.structure _ = G

FirstOrder.Language.simpleGraphOfStructure V = G


theorem uniformContinuous_compare : UniformContinuous (pkg.compare pkg')

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


lemma length_le_length_longestOf [r.FiniteDimensional] (x : RelSeries r) :
    x.length ≤ (RelSeries.longestOf r).length

{α : Type u_1}
(r : Rel α α)
[r.FiniteDimensional]
(x : RelSeries r)


/-- If we equip `k[G]` with the `k`-linear `G`-representation induced by the left regular action of
`G` on itself, the resulting object is isomorphic as a `k[G]`-module to `k[G]` with its natural
`k[G]`-module structure. -/
@[simps]
noncomputable def ofMulActionSelfAsModuleEquiv :
    (ofMulAction k G G).asModule ≃ₗ[MonoidAlgebra k G] MonoidAlgebra k G

{k : Type u_1}
{G : Type u_2}
[CommSemiring k]
[Group G]

∀ (a : (Representation.ofMulAction k G G).asModule),
  Representation.ofMulActionSelfAsModuleEquiv a = (Representation.ofMulAction k G G).asModuleEquiv.toFun a


/-- The pigeonhole principle for finitely many pigeons counted by heads: there is a pigeonhole with
at least as many pigeons as the ceiling of the average number of pigeons across all pigeonholes. -/
theorem exists_lt_card_fiber_of_nsmul_lt_card_of_maps_to (hf : ∀ a ∈ s, f a ∈ t)
    (ht : t.card • b < s.card) : ∃ y ∈ t, b < (s.filter fun x => f x = y).card

{α : Type u}
{β : Type v}
{M : Type w}
[DecidableEq β]
{s : Finset α}
{t : Finset β}
{f : α → β}
{b : M}
[LinearOrderedCommSemiring M]
(hf : ∀ a ∈ s, f a ∈ t)
(ht : t.card • b < ↑s.card)

∃ y ∈ t, b < ↑(Finset.filter (fun x => f x = y) s).card


@[simp]
theorem Iio_subset_Iic_iff [DenselyOrdered α] : Iio a ⊆ Iic b ↔ a ≤ b

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


@[simp]
theorem toLex_lt_toLex [LT α] [LT β] {a b : α ⊕ β} :
    toLex a < toLex b ↔ Lex (· < ·) (· < ·) a b

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

toLex a < toLex b ↔ Sum.Lex (fun x x_1 => x < x_1) (fun x x_1 => x < x_1) a b


theorem limsup_eq_iInf_iSup_of_nat {u : ℕ → α} : limsup u atTop = ⨅ n : ℕ, ⨆ i ≥ n, u i

{α : Type u_1}
[CompleteLattice α]
{u : ℕ → α}

Filter.limsup u Filter.atTop = ⨅ n, ⨆ i, ⨆ (_ : i ≥ n), u i


@[simp] theorem modifyNth_zero_cons (f : α → α) (a : α) (l : List α) :
    (a :: l).modifyNth f 0 = f a :: l

{α : Type u_1}
(f : α → α)
(a : α)
(l : List α)


/-- Implementation of `SheafConditionPairwiseIntersections.coneEquiv`. -/
@[simps]
def coneEquivInverseObj (c : Limits.Cone (SheafConditionEqualizerProducts.diagram F U)) :
    Limits.Cone ((diagram U).op ⋙ F)

(c : CategoryTheory.Limits.Cone (TopCat.Presheaf.SheafConditionEqualizerProducts.diagram F U))

(TopCat.Presheaf.SheafConditionPairwiseIntersections.coneEquivInverseObj F U c).pt = c.pt


@[simp]
theorem uniqueUpToIso_inv_right (P : IsKan s) (Q : IsKan t) :
    (uniqueUpToIso P Q).inv.right = Q.desc s

{s t : CategoryTheory.Bicategory.LeftExtension f g}

(P.uniqueUpToIso Q).inv.right = Q.desc s


protected theorem compl_top : (⊤ : LowerSet α).compl = ⊤


/-- If a function has a Taylor series at order at least `1`, then the term of order `1` of this
series is a derivative of `f`. -/
theorem HasFTaylorSeriesUpTo.hasFDerivAt (h : HasFTaylorSeriesUpTo n f p) (hn : 1 ≤ n) (x : E) :
    HasFDerivAt f (continuousMultilinearCurryFin1 𝕜 E F (p x 1)) x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{n : ℕ∞}
{p : E → FormalMultilinearSeries 𝕜 E F}
(h : HasFTaylorSeriesUpTo n f p)
(hn : 1 ≤ n)
(x : E)

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


theorem volume_preserving_finTwoArrow (α : Type u) [MeasureSpace α]
    [SigmaFinite (volume : Measure α)] :
    MeasurePreserving (@MeasurableEquiv.finTwoArrow α _) volume volume

MeasureTheory.MeasurePreserving (⇑MeasurableEquiv.finTwoArrow) MeasureTheory.volume MeasureTheory.volume


theorem _root_.lipschitzWith_max : LipschitzWith 1 fun p : ℝ × ℝ => max p.1 p.2


protected theorem bijective (e : r ≃r s) : Bijective e

{α : Type u_1}
{β : Type u_2}
{r : α → α → Prop}
{s : β → β → Prop}
(e : r ≃r s)


protected theorem continuousWithinAt (e : M₁ ≃SL[σ₁₂] M₂) {s : Set M₁} {x : M₁} :
    ContinuousWithinAt (e : M₁ → M₂) s x

{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₁}
{x : M₁}


lemma Sigma.uncountable (a : α) [Uncountable (π a)] : Uncountable (Sigma π)

{α : Type u}
{π : α → Type w}
(a : α)
[Uncountable (π a)]


theorem preimage_subset_dom (s : Set β) : f.preimage s ⊆ f.Dom

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


@[simp]
theorem coe_mul (f g : α →ᵈ α) : ⇑(f * g) = f ∘ g

{α : Type u_1}
[PseudoEMetricSpace α]
(f g : α →ᵈ α)


@[simp]
theorem Ioo_filter_lt (a b c : α) : (Ioo a b).filter (· < c) = Ioo a (min b c)

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

Finset.filter (fun x => x < c) (Finset.Ioo a b) = Finset.Ioo a (min b c)


theorem mul_def (f g : E →ₗᵢ[R] E) : (f * g : E →ₗᵢ[R] E) = f.comp g

{R : Type u_1}
{E : Type u_5}
[Semiring R]
[SeminormedAddCommGroup E]
[Module R E]
(f g : E →ₗᵢ[R] E)


theorem StrictConvexSpace.of_norm_add_ne_two
    (h : ∀ ⦃x y : E⦄, ‖x‖ = 1 → ‖y‖ = 1 → x ≠ y → ‖x + y‖ ≠ 2) : StrictConvexSpace ℝ E


/-- Three points are collinear if and only if they are not affinely independent. -/
theorem collinear_iff_not_affineIndependent_set {p₁ p₂ p₃ : P} :
    Collinear k ({p₁, p₂, p₃} : Set P) ↔ ¬AffineIndependent k ![p₁, p₂, p₃]

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[DivisionRing k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
{p₁ p₂ p₃ : P}

Collinear k {p₁, p₂, p₃} ↔ ¬AffineIndependent k ![p₁, p₂, p₃]


/-- The leading coefficient of a product of polynomials is equal to
the product of the leading coefficients, provided that this product is nonzero.

See `Polynomial.leadingCoeff_prod` (without the `'`) for a version for integral domains,
where this condition is automatically satisfied.
-/
theorem leadingCoeff_prod' (h : (∏ i ∈ s, (f i).leadingCoeff) ≠ 0) :
    (∏ i ∈ s, f i).leadingCoeff = ∏ i ∈ s, (f i).leadingCoeff

{R : Type u}
{ι : Type w}
(s : Finset ι)
[CommSemiring R]
(f : ι → R[X])
(h : ∏ i ∈ s, (f i).leadingCoeff ≠ 0)


private theorem mul_smul_aux (x y : T) (p : LocalizedModule S M) :
    (x * y) • p = x • y • p

{R : Type u}
[CommSemiring R]
{S : Submonoid R}
{M : Type v}
[AddCommMonoid M]
[Module R M]
{T : Type u_1}
[CommSemiring T]
[Algebra R T]
[IsLocalization S T]
(x y : T)
(p : LocalizedModule S M)


theorem inner_self_eq_norm_sq_to_K (x : E) : ⟪x, x⟫ = (‖x‖ : 𝕜) ^ 2

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
(x : E)


lemma Y_sub_polynomialY : Y - W.polynomialY = W.negPolynomial

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


@[simp]
theorem Finset.univ_eq_attach {α : Type u} (s : Finset α) : (univ : Finset s) = s.attach


/-- The second marginal of a product probability measure is the second probability measure. -/
@[simp] lemma map_snd_prod : (μ.prod ν).map measurable_snd.aemeasurable = ν

(μ : MeasureTheory.ProbabilityMeasure α)

(ν : MeasureTheory.ProbabilityMeasure β)


@[simp]
theorem toFun_eq_coe (f : E →ₗ.[R] F) (x : f.domain) : f.toFun x = f x

{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)
(x : ↥f.domain)


theorem basis_restrict_iff (hR : R ⊆ M.E := by aesop_mat) :
    (M ↾ R).Basis I X ↔ M.Basis I X ∧ X ⊆ R

{α : Type u_1}
{M : Matroid α}
{R I X : Set α}
(hR : R ⊆ M.E := by aesop_mat)

(M.restrict R).Basis I X ↔ M.Basis I X ∧ X ⊆ R


@[simp]
theorem apply_one [DecidableEq E] (x : E) : (1 : AddGroupSeminorm E) x = if x = 0 then 0 else 1

{E : Type u_4}
[AddGroup E]
[DecidableEq E]
(x : E)


theorem directedOn_singleton (h : Reflexive r) (a : α) : DirectedOn r ({a} : Set α)

{α : Type u}
{r : α → α → Prop}
(h : Reflexive r)
(a : α)


/-- If a complex function is differentiable at a real point, then the induced real function is also
differentiable at this point, with a derivative equal to the real part of the complex derivative. -/
theorem HasStrictDerivAt.real_of_complex (h : HasStrictDerivAt e e' z) :
    HasStrictDerivAt (fun x : ℝ => (e x).re) e'.re z

{e : ℂ → ℂ}
{e' : ℂ}
{z : ℝ}
(h : HasStrictDerivAt e e' ↑z)

HasStrictDerivAt (fun x => (e ↑x).re) e'.re z


@[reassoc (attr := simp)]
lemma d_pOpcycles [K.HasHomology j] : K.d i j ≫ K.pOpcycles j = 0


@[simp]
theorem mk_toOrderHom {a b : SimplexCategory} (f : SimplexCategory.Hom a b) : mk f.toOrderHom = f


/-- If `H ≤ K`, then `G/H ≃ G/K × K/H` constructively, using the provided right inverse
of the quotient map `G → G/K`. The classical version is `Subgroup.quotientEquivProdOfLE`. -/
@[to_additive (attr := simps)
  "If `H ≤ K`, then `G/H ≃ G/K × K/H` constructively, using the provided right inverse
  of the quotient map `G → G/K`. The classical version is `AddSubgroup.quotientEquivSumOfLE`."]
def quotientEquivProdOfLE' (h_le : s ≤ t) (f : α ⧸ t → α)
    (hf : Function.RightInverse f QuotientGroup.mk) : α ⧸ s ≃ (α ⧸ t) × t ⧸ s.subgroupOf t

(hf : Function.RightInverse f QuotientAddGroup.mk)

(AddSubgroup.quotientEquivSumOfLE' h_le f hf) a =
  (Quotient.map' id ⋯ a, Quotient.map' (fun g => ⟨-f (Quotient.mk'' g) + g, ⋯⟩) ⋯ a)


theorem commute_add_nat (n : ℕ) : Function.Commute f (· + n)


theorem map_sup_comap_of_surjective (S T : L.Substructure N) :
    (S.comap f ⊔ T.comap f).map f = S ⊔ T

{L : FirstOrder.Language}
{M : Type w}
{N : Type u_1}
[L.Structure M]
[L.Structure N]
{f : L.Hom M N}
(hf : Function.Surjective ⇑f)
(S T : L.Substructure N)

FirstOrder.Language.Substructure.map f
    (FirstOrder.Language.Substructure.comap f S ⊔ FirstOrder.Language.Substructure.comap f T) =
  S ⊔ T


theorem pow_fst (n : ℕ) (a : 𝓜(𝕜, A)) : (a ^ n).fst = a.fst ^ n

{𝕜 : Type u_1}
{A : Type u_2}
[NontriviallyNormedField 𝕜]
[NonUnitalNormedRing A]
[NormedSpace 𝕜 A]
[SMulCommClass 𝕜 A A]
[IsScalarTower 𝕜 A A]
(n : ℕ)
(a : 𝓜(𝕜, A))


theorem _root_.LE.le.not_gf {x y : PGame} : x ≤ y → ¬y ⧏ x


/-- The infimum edistance is invariant under isometries -/
theorem infEdist_image (hΦ : Isometry Φ) : infEdist (Φ x) (Φ '' t) = infEdist x t

{α : Type u}
{β : Type v}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
{x : α}
{t : Set α}
{Φ : α → β}
(hΦ : Isometry Φ)

EMetric.infEdist (Φ x) (Φ '' t) = EMetric.infEdist x t


lemma card_image_le {f : α → β} (hs : s.Finite) : Nat.card (f '' s) ≤ Nat.card s

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


@[to_additive]
theorem uniformity_eq_comap_nhds_one' : 𝓤 G = comap (fun p : G × G => p.2 / p.1) (𝓝 (1 : G))

(G : Type u_1)
[Group G]
[TopologicalSpace G]
[TopologicalGroup G]

𝓤 G = Filter.comap (fun p => p.2 / p.1) (𝓝 1)


theorem contMDiffAt_snd {p : M × N} : ContMDiffAt (I.prod J) J n Prod.snd p

{𝕜 : 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]
{F : Type u_11}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type u_12}
[TopologicalSpace G]
{J : ModelWithCorners 𝕜 F G}
{N : Type u_13}
[TopologicalSpace N]
[ChartedSpace G N]
{n : ℕ∞}
{p : M × N}


/-- Reinterpret a bounded order homomorphism as a bounded order homomorphism between the dual
orders. -/
@[simps]
protected def dual :
    BoundedOrderHom α β ≃
      BoundedOrderHom αᵒᵈ
        βᵒᵈ

{α : Type u_2}
{β : Type u_3}
[Preorder α]
[BoundedOrder α]
[Preorder β]
[BoundedOrder β]
(f : BoundedOrderHom αᵒᵈ βᵒᵈ)

(BoundedOrderHom.dual.symm f).toOrderHom = OrderHom.dual.symm f.toOrderHom


@[simp]
theorem botEquiv_symm (x : F) : (botEquiv F E).symm x = algebraMap F _ x

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

(IntermediateField.botEquiv F E).symm x = (algebraMap F ↥⊥) x


/-- `canonicalEquiv f f'` is the canonical equivalence between the fractional
ideals in `P` and in `P'`, which are both localizations of `R` at `S`. -/
noncomputable irreducible_def canonicalEquiv : FractionalIdeal S P ≃+* FractionalIdeal S P'

{R : Type u_5}
[CommRing R]
(S : Submonoid R)
(P : Type u_6)
[CommRing P]
[Algebra R P]
[loc : IsLocalization S P]
(P' : Type u_7)
[CommRing P']
[Algebra R P']
[loc' : IsLocalization S P']

FractionalIdeal.canonicalEquiv S P P' =
  FractionalIdeal.mapEquiv
    (let __src := IsLocalization.ringEquivOfRingEquiv P P' (RingEquiv.refl R) ⋯;
    { toEquiv := __src.toEquiv, map_mul' := ⋯, map_add' := ⋯, commutes' := ⋯ })


theorem set_smul_subset_iff₀ (ha : a ≠ 0) {A B : Set β} : a • A ⊆ B ↔ A ⊆ a⁻¹ • B

{α : Type u_2}
{β : Type u_3}
[GroupWithZero α]
[MulAction α β]
{a : α}
(ha : a ≠ 0)
{A B : Set β}

a • A ⊆ B ↔ A ⊆ a⁻¹ • B


@[simp] theorem coe_sSup (S : Set L) : (↑(sSup S) : α) = sSup {(s : α) | s ∈ S}

{α : Type u_1}
[CompleteLattice α]
{L : CompleteSublattice α}
(S : Set ↥L)


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

(F : CategoryTheory.Functor I A.Elements)

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


theorem card_Ioo_eq_card_Ico_sub_one (a b : α) : card (Ioo a b) = card (Ico a b) - 1

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

Multiset.card (Multiset.Ioo a b) = Multiset.card (Multiset.Ico a b) - 1


theorem toMatrix_eq_toMatrix_constr [Fintype ι] [DecidableEq ι] (v : ι → M) :
    e.toMatrix v = LinearMap.toMatrix e e (e.constr ℕ v)

{ι : Type u_1}
{R : Type u_5}
{M : Type u_6}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
(e : Basis ι R M)
[Fintype ι]
[DecidableEq ι]
(v : ι → M)

e.toMatrix v = (LinearMap.toMatrix e e) ((e.constr ℕ) v)


@[simp]
lemma lcs_sup {N₁ N₂ : LieSubmodule R L M} {k : ℕ} :
    (N₁ ⊔ N₂).lcs k = N₁.lcs k ⊔ N₂.lcs k

{R : Type u}
{L : Type v}
{M : Type w}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
{N₁ N₂ : LieSubmodule R L M}
{k : ℕ}

LieSubmodule.lcs k (N₁ ⊔ N₂) = LieSubmodule.lcs k N₁ ⊔ LieSubmodule.lcs k N₂


@[to_additive]
theorem finprod_cond_eq_prod_of_cond_iff (f : α → M) {p : α → Prop} {t : Finset α}
    (h : ∀ {x}, f x ≠ 1 → (p x ↔ x ∈ t)) : (∏ᶠ (i) (_ : p i), f i) = ∏ i ∈ t, f i

(h : ∀ {x : α}, f x ≠ 0 → (p x ↔ x ∈ t))

∑ᶠ (i : α) (_ : p i), f i = ∑ i ∈ t, f i


theorem modifyLast_append_one (f : α → α) (a : α) (l : List α) :
    modifyLast f (l ++ [a]) = l ++ [f a]

{α : Type u}
(f : α → α)
(a : α)
(l : List α)

List.modifyLast f (l ++ [a]) = l ++ [f a]


/-- If `E / F` is an algebraic extension, `F` is separably closed,
then `E` is also separably closed. -/
theorem Algebra.IsAlgebraic.isSepClosed [Algebra.IsAlgebraic F E]
    [IsSepClosed F] : IsSepClosed E

{F : Type u}
{E : Type v}
[Field F]
[Field E]
[Algebra F E]
[Algebra.IsAlgebraic F E]
[IsSepClosed F]


theorem mod_coe (m k : ℕ+) :
    (mod m k : ℕ) = ite ((m : ℕ) % (k : ℕ) = 0) (k : ℕ) ((m : ℕ) % (k : ℕ))

↑(m.mod k) = if ↑m % ↑k = 0 then ↑k else ↑m % ↑k


/-- If `f` and `g` are Lipschitz functions, so is the induced map `f × g` to the product type. -/
protected theorem prod {f : α → β} {Kf : ℝ≥0} (hf : LipschitzWith Kf f) {g : α → γ} {Kg : ℝ≥0}
    (hg : LipschitzWith Kg g) : LipschitzWith (max Kf Kg) fun x => (f x, g x)

{α : Type u}
{β : Type v}
{γ : Type w}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
[PseudoEMetricSpace γ]
{f : α → β}
{Kf : ℝ≥0}
(hf : LipschitzWith Kf f)
{g : α → γ}
{Kg : ℝ≥0}
(hg : LipschitzWith Kg g)


@[simp]
theorem lift_inr (g : G) : lift f₁ f₂ h (inr g) = f₂ g

(h : ∀ (g : G), f₁.comp (MulEquiv.toMonoidHom (φ g)) = (MulEquiv.toMonoidHom (MulAut.conj (f₂ g))).comp f₁)

(SemidirectProduct.lift f₁ f₂ h) (SemidirectProduct.inr g) = f₂ g


theorem irreducible_factor (f : K[X]) : Irreducible (factor f)


@[to_additive]
theorem isPWO_support_mulAntidiagonal : { a | (mulAntidiagonal hs ht a).Nonempty }.IsPWO

{α : Type u_1}
[OrderedCancelAddCommMonoid α]
{s t : Set α}
{hs : s.IsPWO}
{ht : t.IsPWO}

{a | (Finset.addAntidiagonal hs ht a).Nonempty}.IsPWO


theorem if_ctx_congr {α : Sort u} {b c : Prop} [dec_b : Decidable b] [dec_c : Decidable c]
    {x y u v : α} (h_c : b ↔ c) (h_t : c → x = u) (h_e : ¬c → y = v) : ite b x y = ite c u v

(if b then x else y) = if c then u else v


theorem antitone_setOf [Preorder α] {p : α → β → Prop} (hp : ∀ b, Antitone fun a => p a b) :
    Antitone fun a => { b | p a b }

(hp : ∀ (b : β), Antitone fun a => p a b)


theorem map_comp_residue (f : R →+* S) [IsLocalRingHom f] :
    (ResidueField.map f).comp (residue R) = (residue S).comp f

{R : Type u_1}
{S : Type u_2}
[CommRing R]
[LocalRing R]
[CommRing S]
[LocalRing S]
(f : R →+* S)
[IsLocalRingHom f]

(LocalRing.ResidueField.map f).comp (LocalRing.residue R) = (LocalRing.residue S).comp f


theorem mem_of_subset {s₁ s₂ : Finset α} {a : α} : s₁ ⊆ s₂ → a ∈ s₁ → a ∈ s₂

{α : Type u_1}
{s₁ s₂ : Finset α}
{a : α}

s₁ ⊆ s₂ → a ∈ s₁ → a ∈ s₂


theorem measurePreserving_symm (μ : Measure α) (e : α ≃ᵐ β) :
    MeasurePreserving e.symm (map e μ) μ

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
[MeasurableSpace β]
(μ : MeasureTheory.Measure α)
(e : α ≃ᵐ β)

MeasureTheory.MeasurePreserving (⇑e.symm) (MeasureTheory.Measure.map (⇑e) μ) μ


theorem one_sub' (a : PosNum) : sub' 1 a = (pred' a).toZNumNeg


@[simp]
theorem floor_nat_add (n : ℕ) (a : α) : ⌊↑n + a⌋ = n + ⌊a⌋

{α : Type u_2}
[LinearOrderedRing α]
[FloorRing α]
(n : ℕ)
(a : α)


lemma IsLUB.mem_of_nonempty_of_not_isSuccLimit
    (hs : IsLUB s x) (hne : s.Nonempty) (hx : ¬ IsSuccLimit x) : x ∈ s

{α : Type u_2}
[ConditionallyCompleteLinearOrder α]
{s : Set α}
{x : α}
(hs : IsLUB s x)
(hne : s.Nonempty)
(hx : ¬Order.IsSuccLimit x)


theorem _root_.Polynomial.ker_mapRingHom (f : R →+* S) :
    LinearMap.ker (Polynomial.mapRingHom f).toSemilinearMap = f.ker.map (C : R →+* R[X])

{R : Type u}
{S : Type u_1}
[CommSemiring R]
[Semiring S]
(f : R →+* S)

LinearMap.ker (Polynomial.mapRingHom f).toSemilinearMap = Ideal.map Polynomial.C (RingHom.ker f)


theorem adjugate_transpose (A : Matrix n n α) : (adjugate A)ᵀ = adjugate Aᵀ

{n : Type v}
{α : Type w}
[DecidableEq n]
[Fintype n]
[CommRing α]
(A : Matrix n n α)


@[simp]
theorem nullHomotopicMap_f_eq_zero {k₀ : ι} (hk₀ : ∀ l : ι, ¬c.Rel k₀ l)
    (hk₀' : ∀ l : ι, ¬c.Rel l k₀) (hom : ∀ i j, C.X i ⟶ D.X j) :
    (nullHomotopicMap hom).f k₀ = 0

{ι : Type u_1}
{V : Type u}
[CategoryTheory.Category.{v, u} V]
[CategoryTheory.Preadditive V]
{c : ComplexShape ι}
{C D : HomologicalComplex V c}
{k₀ : ι}
(hk₀ : ∀ (l : ι), ¬c.Rel k₀ l)
(hk₀' : ∀ (l : ι), ¬c.Rel l k₀)
(hom : (i j : ι) → C.X i ⟶ D.X j)

(Homotopy.nullHomotopicMap hom).f k₀ = 0


lemma lowerClosure_sup_sdiff (hts : t ⊆ s) (hst : ∀ b ∈ s, ∀ c ∈ t, c ≤ b → b ∈ t) :
    lowerClosure t ⊔ s.sdiff t = s

{α : Type u_1}
[Preorder α]
{s : LowerSet α}
{t : Set α}
(hts : t ⊆ ↑s)
(hst : ∀ b ∈ s, ∀ c ∈ t, c ≤ b → b ∈ t)


@[simp]
theorem closure_empty_iff (s : Set X) : closure s = ∅ ↔ s = ∅

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


/-- The functor `C(·, R)₀` from topological spaces with zero (and `ContinuousMapZero` maps) to
non-unital star algebras. -/
@[simps]
def nonUnitalStarAlgHom_precomp (f : C(X, Y)₀) : C(Y, R)₀ →⋆ₙₐ[R] C(X, R)₀

{X : Type u_1}
{Y : Type u_2}
(R : Type u_4)
[Zero X]
[Zero Y]
[TopologicalSpace X]
[TopologicalSpace Y]
[TopologicalSpace R]
[CommSemiring R]
[StarRing R]
[TopologicalSemiring R]
[ContinuousStar R]
(f : ContinuousMapZero X Y)
(g : ContinuousMapZero Y R)

(ContinuousMapZero.nonUnitalStarAlgHom_precomp R f) g = g.comp f


@[ext 1100]
theorem prod.hom_ext {W X Y : C} [HasBinaryProduct X Y] {f g : W ⟶ X ⨯ Y}
    (h₁ : f ≫ prod.fst = g ≫ prod.fst) (h₂ : f ≫ prod.snd = g ≫ prod.snd) : f = g

(h₁ : f ≫ CategoryTheory.Limits.prod.fst = g ≫ CategoryTheory.Limits.prod.fst)

(h₂ : f ≫ CategoryTheory.Limits.prod.snd = g ≫ CategoryTheory.Limits.prod.snd)


theorem vsub_midpoint (p₁ p₂ p : P) :
    p -ᵥ midpoint R p₁ p₂ = (⅟ 2 : R) • (p -ᵥ p₁) + (⅟ 2 : R) • (p -ᵥ p₂)

{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[Ring R]
[Invertible 2]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
(p₁ p₂ p : P)

p -ᵥ midpoint R p₁ p₂ = ⅟2 • (p -ᵥ p₁) + ⅟2 • (p -ᵥ p₂)


@[to_additive] lemma prod_range_succ (f : ℕ → M) (n : ℕ) :
    ((range n.succ).map f).prod = ((range n).map f).prod * f n

{M : Type u_4}
[Monoid M]
(f : ℕ → M)
(n : ℕ)

(List.map f (List.range n.succ)).prod = (List.map f (List.range n)).prod * f n


theorem exists_eq_pow_mul_of_isAffineOpen (X : Scheme) (U : X.Opens) (hU : IsAffineOpen U)
    (f : Γ(X, U)) (x : Γ(X, X.basicOpen f)) :
    ∃ (n : ℕ) (y : Γ(X, U)), y |_ X.basicOpen f = (f |_ X.basicOpen f) ^ n * x

(X : AlgebraicGeometry.Scheme)
(U : X.Opens)
(hU : AlgebraicGeometry.IsAffineOpen U)
(f : ↑Γ(X, U))
(x : ↑Γ(X, X.basicOpen f))

∃ n y, (y |_ X.basicOpen f) ⋯ = (f |_ X.basicOpen f) ⋯ ^ n * x


@[to_additive]
theorem _root_.MonoidHom.pi_ext [Finite ι] [DecidableEq ι] {f g : (∀ i, M i) →* γ}
    (h : ∀ i x, f (Pi.mulSingle i x) = g (Pi.mulSingle i x)) : f = g

(h : ∀ (i : ι) (x : M i), f (Pi.single i x) = g (Pi.single i x))


/-- The graph of a measurable function is a measurable set. -/
theorem measurableSet_graph (hf : Measurable f) :
    MeasurableSet { p : α × ℝ | p.snd = f p.fst }

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


theorem natDegree_removeFactor (f : K[X]) : f.removeFactor.natDegree = f.natDegree - 1


/-- An unbounded set has zero diameter. If you would prefer to get the value ∞, use `EMetric.diam`.
This lemma makes it possible to avoid side conditions in some situations -/
theorem diam_eq_zero_of_unbounded (h : ¬IsBounded s) : diam s = 0

{α : Type u}
[PseudoMetricSpace α]
{s : Set α}
(h : ¬Bornology.IsBounded s)


@[simp]
theorem prodMonoidal_rightUnitor_hom_snd (X : C₁ × C₂) :
    ((ρ_ X).hom : X ⊗ 𝟙_ _ ⟶ X).2 = (ρ_ X.2).hom

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

(CategoryTheory.MonoidalCategory.rightUnitor X).hom.2 = (CategoryTheory.MonoidalCategory.rightUnitor X.2).hom


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

{π₁ π₂ : BoxIntegral.TaggedPrepartition I}


@[simp]
theorem explicitCokernelDesc_zero {X Y Z : SemiNormedGrp.{u}} {f : X ⟶ Y} :
    explicitCokernelDesc (show f ≫ (0 : Y ⟶ Z) = 0 from CategoryTheory.Limits.comp_zero) = 0

SemiNormedGrp.explicitCokernelDesc ⋯ = 0


/-- `x` is an accumulation point of a set `C` iff it is a cluster point of `C ∖ {x}`. -/
theorem acc_principal_iff_cluster (x : X) (C : Set X) :
    AccPt x (𝓟 C) ↔ ClusterPt x (𝓟 (C \ {x}))

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


protected theorem Countable.prod {s : Set α} {t : Set β} (hs : s.Countable) (ht : t.Countable) :
    Set.Countable (s ×ˢ t)

{α : Type u}
{β : Type v}
{s : Set α}
{t : Set β}
(hs : s.Countable)
(ht : t.Countable)


/-- The generic case of the first simplicial identity -/
theorem δ_comp_δ {n} {i j : Fin (n + 2)} (H : i ≤ j) :
    δ i ≫ δ j.succ = δ j ≫ δ (Fin.castSucc i)

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


theorem ndinter_le_left (s t : Multiset α) : ndinter s t ≤ s

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


/-- General theorem for `Finset.induction_on_pi`-style induction principles. -/
theorem induction_on_pi_of_choice (r : ∀ i, α i → Finset (α i) → Prop)
    (H_ex : ∀ (i) (s : Finset (α i)), s.Nonempty → ∃ x ∈ s, r i x (s.erase x))
    {p : (∀ i, Finset (α i)) → Prop} (f : ∀ i, Finset (α i)) (h0 : p fun _ ↦ ∅)
    (step :
      ∀ (g : ∀ i, Finset (α i)) (i : ι) (x : α i),
        r i x (g i) → p g → p (update g i (insert x (g i)))) :
    p f

(r : (i : ι) → α i → Finset (α i) → Prop)

(H_ex : ∀ (i : ι) (s : Finset (α i)), s.Nonempty → ∃ x ∈ s, r i x (s.erase x))

(step : ∀ (g : (i : ι) → Finset (α i)) (i : ι) (x : α i), r i x (g i) → p g → p (Function.update g i (insert x (g i))))


@[zify_simps] lemma natCast_dvd (a b : Nat) : a ∣ b ↔ (a : Int) ∣ (b : Int)

a ∣ b ↔ ↑a ∣ ↑b


@[to_additive]
theorem mem_sup {s t : Submonoid N} {x : N} : x ∈ s ⊔ t ↔ ∃ y ∈ s, ∃ z ∈ t, y * z = x

{N : Type u_4}
[CommMonoid N]
{s t : Submonoid N}
{x : N}


/-- A Lie module may be pulled back along a morphism of Lie algebras. -/
theorem LieModule.compLieHom [Module R M] [LieModule R L₂ M] :
    @LieModule R L₁ M _ _ _ _ _ (LieRingModule.compLieHom M f)

{R : Type u}
{L₁ : Type v}
{L₂ : Type w}
(M : Type w₁)
[CommRing R]
[LieRing L₁]
[LieAlgebra R L₁]
[LieRing L₂]
[LieAlgebra R L₂]
[AddCommGroup M]
[LieRingModule L₂ M]
(f : L₁ →ₗ⁅R⁆ L₂)
[Module R M]
[LieModule R L₂ M]


theorem w_integral {D : ℝ} (Dpos : 0 < D) : ∫ x : E, w D x ∂μ = 1

(E : Type u_1)
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[FiniteDimensional ℝ E]
[MeasurableSpace E]
[BorelSpace E]
{D : ℝ}
(Dpos : 0 < D)

∫ (x : E), ExistsContDiffBumpBase.w D x ∂MeasureTheory.Measure.addHaar = 1


/-- UV-compression reduces the size of the shadow of `𝒜` if, for all `x ∈ u` there is `y ∈ v`
such that `𝒜` is `(u.erase x, v.erase y)`-compressed. This is the key UV-compression fact needed for
Kruskal-Katona. -/
theorem card_shadow_compression_le (u v : Finset α)
    (huv : ∀ x ∈ u, ∃ y ∈ v, IsCompressed (u.erase x) (v.erase y) 𝒜) :
    (∂ (𝓒 u v 𝒜)).card ≤ (∂ 𝒜).card

(huv : ∀ x ∈ u, ∃ y ∈ v, UV.IsCompressed (u.erase x) (v.erase y) 𝒜)

(UV.compression u v 𝒜).shadow.card ≤ 𝒜.shadow.card


theorem const_smul {f : X → Y} {x : X} {c : ℝ} (hc : c ≠ 0) (hf : ConformalAt f x) :
    ConformalAt (c • f) x

{X : Type u_1}
{Y : Type u_2}
[NormedAddCommGroup X]
[NormedAddCommGroup Y]
[NormedSpace ℝ X]
[NormedSpace ℝ Y]
{f : X → Y}
{x : X}
{c : ℝ}
(hc : c ≠ 0)
(hf : ConformalAt f x)


theorem symm_bijective {f₀ f₁ : C(X, Y)} :
    Function.Bijective (Homotopy.symm : Homotopy f₀ f₁ → Homotopy f₁ f₀)

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


@[simp]
theorem comp {X Y Z : PresheafedSpace.{_, _, v} C} (α : X ⟶ Y) (β : Y ⟶ Z) (x : X) :
    (α ≫ β).stalkMap x =
      (β.stalkMap (α.base x) : Z.presheaf.stalk (β.base (α.base x)) ⟶ Y.presheaf.stalk (α.base x)) ≫
        (α.stalkMap x : Y.presheaf.stalk (α.base x) ⟶ X.presheaf.stalk x)

{X Y Z : AlgebraicGeometry.PresheafedSpace C}

AlgebraicGeometry.PresheafedSpace.Hom.stalkMap (α ≫ β) x =
  AlgebraicGeometry.PresheafedSpace.Hom.stalkMap β (α.base x) ≫ AlgebraicGeometry.PresheafedSpace.Hom.stalkMap α x


@[simp]
theorem LinearMap.toMatrix₂_symm :
    (LinearMap.toMatrix₂ b₁ b₂).symm = Matrix.toLinearMap₂ (N₂ := N₂) b₁ b₂

{R : Type u_1}
{M₁ : Type u_7}
{M₂ : Type u_8}
{N₂ : Type u_11}
{n : Type u_12}
{m : Type u_13}
[CommSemiring R]
[AddCommMonoid M₁]
[Module R M₁]
[AddCommMonoid M₂]
[Module R M₂]
[AddCommMonoid N₂]
[Module R N₂]
[DecidableEq n]
[Fintype n]
[DecidableEq m]
[Fintype m]
(b₁ : Basis n R M₁)
(b₂ : Basis m R M₂)

(LinearMap.toMatrix₂ b₁ b₂).symm = Matrix.toLinearMap₂ b₁ b₂


private lemma lambda_sq_div_u₅_mul : λ ^ 2 ∣ S.u₅ * (λ ^ (S.multiplicity - 1) * S.X) ^ 3

(S : FermatLastTheoremForThreeGen.Solution hζ)

(hζ.toInteger - 1) ^ 2 ∣
  ↑(FermatLastTheoremForThreeGen.Solution.u₅ S) *
    ((hζ.toInteger - 1) ^ (S.multiplicity - 1) * FermatLastTheoremForThreeGen.Solution.X S) ^ 3


theorem unbounded_gt_inter_gt [LinearOrder α] [NoMinOrder α] (a : α) :
    Unbounded (· > ·) (s ∩ { b | b < a }) ↔ Unbounded (· > ·) s

{α : Type u_1}
{s : Set α}
[LinearOrder α]
[NoMinOrder α]
(a : α)

Set.Unbounded (fun x x_1 => x > x_1) (s ∩ {b | b < a}) ↔ Set.Unbounded (fun x x_1 => x > x_1) s


@[simp]
theorem sumAssoc_apply_inl_inr (b) : sumAssoc α β γ (inl (inr b)) = inr (inl b)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
(b : β)

(Equiv.sumAssoc α β γ) (Sum.inl (Sum.inr b)) = Sum.inr (Sum.inl b)


theorem natDegree_multiset_sum_le (l : Multiset S[X]) :
    natDegree l.sum ≤ (l.map natDegree).foldr max max_left_comm 0

{S : Type u_1}
[Semiring S]
(l : Multiset S[X])

l.sum.natDegree ≤ Multiset.foldr max ⋯ 0 (Multiset.map Polynomial.natDegree l)


theorem smeval_at_zero : p.smeval (0 : S) = (p.coeff 0) • (1 : S)

(R : Type u_1)
[Semiring R]
(p : Polynomial R)
{S : Type u_2}
[NonAssocSemiring S]
[Module R S]
[Pow S ℕ]
[NatPowAssoc S]


@[to_additive (attr := simp)]
theorem smul_eq {R : Type*} (y : PUnit) (r : R) : r • y = unit


nonrec theorem IsLocalMax.sub (hf : IsLocalMax f a) (hg : IsLocalMin g a) :
    IsLocalMax (fun x => f x - g x) a

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[OrderedAddCommGroup β]
{f g : α → β}
{a : α}
(hf : IsLocalMax f a)
(hg : IsLocalMin g a)


@[to_additive]
lemma mem_units_of_val_mem_inv_val_mem (S : Submonoid M) {x : Mˣ} (h₁ : (x : M) ∈ S)
    (h₂ : ((x⁻¹ : Mˣ) : M) ∈ S) : x ∈ S.units

{M : Type u_1}
[Monoid M]
(S : Submonoid M)
{x : Mˣ}
(h₁ : ↑x ∈ S)
(h₂ : ↑x⁻¹ ∈ S)


/-- `rpow` version of `Multiset.prod_map_pow`. -/
theorem _root_.Real.multiset_prod_map_rpow {ι} (s : Multiset ι) (f : ι → ℝ)
    (hs : ∀ i ∈ s, (0 : ℝ) ≤ f i) (r : ℝ) :
    (s.map (f · ^ r)).prod = (s.map f).prod ^ r

{ι : Type u_1}
(s : Multiset ι)
(f : ι → ℝ)
(hs : ∀ i ∈ s, 0 ≤ f i)
(r : ℝ)

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


@[simp]
theorem rdropWhile_concat_pos (x : α) (h : p x) : rdropWhile p (l ++ [x]) = rdropWhile p l

{α : Type u_1}
(p : α → Bool)
(l : List α)
(x : α)
(h : p x = true)

List.rdropWhile p (l ++ [x]) = List.rdropWhile p l


/-- Any continuous bijection of compact Hausdorff spaces is an isomorphism. -/
theorem isIso_of_bijective {X Y : CompHausLike.{u} P} (f : X ⟶ Y) (bij : Function.Bijective f) :
    IsIso f

{P : TopCat → Prop}
{X Y : CompHausLike P}
(f : X ⟶ Y)
(bij : Function.Bijective ⇑f)


@[to_additive (attr := simp)]
theorem univ_mul_univ : (univ : Set α) * univ = univ


theorem mul_dioph : DiophFn fun v => f v * g v

{α : Type}
{f g : (α → ℕ) → ℕ}
(df : Dioph.DiophFn f)
(dg : Dioph.DiophFn g)


theorem Integrable.smul_measure {f : α → β} (h : Integrable f μ) {c : ℝ≥0∞} (hc : c ≠ ∞) :
    Integrable f (c • μ)

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup β]
{f : α → β}
(h : MeasureTheory.Integrable f μ)
{c : ℝ≥0∞}
(hc : c ≠ ⊤)


@[to_additive (attr := simp)]
theorem comp_one (f : β →*o γ) : f.comp (1 : α →*o β) = 1

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[Preorder α]
[Preorder β]
[Preorder γ]
[MulOneClass α]
[MulOneClass β]
[MulOneClass γ]
(f : β →*o γ)


theorem Finite.finite_of_encard_le {s : Set α} {t : Set β} (hs : s.Finite)
    (h : t.encard ≤ s.encard) : t.Finite

{α : Type u_1}
{β : Type u_2}
{s : Set α}
{t : Set β}
(hs : s.Finite)
(h : t.encard ≤ s.encard)


lemma tendsto_zpow_atTop_atTop {n : ℤ} (hn : 0 < n) : Tendsto (fun x : α ↦ x ^ n) atTop atTop

{α : Type u_3}
[LinearOrderedSemifield α]
{n : ℤ}
(hn : 0 < n)

Filter.Tendsto (fun x => x ^ n) Filter.atTop Filter.atTop


lemma exists_eq_iSup_of_not_isSuccLimit (hf : ¬ IsSuccLimit (⨆ i, f i)) :
    ∃ i, f i = ⨆ i, f i

{ι : Type u_1}
{α : Type u_2}
[CompleteLinearOrder α]
{f : ι → α}
(hf : ¬Order.IsSuccLimit (⨆ i, f i))


@[simp]
theorem deriv_neg'' : deriv (fun x : 𝕜 => -x) x = -1

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


theorem remainingToString {it} (h : ValidFor l r it) : it.remainingToString = ⟨r⟩

{l r : List Char}
{it : String.Iterator}
(h : String.Iterator.ValidFor l r it)


lemma IsSublattice.preimage [FunLike F β α] [LatticeHomClass F β α]
    (hs : IsSublattice s) (f : F) :
    IsSublattice (f ⁻¹' s)

{F : Type u_1}
{α : Type u_2}
{β : Type u_3}
[Lattice α]
[Lattice β]
{s : Set α}
[FunLike F β α]
[LatticeHomClass F β α]
(hs : IsSublattice s)
(f : F)


@[simp]
theorem hausdorffMeasure_preimage (e : X ≃ᵢ Y) (d : ℝ) (s : Set Y) : μH[d] (e ⁻¹' s) = μH[d] s

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


@[simp]
theorem mul_refl (e : E ≃ₗᵢ[R] E) : e * refl _ _ = e

{R : Type u_1}
{E : Type u_5}
[Semiring R]
[SeminormedAddCommGroup E]
[Module R E]
(e : E ≃ₗᵢ[R] E)


theorem map_nhdsWithin_eq (h : e.IsImage s t) (hx : x ∈ e.source) : map e (𝓝[s] x) = 𝓝[t] e x

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


@[simp high]
theorem toFinsupp_C_mul_X (a : R) : Polynomial.toFinsupp (C a * X) = Finsupp.single 1 a

(Polynomial.C a * Polynomial.X).toFinsupp = Finsupp.single 1 a


/-- An order is an `OrderTop` if it has a greatest element.
We state this using a data mixin, holding the value of `⊤` and the greatest element constraint. -/
class OrderTop (α : Type u) [LE α] extends Top α where
  /-- `⊤` is the greatest element -/
  le_top : ∀ a : α, a ≤ ⊤

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


@[to_additive (attr := simp, norm_cast)]
theorem coe_dfinsupp_prod [Monoid R] [CommMonoid S] (f : Π₀ i, β i) (g : ∀ i, β i → R →* S) :
    ⇑(f.prod g) = f.prod fun a b => ⇑(g a b)

[(i : ι) → (x : β i) → Decidable (x ≠ 0)]


/-- **Schreier's Lemma**: If `R : Finset G` is a `rightTransversal` of `H : Subgroup G`
  with `1 ∈ R`, and if `G` is generated by `S : Finset G`, then `H` is generated by the `Finset`
  `(R * S).image (fun g ↦ g * (toFun hR g)⁻¹)`. -/
theorem closure_mul_image_eq_top' [DecidableEq G] {R S : Finset G}
    (hR : (R : Set G) ∈ rightTransversals (H : Set G)) (hR1 : (1 : G) ∈ R)
    (hS : closure (S : Set G) = ⊤) :
    closure (((R * S).image fun g => ⟨_, mul_inv_toFun_mem hR g⟩ : Finset H) : Set H) = ⊤

(hR : ↑R ∈ Subgroup.rightTransversals ↑H)

Subgroup.closure ↑(Finset.image (fun g => ⟨g * (↑(Subgroup.MemRightTransversals.toFun hR g))⁻¹, ⋯⟩) (R * S)) = ⊤


/-- Given a congruence relation `c` on a monoid and a homomorphism `f` constant on `c`'s
    equivalence classes, `f` has the same image as the homomorphism that `f` induces on the
    quotient. -/
@[to_additive "Given an additive congruence relation `c` on an `AddMonoid` and a homomorphism `f`
constant on `c`'s equivalence classes, `f` has the same image as the homomorphism that `f` induces
on the quotient."]
theorem lift_range (H : c ≤ ker f) : MonoidHom.mrange (c.lift f H) = MonoidHom.mrange f

{M : Type u_1}
{P : Type u_3}
[AddZeroClass M]
[AddZeroClass P]
{c : AddCon M}
{f : M →+ P}
(H : c ≤ AddCon.ker f)

AddMonoidHom.mrange (c.lift f H) = AddMonoidHom.mrange f


@[simp]
theorem coe_toEquiv_trans : (e₁₂ : A ≃ B).trans e₂₃ = (e₁₂.trans e₂₃ : A ≃ C)

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
{C : Type u_4}
[CommSemiring R]
[AddCommMonoid A]
[AddCommMonoid B]
[AddCommMonoid C]
[Module R A]
[Module R B]
[Module R C]
[CoalgebraStruct R A]
[CoalgebraStruct R B]
[CoalgebraStruct R C]
{e₁₂ : A ≃ₗc[R] B}
{e₂₃ : B ≃ₗc[R] C}


/-- Rotation by π is negation. -/
theorem rotation_pi_apply (x : V) : o.rotation π x = -x

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


theorem cons_mem_subchain_iff :
    (a::l) ∈ s.subchain ↔ a ∈ s ∧ l ∈ s.subchain ∧ ∀ b ∈ l.head?, a < b

{α : Type u_1}
[LT α]
{s : Set α}
{l : List α}
{a : α}

a :: l ∈ s.subchain ↔ a ∈ s ∧ l ∈ s.subchain ∧ ∀ b ∈ l.head?, a < b


@[to_additive]
lemma MonoidHom.tendsto_coe_cofinite_of_discrete [T2Space G] {H : Type*} [Group H] {f : H →* G}
    (hf : Function.Injective f) (hf' : DiscreteTopology f.range) :
    Tendsto f cofinite (cocompact _)

{G : Type u_1}
[AddGroup G]
[TopologicalSpace G]
[TopologicalAddGroup G]
[T2Space G]
{H : Type u_2}
[AddGroup H]
{f : H →+ G}
(hf : Function.Injective ⇑f)
(hf' : DiscreteTopology ↥f.range)

Filter.Tendsto (⇑f) Filter.cofinite (Filter.cocompact G)


@[simp]
theorem coe_toLinearEquiv (f : M₁ ≃SL[σ₁₂] M₂) : ⇑f.toLinearEquiv = f

{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₂]
(f : M₁ ≃SL[σ₁₂] M₂)


@[simp]
theorem coe_inclusion {X : TopCat} {U : Opens X} :
    (inclusion U : U → X) = Subtype.val

{X : TopCat}
{U : TopologicalSpace.Opens ↑X}


/-- `SubmultiplicativeHomClass F α β` states that `F` is a type of submultiplicative morphisms. -/
@[to_additive SubadditiveHomClass]
class SubmultiplicativeHomClass (F α β : Type*) [Mul α] [Mul β] [LE β] [FunLike F α β] : Prop where
  /-- the image of a product is less or equal than the product of the images. -/
  map_mul_le_mul (f : F) : ∀ a b, f (a * b) ≤ f a * f b

[self : SubmultiplicativeHomClass F α β]


theorem mul_sup (a b c : ℝ≥0) : a * (b ⊔ c) = a * b ⊔ a * c


@[reassoc (attr := simp)]
theorem functor_unit_comp (e : C ≌ D) (X : C) :
    e.functor.map (e.unit.app X) ≫ e.counit.app (e.functor.obj X) = 𝟙 (e.functor.obj X)

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

CategoryTheory.CategoryStruct.comp (e.functor.map (e.unit.app X)) (e.counit.app (e.functor.obj X)) =
  CategoryTheory.CategoryStruct.id (e.functor.obj X)


lemma div_nonpos_of_nonneg_of_nonpos {a b : EReal} (h : 0 ≤ a) (h' : b ≤ 0) : a / b ≤ 0


lemma extend_finset_to_connected (Gpc : G.Preconnected) {t : Finset V} (tn : t.Nonempty) :
    ∃ (t' : Finset V), t ⊆ t' ∧ (G.induce (t' : Set V)).Connected

{V : Type u}
{G : SimpleGraph V}
(Gpc : G.Preconnected)
{t : Finset V}
(tn : t.Nonempty)

∃ t', t ⊆ t' ∧ (SimpleGraph.induce (↑t') G).Connected


@[simp]
theorem inf_eq_inter (s t : Multiset α) : s ⊓ t = s ∩ t

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


@[simp]
theorem toMeasure_toOuterMeasure (m : OuterMeasure α) (h : ms ≤ m.caratheodory) :
    (m.toMeasure h).toOuterMeasure = m.trim

{α : Type u_1}
[ms : MeasurableSpace α]
(m : MeasureTheory.OuterMeasure α)
(h : ms ≤ m.caratheodory)


theorem neg_coe_abs_toReal_of_sign_nonpos {θ : Angle} (h : θ.sign ≤ 0) : -↑|θ.toReal| = θ


theorem mem_nhdsSet_iff_exists : s ∈ 𝓝ˢ t ↔ ∃ U : Set X, IsOpen U ∧ t ⊆ U ∧ U ⊆ s

{X : Type u_1}
[TopologicalSpace X]
{s t : Set X}

s ∈ 𝓝ˢ t ↔ ∃ U, IsOpen U ∧ t ⊆ U ∧ U ⊆ s


@[simp]
theorem symm_inv (α : X ≅ Y) : α.symm.inv = α.hom

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


theorem progMeasurable_min_stopping_time [MetrizableSpace ι] (hτ : IsStoppingTime f τ) :
    ProgMeasurable f fun i ω => min i (τ ω)

{Ω : Type u_1}
{ι : Type u_3}
{m : MeasurableSpace Ω}
[LinearOrder ι]
[MeasurableSpace ι]
[TopologicalSpace ι]
[OrderTopology ι]
[SecondCountableTopology ι]
[BorelSpace ι]
{τ : Ω → ι}
{f : MeasureTheory.Filtration ι m}
[TopologicalSpace.MetrizableSpace ι]
(hτ : MeasureTheory.IsStoppingTime f τ)

MeasureTheory.ProgMeasurable f fun i ω => min i (τ ω)


/-- Given `Uᵢ ×[Z] Y`, this is the glued fibered product `X ×[Z] Y`. -/
@[simps U V f t t', simps (config := .lemmasOnly) J]
def gluing : Scheme.GlueData.{u}

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

(AlgebraicGeometry.Scheme.Pullback.gluing 𝒰 f g).U i = CategoryTheory.Limits.pullback (𝒰.map i ≫ f) g


@[reassoc (attr := simp)]
theorem rightAdjointUniq_hom_app_counit {F : C ⥤ D} {G G' : D ⥤ C} (adj1 : F ⊣ G) (adj2 : F ⊣ G')
    (x : D) :
    F.map ((rightAdjointUniq adj1 adj2).hom.app x) ≫ adj2.counit.app x = adj1.counit.app x

{C : Type u_1}
{D : Type u_2}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Category.{u_4, u_2} D]
{F : C ⥤ D}
{G G' : D ⥤ C}
(adj1 : F ⊣ G)
(adj2 : F ⊣ G')
(x : D)

F.map ((adj1.rightAdjointUniq adj2).hom.app x) ≫ adj2.counit.app x = adj1.counit.app x


@[simp]
theorem pow_zero (e : C ≌ C) : e ^ (0 : ℤ) = Equivalence.refl

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


@[simp] lemma mem_mapSubmodule {m : AEval R M a} :
    m ∈ mapSubmodule a hp ↔ (of R M a).symm m ∈ p

(hp : p ≤ Submodule.comap ((Algebra.lsmul R R M) a) p)

m ∈ Module.AEval.mapSubmodule a hp ↔ (Module.AEval.of R M a).symm m ∈ p


@[deprecated getElem_cons_drop (since := "2024-06-12")]
theorem get_cons_drop (l : List α) (i) : get l i :: drop (i + 1) l = drop i l

{α : Type u_1}
(l : List α)
(i : Fin l.length)

l.get i :: List.drop (↑i + 1) l = List.drop (↑i) l


@[to_additive]
theorem lift_eq_prod_map {β : Type v} [Group β] {f : α → β} {x} : lift f x = prod (map f x)

{α : Type u}
{β : Type v}
[Group β]
{f : α → β}
{x : FreeGroup α}

(FreeGroup.lift f) x = FreeGroup.prod ((FreeGroup.map f) x)


theorem IsDiag.sub [AddGroup α] {A B : Matrix n n α} (ha : A.IsDiag) (hb : B.IsDiag) :
    (A - B).IsDiag

{α : Type u_1}
{n : Type u_4}
[AddGroup α]
{A B : Matrix n n α}
(ha : A.IsDiag)
(hb : B.IsDiag)


@[deprecated eq_of_dist_eq_zero (since := "2024-03-10")]
protected theorem eq_of_dist_eq_zero (x y : Completion α) (h : dist x y = 0) : x = y

{α : Type u}
[PseudoMetricSpace α]
(x y : UniformSpace.Completion α)
(h : dist x y = 0)


/-- The `orthogonalProjection` lies in the given subspace. -/
theorem orthogonalProjection_mem {s : AffineSubspace ℝ P} [Nonempty s]
    [HasOrthogonalProjection s.direction] (p : P) : ↑(orthogonalProjection s p) ∈ s

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
{s : AffineSubspace ℝ P}
[Nonempty ↥s]
[HasOrthogonalProjection s.direction]
(p : P)

↑((EuclideanGeometry.orthogonalProjection s) p) ∈ s


protected theorem sub_eq_max_sub (n m : Nat) : n - m = max n m - m


theorem gcd_mk_mk {a b : α} : gcd (Associates.mk a) (Associates.mk b) = Associates.mk (gcd a b)

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


lemma smul_nonneg' [SMulPosMono α β] (ha : 0 ≤ a) (hb : 0 ≤ b₁) : 0 ≤ a • b₁

{α : Type u_1}
{β : Type u_2}
{a : α}
{b₁ : β}
[Zero α]
[Zero β]
[SMulWithZero α β]
[Preorder α]
[Preorder β]
[SMulPosMono α β]
(ha : 0 ≤ a)
(hb : 0 ≤ b₁)


theorem maximum_cons (a : α) (l : List α) : maximum (a :: l) = max ↑a (maximum l)

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


theorem toLipschitzWith (hf : ContractingWith K f) : LipschitzWith K f

{α : Type u_1}
[EMetricSpace α]
{K : ℝ≥0}
{f : α → α}
(hf : ContractingWith K f)


@[simp]
lemma reverse_kstar (l : Language α) : l∗.reverse = l.reverse∗


/-- A functor `F : C ⥤ D` sends isomorphisms `i : X ≅ Y` to isomorphisms `F.obj X ≅ F.obj Y` -/
@[simps]
def mapIso (F : C ⥤ D) {X Y : C} (i : X ≅ Y) : F.obj X ≅ F.obj Y

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
(F : CategoryTheory.Functor C D)
{X Y : C}
(i : X ≅ Y)


@[simp]
theorem coe_star (f : C(α, β)) : ⇑(star f) = star (⇑f)

{α : Type u_2}
{β : Type u_3}
[TopologicalSpace α]
[TopologicalSpace β]
[Star β]
[ContinuousStar β]
(f : C(α, β))


theorem sequentialFunctor_map : Antitone (sequentialFunctor_obj J)

(J : Type u_2)
[Countable J]
[Preorder J]
[CategoryTheory.IsCofiltered J]


theorem go_succ {k p n : ℕ} : go (k+1) p n = go k p n + 1

Nat.maxPowDiv.go (k + 1) p n = Nat.maxPowDiv.go k p n + 1


theorem Antitone.union [Preorder β] {f g : β → Set α} (hf : Antitone f) (hg : Antitone g) :
    Antitone fun x => f x ∪ g x

{α : Type u_1}
{β : Type u_2}
[Preorder β]
{f g : β → Set α}
(hf : Antitone f)
(hg : Antitone g)


@[simp]
theorem toFinset_eq_empty {m : Multiset α} : m.toFinset = ∅ ↔ m = 0

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


theorem bot_lt_add [LT α] {a b : WithBot α} : ⊥ < a + b ↔ ⊥ < a ∧ ⊥ < b

{α : Type u}
[Add α]
[LT α]
{a b : WithBot α}


@[measurability]
theorem Measurable.sup (hf : Measurable f) (hg : Measurable g) : Measurable fun a => f a ⊔ g a

{M : Type u_1}
[MeasurableSpace M]
{α : Type u_2}
{m : MeasurableSpace α}
{f g : α → M}
[Sup M]
[MeasurableSup₂ M]
(hf : Measurable f)
(hg : Measurable g)


theorem symm_bijective : Function.Bijective (symm : I → I)


lemma Even.pow_pos_iff (hn : Even n) (h₀ : n ≠ 0) : 0 < a ^ n ↔ a ≠ 0

{R : Type u_3}
[LinearOrderedSemiring R]
{a : R}
{n : ℕ}
[ExistsAddOfLE R]
(hn : Even n)
(h₀ : n ≠ 0)


@[to_additive]
theorem Function.Injective.multipliable_iff {g : γ → β} (hg : Injective g)
    (hf : ∀ x ∉ Set.range g, f x = 1) : Multipliable (f ∘ g) ↔ Multipliable f

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[CommMonoid α]
[TopologicalSpace α]
{f : β → α}
{g : γ → β}
(hg : Function.Injective g)
(hf : ∀ x ∉ Set.range g, f x = 1)


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


protected theorem map_dvd (f : α →+* β) {a b : α} : a ∣ b → f a ∣ f b

{α : Type u_2}
{β : Type u_3}
[Semiring α]
[Semiring β]
(f : α →+* β)
{a b : α}


/-- If there is a fundamental solution, it is unique. -/
theorem subsingleton {a b : Solution₁ d} (ha : IsFundamental a) (hb : IsFundamental b) : a = b

{d : ℤ}
{a b : Pell.Solution₁ d}
(ha : Pell.IsFundamental a)
(hb : Pell.IsFundamental b)


/-- The augmented Čech conerve construction, as a functor from `Arrow C`. -/
@[simps]
def augmentedCechConerve : Arrow C ⥤ CosimplicialObject.Augmented C

[∀ (n : ℕ) (f : CategoryTheory.Arrow C), CategoryTheory.Limits.HasWidePushout f.left (fun x => f.right) fun x => f.hom]

CategoryTheory.CosimplicialObject.augmentedCechConerve.obj f = f.augmentedCechConerve


lemma yonedaEquiv_ι_presheafHom (P : Cᵒᵖ ⥤ Type v₁) {X : C} (f : yoneda.obj X ⟶ P) :
    yonedaEquiv (f ≫ presheafHom φ P) =
      (G.map f).app (Opposite.op (F.obj X)) ((φ.app X).app _ (𝟙 _))

{G : CategoryTheory.Functor (CategoryTheory.Functor Cᵒᵖ (Type v₁)) (CategoryTheory.Functor Dᵒᵖ (Type v₁))}

(φ : F.comp CategoryTheory.yoneda ⟶ CategoryTheory.yoneda.comp G)

(P : CategoryTheory.Functor Cᵒᵖ (Type v₁))

CategoryTheory.yonedaEquiv
    (CategoryTheory.CategoryStruct.comp f (CategoryTheory.Presheaf.compYonedaIsoYonedaCompLan.presheafHom φ P)) =
  (G.map f).app (Opposite.op (F.obj X))
    ((φ.app X).app (Opposite.op (F.obj X)) (CategoryTheory.CategoryStruct.id (Opposite.unop (Opposite.op (F.obj X)))))


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

HasSum (fun n => z ^ (2 * n) / ↑(2 * n)!) (Complex.cosh z)


@[simp]
theorem liftQ_mkQ (f : M →ₛₗ[τ₁₂] M₂) (h) : (p.liftQ f h).comp p.mkQ = f

{R : Type u_1}
{M : Type u_2}
[Ring R]
[AddCommGroup M]
[Module R M]
(p : Submodule R M)
{R₂ : Type u_3}
{M₂ : Type u_4}
[Ring R₂]
[AddCommGroup M₂]
[Module R₂ M₂]
{τ₁₂ : R →+* R₂}
(f : M →ₛₗ[τ₁₂] M₂)
(h : p ≤ LinearMap.ker f)


@[simp]
theorem preimage_add_const_Ioo : (fun x => x + a) ⁻¹' Ioo b c = Ioo (b - a) (c - a)

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

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


lemma isLocalAtTarget [P.IsMultiplicative]
    (hP : ∀ {X Y Z : Scheme.{u}} (f : X ⟶ Y) (g : Y ⟶ Z) [IsOpenImmersion g], P (f ≫ g) → P f) :
    IsLocalAtTarget P

{P : CategoryTheory.MorphismProperty AlgebraicGeometry.Scheme}

(hP :
  ∀ {X Y Z : AlgebraicGeometry.Scheme} (f : X ⟶ Y) (g : Y ⟶ Z) [inst : AlgebraicGeometry.IsOpenImmersion g],
    P (f ≫ g) → P f)


lemma Y_eq_negY_of_Y_eq [NoZeroDivisors R] {P Q : Fin 3 → R} (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)
    (hy' : P y * Q z ^ 3 = W'.negY Q * P z ^ 3) : P y = W'.negY P


{α : Type u_1}
[LinearOrder α]
{b c : α}


@[simp]
theorem integrableOn_add_measure :
    IntegrableOn f s (μ + ν) ↔ IntegrableOn f s μ ∧ IntegrableOn f s ν

{α : Type u_1}
{E : Type u_3}
[MeasurableSpace α]
[NormedAddCommGroup E]
{f : α → E}
{s : Set α}
{μ ν : MeasureTheory.Measure α}

MeasureTheory.IntegrableOn f s (μ + ν) ↔ MeasureTheory.IntegrableOn f s μ ∧ MeasureTheory.IntegrableOn f s ν


theorem MDifferentiableAt.hasMFDerivAt (h : MDifferentiableAt I I' f x) :
    HasMFDerivAt I I' f x (mfderiv I I' f x)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
{f : M → M'}
{x : M}
[Is : SmoothManifoldWithCorners I M]
[I's : SmoothManifoldWithCorners I' M']
(h : MDifferentiableAt I I' f x)


/-- The inversion with center `c` and radius `R` maps a sphere passing through the center to a
hyperplane. -/
theorem inversion_mem_perpBisector_inversion_iff (hR : R ≠ 0) (hx : x ≠ c) (hy : y ≠ c) :
    inversion c R x ∈ perpBisector c (inversion c R y) ↔ dist x y = dist y c

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
{c x y : P}
{R : ℝ}
(hR : R ≠ 0)
(hx : x ≠ c)
(hy : y ≠ c)

EuclideanGeometry.inversion c R x ∈ AffineSubspace.perpBisector c (EuclideanGeometry.inversion c R y) ↔
  dist x y = dist y c


/-- The image of a binary bicone under a functor. -/
@[simps!]
def mapBinaryBicone {X Y : C} (b : BinaryBicone X Y) : BinaryBicone (F.obj X) (F.obj Y)

(b : CategoryTheory.Limits.BinaryBicone X Y)


lemma Basis'.basis_closure_right (h : M.Basis' I X) : M.Basis I (M.closure X)

{α : Type u_2}
{M : Matroid α}
{X I : Set α}
(h : M.Basis' I X)


@[simp]
theorem act'_symm_apply (x y : R) : (act' x).symm y = x ◃⁻¹ y


lemma findGreatest_spec (hmb : m ≤ n) (hm : P m) : P (Nat.findGreatest P n)

{m : ℕ}
{P : ℕ → Prop}
[DecidablePred P]
{n : ℕ}
(hmb : m ≤ n)
(hm : P m)


@[to_additive]
theorem map_mul_right_nhds_one (x : G) : map (· * x) (𝓝 1) = 𝓝 x

{G : Type w}
[TopologicalSpace G]
[Group G]
[TopologicalGroup G]
(x : G)

Filter.map (fun x_1 => x_1 * x) (𝓝 1) = 𝓝 x


/-- The standard one-dimensional simplex in `Fin 2 → 𝕜` is equivalent to the unit interval. -/
@[simps (config := .asFn)]
def stdSimplexEquivIcc : stdSimplex 𝕜 (Fin 2) ≃ Icc (0 : 𝕜) 1

(𝕜 : Type u_1)
[OrderedRing 𝕜]
(f : ↑(stdSimplex 𝕜 (Fin 2)))


theorem measurable_of_countable [Countable α] [MeasurableSingletonClass α] (f : α → β) :
    Measurable f

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
[MeasurableSpace β]
[Countable α]
[MeasurableSingletonClass α]
(f : α → β)


/-- Alternate definition of a block -/
theorem IsBlock.mk_notempty {B : Set X} :
    IsBlock G B ↔ ∀ g g' : G, g • B ∩ g' • B ≠ ∅ → g • B = g' • B

{G : Type u_1}
{X : Type u_2}
[SMul G X]
{B : Set X}

MulAction.IsBlock G B ↔ ∀ (g g' : G), g • B ∩ g' • B ≠ ∅ → g • B = g' • B


@[reassoc (attr := simp)]
theorem diagonal_fst : diagonal f ≫ pullback.fst _ _ = 𝟙 _

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
{X Y : C}
(f : X ⟶ Y)
[CategoryTheory.Limits.HasPullback f f]

CategoryTheory.Limits.pullback.diagonal f ≫ CategoryTheory.Limits.pullback.fst f f = 𝟙 X


/-- A finitely generated idempotent ideal is generated by an idempotent element -/
theorem isIdempotentElem_iff_of_fg {R : Type*} [CommRing R] (I : Ideal R) (h : I.FG) :
    IsIdempotentElem I ↔ ∃ e : R, IsIdempotentElem e ∧ I = R ∙ e

{R : Type u_1}
[CommRing R]
(I : Ideal R)
(h : I.FG)

IsIdempotentElem I ↔ ∃ e, IsIdempotentElem e ∧ I = Submodule.span R {e}


@[simp]
lemma algebraMap_galRestrictHom_apply (σ : L →ₐ[K] L) (x : B) :
    algebraMap B L (galRestrictHom A K L B σ x) = σ (algebraMap B L x)

(A : Type u_1)
(K : Type u_2)
(L : Type u_3)
(B : Type u_4)
[CommRing A]
[CommRing B]
[Algebra A B]
[Field K]
[Field L]
[Algebra A K]
[IsFractionRing A K]
[Algebra B L]
[Algebra K L]
[Algebra A L]
[IsScalarTower A B L]
[IsScalarTower A K L]
[IsIntegralClosure B A L]
[FiniteDimensional K L]
(σ : L →ₐ[K] L)
(x : B)

(algebraMap B L) (((galRestrictHom A K L B) σ) x) = σ ((algebraMap B L) x)


theorem mem_sSup_of_directedOn {S : Set (Subsemiring R)} (Sne : S.Nonempty)
    (hS : DirectedOn (· ≤ ·) S) {x : R} : x ∈ sSup S ↔ ∃ s ∈ S, x ∈ s

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


theorem not_ofNat_neg (n : Nat) : ¬((n : Int) < 0)


theorem IsAntichain.minimals_eq (h : IsAntichain r s) : minimals r s = s

{α : Type u_1}
{r : α → α → Prop}
{s : Set α}
(h : IsAntichain r s)


@[simp]
theorem right_eq_sup : b = a ⊔ b ↔ a ≤ b

{α : Type u}
[SemilatticeSup α]
{a b : α}


theorem appendFun_id_id {α : TypeVec n} {β : Type*} :
    (@TypeVec.id n α ::: @_root_.id β) = TypeVec.id

{n : ℕ}
{α : TypeVec.{u_1} n}
{β : Type u_1}


protected theorem mul_one (x : A ⊗[R] B) : mul x (1 ⊗ₜ 1) = x

{R : Type uR}
{A : Type uA}
{B : Type uB}
[CommSemiring R]
[NonAssocSemiring A]
[Module R A]
[SMulCommClass R A A]
[IsScalarTower R A A]
[NonAssocSemiring B]
[Module R B]
[SMulCommClass R B B]
[IsScalarTower R B B]
(x : A ⊗[R] B)

(Algebra.TensorProduct.mul x) (1 ⊗ₜ[R] 1) = x


/-- Compose a quadratic map with a linear function on the left. -/
@[simps! (config := { simpRhs := true })]
def _root_.LinearMap.compQuadraticMap' [CommSemiring S] [Algebra S R] [Module S N] [Module S M]
    [IsScalarTower S R N] [IsScalarTower S R M] [Module S P]
    (f : N →ₗ[S] P) (Q : QuadraticMap R M N) : QuadraticMap S M P

{S : Type u_1}
{R : Type u_3}
{M : Type u_4}
{N : Type u_5}
{P : Type u_6}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
[AddCommMonoid N]
[Module R N]
[AddCommMonoid P]
[CommSemiring S]
[Algebra S R]
[Module S N]
[Module S M]
[IsScalarTower S R N]
[IsScalarTower S R M]
[Module S P]
(f : N →ₗ[S] P)
(Q : QuadraticMap R M N)
(x : M)


@[to_additive (attr := simp)]
theorem prod_dite_irrel (p : Prop) [Decidable p] (s : Finset α) (f : p → α → β) (g : ¬p → α → β) :
    ∏ x ∈ s, (if h : p then f h x else g h x) =
      if h : p then ∏ x ∈ s, f h x else ∏ x ∈ s, g h x

{α : Type u_3}
{β : Type u_4}
[CommMonoid β]
(p : Prop)
[Decidable p]
(s : Finset α)
(f : p → α → β)
(g : ¬p → α → β)

(∏ x ∈ s, if h : p then f h x else g h x) = if h : p then ∏ x ∈ s, f h x else ∏ x ∈ s, g h x


theorem primeFactorsList_subset_of_dvd {n k : ℕ} (h : n ∣ k) (h' : k ≠ 0) :
    n.primeFactorsList ⊆ k.primeFactorsList


lemma logTaylor_zero : logTaylor 0 = fun _ ↦ 0


@[to_additive (attr := simp)]
theorem comap_inclusion_subgroupOf {K₁ K₂ : Subgroup G} (h : K₁ ≤ K₂) (H : Subgroup G) :
    (H.subgroupOf K₂).comap (inclusion h) = H.subgroupOf K₁

{G : Type u_1}
[AddGroup G]
{K₁ K₂ : AddSubgroup G}
(h : K₁ ≤ K₂)
(H : AddSubgroup G)

AddSubgroup.comap (AddSubgroup.inclusion h) (H.addSubgroupOf K₂) = H.addSubgroupOf K₁


@[simp]
theorem reverse.map_one : reverse (1 : CliffordAlgebra Q) = 1

{R : Type u_1}
[CommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
{Q : QuadraticForm R M}


@[simp]
theorem sign_mul (x y : EReal) : sign (x * y) = sign x * sign y

SignType.sign (x * y) = SignType.sign x * SignType.sign y


@[simp]
theorem coprime_sub_self_left {m n : ℕ} (h : m ≤ n) : Coprime (n - m) m ↔ Coprime n m


theorem ContDiffWithinAt.rpow_const_of_ne (hf : ContDiffWithinAt ℝ n f s x) (h : f x ≠ 0) :
    ContDiffWithinAt ℝ n (fun x => f x ^ p) s x

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : E → ℝ}
{x : E}
{s : Set E}
{p : ℝ}
{n : ℕ∞}
(hf : ContDiffWithinAt ℝ n f s x)
(h : f x ≠ 0)


/-- The measure equivalence between `EuclideanSpace ℝ ι` and `ι → ℝ` is volume preserving. -/
theorem EuclideanSpace.volume_preserving_measurableEquiv :
    MeasurePreserving (EuclideanSpace.measurableEquiv ι)

MeasureTheory.MeasurePreserving (⇑(EuclideanSpace.measurableEquiv ι)) MeasureTheory.volume MeasureTheory.volume


theorem le_of_forall_lt_rat_imp_le (h : ∀ q : ℚ, y < q → x ≤ q) : x ≤ y

{α : Type u_1}
[LinearOrderedField α]
[Archimedean α]
{x y : α}
(h : ∀ (q : ℚ), y < ↑q → x ≤ ↑q)


theorem isOpen_setOf_eventually_nhds {p : X → Prop} : IsOpen { x | ∀ᶠ y in 𝓝 x, p y }

{X : Type u}
[TopologicalSpace X]
{p : X → Prop}


/-- The existence of binary biproducts implies that there is at most one preadditive structure. -/
theorem biprod.add_eq_lift_id_desc [HasBinaryBiproduct X X] :
    f + g = biprod.lift (𝟙 X) (𝟙 X) ≫ biprod.desc f g

f + g = CategoryTheory.Limits.biprod.lift (𝟙 X) (𝟙 X) ≫ CategoryTheory.Limits.biprod.desc f g


protected theorem eq_mul_inv_iff_mul_eq {φ₁ φ₂ φ₃ : MvPowerSeries σ k}
    (h : constantCoeff σ k φ₃ ≠ 0) : φ₁ = φ₂ * φ₃⁻¹ ↔ φ₁ * φ₃ = φ₂

(h : (MvPowerSeries.constantCoeff σ k) φ₃ ≠ 0)

φ₁ = φ₂ * φ₃⁻¹ ↔ φ₁ * φ₃ = φ₂


nonrec lemma Nontrivial.exists_ne (hs : s.Nontrivial) (a : α) : ∃ b ∈ s, b ≠ a

{α : Type u_1}
{s : Finset α}
(hs : s.Nontrivial)
(a : α)


theorem lawfulFunctor
    (h : ∀ α β : Type u, @Functor.mapConst F _ α _ = Functor.map ∘ Function.const β) :
    LawfulFunctor F

(h : ∀ (α β : Type u), Functor.mapConst = Functor.map ∘ Function.const β)


lemma leftFractionRel_op_iff
    {X Y : C} (z₁ z₂ : W.RightFraction X Y) :
    LeftFractionRel z₁.op z₂.op ↔ RightFractionRel z₁ z₂

{C : Type u_1}
[CategoryTheory.Category.{u_3, u_1} C]
{W : CategoryTheory.MorphismProperty C}
{X Y : C}
(z₁ z₂ : W.RightFraction X Y)

CategoryTheory.MorphismProperty.LeftFractionRel z₁.op z₂.op ↔ CategoryTheory.MorphismProperty.RightFractionRel z₁ z₂


theorem hurwitzZetaEven_one_sub_two_mul_nat (hk : k ≠ 0) (hx : x ∈ Icc (0 : ℝ) 1) :
    hurwitzZetaEven x (1 - 2 * k) =
      -1 / (2 * k) * ((Polynomial.bernoulli (2 * k)).map (algebraMap ℚ ℂ)).eval (x : ℂ)

{k : ℕ}
{x : ℝ}
(hk : k ≠ 0)
(hx : x ∈ Set.Icc 0 1)

HurwitzZeta.hurwitzZetaEven (↑x) (1 - 2 * ↑k) =
  -1 / (2 * ↑k) * Polynomial.eval (↑x) (Polynomial.map (algebraMap ℚ ℂ) (Polynomial.bernoulli (2 * k)))


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

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

∀ (X_1 : C),
  ((CategoryTheory.Monoidal.CommMonFunctorCategoryEquivalence.counitIso.hom.app X).app X_1).hom =
    𝟙 ((CommMon_.forget₂Mon_ D).obj (X.obj X_1)).X


lemma minimalPrimes_eq_minimals : minimalPrimes R = minimals (· ≤ ·) (setOf Ideal.IsPrime)

minimalPrimes R = minimals (fun x x_1 => x ≤ x_1) (setOf Ideal.IsPrime)


/-- A nilpotent Lie algebra with a representation whose trace form is non-singular is Abelian. -/
lemma isLieAbelian_of_ker_traceForm_eq_bot (h : LinearMap.ker (traceForm R L M) = ⊥) :
    IsLieAbelian L

(h : LinearMap.ker (LieModule.traceForm R L M) = ⊥)


@[simp]
theorem intervalIntegrable_inv_one_add_sq :
    IntervalIntegrable (fun x : ℝ => (↑1 + x ^ 2)⁻¹) μ a b

IntervalIntegrable (fun x => (1 + x ^ 2)⁻¹) μ a b


lemma padicValRat_def (p : ℕ) (q : ℚ) :
    padicValRat p q = padicValInt p q.num - padicValNat p q.den

padicValRat p q = ↑(padicValInt p q.num) - ↑(padicValNat p q.den)


/-- The inverse of a homotopy equivalence. -/
@[simps]
def symm (e : HomotopyEquiv S₁ S₂) : HomotopyEquiv S₂ S₁

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Preadditive C]
{S₁ S₂ : CategoryTheory.ShortComplex C}
(e : S₁.HomotopyEquiv S₂)


@[simp]
theorem coe_basis {φ : ι → Type*} (b : ∀ i, Basis (φ i) R M) :
    ⇑(Finsupp.basis b) = fun ix : Σi, φ i => single ix.1 (b ix.1 ix.2)

{R : Type u_1}
{M : Type u_2}
{ι : Type u_3}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{φ : ι → Type u_4}
(b : (i : ι) → Basis (φ i) R M)

⇑(Finsupp.basis b) = fun ix => Finsupp.single ix.fst ((b ix.fst) ix.snd)


theorem expand_contract' [NoZeroDivisors R] {f : R[X]} (hf : Polynomial.derivative f = 0) :
    expand R p (contract p f) = f

{R : Type u}
[CommSemiring R]
(p : ℕ)
[ExpChar R p]
[NoZeroDivisors R]
{f : R[X]}
(hf : Polynomial.derivative f = 0)

(Polynomial.expand R p) (Polynomial.contract p f) = f


@[to_additive]
theorem mulSupport_eq_preimage (f : α → M) : mulSupport f = f ⁻¹' {1}ᶜ

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


@[to_additive (attr := simp) lt_add_iff_pos_left]
theorem lt_mul_iff_one_lt_left' [CovariantClass α α (swap (· * ·)) (· < ·)]
    [ContravariantClass α α (swap (· * ·)) (· < ·)] (a : α) {b : α} : a < b * a ↔ 1 < b

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

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


theorem map_mulVec [NonAssocSemiring R] [NonAssocSemiring S] (f : R →+* S) (M : Matrix m n R)
    (v : n → R) (i : m) : f ((M *ᵥ v) i) = (M.map f *ᵥ (f ∘ v)) i

{m : Type u_2}
{n : Type u_3}
{R : Type u_7}
{S : Type u_8}
[Fintype n]
[NonAssocSemiring R]
[NonAssocSemiring S]
(f : R →+* S)
(M : Matrix m n R)
(v : n → R)
(i : m)


@[simp]
theorem Equivalence_mk'_counit (functor inverse unit_iso counit_iso f) :
    (⟨functor, inverse, unit_iso, counit_iso, f⟩ : C ≌ D).counit = counit_iso.hom

(unit_iso : CategoryTheory.Functor.id C ≅ functor.comp inverse)

(counit_iso : inverse.comp functor ≅ CategoryTheory.Functor.id D)

(f :
  ∀ (X : C),
    CategoryTheory.CategoryStruct.comp (functor.map (unit_iso.hom.app X)) (counit_iso.hom.app (functor.obj X)) =
      CategoryTheory.CategoryStruct.id (functor.obj X))

{ functor := functor, inverse := inverse, unitIso := unit_iso, counitIso := counit_iso,
      functor_unitIso_comp := f }.counit =
  counit_iso.hom


protected theorem map_neg : D (-a) = -D a

{R : Type u_1}
[CommRing R]
{A : Type u_2}
[CommRing A]
[Algebra R A]
{M : Type u_3}
[AddCommGroup M]
[Module A M]
[Module R M]
(D : Derivation R A M)
(a : A)


theorem isRadical_of_eq_jacobson (h : jacobson I = I) : I.IsRadical

{R : Type u}
[CommRing R]
{I : Ideal R}
(h : I.jacobson = I)


@[simp]
theorem den_zero : ((0 : NumDenSameDeg 𝒜 x).den : A) = 1

{ι : Type u_1}
{R : Type u_2}
{A : Type u_3}
[AddCommMonoid ι]
[DecidableEq ι]
[CommRing R]
[CommRing A]
[Algebra R A]
{𝒜 : ι → Submodule R A}
[GradedAlgebra 𝒜]
(x : Submonoid A)

↑(HomogeneousLocalization.NumDenSameDeg.den 0) = 1


@[elab_as_elim]
protected theorem induction_on {P : Part α → Prop} (a : Part α) (hnone : P none)
    (hsome : ∀ a : α, P (some a)) : P a

{α : Type u_1}
{P : Part α → Prop}
(a : Part α)
(hnone : P Part.none)
(hsome : ∀ (a : α), P (Part.some a))