theorem realize_constantsVarsEquiv [L[[α]].Structure M] [(lhomWithConstants L α).IsExpansionOn M]
    {n} {φ : L[[α]].BoundedFormula β n} {v : β → M} {xs : Fin n → M} :
    (constantsVarsEquiv φ).Realize (Sum.elim (fun a => ↑(L.con a)) v) xs ↔ φ.Realize v xs

{φ : (L.withConstants α).BoundedFormula β n}

(FirstOrder.Language.BoundedFormula.constantsVarsEquiv φ).Realize (Sum.elim (fun a => ↑(L.con a)) v) xs ↔ φ.Realize v xs


@[simp]
theorem nhds_principal (s : Set α) : 𝓝 (𝓟 s) = 𝓟 (Iic (𝓟 s))


@[fun_prop]
theorem HasStrictFDerivAt.sub (hf : HasStrictFDerivAt f f' x) (hg : HasStrictFDerivAt g g' x) :
    HasStrictFDerivAt (fun x => f x - g x) (f' - g') x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f g : E → F}
{f' g' : E →L[𝕜] F}
{x : E}
(hf : HasStrictFDerivAt f f' x)
(hg : HasStrictFDerivAt g g' x)


@[to_additive]
theorem inter_div_union_subset_union : s₁ ∩ s₂ / (t₁ ∪ t₂) ⊆ s₁ / t₁ ∪ s₂ / t₂

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


theorem add_right_inj_of_lt_aleph0 {α β γ : Cardinal} (γ₀ : γ < aleph0) : α + γ = β + γ ↔ α = β

α + γ = β + γ ↔ α = β


/-- The mean value theorem on a convex set in dimension 1: if the derivative of a function is
bounded by `C`, then the function is `C`-Lipschitz. Version with `deriv`. -/
theorem norm_image_sub_le_of_norm_deriv_le {C : ℝ} (hf : ∀ x ∈ s, DifferentiableAt 𝕜 f x)
    (bound : ∀ x ∈ s, ‖deriv f x‖ ≤ C) (hs : Convex ℝ s) (xs : x ∈ s) (ys : y ∈ s) :
    ‖f y - f x‖ ≤ C * ‖y - x‖

{𝕜 : Type u_3}
{G : Type u_4}
[RCLike 𝕜]
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{f : 𝕜 → G}
{s : Set 𝕜}
{x y : 𝕜}
{C : ℝ}
(hf : ∀ x ∈ s, DifferentiableAt 𝕜 f x)
(bound : ∀ x ∈ s, ‖deriv f x‖ ≤ C)
(hs : Convex ℝ s)
(xs : x ∈ s)
(ys : y ∈ s)


theorem compress_of_disjoint_of_le (hua : Disjoint u a) (hva : v ≤ a) :
    compress u v a = (a ⊔ u) \ v

{α : Type u_1}
[GeneralizedBooleanAlgebra α]
[DecidableRel Disjoint]
[DecidableRel fun x x_1 => x ≤ x_1]
{u v a : α}
(hua : Disjoint u a)
(hva : v ≤ a)


theorem equivIccQuot_comp_mk_eq_toIocMod :
    equivIccQuot p a ∘ Quotient.mk'' = fun x =>
      Quot.mk _ ⟨toIocMod hp.out a x, Ioc_subset_Icc_self <| toIocMod_mem_Ioc _ _ x⟩

{𝕜 : Type u_1}
[LinearOrderedAddCommGroup 𝕜]
[TopologicalSpace 𝕜]
[OrderTopology 𝕜]
(p a : 𝕜)
[hp : Fact (0 < p)]
[Archimedean 𝕜]

⇑(AddCircle.equivIccQuot p a) ∘ Quotient.mk'' = fun x => Quot.mk (AddCircle.EndpointIdent p a) ⟨toIocMod ⋯ a x, ⋯⟩


theorem sub_pow_char_pow [CommRing R] {p : ℕ} [Fact p.Prime] [CharP R p] {n : ℕ} (x y : R) :
    (x - y) ^ p ^ n = x ^ p ^ n - y ^ p ^ n

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


@[simp (high)]
protected theorem mul (q r : ℚ_[p]) : ‖q * r‖ = ‖q‖ * ‖r‖

{p : ℕ}
[hp : Fact (Nat.Prime p)]
(q r : ℚ_[p])


/-- See also `Function.injective_iff_pairwise_ne` -/
lemma injOn_iff_pairwise_ne {s : Set ι} : InjOn f s ↔ s.Pairwise (f · ≠ f ·)

{α : Type u_1}
{ι : Type u_4}
{f : ι → α}
{s : Set ι}

Set.InjOn f s ↔ s.Pairwise fun x x_1 => f x ≠ f x_1


/-- Homotopy equivalent complexes become isomorphic in the homotopy category. -/
@[simps]
def isoOfHomotopyEquiv {C D : HomologicalComplex V c} (f : HomotopyEquiv C D) :
    (quotient V c).obj C ≅ (quotient V c).obj D

{ι : Type u_2}
{V : Type u}
[CategoryTheory.Category.{v, u} V]
[CategoryTheory.Preadditive V]
{c : ComplexShape ι}
{C D : HomologicalComplex V c}
(f : HomotopyEquiv C D)

(HomotopyCategory.isoOfHomotopyEquiv f).inv = (HomotopyCategory.quotient V c).map f.inv


/-- If `C` has finite coproducts, a functor `Discrete α ⥤ C` lifts to a functor
    `Finset (Discrete α) ⥤ C` by taking coproducts. -/
@[simps!]
def liftToFinset [HasFiniteCoproducts C] (F : Discrete α ⥤ C) : Finset (Discrete α) ⥤ C

(s : Finset (CategoryTheory.Discrete α))

(CategoryTheory.Limits.CoproductsFromFiniteFiltered.liftToFinset F).obj s = ∐ fun x => F.obj ↑x


theorem Nat.geom_sum_le {b : ℕ} (hb : 2 ≤ b) (a n : ℕ) :
    ∑ i ∈ range n, a / b ^ i ≤ a * b / (b - 1)

∑ i ∈ Finset.range n, a / b ^ i ≤ a * b / (b - 1)


@[simp]
theorem toDFinsupp_union (s t : Multiset α) : toDFinsupp (s ∪ t) = toDFinsupp s ⊔ toDFinsupp t

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

Multiset.toDFinsupp (s ∪ t) = Multiset.toDFinsupp s ⊔ Multiset.toDFinsupp t


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

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

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


lemma cpow_nat_mul (x : ℂ) (n : ℕ) (y : ℂ) : x ^ (n * y) = (x ^ y) ^ n


/-- A quaternion basis contains the information both sufficient and necessary to construct an
`R`-algebra homomorphism from `ℍ[R,c₁,c₂]` to `A`; or equivalently, a surjective
`R`-algebra homomorphism from `ℍ[R,c₁,c₂]` to an `R`-subalgebra of `A`.

Note that for definitional convenience, `k` is provided as a field even though `i_mul_j` fully
determines it. -/
structure Basis {R : Type*} (A : Type*) [CommRing R] [Ring A] [Algebra R A] (c₁ c₂ : R) where
  (i j k : A)
  i_mul_i : i * i = c₁ • (1 : A)
  j_mul_j : j * j = c₂ • (1 : A)
  i_mul_j : i * j = k
  j_mul_i : j * i = -k

(self : QuaternionAlgebra.Basis A c₁ c₂)


@[to_additive]
theorem prod_hom' [CommMonoid β] (s : Multiset ι) {F : Type*} [FunLike F α β]
    [MonoidHomClass F α β] (f : F)
    (g : ι → α) : (s.map fun i => f <| g i).prod = f (s.map g).prod

{ι : Type u_2}
{α : Type u_3}
{β : Type u_4}
[CommMonoid α]
[CommMonoid β]
(s : Multiset ι)
{F : Type u_6}
[FunLike F α β]
[MonoidHomClass F α β]
(f : F)
(g : ι → α)

(Multiset.map (fun i => f (g i)) s).prod = f (Multiset.map g s).prod


/-- If `f` is a smooth partition of unity on a set `s : Set M` and `g : ι → M → F` is a family of
functions such that `g i` is smooth at every point of the topological support of `f i`, then the sum
`fun x ↦ ∑ᶠ i, f i x • g i x` is smooth on the whole manifold. -/
theorem smooth_finsum_smul {g : ι → M → F}
    (hg : ∀ (i), ∀ x ∈ tsupport (f i), SmoothAt I 𝓘(ℝ, F) (g i) x) :
    Smooth I 𝓘(ℝ, F) fun x => ∑ᶠ i, f i x • g i x

(hg : ∀ (i : ι), ∀ x ∈ tsupport ⇑(f i), SmoothAt I 𝓘(ℝ, F) (g i) x)

Smooth I 𝓘(ℝ, F) fun x => ∑ᶠ (i : ι), (f i) x • g i x


theorem StrictMonoOn.le_iff_le (hf : StrictMonoOn f s) {a b : α} (ha : a ∈ s) (hb : b ∈ s) :
    f a ≤ f b ↔ a ≤ b

{α : Type u}
{β : Type v}
[LinearOrder α]
[Preorder β]
{f : α → β}
{s : Set α}
(hf : StrictMonoOn f s)
{a b : α}
(ha : a ∈ s)
(hb : b ∈ s)


theorem counit_tensorObj :
    Coalgebra.counit (R := R) (A := (CoalgebraCat.of R M ⊗ CoalgebraCat.of R N : CoalgebraCat R))
      = Coalgebra.counit (A := M ⊗[R] N)

{R : Type u}
[CommRing R]
{M N : Type u}
[AddCommGroup M]
[AddCommGroup N]
[Module R M]
[Module R N]
[Coalgebra R M]
[Coalgebra R N]


theorem ofPrime_valuation_eq_one_iff_mem_primeCompl (A : ValuationSubring K) (P : Ideal A)
    [P.IsPrime] (x : A) : (ofPrime A P).valuation x = 1 ↔ x ∈ P.primeCompl

{K : Type u}
[Field K]
(A : ValuationSubring K)
(P : Ideal ↥A)
[P.IsPrime]
(x : ↥A)

(A.ofPrime P).valuation ↑x = 1 ↔ x ∈ P.primeCompl


protected theorem bijective (e : E) : Function.Bijective (e : α → β)

{E : Sort u_1}
{α : Sort u_3}
{β : Sort u_4}
[iE : EquivLike E α β]
(e : E)


@[simp]
theorem empty_subset (x : PSet.{u}) : (∅ : PSet) ⊆ x


protected theorem Perm.symm {l₁ l₂ : List α} (h : l₁ ~ l₂) : l₂ ~ l₁

{α : Type u_1}
{l₁ l₂ : List α}
(h : l₁ ~ l₂)


@[measurability]
theorem measurable_ereal_toReal : Measurable EReal.toReal


theorem rightLim_eq_of_eq_bot [TopologicalSpace α] [OrderTopology α] (f : α → β) {a : α}
    (h : 𝓝[>] a = ⊥) : rightLim f a = f a

{α : Type u_1}
{β : Type u_2}
[LinearOrder α]
[TopologicalSpace β]
[TopologicalSpace α]
[OrderTopology α]
(f : α → β)
{a : α}
(h : 𝓝[>] a = ⊥)


theorem choose_one_right [NatPowAssoc R] (r : R) : choose r 1 = r

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


@[simp] theorem false_or (p : Prop) : (False ∨ p) = p


/-- If `f` is a collection of linear maps, then the construction `MultilinearMap.compLinearMap`
sending a multilinear map `g` to `g (f₁ ⬝ , ..., fₙ ⬝ )` is linear in `g` and multilinear in
`f₁, ..., fₙ`. -/
@[simps] def compLinearMapMultilinear :
  @MultilinearMap R ι (fun i ↦ M₁ i →ₗ[R] M₁' i)
    ((MultilinearMap R M₁' M₂) →ₗ[R] MultilinearMap R M₁ M₂) _ _ _
      (fun i ↦ LinearMap.module) _

{R : Type uR}
{ι : Type uι}
{M₁ : ι → Type v₁}
{M₂ : Type v₂}
[CommSemiring R]
[(i : ι) → AddCommMonoid (M₁ i)]
[AddCommMonoid M₂]
[(i : ι) → Module R (M₁ i)]
[Module R M₂]
{M₁' : ι → Type u_1}
[(i : ι) → AddCommMonoid (M₁' i)]
[(i : ι) → Module R (M₁' i)]
(f : (i : ι) → M₁ i →ₗ[R] M₁' i)

MultilinearMap.compLinearMapMultilinear f = MultilinearMap.compLinearMapₗ f


/-- Definition of a fiber functor from a Galois category. Lenstra, Def 3.1, (G4)-(G6) -/
class FiberFunctor {C : Type u₁} [Category.{u₂, u₁} C] [PreGaloisCategory C]
    (F : C ⥤ FintypeCat.{w}) where
  /-- `F` preserves terminal objects (G4). -/
  preservesTerminalObjects : PreservesLimitsOfShape (CategoryTheory.Discrete PEmpty.{1}) F := by
    infer_instance
  /-- `F` preserves pullbacks (G4). -/
  preservesPullbacks : PreservesLimitsOfShape WalkingCospan F := by infer_instance
  /-- `F` preserves finite coproducts (G5). -/
  preservesFiniteCoproducts : PreservesFiniteCoproducts F := by infer_instance
  /-- `F` preserves epimorphisms (G5). -/
  preservesEpis : Functor.PreservesEpimorphisms F := by infer_instance
  /-- `F` preserves quotients by finite groups (G5). -/
  preservesQuotientsByFiniteGroups (G : Type u₂) [Group G] [Finite G] :
    PreservesColimitsOfShape (SingleObj G) F := by infer_instance
  /-- `F` reflects isomorphisms (G6). -/
  reflectsIsos : F.ReflectsIsomorphisms := by infer_instance

{F : CategoryTheory.Functor C FintypeCat}

[self : CategoryTheory.PreGaloisCategory.FiberFunctor F]


lemma intCast_eq_zero_iff (a : ℤ) : (a : R) = 0 ↔ (p : ℤ) ∣ a

(R : Type u_1)
[AddGroupWithOne R]
(p : ℕ)
[CharP R p]
(a : ℤ)


theorem exists_vector_zero (f : Vector3 α 0 → Prop) : Exists f ↔ f []


theorem disjoint_def' {p p' : Submodule R M} :
    Disjoint p p' ↔ ∀ x ∈ p, ∀ y ∈ p', x = y → x = (0 : M)

{R : Type u_1}
{M : Type u_3}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{p p' : Submodule R M}

Disjoint p p' ↔ ∀ x ∈ p, ∀ y ∈ p', x = y → x = 0


theorem ContDiffWithinAt.log {n} (hf : ContDiffWithinAt ℝ n f s x) (hx : f x ≠ 0) :
    ContDiffWithinAt ℝ n (fun x => log (f x)) s x

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

ContDiffWithinAt ℝ n (fun x => Real.log (f x)) s x


theorem coe_algHom_injective : Function.Injective ((↑) : (A₁ ≃ₐ[R] A₂) → A₁ →ₐ[R] A₂)

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


@[to_additive (attr := simp)]
theorem map_one_eq_bot : K.map (1 : G →* N) = ⊥

{G : Type u_1}
[AddGroup G]
(K : AddSubgroup G)
{N : Type u_5}
[AddGroup N]


theorem iSup₂_inf_eq {f : ∀ i, κ i → α} (a : α) :
    (⨆ (i) (j), f i j) ⊓ a = ⨆ (i) (j), f i j ⊓ a

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

(⨆ i, ⨆ j, f i j) ⊓ a = ⨆ i, ⨆ j, f i j ⊓ a


/-- If `s` is not in `-ℕ`, and either `a ≠ 0` or `s ≠ 1`, then
`hurwitzZetaEven a (1 - s)` is an explicit multiple of `cosZeta s`. -/
lemma hurwitzZetaEven_one_sub (a : UnitAddCircle) {s : ℂ}
    (hs : ∀ (n : ℕ), s ≠ -n) (hs' : a ≠ 0 ∨ s ≠ 1) :
    hurwitzZetaEven a (1 - s) = 2 * (2 * π) ^ (-s) * Gamma s * cos (π * s / 2) * cosZeta a s

(a : UnitAddCircle)
{s : ℂ}
(hs : ∀ (n : ℕ), s ≠ -↑n)
(hs' : a ≠ 0 ∨ s ≠ 1)

HurwitzZeta.hurwitzZetaEven a (1 - s) =
  2 * (2 * ↑π) ^ (-s) * Complex.Gamma s * Complex.cos (↑π * s / 2) * HurwitzZeta.cosZeta a s


@[simp, deprecated get_tails (since := "2024-04-16")]
theorem nth_le_tails (l : List α) (n : ℕ) (hn : n < length (tails l)) :
    nthLe (tails l) n hn = l.drop n

{α : Type u_1}
(l : List α)
(n : ℕ)
(hn : n < l.tails.length)


theorem map_comp_reindex_symm (f : Π i, s i →ₗ[R] t i) (e : ι ≃ ι₂) :
    map f ∘ₗ (reindex R s e).symm = (reindex R t e).symm ∘ₗ map (fun i => f (e.symm i))

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

PiTensorProduct.map f ∘ₗ ↑(PiTensorProduct.reindex R s e).symm =
  ↑(PiTensorProduct.reindex R t e).symm ∘ₗ PiTensorProduct.map fun i => f (e.symm i)


/-- The minimal polynomial of an element `x` of `E / F` of exponential characteristic `q` has
separable degree one if and only if the minimal polynomial is of the form
`(X - x) ^ (q ^ n)` for some `n : ℕ`. -/
theorem natSepDegree_eq_one_iff_eq_X_sub_C_pow : (minpoly F x).natSepDegree = 1 ↔
    ∃ n : ℕ, (minpoly F x).map (algebraMap F E) = (X - C x) ^ q ^ n

{F : Type u}
{E : Type v}
[Field F]
[Field E]
[Algebra F E]
(q : ℕ)
[hF : ExpChar F q]
{x : E}

(minpoly F x).natSepDegree = 1 ↔
  ∃ n, Polynomial.map (algebraMap F E) (minpoly F x) = (Polynomial.X - Polynomial.C x) ^ q ^ n


@[to_additive]
theorem pi_empty (H : ∀ i, Subgroup (f i)) : pi ∅ H = ⊤

{η : Type u_7}
{f : η → Type u_8}
[(i : η) → Group (f i)]
(H : (i : η) → Subgroup (f i))


/-- The universal property of `𝕎 R` as projective limit of truncated Witt vector rings. -/
@[simps]
def liftEquiv : { f : ∀ k, S →+* TruncatedWittVector p k R // ∀ (k₁ k₂) (hk : k₁ ≤ k₂),
    (TruncatedWittVector.truncate hk).comp (f k₂) = f k₁ } ≃ (S →+* 𝕎 R)

(f : { f // ∀ (k₁ k₂ : ℕ) (hk : k₁ ≤ k₂), (TruncatedWittVector.truncate hk).comp (f k₂) = f k₁ })

WittVector.liftEquiv f = WittVector.lift ↑f ⋯


theorem map_injective {f : A →ₐ[R] B} (hf : Function.Injective f) : Function.Injective (map f)

{R : Type u}
{A : Type v}
{B : Type w}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[Semiring B]
[Algebra R B]
{f : A →ₐ[R] B}
(hf : Function.Injective ⇑f)


theorem fix_eq (hc : Continuous f) : Part.fix f = f (Part.fix f)

{f : ((a : α) → Part (β a)) →o (a : α) → Part (β a)}

(hc : OmegaCompletePartialOrder.Continuous f)


theorem IsGLB.iUnion_Ioi_eq (h : IsGLB (range f) a) : ⋃ x, Ioi (f x) = Ioi a

{ι : Sort u}
{α : Type v}
[LinearOrder α]
{a : α}
{f : ι → α}
(h : IsGLB (Set.range f) a)


@[fun_prop]
nonrec theorem HasFDerivAt.add (hf : HasFDerivAt f f' x) (hg : HasFDerivAt g g' x) :
    HasFDerivAt (fun x => f x + g x) (f' + g') x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f g : E → F}
{f' g' : E →L[𝕜] F}
{x : E}
(hf : HasFDerivAt f f' x)
(hg : HasFDerivAt g g' x)


/-- Seminorm-balls containing the origin are absorbent. -/
protected theorem absorbent_ball (hpr : p x < r) : Absorbent 𝕜 (ball p x r)

{𝕜 : Type u_3}
{E : Type u_7}
[NormedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
(p : Seminorm 𝕜 E)
{r : ℝ}
{x : E}
(hpr : p x < r)


theorem opAlgEquiv_apply (x : Aᵐᵒᵖ ⊗[R] Bᵐᵒᵖ) :
    opAlgEquiv R S A B x =
      op (_root_.TensorProduct.map
        (opLinearEquiv R).symm.toLinearMap (opLinearEquiv R).symm.toLinearMap x)

(R : Type u_1)
(S : Type u_2)
(A : Type u_3)
(B : Type u_4)
[CommSemiring R]
[CommSemiring S]
[Semiring A]
[Semiring B]
[Algebra R S]
[Algebra R A]
[Algebra R B]
[Algebra S A]
[IsScalarTower R S A]
(x : Aᵐᵒᵖ ⊗[R] Bᵐᵒᵖ)

(Algebra.TensorProduct.opAlgEquiv R S A B) x =
  MulOpposite.op ((TensorProduct.map ↑(MulOpposite.opLinearEquiv R).symm ↑(MulOpposite.opLinearEquiv R).symm) x)


/-- A bounded convergence theorem for a finite measure:
If a sequence of bounded continuous non-negative functions are uniformly bounded by a constant and
tend pointwise to a limit, then their integrals (`MeasureTheory.FiniteMeasure.testAgainstNN`)
against the finite measure tend to the integral of the limit.

Related results:
 * `MeasureTheory.FiniteMeasure.tendsto_testAgainstNN_filter_of_le_const`:
   more general assumptions
 * `MeasureTheory.FiniteMeasure.tendsto_lintegral_nn_of_le_const`:
   using `MeasureTheory.lintegral` for integration.
-/
theorem tendsto_testAgainstNN_of_le_const {μ : FiniteMeasure Ω} {fs : ℕ → Ω →ᵇ ℝ≥0} {c : ℝ≥0}
    (fs_le_const : ∀ n ω, fs n ω ≤ c) {f : Ω →ᵇ ℝ≥0}
    (fs_lim : ∀ ω, Tendsto (fun n => fs n ω) atTop (𝓝 (f ω))) :
    Tendsto (fun n => μ.testAgainstNN (fs n)) atTop (𝓝 (μ.testAgainstNN f))

{fs : ℕ → Ω →ᵇ ℝ≥0}

(fs_le_const : ∀ (n : ℕ) (ω : Ω), (fs n) ω ≤ c)

{f : Ω →ᵇ ℝ≥0}

(fs_lim : ∀ (ω : Ω), Filter.Tendsto (fun n => (fs n) ω) Filter.atTop (𝓝 (f ω)))

Filter.Tendsto (fun n => μ.testAgainstNN (fs n)) Filter.atTop (𝓝 (μ.testAgainstNN f))


lemma subset_preimage_val_image_val_iff : D ⊆ A ↓∩ ↑E ↔ D ⊆ E

{α : Type u_2}
{A : Set α}
{D E : Set ↑A}

D ⊆ Subtype.val ⁻¹' (Subtype.val '' E) ↔ D ⊆ E


@[simp]
theorem single_eq_C_mul_T (r : R) (n : ℤ) :
    (Finsupp.single n r : R[T;T⁻¹]) = (C r * T n : R[T;T⁻¹])

{R : Type u_1}
[Semiring R]
(r : R)
(n : ℤ)

Finsupp.single n r = LaurentPolynomial.C r * LaurentPolynomial.T n


theorem eq_aleph_of_eq_card_ord {o : Ordinal} (ho : o.card.ord = o) (ho' : ω ≤ o) :
    ∃ a, (aleph a).ord = o

{o : Ordinal.{u_1}}
(ho : o.card.ord = o)
(ho' : ω ≤ o)


@[simp]
theorem eventually_atBot [SemilatticeInf α] [Nonempty α] {p : α → Prop} :
    (∀ᶠ x in atBot, p x) ↔ ∃ a, ∀ b ≤ a, p b

{α : Type u_3}
[SemilatticeInf α]
[Nonempty α]
{p : α → Prop}

(∀ᶠ (x : α) in Filter.atBot, p x) ↔ ∃ a, ∀ b ≤ a, p b


theorem div_add_mod' (m k : Int) : m.div k * k + mod m k = m


/-- Corresponds to `eq_of_dist_eq_zero`. -/
theorem eq_of_hammingDist_eq_zero {x y : ∀ i, β i} : hammingDist x y = 0 → x = y

{ι : Type u_2}
{β : ι → Type u_3}
[Fintype ι]
[(i : ι) → DecidableEq (β i)]
{x y : (i : ι) → β i}


lemma rootOfSplitsXPowSubC_pow :
    (rootOfSplitsXPowSubC hn a L) ^ n = algebraMap K L a

[Polynomial.IsSplittingField K L (Polynomial.X ^ n - Polynomial.C a)]

rootOfSplitsXPowSubC hn a L ^ n = (algebraMap K L) a


/-- Obvious triangles `0 ⟶ X ⟶ X ⟶ 0⟦1⟧` are distinguished -/
lemma contractible_distinguished₁ (X : C) :
    Triangle.mk (0 : 0 ⟶ X) (𝟙 X) 0 ∈ distTriang C

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

CategoryTheory.Pretriangulated.Triangle.mk 0 (𝟙 X) 0 ∈ CategoryTheory.Pretriangulated.distinguishedTriangles


@[simp]
theorem repeat_add {α : Type*} (a : Fin n → α) (m₁ m₂ : ℕ) : Fin.repeat (m₁ + m₂) a =
    append (Fin.repeat m₁ a) (Fin.repeat m₂ a) ∘ cast (Nat.add_mul ..)

{n : ℕ}
{α : Type u_1}
(a : Fin n → α)
(m₁ m₂ : ℕ)

Fin.repeat (m₁ + m₂) a = Fin.append (Fin.repeat m₁ a) (Fin.repeat m₂ a) ∘ Fin.cast ⋯


@[simp]
theorem nadd_nat (n : ℕ) : a ♯ n = a + n


theorem of_f {i j : ι} {hij : i ≤ j} {x : G i} : of L ι G f j (f i j hij x) = of L ι G f i x

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

(FirstOrder.Language.DirectLimit.of L ι G f j) ((f i j hij) x) = (FirstOrder.Language.DirectLimit.of L ι G f i) x


theorem IsLocalMaxOn.on_subset {t : Set α} (hf : IsLocalMaxOn f t a) (h : s ⊆ t) :
    IsLocalMaxOn f s a

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[Preorder β]
{f : α → β}
{s : Set α}
{a : α}
{t : Set α}
(hf : IsLocalMaxOn f t a)
(h : s ⊆ t)


/-- A set `s : Set α` is countable if and only if there exists a function `α → ℕ` injective
on `s`. -/
theorem countable_iff_exists_injOn {s : Set α} : s.Countable ↔ ∃ f : α → ℕ, InjOn f s


theorem coe_ne_coe {x y : ℝ} : (x : ℝ*) ≠ y ↔ x ≠ y

↑x ≠ ↑y ↔ x ≠ y


@[simp]
theorem of_symm_of (x : A ⊗[R] B) : (of R 𝒜 ℬ).symm (of R 𝒜 ℬ x) = x

{R : Type u_1}
{ι : Type u_2}
{A : Type u_3}
{B : Type u_4}
[CommSemiring ι]
[DecidableEq ι]
[CommRing R]
[Ring A]
[Ring B]
[Algebra R A]
[Algebra R B]
(𝒜 : ι → Submodule R A)
(ℬ : ι → Submodule R B)
[GradedAlgebra 𝒜]
[GradedAlgebra ℬ]
(x : A ⊗[R] B)

(GradedTensorProduct.of R 𝒜 ℬ).symm ((GradedTensorProduct.of R 𝒜 ℬ) x) = x


theorem outerMeasure_caratheodory (A : Set G) :
    MeasurableSet[μ.outerMeasure.caratheodory] A ↔
      ∀ U : Opens G, μ.outerMeasure (U ∩ A) + μ.outerMeasure (U \ A) ≤ μ.outerMeasure U

{G : Type w}
[TopologicalSpace G]
(μ : MeasureTheory.Content G)
[R1Space G]
(A : Set G)

MeasurableSet A ↔
  ∀ (U : TopologicalSpace.Opens G), μ.outerMeasure (↑U ∩ A) + μ.outerMeasure (↑U \ A) ≤ μ.outerMeasure ↑U


theorem coe_int_inj (m n : ℤ) : (m : ℚ) = n ↔ m = n


@[simp] theorem mem_closedBall : y ∈ closedBall x ε ↔ edist y x ≤ ε

{α : Type u}
[PseudoEMetricSpace α]
{x y : α}
{ε : ℝ≥0∞}

y ∈ EMetric.closedBall x ε ↔ edist y x ≤ ε


/-- An unbundled functor. -/
class Functorial (F : C → D) : Type max v₁ v₂ u₁ u₂ where
  /-- A functorial map extends to an action on morphisms. -/
  map' : ∀ {X Y : C}, (X ⟶ Y) → (F X ⟶ F Y)
  /-- A functorial map preserves identities. -/
  map_id' : ∀ X : C, map' (𝟙 X) = 𝟙 (F X) := by aesop_cat
  /-- A functorial map preserves composition of morphisms. -/
  map_comp' : ∀ {X Y Z : C} (f : X ⟶ Y) (g : Y ⟶ Z), map' (f ≫ g) = map' f ≫ map' g := by
    aesop_cat

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{F : C → D}
[self : CategoryTheory.Functorial F]
(X : C)

CategoryTheory.Functorial.map' (CategoryTheory.CategoryStruct.id X) = CategoryTheory.CategoryStruct.id (F X)


/-- The extension of a family agrees with the original family. -/
theorem extend_agrees {x : FamilyOfElements P R} (t : x.Compatible) {f : Y ⟶ X} (hf : R f) :
    x.sieveExtend f (le_generate R Y hf) = x f hf

{P : CategoryTheory.Functor Cᵒᵖ (Type w)}

{x : CategoryTheory.Presieve.FamilyOfElements P R}


theorem OrderIso.map_iInf [CompleteLattice β] (f : α ≃o β) (x : ι → α) :
    f (⨅ i, x i) = ⨅ i, f (x i)

{α : Type u_1}
{β : Type u_2}
{ι : Sort u_5}
[CompleteLattice α]
[CompleteLattice β]
(f : α ≃o β)
(x : ι → α)


/-- The identity map from a type with 1 to itself. -/
@[to_additive (attr := simps) "The identity map from a type with zero to itself."]
def OneHom.id (M : Type*) [One M] : OneHom M M


theorem add_one_le_exp (x : ℝ) : x + 1 ≤ Real.exp x


theorem replaceF_nil : [].replaceF p = []

∀ {α : Type u_1} {p : α → Option α}, List.replaceF p [] = []


theorem CPolynomialOn.mono {s t : Set E} (hf : CPolynomialOn 𝕜 f t) (hst : s ⊆ t) :
    CPolynomialOn 𝕜 f s

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{s t : Set E}
(hf : CPolynomialOn 𝕜 f t)
(hst : s ⊆ t)


theorem setOf_isOpen_iSup {t : ι → TopologicalSpace α} :
    { s | IsOpen[⨆ i, t i] s } = ⋂ i, { s | IsOpen[t i] s }

{α : Type u}
{ι : Sort v}
{t : ι → TopologicalSpace α}


theorem IsLocalMax.comp_continuous [TopologicalSpace δ] {g : δ → α} {b : δ}
    (hf : IsLocalMax f (g b)) (hg : ContinuousAt g b) : IsLocalMax (f ∘ g) b

{α : Type u}
{β : Type v}
{δ : Type x}
[TopologicalSpace α]
[Preorder β]
{f : α → β}
[TopologicalSpace δ]
{g : δ → α}
{b : δ}
(hf : IsLocalMax f (g b))
(hg : ContinuousAt g b)


lemma noncompact_univ (X : Type*) [TopologicalSpace X] [NoncompactSpace X] :
    ¬IsCompact (univ : Set X)

(X : Type u_2)
[TopologicalSpace X]
[NoncompactSpace X]


theorem mem_carrier {s : Subalgebra R A} {x : A} : x ∈ s.carrier ↔ x ∈ s

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


protected theorem uniformEmbedding {α : Type*} {β : Type*} [EMetricSpace α] [PseudoEMetricSpace β]
    {K : ℝ≥0} {f : α → β} (hf : AntilipschitzWith K f) (hfc : UniformContinuous f) :
    UniformEmbedding f

{α : Type u_4}
{β : Type u_5}
[EMetricSpace α]
[PseudoEMetricSpace β]
{K : ℝ≥0}
{f : α → β}
(hf : AntilipschitzWith K f)
(hfc : UniformContinuous f)


lemma measurable_singularPart_fun (κ η : Kernel α γ) :
    Measurable (fun p : α × γ ↦ Real.toNNReal (rnDerivAux κ (κ + η) p.1 p.2)
      - Real.toNNReal (1 - rnDerivAux κ (κ + η) p.1 p.2) * rnDeriv κ η p.1 p.2)

[hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ]

Measurable fun p =>
  ↑(κ.rnDerivAux (κ + η) p.1 p.2).toNNReal - ↑(1 - κ.rnDerivAux (κ + η) p.1 p.2).toNNReal * κ.rnDeriv η p.1 p.2


theorem not_mem_of_not_mem_closure {s : Set R} {P : R} (hP : P ∉ closure s) : P ∉ s

{R : Type u}
[Ring R]
{s : Set R}
{P : R}
(hP : P ∉ Subring.closure s)


theorem image_rayleigh_eq_image_rayleigh_sphere {r : ℝ} (hr : 0 < r) :
    rayleighQuotient T '' {0}ᶜ = rayleighQuotient T '' sphere 0 r

{𝕜 : Type u_1}
[RCLike 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
(T : E →L[𝕜] E)
{r : ℝ}
(hr : 0 < r)

T.rayleighQuotient '' {0}ᶜ = T.rayleighQuotient '' Metric.sphere 0 r


@[to_additive]
theorem OrderedCancelCommMonoid.toContravariantClassRight :
    ContravariantClass α α (swap (· * ·)) (· < ·)

{α : Type u_1}
[OrderedCancelCommMonoid α]

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


theorem sups_right_comm : s ⊻ t ⊻ u = s ⊻ u ⊻ t

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


@[reassoc (attr := simp)]
theorem ι_preservesColimitsIso_hom (j : J) :
    G.map (colimit.ι F j) ≫ (preservesColimitIso G F).hom = colimit.ι (F ⋙ G) j

CategoryTheory.CategoryStruct.comp (G.map (CategoryTheory.Limits.colimit.ι F j))
    (CategoryTheory.preservesColimitIso G F).hom =
  CategoryTheory.Limits.colimit.ι (F.comp G) j


/-- `∏' i, f i` is the product of `f` it exists, or 1 otherwise. -/
@[to_additive "`∑' i, f i` is the sum of `f` it exists, or 0 otherwise."]
noncomputable irreducible_def tprod {β} (f : β → α)

{α : Type u_4}
[CommMonoid α]
[TopologicalSpace α]
{β : Type u_5}
(f : β → α)

tprod f = if h : Multipliable f then if (Function.mulSupport f).Finite then finprod f else Exists.choose h else 1


@[ext] theorem ext_of {X Y : Type u} [CommSemiring X] [CommSemiring Y] (f g : X →+* Y)
    (h : ∀ x, f x = g x) :
    @Eq (CommSemiRingCat.of X ⟶ CommSemiRingCat.of Y) f g

{X Y : Type u}
[CommSemiring X]
[CommSemiring Y]
(f g : X →+* Y)
(h : ∀ (x : X), f x = g x)


/-- A morphism between algebras of endofunctor `F` -/
@[ext]
structure Hom (A₀ A₁ : Algebra F) where
  /-- underlying morphism between the carriers -/
  f : A₀.1 ⟶ A₁.1
  /-- compatibility condition -/
  h : F.map f ≫ A₁.str = A₀.str ≫ f := by aesop_cat

{A₀ A₁ : CategoryTheory.Endofunctor.Algebra F}

CategoryTheory.CategoryStruct.comp (F.map self.f) A₁.str = CategoryTheory.CategoryStruct.comp A₀.str self.f


theorem differentiableAt_log (hx : x ≠ 0) : DifferentiableAt ℝ log x


theorem SSameSide.nonempty {s : AffineSubspace R P} {x y : P} (h : s.SSameSide x y) :
    (s : Set P).Nonempty

{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[StrictOrderedCommRing R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
{s : AffineSubspace R P}
{x y : P}
(h : s.SSameSide x y)


theorem rpow_sub {x : ℝ≥0∞} (y z : ℝ) (hx : x ≠ 0) (h'x : x ≠ ⊤) : x ^ (y - z) = x ^ y / x ^ z


theorem integral_congr_ae {f g : α → G} (h : f =ᵐ[μ] g) : ∫ a, f a ∂μ = ∫ a, g a ∂μ

{α : Type u_1}
{G : Type u_5}
[NormedAddCommGroup G]
[NormedSpace ℝ G]
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f g : α → G}
(h : f =ᵐ[μ] g)


class LawfulMonadCont (m : Type u → Type v) [Monad m] [MonadCont m]
    extends LawfulMonad m : Prop where
  callCC_bind_right {α ω γ} (cmd : m α) (next : Label ω m γ → α → m ω) :
    (callCC fun f => cmd >>= next f) = cmd >>= fun x => callCC fun f => next f x
  callCC_bind_left {α} (β) (x : α) (dead : Label α m β → β → m α) :
    (callCC fun f : Label α m β => goto f x >>= dead f) = pure x
  callCC_dummy {α β} (dummy : m α) : (callCC fun _ : Label α m β => dummy) = dummy

{m : Type u → Type v}
[Monad m]
[MonadCont m]
[self : LawfulMonadCont m]
{α ω γ : Type u}
(cmd : m α)
(next : ContT.Label ω m γ → α → m ω)

(MonadCont.callCC fun f => cmd >>= next f) = do
  let x ← cmd
  MonadCont.callCC fun f => next f x


theorem pairwise_pmap {p : β → Prop} {f : ∀ b, p b → α} {l : List β} (h : ∀ x ∈ l, p x) :
    Pairwise R (l.pmap f h) ↔
      Pairwise (fun b₁ b₂ => ∀ (h₁ : p b₁) (h₂ : p b₂), R (f b₁ h₁) (f b₂ h₂)) l

{α : Type u_1}
{β : Type u_2}
{R : α → α → Prop}
{p : β → Prop}
{f : (b : β) → p b → α}
{l : List β}
(h : ∀ (x : β), x ∈ l → p x)

List.Pairwise R (List.pmap f l h) ↔ List.Pairwise (fun b₁ b₂ => ∀ (h₁ : p b₁) (h₂ : p b₂), R (f b₁ h₁) (f b₂ h₂)) l


@[simp]
theorem diagonal_smul [Zero α] [SMulZeroClass R α] (r : R) (d : n → α) :
    diagonal (r • d) = r • diagonal d

{n : Type u_3}
{R : Type u_7}
{α : Type v}
[DecidableEq n]
[Zero α]
[SMulZeroClass R α]
(r : R)
(d : n → α)

Matrix.diagonal (r • d) = r • Matrix.diagonal d


theorem log_injective : Function.Injective log


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


theorem aecover_Iio_of_Iic : AECover (μ.restrict (Iio B)) l fun i ↦ Iic (b i)

{α : Type u_1}
{ι : Type u_2}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
{l : Filter ι}
[LinearOrder α]
[TopologicalSpace α]
[OrderClosedTopology α]
[OpensMeasurableSpace α]
{b : ι → α}
{B : α}
(hb : Filter.Tendsto b l (𝓝 B))

MeasureTheory.AECover (μ.restrict (Set.Iio B)) l fun i => Set.Iic (b i)


/-- `Set.univ X` is homeomorphic to `X`. -/
@[simps! (config := .asFn)]
def Set.univ (X : Type*) [TopologicalSpace X] : (univ : Set X) ≃ₜ X

(X : Type u_6)
[TopologicalSpace X]
(a : X)


@[simp]
theorem unop_op (s : Set αᵒᵖ) : s.unop.op = s


theorem End.natCast_def (n : ℕ) [AddCommMonoid N₁] [Module R N₁] :
    (↑n : Module.End R N₁) = Module.toModuleEnd R N₁ n

(R : Type u_1)
{N₁ : Type u_10}
[Semiring R]
(n : ℕ)
[AddCommMonoid N₁]
[Module R N₁]


protected theorem not_le_of_lt : ∀{a b : Nat}, a < b → ¬(b ≤ a)


theorem rightInverse_symm (f : Equiv α β) : Function.RightInverse f.symm f


/-- A graph is strongly regular with parameters `n k ℓ μ` if
 * its vertex set has cardinality `n`
 * it is regular with degree `k`
 * every pair of adjacent vertices has `ℓ` common neighbors
 * every pair of nonadjacent vertices has `μ` common neighbors
-/
structure IsSRGWith (n k ℓ μ : ℕ) : Prop where
  card : Fintype.card V = n
  regular : G.IsRegularOfDegree k
  of_adj : ∀ v w : V, G.Adj v w → Fintype.card (G.commonNeighbors v w) = ℓ
  of_not_adj : Pairwise fun v w => ¬G.Adj v w → Fintype.card (G.commonNeighbors v w) = μ

{V : Type u}
[Fintype V]
{G : SimpleGraph V}
[DecidableRel G.Adj]
{n k ℓ μ : ℕ}
(self : G.IsSRGWith n k ℓ μ)


@[to_additive sum_nonneg]
lemma one_le_prod_of_one_le [Preorder M] [CovariantClass M M (· * ·) (· ≤ ·)] {l : List M}
    (hl₁ : ∀ x ∈ l, (1 : M) ≤ x) : 1 ≤ l.prod

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


theorem intervalIntegrable_iff_integrableOn_Ioc_of_le (hab : a ≤ b) :
    IntervalIntegrable f μ a b ↔ IntegrableOn f (Ioc a b) μ

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

IntervalIntegrable f μ a b ↔ MeasureTheory.IntegrableOn f (Set.Ioc a b) μ


private irreducible_def neg {R : Type u} [Ring R] : R[X] → R[X]

∀ (x : R[X]),
  Polynomial.neg x =
    match x with
    | { toFinsupp := a } => { toFinsupp := -a }


theorem WellFounded.monotone_chain_condition' [Preorder α] :
    WellFounded ((· > ·) : α → α → Prop) ↔ ∀ a : ℕ →o α, ∃ n, ∀ m, n ≤ m → ¬a n < a m

(WellFounded fun x x_1 => x > x_1) ↔ ∀ (a : ℕ →o α), ∃ n, ∀ (m : ℕ), n ≤ m → ¬a n < a m


theorem LinearIsometry.map_orthogonalProjection {E E' : Type*} [NormedAddCommGroup E]
    [NormedAddCommGroup E'] [InnerProductSpace 𝕜 E] [InnerProductSpace 𝕜 E'] (f : E →ₗᵢ[𝕜] E')
    (p : Submodule 𝕜 E) [HasOrthogonalProjection p] [HasOrthogonalProjection (p.map f.toLinearMap)]
    (x : E) : f (orthogonalProjection p x) = orthogonalProjection (p.map f.toLinearMap) (f x)

[HasOrthogonalProjection (Submodule.map f.toLinearMap p)]

f ↑((orthogonalProjection p) x) = ↑((orthogonalProjection (Submodule.map f.toLinearMap p)) (f x))


theorem principal_subtype {α : Type*} (s : Set α) (t : Set s) :
    𝓟 t = comap (↑) (𝓟 (((↑) : s → α) '' t))

𝓟 t = Filter.comap Subtype.val (𝓟 (Subtype.val '' t))


@[simp]
theorem disjoint_nhds_atBot_iff : Disjoint (𝓝 a) atBot ↔ ¬IsBot a

{α : Type u}
[TopologicalSpace α]
[Preorder α]
[ClosedIicTopology α]
{a : α}


@[symm]
theorem symm (h : Commute f g) : Commute g f

{α : Type u_1}
{f g : α → α}
(h : Function.Commute f g)


theorem neg (hf : Martingale f ℱ μ) : Martingale (-f) ℱ μ

{Ω : Type u_1}
{E : Type u_2}
{ι : Type u_3}
[Preorder ι]
{m0 : MeasurableSpace Ω}
{μ : MeasureTheory.Measure Ω}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[CompleteSpace E]
{f : ι → Ω → E}
{ℱ : MeasureTheory.Filtration ι m0}
(hf : MeasureTheory.Martingale f ℱ μ)


theorem fdiv_nonneg {a b : Int} (Ha : 0 ≤ a) (Hb : 0 ≤ b) : 0 ≤ a.fdiv b


theorem lt_iff (s t : String) : s < t ↔ s.data < t.data


@[simp] theorem toBialgEquiv_toBialgHom (i : X ≅ Y) :
    (i.toBialgEquiv : X →ₐc[R] Y) = i.hom.1

{R : Type u}
[CommRing R]
{X Y : BialgebraCat R}
(i : X ≅ Y)


@[simp]
theorem generateFrom_insert_empty (S : Set (Set α)) :
    generateFrom (insert ∅ S) = generateFrom S

MeasurableSpace.generateFrom (insert ∅ S) = MeasurableSpace.generateFrom S


/-- The functor `ℕ ⥤ C` constructed from a sequence of
morphisms `f : X n ⟶ X (n + 1)` for all `n : ℕ`. -/
@[simps obj]
def ofSequence : ℕ ⥤ C

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
{X : ℕ → C}
(f : (n : ℕ) → X n ⟶ X (n + 1))

∀ (a : ℕ), (CategoryTheory.Functor.ofSequence f).obj a = X a


/-- If `P` is a submodule of `M` and `Q` a submodule of `N`,
and `f : M ≃ₗ N` maps `P` to `Q`, then `M ⧸ P` is equivalent to `N ⧸ Q`. -/
@[simps]
def Quotient.equiv {N : Type*} [AddCommGroup N] [Module R N] (P : Submodule R M)
    (Q : Submodule R N) (f : M ≃ₗ[R] N) (hf : P.map f = Q) : (M ⧸ P) ≃ₗ[R] N ⧸ Q

{R : Type u_1}
{M : Type u_2}
[Ring R]
[AddCommGroup M]
[Module R M]
{N : Type u_5}
[AddCommGroup N]
[Module R N]
(P : Submodule R M)
(Q : Submodule R N)
(f : M ≃ₗ[R] N)
(hf : Submodule.map f P = Q)
(a : N ⧸ Q)

(Submodule.Quotient.equiv P Q f hf).symm a = (Q.mapQ P ↑f.symm ⋯) a


@[to_additive]
theorem mul_right_cancel : a * b = c * b → a = c

{G : Type u_1}
[Mul G]
[IsRightCancelMul G]
{a b c : G}


theorem strictMonoOn_id [Preorder α] {s : Set α} : StrictMonoOn id s


@[to_additive (attr := simp)]
theorem MonoidHom.mulSingle_apply [∀ i, MulOneClass <| f i] (i : I) (x : f i) :
    mulSingle f i x = Pi.mulSingle i x

{I : Type u}
(f : I → Type v)
[DecidableEq I]
[(i : I) → AddZeroClass (f i)]
(i : I)
(x : f i)

(AddMonoidHom.single f i) x = Pi.single i x


theorem splits_of_exists_multiset {f : K[X]} {s : Multiset L}
    (hs : f.map i = C (i f.leadingCoeff) * (s.map fun a : L => X - C a).prod) : Splits i f

(hs :
  Polynomial.map i f = Polynomial.C (i f.leadingCoeff) * (Multiset.map (fun a => Polynomial.X - Polynomial.C a) s).prod)


theorem continuousAt_sign_of_neg {a : α} (h : a < 0) : ContinuousAt SignType.sign a

{α : Type u_1}
[Zero α]
[TopologicalSpace α]
[PartialOrder α]
[DecidableRel fun x x_1 => x < x_1]
[OrderTopology α]
{a : α}
(h : a < 0)


/-- A reduced word is a `head`, which is an element of `G`, followed by the product list of pairs.
There should also be no sequences of the form `t^u * g * t^-u`, where `g` is in
`toSubgroup A B u` This is a less strict condition than required for `NormalWord`. -/
structure ReducedWord : Type _ :=
  /-- Every `ReducedWord` is the product of an element of the group and a word made up
  of letters each of which is in the transversal. `head` is that element of the base group. -/
  head : G
  /-- The list of pairs `(ℤˣ × G)`, where each pair `(u, g)` represents the element `t^u * g` of
  `HNNExtension G A B φ` -/
  toList : List (ℤˣ × G)
  /-- There are no sequences of the form `t^u * g * t^-u` where `g ∈ toSubgroup A B u` -/
  chain : toList.Chain' (fun a b => a.2 ∈ toSubgroup A B a.1 → a.1 = b.1)

(self : HNNExtension.NormalWord.ReducedWord G A B)

List.Chain' (fun a b => a.2 ∈ HNNExtension.toSubgroup A B a.1 → a.1 = b.1) self.toList


lemma lie_eq_smul_of_mem_rootSpace {α : H → K} {x : L} (hx : x ∈ rootSpace H α) (h : H) :
    ⁅h, x⁆ = α h • x

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


theorem PosDef.smul {R} [LinearOrderedCommRing R] [Module R M] [Module R N] [PosSMulStrictMono R N]
    {Q : QuadraticMap R M N} (h : PosDef Q) {a : R} (a_pos : 0 < a) : PosDef (a • Q)

{M : Type u_4}
{N : Type u_5}
[AddCommMonoid M]
[PartialOrder N]
[AddCommMonoid N]
{R : Type u_8}
[LinearOrderedCommRing R]
[Module R M]
[Module R N]
[PosSMulStrictMono R N]
{Q : QuadraticMap R M N}
(h : Q.PosDef)
{a : R}
(a_pos : 0 < a)


private theorem sum_density_div_card_le_density_add_eps [Nonempty α]
    (hPα : P.parts.card * 16 ^ P.parts.card ≤ card α) (hPε : ↑100 ≤ ↑4 ^ P.parts.card * ε ^ 5)
    (hε₁ : ε ≤ 1) {hU : U ∈ P.parts} {hV : V ∈ P.parts} {A B : Finset (Finset α)}
    (hA : A ⊆ (chunk hP G ε hU).parts) (hB : B ⊆ (chunk hP G ε hV).parts) :
    (∑ ab ∈ A.product B, G.edgeDensity ab.1 ab.2 : ℝ) / (A.card * B.card) ≤
    G.edgeDensity (A.biUnion id) (B.biUnion id) + ε ^ 5 / 49

(hPα : P.parts.card * 16 ^ P.parts.card ≤ Fintype.card α)

(hA : A ⊆ (SzemerediRegularity.chunk hP G ε hU).parts)

(hB : B ⊆ (SzemerediRegularity.chunk hP G ε hV).parts)

(∑ ab ∈ A.product B, ↑(G.edgeDensity ab.1 ab.2)) / (↑A.card * ↑B.card) ≤
  ↑(G.edgeDensity (A.biUnion id) (B.biUnion id)) + ε ^ 5 / 49


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


theorem sublistsLenAux_eq (l : List α) (n) (f : List α → β) (r) :
    sublistsLenAux n l f r = (sublistsLen n l).map f ++ r

{α : Type u}
{β : Type v}
(l : List α)
(n : ℕ)
(f : List α → β)
(r : List β)

List.sublistsLenAux n l f r = List.map f (List.sublistsLen n l) ++ r


@[to_additive]
theorem isClosed_setOf_map_one [One M₁] [One M₂] : IsClosed { f : M₁ → M₂ | f 1 = 1 }

(M₁ : Type u_6)
(M₂ : Type u_7)
[TopologicalSpace M₂]
[T2Space M₂]
[Zero M₁]
[Zero M₂]


@[ext]
theorem ext {x y : AdicCompletion I M} (h : ∀ n, x.val n = y.val n) : x = y

{R : Type u_1}
[CommRing R]
{I : Ideal R}
{M : Type u_2}
[AddCommGroup M]
[Module R M]
{x y : AdicCompletion I M}
(h : ∀ (n : ℕ), ↑x n = ↑y n)


/-- `(n, m)` is in the reflexive-transitive closure of `~` if `i ~ pred i` and `pred i ~ i`
  for all `i` between `n` and `m`. -/
theorem reflTransGen_of_pred (r : α → α → Prop) {n m : α} (h1 : ∀ i ∈ Ioc m n, r i (pred i))
    (h2 : ∀ i ∈ Ioc n m, r (pred i) i) : ReflTransGen r n m

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

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


theorem subset_diff_union (s t : Set α) : s ⊆ s \ t ∪ t


@[simp]
theorem map_subtype_span_singleton {p : Submodule R M} (x : p) :
    map p.subtype (R ∙ x) = R ∙ (x : M)

{R : Type u_1}
{M : Type u_4}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{p : Submodule R M}
(x : ↥p)

Submodule.map p.subtype (Submodule.span R {x}) = Submodule.span R {↑x}


/-- The composition of two semiring homomorphisms is a semiring homomorphism. -/
theorem comp (hf : IsSemiringHom f) {γ} [Semiring γ] {g : β → γ} (hg : IsSemiringHom g) :
    IsSemiringHom (g ∘ f)

{α : Type u}
{β : Type v}
[Semiring α]
[Semiring β]
{f : α → β}
(hf : IsSemiringHom f)
{γ : Type u_1}
[Semiring γ]
{g : β → γ}
(hg : IsSemiringHom g)


lemma closure_isGLB (x : α) : IsGLB { y | x ≤ y ∧ c.IsClosed y } (c x)

{α : Type u_1}
[PartialOrder α]
{c : ClosureOperator α}
(x : α)


@[simp]
theorem blockDiagonal'_inj [DecidableEq o] {M N : ∀ i, Matrix (m' i) (n' i) α} :
    blockDiagonal' M = blockDiagonal' N ↔ M = N

{M N : (i : o) → Matrix (m' i) (n' i) α}

Matrix.blockDiagonal' M = Matrix.blockDiagonal' N ↔ M = N


@[simp]
theorem mul_fst (x y : X q) : (x * y).1 = x.1 * y.1 + 3 * x.2 * y.2


theorem not_mem_compl_iff {x : α} : x ∉ sᶜ ↔ x ∈ s

x ∉ sᶜ ↔ x ∈ s


@[simp]
theorem preimage_const_mul_Ici_of_neg (a : α) {c : α} (h : c < 0) :
    (c * ·) ⁻¹' Ici a = Iic (a / c)

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

(fun x => c * x) ⁻¹' Set.Ici a = Set.Iic (a / c)


@[simp 1100]
theorem prevD_chainComplex (f : ∀ i j, P.X i ⟶ Q.X j) (j : ℕ) :
    prevD j f = f j (j + 1) ≫ Q.d _ _

{V : Type u}
[CategoryTheory.Category.{v, u} V]
[CategoryTheory.Preadditive V]
{P Q : ChainComplex V ℕ}
(f : (i j : ℕ) → P.X i ⟶ Q.X j)
(j : ℕ)

(prevD j) f = f j (j + 1) ≫ Q.d (j + 1) j


theorem of_comp_finiteType {f : A →ₐ[R] B} {g : B →ₐ[R] C} (h : (g.comp f).FiniteType) :
    g.FiniteType

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
{C : Type u_4}
[CommRing R]
[CommRing A]
[CommRing B]
[CommRing C]
[Algebra R A]
[Algebra R B]
[Algebra R C]
{f : A →ₐ[R] B}
{g : B →ₐ[R] C}
(h : (g.comp f).FiniteType)


theorem _root_.Relator.BiUnique.forall₂ (hr : BiUnique R) : BiUnique (Forall₂ R)

{α : Type u_1}
{β : Type u_2}
{R : α → β → Prop}
(hr : Relator.BiUnique R)


/-- A `SubtractionMonoid` is a `SubNegMonoid` with involutive negation and such that
`-(a + b) = -b + -a` and `a + b = 0 → -a = b`. -/
class SubtractionMonoid (G : Type u) extends SubNegMonoid G, InvolutiveNeg G where
  protected neg_add_rev (a b : G) : -(a + b) = -b + -a
  /-- Despite the asymmetry of `neg_eq_of_add`, the symmetric version is true thanks to the
  involutivity of negation. -/
  protected neg_eq_of_add (a b : G) : a + b = 0 → -a = b

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


@[simp] theorem wordProd_reverse (ω : List B) : π (reverse ω) = (π ω)⁻¹

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

cs.wordProd ω.reverse = (cs.wordProd ω)⁻¹


theorem tendsto_abs (hl : IsExpCmpFilter l) : Tendsto abs l atTop

{l : Filter ℂ}
(hl : Complex.IsExpCmpFilter l)

Filter.Tendsto (⇑Complex.abs) l Filter.atTop


/-- **Burnside's normal p-complement theorem**: If `N(P) ≤ C(P)`, then `P` has a normal
complement. -/
theorem ker_transferSylow_isComplement' : IsComplement' (transferSylow P hP).ker P

(hP : (↑P).normalizer ≤ Subgroup.centralizer ↑P)

(MonoidHom.transferSylow P hP).ker.IsComplement' ↑P


@[simp]
theorem projIci_self (a : α) : projIci a a = ⟨a, le_rfl⟩


/-- Extract the functor `J ⥤ C` consisting of the cone points and the maps between them,
from a `DiagramOfCones`.
-/
@[simps]
def DiagramOfCones.conePoints (D : DiagramOfCones F) : J ⥤ C

(D : CategoryTheory.Limits.DiagramOfCones F)


theorem sizeOf_lt_of_mem [SizeOf α] {as : Array α} (h : a ∈ as) : sizeOf a < sizeOf as

{α : Type u_1}
{a : α}
[SizeOf α]
{as : Array α}
(h : a ∈ as)


theorem t0Space_iff_inseparable (X : Type u) [TopologicalSpace X] :
    T0Space X ↔ ∀ x y : X, Inseparable x y → x = y

T0Space X ↔ ∀ (x y : X), Inseparable x y → x = y


@[to_additive (attr := simp) posPart_pos_iff] lemma one_lt_oneLePart_iff : 1 < a⁺ᵐ ↔ 1 < a

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


/-- The equivalence between `BddDistLat` and itself induced by `OrderDual` both ways. -/
@[simps functor inverse]
def dualEquiv : BddDistLat ≌ BddDistLat


theorem Trivialization.contMDiffWithinAt_snd_comp_iff₂ {f : M → TotalSpace F E}
    (hp : ContMDiffWithinAt IM IB n (π F E ∘ f) s x)
    (he : f x ∈ e.source) (he' : f x ∈ e'.source) :
    ContMDiffWithinAt IM 𝓘(𝕜, F) n (fun y ↦ (e (f y)).2) s x ↔
      ContMDiffWithinAt IM 𝓘(𝕜, F) n (fun y ↦ (e' (f y)).2) s x

[TopologicalSpace (Bundle.TotalSpace F E)]

{e e' : Trivialization F Bundle.TotalSpace.proj}

(hp : ContMDiffWithinAt IM IB n (Bundle.TotalSpace.proj ∘ f) s x)

ContMDiffWithinAt IM 𝓘(𝕜, F) n (fun y => (↑e (f y)).2) s x ↔ ContMDiffWithinAt IM 𝓘(𝕜, F) n (fun y => (↑e' (f y)).2) s x


theorem inter_minimals_subset : s ∩ minimals r t ⊆ minimals r (s ∩ t)

{α : Type u_1}
{r : α → α → Prop}
{s t : Set α}


theorem Valid'.balance'_aux {l} {x : α} {r o₁ o₂} (hl : Valid' o₁ l x) (hr : Valid' x r o₂)
    (H₁ : 2 * @size α r ≤ 9 * size l + 5 ∨ size r ≤ 3)
    (H₂ : 2 * @size α l ≤ 9 * size r + 5 ∨ size l ≤ 3) : Valid' o₁ (@balance' α l x r) o₂

(H₁ : 2 * r.size ≤ 9 * l.size + 5 ∨ r.size ≤ 3)

(H₂ : 2 * l.size ≤ 9 * r.size + 5 ∨ l.size ≤ 3)


@[to_additive (attr := simp)]
theorem one_div (a : G) : 1 / a = a⁻¹


/-- If `x^n = 1`, but `x^(n/p) ≠ 1` for all prime factors `p` of `n`,
then `x` has order `n` in `G`. -/
@[to_additive addOrderOf_eq_of_nsmul_and_div_prime_nsmul "If `n * x = 0`, but `n/p * x ≠ 0` for
all prime factors `p` of `n`, then `x` has order `n` in `G`."]
theorem orderOf_eq_of_pow_and_pow_div_prime (hn : 0 < n) (hx : x ^ n = 1)
    (hd : ∀ p : ℕ, p.Prime → p ∣ n → x ^ (n / p) ≠ 1) : orderOf x = n

(hd : ∀ (p : ℕ), Nat.Prime p → p ∣ n → (n / p) • x ≠ 0)


/-- If `u₁` and `u₂` are two uniform structures on `γ`, then
`𝒱(α, γ, 𝔖, u₁ ⊓ u₂) = 𝒱(α, γ, 𝔖, u₁) ⊓ 𝒱(α, γ, 𝔖, u₂)`. -/
protected theorem inf_eq {u₁ u₂ : UniformSpace γ} :
    𝒱(α, γ, 𝔖, u₁ ⊓ u₂) = 𝒱(α, γ, 𝔖, u₁) ⊓ 𝒱(α, γ, 𝔖, u₂)

{α : Type u_1}
{γ : Type u_3}
{𝔖 : Set (Set α)}
{u₁ u₂ : UniformSpace γ}

UniformOnFun.uniformSpace α γ 𝔖 = UniformOnFun.uniformSpace α γ 𝔖 ⊓ UniformOnFun.uniformSpace α γ 𝔖


theorem Sublist.length_le : l₁ <+ l₂ → length l₁ ≤ length l₂

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


@[simp]
lemma even_ofMul_iff {a : α} : Even (Additive.ofMul a) ↔ IsSquare a


/-- A typeclass carrying a choice of bicategorical structural isomorphism between two objects.
Used by the `⊗≫` bicategorical composition operator, and the `coherence` tactic.
-/
class BicategoricalCoherence (f g : a ⟶ b) where
  /-- The chosen structural isomorphism between to 1-morphisms. -/
  hom : f ⟶ g
  [isIso : IsIso hom]

[self : CategoryTheory.BicategoricalCoherence f g]


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

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


@[simp]
theorem mapAccumr₂_mapAccumr_right (f₁ : α → γ → σ₁ → σ₁ × ζ) (f₂ : β → σ₂ → σ₂ × γ) :
    (mapAccumr₂ f₁ xs (mapAccumr f₂ ys s₂).snd s₁)
    = let m := (mapAccumr₂ (fun x y s =>
          let r₂ := f₂ y s.snd
          let r₁ := f₁ x r₂.snd s.fst
          ((r₁.fst, r₂.fst), r₁.snd)
        ) xs ys (s₁, s₂))
      (m.fst.fst, m.snd)

{α : Type}
{n : ℕ}
{β : Type}
(xs : Mathlib.Vector α n)
(ys : Mathlib.Vector β n)
{γ σ₁ ζ σ₂ : Type}
{s₂ : σ₂}
{s₁ : σ₁}
(f₁ : α → γ → σ₁ → σ₁ × ζ)
(f₂ : β → σ₂ → σ₂ × γ)

Mathlib.Vector.mapAccumr₂ f₁ xs (Mathlib.Vector.mapAccumr f₂ ys s₂).2 s₁ =
  let m :=
    Mathlib.Vector.mapAccumr₂
      (fun x y s =>
        let r₂ := f₂ y s.2;
        let r₁ := f₁ x r₂.2 s.1;
        ((r₁.1, r₂.1), r₁.2))
      xs ys (s₁, s₂);
  (m.1.1, m.2)


@[simp]
lemma ofNat_le_ofReal {n : ℕ} [n.AtLeastTwo] {p : ℝ} :
    no_index (OfNat.ofNat n) ≤ ENNReal.ofReal p ↔ OfNat.ofNat n ≤ p

OfNat.ofNat n ≤ ENNReal.ofReal p ↔ OfNat.ofNat n ≤ p


nonrec theorem IsLocalMinOn.inf (hf : IsLocalMinOn f s a) (hg : IsLocalMinOn g s a) :
    IsLocalMinOn (fun x => f x ⊓ g x) s a

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[SemilatticeInf β]
{f g : α → β}
{a : α}
{s : Set α}
(hf : IsLocalMinOn f s a)
(hg : IsLocalMinOn g s a)


theorem length_modifyNth (f : α → α) : ∀ n l, length (modifyNth f n l) = length l

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

(List.modifyNth f n l).length = l.length


theorem eLpNorm_indicator_const {c : G} (hs : MeasurableSet s) (hp : p ≠ 0) (hp_top : p ≠ ∞) :
    eLpNorm (s.indicator fun _ => c) p μ = ‖c‖₊ * μ s ^ (1 / p.toReal)

{α : Type u_1}
{G : Type u_4}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup G]
{s : Set α}
{c : G}
(hs : MeasurableSet s)
(hp : p ≠ 0)
(hp_top : p ≠ ⊤)

MeasureTheory.eLpNorm (s.indicator fun x => c) p μ = ↑‖c‖₊ * μ s ^ (1 / p.toReal)


@[to_additive (attr := simp)]
lemma inv_inter (s t : Finset α) : (s ∩ t)⁻¹ = s⁻¹ ∩ t⁻¹

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

(s ∩ t)⁻¹ = s⁻¹ ∩ t⁻¹


/-- An `R`-algebra `S` is flat if it is flat as `R`-module. -/
class Algebra.Flat (R : Type u) (S : Type v) [CommRing R] [CommRing S] [Algebra R S] : Prop where
  out : Module.Flat R S

{R : Type u}
{S : Type v}
[CommRing R]
[CommRing S]
[Algebra R S]
[self : Algebra.Flat R S]


lemma ofUpper_inj {a b : WithUpper α} : ofUpper a = ofUpper b ↔ a = b

{α : Type u_1}
{a b : Topology.WithUpper α}

Topology.WithUpper.ofUpper a = Topology.WithUpper.ofUpper b ↔ a = b


theorem IsAdjointPair.sub (h : IsAdjointPair B B' f g) (h' : IsAdjointPair B B' f' g') :
    IsAdjointPair B B' (f - f') (g - g')

{R : Type u_1}
{M : Type u_5}
{M₁ : Type u_6}
{M₂ : Type u_7}
[CommRing R]
[AddCommGroup M]
[Module R M]
[AddCommGroup M₁]
[Module R M₁]
[AddCommGroup M₂]
[Module R M₂]
{B : M →ₗ[R] M →ₗ[R] M₂}
{B' : M₁ →ₗ[R] M₁ →ₗ[R] M₂}
{f f' : M →ₗ[R] M₁}
{g g' : M₁ →ₗ[R] M}
(h : B.IsAdjointPair B' f g)
(h' : B.IsAdjointPair B' f' g')


theorem Filter.EventuallyEq.isMaxFilter_iff {α β : Type*} [Preorder β] {f g : α → β} {a : α}
    {l : Filter α} (heq : f =ᶠ[l] g) (hfga : f a = g a) : IsMaxFilter f l a ↔ IsMaxFilter g l a

{α : Type u_1}
{β : Type u_2}
[Preorder β]
{f g : α → β}
{a : α}
{l : Filter α}
(heq : f =ᶠ[l] g)
(hfga : f a = g a)


theorem nhds_eq_comap_uniformity {x : α} : 𝓝 x = (𝓤 α).comap (Prod.mk x)


theorem denom_add_dvd (x y : RatFunc K) : denom (x + y) ∣ denom x * denom y

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


theorem MDifferentiable.const_smul (s : 𝕜) (hf : MDifferentiable I 𝓘(𝕜, E') f) :
    MDifferentiable I 𝓘(𝕜, E') (s • f)

{𝕜 : 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]
[SmoothManifoldWithCorners I M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{f : M → E'}
(s : 𝕜)
(hf : MDifferentiable I 𝓘(𝕜, E') f)


@[to_additive]
theorem div_eq_mul_one_div (a b : G) : a / b = a * (1 / b)

{G : Type u_3}
[DivInvMonoid G]
(a b : G)


theorem eqRec_eq_cast {α : Sort _} {a : α} {motive : (a' : α) → a = a' → Sort _}
    (x : motive a (rfl : a = a)) {a' : α} (e : a = a') :
    @Eq.rec α a motive x a' e = cast (e ▸ rfl) x

{α : Sort u_1}
{a : α}
{motive : (a' : α) → a = a' → Sort u_2}
(x : motive a ⋯)
{a' : α}
(e : a = a')


/-- If `x` is a fixed point of `f`, then it is a fixed point of `f^[n]`. -/
protected theorem iterate (hf : IsFixedPt f x) (n : ℕ) : IsFixedPt f^[n] x

{α : Type u}
{f : α → α}
{x : α}
(hf : Function.IsFixedPt f x)
(n : ℕ)


@[simp]
theorem Biprod.ofComponents_snd :
    Biprod.ofComponents f₁₁ f₁₂ f₂₁ f₂₂ ≫ biprod.snd = biprod.fst ≫ f₁₂ + biprod.snd ≫ f₂₂

CategoryTheory.Biprod.ofComponents f₁₁ f₁₂ f₂₁ f₂₂ ≫ CategoryTheory.Limits.biprod.snd =
  CategoryTheory.Limits.biprod.fst ≫ f₁₂ + CategoryTheory.Limits.biprod.snd ≫ f₂₂


lemma map_ψ₂ : (W.map f).ψ₂ = W.ψ₂.map (mapRingHom f)

{R : Type r}
{S : Type s}
[CommRing R]
[CommRing S]
(W : WeierstrassCurve R)
(f : R →+* S)

(W.map f).ψ₂ = Polynomial.map (Polynomial.mapRingHom f) W.ψ₂


@[simp]
theorem insert_diff_singleton {a : α} {s : Set α} : insert a (s \ {a}) = insert a s


/-- The `DFinsupp` version of `Finsupp.lsum`.

See note [bundled maps over different rings] for why separate `R` and `S` semirings are used. -/
@[simps]
def lsum [Semiring S] [Module S N] [SMulCommClass R S N] :
    (∀ i, M i →ₗ[R] N) ≃ₗ[S] (Π₀ i, M i) →ₗ[R] N

{ι : Type u_1}
{R : Type u_2}
(S : Type u_3)
{M : ι → Type u_4}
{N : Type u_5}
[Semiring R]
[(i : ι) → AddCommMonoid (M i)]
[(i : ι) → Module R (M i)]
[AddCommMonoid N]
[Module R N]
[DecidableEq ι]
[Semiring S]
[Module S N]
[SMulCommClass R S N]
(F : (i : ι) → M i →ₗ[R] N)
(a : Π₀ (i : ι), M i)

((DFinsupp.lsum S) F) a = (DFinsupp.sumAddHom fun i => (F i).toAddMonoidHom) a


theorem coe_sub_iff_lt {a b : Fin n} : (↑(a - b) : Nat) = n + a - b ↔ a < b


theorem FiniteDimensional.rank_linearMap_self :
    Module.rank S (M →ₗ[R] S) = lift.{u'} (Module.rank R M)

(R : Type u)
(S : Type u')
(M : Type v)
[Ring R]
[Ring S]
[AddCommGroup M]
[Module R M]
[Module.Free R M]
[Module.Finite R M]
[StrongRankCondition R]
[StrongRankCondition S]
[Module R S]
[SMulCommClass R S S]

Module.rank S (M →ₗ[R] S) = Cardinal.lift.{u', v} (Module.rank R M)


theorem one_of_one_le (h : 1 ≤ x) : smoothTransition x = 1


@[simp]
theorem sbtw_mul_sub_add_iff [NoZeroDivisors R] {x y r : R} :
    Sbtw R x (r * (y - x) + x) y ↔ x ≠ y ∧ r ∈ Set.Ioo (0 : R) 1

{R : Type u_1}
[OrderedRing R]
[NoZeroDivisors R]
{x y r : R}

Sbtw R x (r * (y - x) + x) y ↔ x ≠ y ∧ r ∈ Set.Ioo 0 1


lemma scaleRoots_dvd_iff (p q : R[X]) {r : R} (hr : IsUnit r) :
    p.scaleRoots r ∣ q.scaleRoots r ↔ p ∣ q

{R : Type u_1}
[CommSemiring R]
(p q : Polynomial R)
{r : R}
(hr : IsUnit r)


theorem image2_iInter₂_subset_left (s : ∀ i, κ i → Set α) (t : Set β) :
    image2 f (⋂ (i) (j), s i j) t ⊆ ⋂ (i) (j), image2 f (s i j) t

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{ι : Sort u_4}
{κ : ι → Sort u_7}
(f : α → β → γ)
(s : (i : ι) → κ i → Set α)
(t : Set β)

Set.image2 f (⋂ i, ⋂ j, s i j) t ⊆ ⋂ i, ⋂ j, Set.image2 f (s i j) t


theorem uniformContinuous_toMul : UniformContinuous (toMul : Additive α → α)


theorem adjoin_contains_field_as_subfield (F : Subfield E) : (F : Set E) ⊆ adjoin F S

{E : Type u_2}
[Field E]
(S : Set E)
(F : Subfield E)


theorem indicator_injective : Injective fun f : ∀ i ∈ s, α => indicator s f

{ι : Type u_1}
{α : Type u_2}
[Zero α]
(s : Finset ι)

Function.Injective fun f => Finsupp.indicator s f


theorem union_vsub : s₁ ∪ s₂ -ᵥ t = s₁ -ᵥ t ∪ (s₂ -ᵥ t)

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


theorem tendsto_atTop [Nonempty β] [SemilatticeSup β] {u : β → α} {a : α} :
    Tendsto u atTop (𝓝 a) ↔ ∀ ε > 0, ∃ N, ∀ n ≥ N, dist (u n) a < ε

{α : Type u}
{β : Type v}
[PseudoMetricSpace α]
[Nonempty β]
[SemilatticeSup β]
{u : β → α}
{a : α}

Filter.Tendsto u Filter.atTop (𝓝 a) ↔ ∀ ε > 0, ∃ N, ∀ n ≥ N, dist (u n) a < ε


@[simp, norm_cast]
theorem star_intCast [Ring R] [StarRing R] (z : ℤ) : star (z : R) = z

{R : Type u}
[Ring R]
[StarRing R]
(z : ℤ)


theorem mulMap'_surjective : Function.Surjective (mulMap' A B)

{R : Type u}
{S : Type v}
[CommSemiring R]
[CommSemiring S]
[Algebra R S]
(A B : Subalgebra R S)


/-- Convex hull of `s` is bounded if and only if `s` is bounded. -/
@[simp]
theorem isBounded_convexHull {s : Set E} :
    Bornology.IsBounded (convexHull ℝ s) ↔ Bornology.IsBounded s

{E : Type u_2}
[SeminormedAddCommGroup E]
[NormedSpace ℝ E]
{s : Set E}

Bornology.IsBounded ((convexHull ℝ) s) ↔ Bornology.IsBounded s


@[simp]
theorem quot_one_mul (x : PGame) : (⟦1 * x⟧ : Game) = ⟦x⟧


theorem LinearOrder.ext {A B : LinearOrder α}
    (H : ∀ x y : α, (haveI := A; x ≤ y) ↔ x ≤ y) : A = B

{α : Type u_2}
{A B : LinearOrder α}
(H : ∀ (x y : α), x ≤ y ↔ x ≤ y)


@[simp] theorem mk_zero [Zero α] [Monoid α] : Associates.mk (0 : α) = 0


@[simp]
theorem comap_snd_neBot_iff {f : Filter β} :
    (f.comap (Prod.snd : α × β → β)).NeBot ↔ Nonempty α ∧ f.NeBot

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

(Filter.comap Prod.snd f).NeBot ↔ Nonempty α ∧ f.NeBot


@[to_additive]
theorem smul_closedBall'' : a • closedBall b r = closedBall (a • b) r

{E : Type u_6}
[SeminormedCommGroup E]
{a b : E}
{r : ℝ}

a • Metric.closedBall b r = Metric.closedBall (a • b) r


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

{α : Type u_2}
{β : Type u_3}
[TopologicalSpace α]
[Preorder α]
[TopologicalSpace β]
[Preorder β]
(f : α →Co β)
(f' : α → β)
(h : f' = ⇑f)


theorem TendstoLocallyUniformlyOn.congr_right {g : α → β} (hf : TendstoLocallyUniformlyOn F f p s)
    (hg : s.EqOn f g) : TendstoLocallyUniformlyOn F g p s

{F : ι → α → β}


theorem succ_mul_binomial [DecidableEq α] (h : a ≠ b) :
    (f a + f b).succ * multinomial {a, b} f =
      (f a).succ * multinomial {a, b} (Function.update f a (f a).succ)

{α : Type u_1}
{f : α → ℕ}
{a b : α}
[DecidableEq α]
(h : a ≠ b)

(f a + f b).succ * Nat.multinomial {a, b} f = (f a).succ * Nat.multinomial {a, b} (Function.update f a (f a).succ)


protected theorem ext {α} {x y : Comp F G α} : x.run = y.run → x = y

{F : Type u → Type w}
{G : Type v → Type u}
{α : Type v}
{x y : Functor.Comp F G α}


nonrec theorem _root_.Commute.tmul {a₁ a₂ : A} {b₁ b₂ : B}
    (ha : Commute a₁ a₂) (hb : Commute b₁ b₂) :
    Commute (a₁ ⊗ₜ[R] b₁) (a₂ ⊗ₜ[R] b₂)

{R : Type uR}
{A : Type uA}
{B : Type uB}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[Module R A]
[SMulCommClass R A A]
[IsScalarTower R A A]
[NonUnitalNonAssocSemiring B]
[Module R B]
[SMulCommClass R B B]
[IsScalarTower R B B]
{a₁ a₂ : A}
{b₁ b₂ : B}
(ha : Commute a₁ a₂)
(hb : Commute b₁ b₂)


@[simp]
theorem leadingCoeff_monomial (a : R) (n : ℕ) : leadingCoeff (monomial n a) = a

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

((Polynomial.monomial n) a).leadingCoeff = a


@[simp]
theorem lift_unique (f : M →ₗ[R] A) (cond : ∀ m, f m * f m = 0) (g : ExteriorAlgebra R M →ₐ[R] A) :
    g.toLinearMap.comp (ι R) = f ↔ g = lift R ⟨f, cond⟩

(R : Type u1)
[CommRing R]
{M : Type u2}
[AddCommGroup M]
[Module R M]
{A : Type u_1}
[Semiring A]
[Algebra R A]
(f : M →ₗ[R] A)
(cond : ∀ (m : M), f m * f m = 0)
(g : ExteriorAlgebra R M →ₐ[R] A)

g.toLinearMap ∘ₗ ExteriorAlgebra.ι R = f ↔ g = (ExteriorAlgebra.lift R) ⟨f, cond⟩


lemma pow_le_pow_of_le_one [ZeroLEOneClass α] [PosMulMono α] [MulPosMono α]
    (ha₀ : 0 ≤ a) (ha₁ : a ≤ 1) : ∀ {m n : ℕ}, m ≤ n → a ^ n ≤ a ^ m

{α : Type u}
[Semiring α]
[Preorder α]
{a : α}
[ZeroLEOneClass α]
[PosMulMono α]
[MulPosMono α]
(ha₀ : 0 ≤ a)
(ha₁ : a ≤ 1)
{m n : ℕ}


theorem Disjoint.inv_left (h : Disjoint f g) : Disjoint f⁻¹ g

{α : Type u_1}
{f g : Equiv.Perm α}
(h : f.Disjoint g)


@[to_additive]
theorem measure_isOpen_pos_of_smulInvariant_of_ne_zero (hμ : μ ≠ 0) (hU : IsOpen U)
    (hne : U.Nonempty) : 0 < μ U

[MeasureTheory.VAddInvariantMeasure G α μ]


@[simp, nolint simpNF]
theorem hnot_eq : ￢a = unit


lemma transGen_wcovBy_of_le [Preorder α] [LocallyFiniteOrder α] {x y : α} (hxy : x ≤ y) :
    TransGen (· ⩿ ·) x y

{α : Type u_2}
[Preorder α]
[LocallyFiniteOrder α]
{x y : α}
(hxy : x ≤ y)

Relation.TransGen (fun x x_1 => x ⩿ x_1) x y


/--
A class describing the property of reflecting effective epimorphic families.
-/
class ReflectsEffectiveEpiFamilies (F : C ⥤ D) : Prop where
  /--
  A functor reflects effective epimorphic families if families that are mapped to effective
  epimorphic families are themselves effective epimorphic families.
  -/
  reflects : ∀ {α : Type u} {B : C} (X : α → C) (π : (a : α) → (X a ⟶ B)),
    EffectiveEpiFamily (fun a ↦ F.obj (X a)) (fun a  ↦ F.map (π a)) →
    EffectiveEpiFamily X π

{C : Type u_1}
[CategoryTheory.Category.{u_3, u_1} C]
{D : Type u_2}
[CategoryTheory.Category.{u_4, u_2} D]
{F : CategoryTheory.Functor C D}
[self : F.ReflectsEffectiveEpiFamilies]
{α : Type u}
{B : C}
(X : α → C)
(π : (a : α) → X a ⟶ B)

(CategoryTheory.EffectiveEpiFamily (fun a => F.obj (X a)) fun a => F.map (π a)) → CategoryTheory.EffectiveEpiFamily X π


/-- Typeclass for strict monotonicity of scalar multiplication by positive elements on the left,
namely `b₁ < b₂ → a • b₁ < a • b₂` if `0 < a`.

You should usually not use this very granular typeclass directly, but rather a typeclass like
`OrderedSMul`. -/
class PosSMulStrictMono : Prop where
  /-- Do not use this. Use `smul_lt_smul_of_pos_left` instead. -/
  protected elim ⦃a : α⦄ (ha : 0 < a) ⦃b₁ b₂ : β⦄ (hb : b₁ < b₂) : a • b₁ < a • b₂

{α : Type u_1}
{β : Type u_2}
[SMul α β]
[Preorder α]
[Preorder β]
[Zero α]
[self : PosSMulStrictMono α β]
⦃a : α⦄
(ha : 0 < a)
⦃b₁ b₂ : β⦄
(hb : b₁ < b₂)


theorem toReal_coe_eq_self_iff_mem_Ioc {θ : ℝ} : (θ : Angle).toReal = θ ↔ θ ∈ Set.Ioc (-π) π


theorem grade_eq_lsingle_range (m : M) :
    grade R m = LinearMap.range (Finsupp.lsingle m : R →ₗ[R] M →₀ R)

{M : Type u_1}
(R : Type u_3)
[CommSemiring R]
(m : M)

AddMonoidAlgebra.grade R m = LinearMap.range (Finsupp.lsingle m)


theorem subtype_card {p : α → Prop} (s : Finset α) (H : ∀ x : α, x ∈ s ↔ p x) :
    @card { x // p x } (Fintype.subtype s H) = s.card

{α : Type u_1}
{p : α → Prop}
(s : Finset α)
(H : ∀ (x : α), x ∈ s ↔ p x)


theorem natAdd_zero {n : Nat} : natAdd 0 = cast (Nat.zero_add n).symm


theorem real_smul_eq_coe_smul [AddCommGroup E] [Module K E] [Module ℝ E] [IsScalarTower ℝ K E]
    (r : ℝ) (x : E) : r • x = (r : K) • x

{K : Type u_1}
{E : Type u_2}
[RCLike K]
[AddCommGroup E]
[Module K E]
[Module ℝ E]
[IsScalarTower ℝ K E]
(r : ℝ)
(x : E)


@[reassoc (attr := simp)]
theorem app_p_comp : P.p.app X ≫ f.f.app X = f.f.app X

{P Q : CategoryTheory.Idempotents.Karoubi (J ⥤ C)}


/-- `HomClass L F M N` states that `F` is a type of `L`-homomorphisms. You should extend this
  typeclass when you extend `FirstOrder.Language.Hom`. -/
class HomClass (L : outParam Language) (F M N : Type*)
  [FunLike F M N] [L.Structure M] [L.Structure N] : Prop where
  map_fun : ∀ (φ : F) {n} (f : L.Functions n) (x), φ (funMap f x) = funMap f (φ ∘ x)
  map_rel : ∀ (φ : F) {n} (r : L.Relations n) (x), RelMap r x → RelMap r (φ ∘ x)

[self : FirstOrder.Language.HomClass L F M N]

FirstOrder.Language.Structure.RelMap r x → FirstOrder.Language.Structure.RelMap r (⇑φ ∘ x)


theorem IsStrongLimit.two_power_lt {x c} (h : IsStrongLimit c) : x < c → (2^x) < c

{x c : Cardinal.{u_2}}
(h : c.IsStrongLimit)


/-- A path whose support contains every vertex is hamiltonian. -/
lemma IsPath.isHamiltonian_of_mem (hp : p.IsPath) (hp' : ∀ w, w ∈ p.support) :
    p.IsHamiltonian

{α : Type u_1}
[DecidableEq α]
{G : SimpleGraph α}
{a b : α}
{p : G.Walk a b}
(hp : p.IsPath)
(hp' : ∀ (w : α), w ∈ p.support)


/-- Morphisms in `SimplicialObject.Split C` are morphisms of simplicial objects that
are compatible with the splittings. -/
structure Hom (S₁ S₂ : Split C) where
  /-- the morphism between the underlying simplicial objects -/
  F : S₁.X ⟶ S₂.X
  /-- the morphism between the "nondegenerate" `n`-simplices for all `n : ℕ` -/
  f : ∀ n : ℕ, S₁.s.N n ⟶ S₂.s.N n
  comm : ∀ n : ℕ, S₁.s.ι n ≫ F.app (op [n]) = f n ≫ S₂.s.ι n := by aesop_cat

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
{S₁ S₂ : SimplicialObject.Split C}
(self : S₁.Hom S₂)
(n : ℕ)

S₁.s.ι n ≫ self.F.app (Opposite.op [n]) = self.f n ≫ S₂.s.ι n


theorem degree_sub_eq_left_of_degree_lt (h : degree q < degree p) : degree (p - q) = degree p

{R : Type u}
[Ring R]
{p q : R[X]}
(h : q.degree < p.degree)


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

{α : Type u_3}
{E : Type u_6}
[SeminormedAddGroup E]
[TopologicalSpace α]
{f : α → E}
{s : Set α}
{a : α}
(h : ContinuousWithinAt f s a)


@[simp] lemma mk_zero : (⟨0, zero_mem _⟩ : 𝓞 K) = 0


/-- The obvious triangle `X₁ ⟶ X₁ ⨯ X₂ ⟶ X₂ ⟶ X₁⟦1⟧`. -/
@[simps!]
def binaryProductTriangle (X₁ X₂ : C) [HasZeroMorphisms C] [HasBinaryProduct X₁ X₂] :
    Triangle C

(CategoryTheory.Pretriangulated.binaryProductTriangle X₁ X₂).mor₃ = 0


@[to_additive (attr := simp)]
theorem div_lt_div_iff_left (a : α) : a / b < a / c ↔ c < b

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

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


theorem closure_cycle_adjacent_swap {σ : Perm α} (h1 : IsCycle σ) (h2 : σ.support = ⊤) (x : α) :
    closure ({σ, swap x (σ x)} : Set (Perm α)) = ⊤

{α : Type u_2}
[DecidableEq α]
[Fintype α]
{σ : Equiv.Perm α}
(h1 : σ.IsCycle)
(h2 : σ.support = ⊤)
(x : α)

Subgroup.closure {σ, Equiv.swap x (σ x)} = ⊤


@[simp] theorem snd_comp_inl : snd R M M₂ ∘ₗ inl R M M₂ = 0

(R : Type u)
(M : Type v)
(M₂ : Type w)
[Semiring R]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R M₂]

LinearMap.snd R M M₂ ∘ₗ LinearMap.inl R M M₂ = 0


/-- A submonoid is either the trivial submonoid or nontrivial. -/
@[to_additive "An additive submonoid is either the trivial additive submonoid or nontrivial."]
theorem bot_or_nontrivial (S : Submonoid M) : S = ⊥ ∨ Nontrivial S

{M : Type u_1}
[AddZeroClass M]
(S : AddSubmonoid M)


@[simp] theorem or_true (p : Prop) : (p ∨ True) = True


@[simp, norm_cast]
theorem coe_mul : ((φ * ψ : MvPolynomial σ R) : MvPowerSeries σ R) = φ * ψ

{σ : Type u_1}
{R : Type u_2}
[CommSemiring R]
(φ ψ : MvPolynomial σ R)

↑(φ * ψ) = ↑φ * ↑ψ


/-- The elliptic 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$.
When `R` is a field, any two Weierstrass equations isomorphic to `E` are related by this. -/
@[simps (config := { rhsMd := .default }) a₁ a₂ a₃ a₄ a₆ Δ' toWeierstrassCurve]
def variableChange : EllipticCurve R

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

(E.variableChange C).a₄ =
  ↑C.u⁻¹ ^ 4 * (E.a₄ - C.s * E.a₃ + 2 * C.r * E.a₂ - (C.t + C.r * C.s) * E.a₁ + 3 * C.r ^ 2 - 2 * C.s * C.t)


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

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

(t \ s).mulIndicator f = t.mulIndicator f * (s.mulIndicator f)⁻¹


theorem card_support_conj : (σ * τ * σ⁻¹).support.card = τ.support.card

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


@[simp]
theorem abelianizationCongr_of (x : G) :
    e.abelianizationCongr (Abelianization.of x) = Abelianization.of (e x)

{G : Type u}
[Group G]
{H : Type v}
[Group H]
(e : G ≃* H)
(x : G)


@[simp]
theorem destutter'_eq_self_iff (a) : l.destutter' R a = a :: l ↔ l.Chain R a

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

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


theorem choose_symm_of_eq_add {n a b : ℕ} (h : n = a + b) : Nat.choose n a = Nat.choose n b


/-- First coefficient of the `n`-th power of a power series. -/
lemma coeff_one_pow (n : ℕ) (φ : R⟦X⟧) :
    coeff R 1 (φ ^ n) = n * coeff R 1 φ * (constantCoeff R φ) ^ (n - 1)

{R : Type u_2}
[CommSemiring R]
(n : ℕ)
(φ : PowerSeries R)

(PowerSeries.coeff R 1) (φ ^ n) = ↑n * (PowerSeries.coeff R 1) φ * (PowerSeries.constantCoeff R) φ ^ (n - 1)


@[simps!]
instance category : Category (Square C)

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

(CategoryTheory.CategoryStruct.id sq).τ₃ = CategoryTheory.CategoryStruct.id sq.X₃


@[simp]
theorem dom_natCast (x : ℕ) : (x : PartENat).Dom


@[to_additive (attr := simp)]
theorem inv_mul_cancel_left (a : αˣ) (b : α) : (↑a⁻¹ : α) * (a * b) = b

{α : Type u}
[AddMonoid α]
(a : AddUnits α)
(b : α)


@[aesop safe 20 apply (rule_sets := [Measurable])]
protected theorem dist {_ : MeasurableSpace α} {β : Type*} [PseudoMetricSpace β] {f g : α → β}
    (hf : StronglyMeasurable f) (hg : StronglyMeasurable g) :
    StronglyMeasurable fun x => dist (f x) (g x)

∀ {x : MeasurableSpace α} {β : Type u_5} [inst : PseudoMetricSpace β] {f g : α → β},
  MeasureTheory.StronglyMeasurable f →
    MeasureTheory.StronglyMeasurable g → MeasureTheory.StronglyMeasurable fun x => dist (f x) (g x)


theorem integrableOn_Icc_iff_integrableOn_Ioo' (ha : μ {a} ≠ ∞) (hb : μ {b} ≠ ∞) :
    IntegrableOn f (Icc a b) μ ↔ IntegrableOn f (Ioo a b) μ

{α : Type u_1}
{E : Type u_3}
[MeasurableSpace α]
[NormedAddCommGroup E]
[PartialOrder α]
[MeasurableSingletonClass α]
{f : α → E}
{μ : MeasureTheory.Measure α}
{a b : α}
(ha : μ {a} ≠ ⊤)
(hb : μ {b} ≠ ⊤)

MeasureTheory.IntegrableOn f (Set.Icc a b) μ ↔ MeasureTheory.IntegrableOn f (Set.Ioo a b) μ


@[to_additive]
theorem absolutelyContinuous_map_div_left (g : G) : μ ≪ map (fun h => g / h) μ

{G : Type u_1}
[MeasurableSpace G]
[Group G]
[MeasurableMul₂ G]
(μ : MeasureTheory.Measure G)
[MeasureTheory.SFinite μ]
[MeasurableInv G]
[μ.IsMulLeftInvariant]
(g : G)

μ ≪ MeasureTheory.Measure.map (fun h => g / h) μ


@[simp]
theorem prev (α : Type*) [AddRightCancelSemigroup α] [One α] (i : α) :
    (ComplexShape.down α).prev i = i + 1

(α : Type u_2)
[AddRightCancelSemigroup α]
[One α]
(i : α)


theorem setToL1_nonneg {T : Set α → G' →L[ℝ] G''} {C : ℝ} (hT : DominatedFinMeasAdditive μ T C)
    (hT_nonneg : ∀ s, MeasurableSet s → μ s < ∞ → ∀ x, 0 ≤ x → 0 ≤ T s x) {f : α →₁[μ] G'}
    (hf : 0 ≤ f) : 0 ≤ setToL1 hT f

(hT : MeasureTheory.DominatedFinMeasAdditive μ T C)

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


theorem wronskian_add_left (a b c : R[X]) : wronskian (a + b) c = wronskian a c + wronskian b c

{R : Type u_1}
[CommRing R]
(a b c : R[X])

(a + b).wronskian c = a.wronskian c + b.wronskian c


/-- Given a `k`-linear `G`-representation `A`, there is a `k`-linear isomorphism between
representation morphisms `Hom(k[G], A)` and `A`. -/
@[simps]
noncomputable def leftRegularHomEquiv (A : Rep k G) : (Rep.ofMulAction k G G ⟶ A) ≃ₗ[k] A

{k G : Type u}
[CommRing k]
[Monoid G]
(A : Rep k G)
(f : Rep.ofMulAction k G G ⟶ A)

A.leftRegularHomEquiv f = f.hom (Finsupp.single 1 1)


theorem mem_sphere' : y ∈ sphere x ε ↔ dist x y = ε

{α : Type u}
[PseudoMetricSpace α]
{x y : α}
{ε : ℝ}


theorem biprod.lift_eq {T : C} {f : T ⟶ X} {g : T ⟶ Y} :
    biprod.lift f g = f ≫ biprod.inl + g ≫ biprod.inr

CategoryTheory.Limits.biprod.lift f g = f ≫ CategoryTheory.Limits.biprod.inl + g ≫ CategoryTheory.Limits.biprod.inr


@[simp]
theorem succ_coe_top : succ ↑(⊤ : α) = (⊤ : WithTop α)

{α : Type u_1}
[DecidableEq α]
[PartialOrder α]
[OrderTop α]
[SuccOrder α]


@[simp]
theorem diam_preimage (s : Set β) : Metric.diam (h ⁻¹' s) = Metric.diam s

{α : Type u}
{β : Type v}
[PseudoMetricSpace α]
[PseudoMetricSpace β]
(h : α ≃ᵢ β)
(s : Set β)


lemma add_pow_le (ha : 0 ≤ a) (hb : 0 ≤ b) : ∀ n, (a + b) ^ n ≤ 2 ^ (n - 1) * (a ^ n + b ^ n)

{R : Type u_3}
[LinearOrderedSemiring R]
{a b : R}
[ExistsAddOfLE R]
(ha : 0 ≤ a)
(hb : 0 ≤ b)
(n : ℕ)


@[to_additive]
theorem Prod.commute_iff {x y : M × N} :
    Commute x y ↔ Commute x.1 y.1 ∧ Commute x.2 y.2

{M : Type u_5}
{N : Type u_6}
[Add M]
[Add N]
{x y : M × N}

AddCommute x y ↔ AddCommute x.1 y.1 ∧ AddCommute x.2 y.2


lemma IsConj.symm (hσ : IsConj φ σ) :
    IsConj φ σ.symm

(hσ : NumberField.ComplexEmbedding.IsConj φ σ)


/-- Forgetting the `A` action, a `Submodule` over `A ⊗[R] B` is just a `Submodule` over `B`. -/
@[simps]
def toSubmodule' (p : Submodule (A ⊗[R] B) M) : Submodule B M

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
{M : Type u_4}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
[Semiring A]
[Semiring B]
[Module A M]
[Module B M]
[Algebra R A]
[Algebra R B]
[IsScalarTower R A M]
[IsScalarTower R B M]
[SMulCommClass A B M]
(p : Submodule (A ⊗[R] B) M)


/-- A version of `Set.indicator_add` for `MeasureTheory.indicatorConstLp`.-/
theorem indicatorConstLp_add {c' : E} :
    indicatorConstLp p hs hμs c + indicatorConstLp p hs hμs c' =
    indicatorConstLp p hs hμs (c + c')

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

MeasureTheory.indicatorConstLp p hs hμs c + MeasureTheory.indicatorConstLp p hs hμs c' =
  MeasureTheory.indicatorConstLp p hs hμs (c + c')


@[simp, norm_cast]
theorem coe_id : (id R₁ M₁ : M₁ →ₗ[R₁] M₁) = LinearMap.id

{R₁ : Type u_1}
[Semiring R₁]
{M₁ : Type u_4}
[TopologicalSpace M₁]
[AddCommMonoid M₁]
[Module R₁ M₁]

↑(ContinuousLinearMap.id R₁ M₁) = LinearMap.id


theorem le_pointwise_smul_iff₀ {a : M} (ha : a ≠ 0) {S T : Subring R} : S ≤ a • T ↔ a⁻¹ • S ≤ T

{M : Type u_1}
{R : Type u_2}
[GroupWithZero M]
[Ring R]
[MulSemiringAction M R]
{a : M}
(ha : a ≠ 0)
{S T : Subring R}

S ≤ a • T ↔ a⁻¹ • S ≤ T


@[simp]
lemma basis_one : CoordinateRing.basis W 1 = mk W Y

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

(WeierstrassCurve.Affine.CoordinateRing.basis W) 1 = (WeierstrassCurve.Affine.CoordinateRing.mk W) Y


protected theorem eq {a₁ b₁} {a₂ b₂ : M} :
    mk' S a₁ a₂ = mk' S b₁ b₂ ↔ ∃ c : M, ↑c * (↑b₂ * a₁) = c * (a₂ * b₁)

{R : Type u_1}
[CommSemiring R]
{M : Submonoid R}
{S : Type u_2}
[CommSemiring S]
[Algebra R S]
[IsLocalization M S]
{a₁ b₁ : R}
{a₂ b₂ : ↥M}

IsLocalization.mk' S a₁ a₂ = IsLocalization.mk' S b₁ b₂ ↔ ∃ c, ↑c * (↑b₂ * a₁) = ↑c * (↑a₂ * b₁)


@[simp]
theorem coeff_ofNat_succ (a n : ℕ) [h : a.AtLeastTwo] :
    coeff (no_index (OfNat.ofNat a : R[X])) (n + 1) = 0

{R : Type u}
[Semiring R]
(a n : ℕ)
[h : a.AtLeastTwo]


@[simp] lemma coe_neg : ((-α : Weight K H L) : H → K) = -α

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


@[to_additive (attr := simp)]
theorem coe_inclusion {H K : Subgroup G} {h : H ≤ K} (a : H) : (inclusion h a : G) = a

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


/-- The identity morphism of `X : Pointed`. -/
@[simps]
def id (X : Pointed) : Pointed.Hom X X


theorem iUnion_or {p q : Prop} (s : p ∨ q → Set α) :
    ⋃ h, s h = (⋃ i, s (Or.inl i)) ∪ ⋃ j, s (Or.inr j)

{α : Type u_1}
{p q : Prop}
(s : p ∨ q → Set α)

⋃ (h : p ∨ q), s h = (⋃ (i : p), s ⋯) ∪ ⋃ (j : q), s ⋯


/-- Unlike the other set constructors, the `iota` definite descriptor
  is a set for any set input, but not constructively so, so there is no
  associated `Class → Set` function. -/
theorem iota_ex (A) : iota.{u} A ∈ univ.{u}


@[simp]
theorem neg_iSup {ι : Sort*} (S : ι → Submodule R M) : (-⨆ i, S i) = ⨆ i, -S i

{R : Type u_2}
{M : Type u_3}
[Semiring R]
[AddCommGroup M]
[Module R M]
{ι : Sort u_4}
(S : ι → Submodule R M)


@[simp]
theorem const_succ (α : Type u) {β : Type u} (b : β) (n : ℕ) :
    const α b n.succ = fun _ => const _ b n

Function.OfArity.const α b n.succ = fun x => Function.OfArity.const α b n


theorem eval₂Hom_congr' {f₁ f₂ : R →+* S} {g₁ g₂ : σ → S} {p₁ p₂ : MvPolynomial σ R} :
    f₁ = f₂ →
      (∀ i, i ∈ p₁.vars → i ∈ p₂.vars → g₁ i = g₂ i) →
        p₁ = p₂ → eval₂Hom f₁ g₁ p₁ = eval₂Hom f₂ g₂ p₂

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

f₁ = f₂ →
  (∀ i ∈ p₁.vars, i ∈ p₂.vars → g₁ i = g₂ i) →
    p₁ = p₂ → (MvPolynomial.eval₂Hom f₁ g₁) p₁ = (MvPolynomial.eval₂Hom f₂ g₂) p₂


theorem ofFractionRing_mul (p q : FractionRing K[X]) :
    ofFractionRing (p * q) = ofFractionRing p * ofFractionRing q

{K : Type u}
[CommRing K]
(p q : FractionRing K[X])

{ toFractionRing := p * q } = { toFractionRing := p } * { toFractionRing := q }


theorem sup_sInf_eq : a ⊔ sInf s = ⨅ b ∈ s, a ⊔ b

{α : Type u}
[Order.Coframe α]
{s : Set α}
{a : α}


theorem algebraMap_exp_comm_of_mem_ball [CompleteSpace 𝕂] (x : 𝕂)
    (hx : x ∈ EMetric.ball (0 : 𝕂) (expSeries 𝕂 𝕂).radius) :
    algebraMap 𝕂 𝔸 (exp 𝕂 x) = exp 𝕂 (algebraMap 𝕂 𝔸 x)

(hx : x ∈ EMetric.ball 0 (NormedSpace.expSeries 𝕂 𝕂).radius)

(algebraMap 𝕂 𝔸) (NormedSpace.exp 𝕂 x) = NormedSpace.exp 𝕂 ((algebraMap 𝕂 𝔸) x)


/-- `snd` is the functor `(X, Y) ↦ Y`. -/
@[simps]
def snd : C × D ⥤ D

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

(CategoryTheory.Prod.snd C D).obj X = X.2


@[to_additive (attr := simp)]
theorem coe_range (f : G →* N) : (f.range : Set N) = Set.range f

{G : Type u_1}
[Group G]
{N : Type u_5}
[Group N]
(f : G →* N)


theorem multiset_prod_comp (s : Multiset R[X]) (q : R[X]) :
    s.prod.comp q = (s.map fun p : R[X] => p.comp q).prod

{R : Type u}
[CommSemiring R]
(s : Multiset R[X])
(q : R[X])

s.prod.comp q = (Multiset.map (fun p => p.comp q) s).prod


theorem _root_.Algebra.lmul_injective : Function.Injective (Algebra.lmul R A)

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


/-- If a filter is converging, its liminf coincides with its limit. -/
theorem limsSup_eq_of_le_nhds : ∀ {f : Filter α} {a : α} [NeBot f], f ≤ 𝓝 a → f.limsSup = a

{α : Type u_2}
[ConditionallyCompleteLinearOrder α]
[TopologicalSpace α]
[OrderTopology α]
{f : Filter α}
{a : α}
[f.NeBot]


lemma pow_right_injective (ha₀ : 0 < a) (ha₁ : a ≠ 1) : Injective (a ^ ·)

{R : Type u_3}
[LinearOrderedSemiring R]
{a : R}
(ha₀ : 0 < a)
(ha₁ : a ≠ 1)


theorem PartiallyWellOrderedOn.wellFoundedOn [IsPreorder α r] (h : s.PartiallyWellOrderedOn r) :
    s.WellFoundedOn fun a b => r a b ∧ ¬r b a

{α : Type u_2}
{r : α → α → Prop}
{s : Set α}
[IsPreorder α r]
(h : s.PartiallyWellOrderedOn r)


protected theorem mono {T} (hS : RestrictGenTopology S) (hT : S ⊆ T) : RestrictGenTopology T

{X : Type u_1}
[TopologicalSpace X]
{S T : Set (Set X)}
(hS : RestrictGenTopology S)
(hT : S ⊆ T)


@[simp]
theorem subtype_comp_codRestrict (f : F) (S : NonUnitalStarSubalgebra R B) (hf : ∀ x : A, f x ∈ S) :
    (NonUnitalStarSubalgebraClass.subtype S).comp (NonUnitalStarAlgHom.codRestrict f S hf) = f

{F : Type v'}
{R : Type u}
{A : Type v}
{B : Type w}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[Module R A]
[Star A]
[NonUnitalNonAssocSemiring B]
[Module R B]
[Star B]
[FunLike F A B]
[NonUnitalAlgHomClass F R A B]
[NonUnitalStarAlgHomClass F R A B]
(f : F)
(S : NonUnitalStarSubalgebra R B)
(hf : ∀ (x : A), f x ∈ S)

(NonUnitalStarSubalgebraClass.subtype S).comp (NonUnitalStarAlgHom.codRestrict f S hf) = ↑f


theorem ClosedUnderLimitsOfShape.limit (h : ClosedUnderLimitsOfShape J P) {F : J ⥤ C} [HasLimit F] :
    (∀ j, P (F.obj j)) → P (limit F)

(h : CategoryTheory.Limits.ClosedUnderLimitsOfShape J P)

(∀ (j : J), P (F.obj j)) → P (CategoryTheory.Limits.limit F)


/-- Given an equivalence `e` of Lie algebras from `L` to `L'`, and an element `x : L`, the conjugate
of the endomorphism `ad(x)` of `L` by `e` is the endomorphism `ad(e x)` of `L'`. -/
@[simp]
lemma conj_ad_apply (e : L ≃ₗ⁅R⁆ L') (x : L) : LinearEquiv.conj e (ad R L x) = ad R L' (e x)

{R : Type u_1}
{L : Type u_2}
{L' : Type u_3}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[LieRing L']
[LieAlgebra R L']
(e : L ≃ₗ⁅R⁆ L')
(x : L)

e.toLinearEquiv.conj ((LieAlgebra.ad R L) x) = (LieAlgebra.ad R L') (e x)


theorem empty_of_word_prod_eq_one {w : Word H} (h : lift f w.prod = 1) : w = Word.empty

(hcard : 3 ≤ Cardinal.mk ι ∨ ∃ i, 3 ≤ Cardinal.mk (H i))

(hXnonempty : ∀ (i : ι), (X i).Nonempty)

(hXdisj : Pairwise fun i j => Disjoint (X i) (X j))

(hpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → (f i) h • X j ⊆ X i)

(h : (Monoid.CoprodI.lift f) w.prod = 1)


@[simp]
theorem attach_map_val (s : Multiset α) : s.attach.map Subtype.val = s


/-- The real part of a complex measure is a signed measure. -/
@[simps! apply]
def re : ComplexMeasure α →ₗ[ℝ] SignedMeasure α

{α : Type u_1}
{m : MeasurableSpace α}
(v : MeasureTheory.VectorMeasure α ℂ)

MeasureTheory.ComplexMeasure.re v = v.mapRange Complex.reLm.toAddMonoidHom Complex.continuous_re


theorem sup_support_list_prod_le (degb0 : degb 0 ≤ 0)
    (degbm : ∀ a b, degb (a + b) ≤ degb a + degb b) :
    ∀ l : List R[A],
      l.prod.support.sup degb ≤ (l.map fun f : R[A] => f.support.sup degb).sum

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

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

(degbm : ∀ (a b : A), degb (a + b) ≤ degb a + degb b)

l.prod.support.sup degb ≤ (List.map (fun f => f.support.sup degb) l).sum


@[fun_prop]
nonrec theorem ContinuousAt.inv₀ (hf : ContinuousAt f a) (ha : f a ≠ 0) :
    ContinuousAt (fun x => (f x)⁻¹) a

{α : Type u_1}
{G₀ : Type u_3}
[Zero G₀]
[Inv G₀]
[TopologicalSpace G₀]
[HasContinuousInv₀ G₀]
{f : α → G₀}
{a : α}
[TopologicalSpace α]
(hf : ContinuousAt f a)
(ha : f a ≠ 0)


/-- The product of a monotone function and a strictly monotone function is strictly monotone. -/
@[to_additive add_strictMono "The sum of a monotone function and a strictly monotone function is
strictly monotone."]
theorem MonotoneOn.mul_strictMono' [CovariantClass α α (· * ·) (· < ·)]
    [CovariantClass α α (swap (· * ·)) (· ≤ ·)] {f g : β → α} (hf : MonotoneOn f s)
    (hg : StrictMonoOn g s) : StrictMonoOn (fun x => f x * g x) s

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

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


@[simp]
theorem append_cons (a : α) (v : Vector3 α m) (w : Vector3 α n) : (a :: v) +-+ w = a :: v +-+ w

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

(Vector3.cons a v).append w = Vector3.cons a (v.append w)


@[simp]
theorem diagonal_mul_diagonal [Fintype n] [DecidableEq n] (d₁ d₂ : n → α) :
    diagonal d₁ * diagonal d₂ = diagonal fun i => d₁ i * d₂ i

{n : Type u_3}
{α : Type v}
[NonUnitalNonAssocSemiring α]
[Fintype n]
[DecidableEq n]
(d₁ d₂ : n → α)

Matrix.diagonal d₁ * Matrix.diagonal d₂ = Matrix.diagonal fun i => d₁ i * d₂ i


theorem le_zeroRootSubalgebra : H ≤ zeroRootSubalgebra R L H

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


@[to_additive]
lemma map_stabilizer_le (f : G →* H) (s : Set G) :
    (stabilizer G s).map f ≤ stabilizer H (f '' s)

{G : Type u_1}
{H : Type u_2}
[AddGroup G]
[AddGroup H]
(f : G →+ H)
(s : Set G)

AddSubgroup.map f (AddAction.stabilizer G s) ≤ AddAction.stabilizer H (⇑f '' s)


/-- The members of `l.ranges` have no duplicate -/
theorem ranges_nodup {l s : List ℕ} (hs : s ∈ ranges l) : s.Nodup


/-- `HasStrictFDerivAt.implicitFunctionOfComplemented` sends `(z, y)` to a point in `f ⁻¹' z`. -/
theorem map_implicitFunctionOfComplemented_eq (hf : HasStrictFDerivAt f f' a) (hf' : range f' = ⊤)
    (hker : (ker f').ClosedComplemented) :
    ∀ᶠ p : F × ker f' in 𝓝 (f a, 0),
      f (hf.implicitFunctionOfComplemented f f' hf' hker p.1 p.2) = p.1

(hker : (LinearMap.ker f').ClosedComplemented)

∀ᶠ (p : F × ↥(LinearMap.ker f')) in 𝓝 (f a, 0),
  f (HasStrictFDerivAt.implicitFunctionOfComplemented f f' hf hf' hker p.1 p.2) = p.1


/-- **Fundamental theorem of calculus, part 2**. This version assumes that `f` is continuous on the
interval and is differentiable off a countable set `s`.

See also `intervalIntegral.integral_eq_sub_of_hasDeriv_right` for a version that
only assumes right differentiability of `f`.
-/
theorem integral_eq_of_hasDerivWithinAt_off_countable (f f' : ℝ → E) {a b : ℝ} {s : Set ℝ}
    (hs : s.Countable) (Hc : ContinuousOn f [[a, b]])
    (Hd : ∀ x ∈ Ioo (min a b) (max a b) \ s, HasDerivAt f (f' x) x)
    (Hi : IntervalIntegrable f' volume a b) : ∫ x in a..b, f' x = f b - f a

(Hd : ∀ x ∈ Set.Ioo (min a b) (max a b) \ s, HasDerivAt f (f' x) x)

(Hi : IntervalIntegrable f' MeasureTheory.volume a b)


theorem mulMap'_surjective : Function.Surjective (mulMap' M N)

{R : Type u}
{S : Type v}
[CommSemiring R]
[Semiring S]
[Algebra R S]
(M N : Submodule R S)


@[simp]
theorem isBounded_compl_iff : IsBounded sᶜ ↔ IsCobounded s

∀ {x : Bornology α} {s : Set α}, Bornology.IsBounded sᶜ ↔ Bornology.IsCobounded s


/-- The image of an element `m : M` in `MonoidAlgebra R M` belongs the submodule generated by
`S : Set M` if and only if `m ∈ S`. -/
theorem of_mem_span_of_iff [Nontrivial R] {m : M} {S : Set M} :
    of R M m ∈ span R (of R M '' S) ↔ m ∈ S

{R : Type u_1}
{M : Type u_2}
[CommRing R]
[Monoid M]
[Nontrivial R]
{m : M}
{S : Set M}

(MonoidAlgebra.of R M) m ∈ Submodule.span R (⇑(MonoidAlgebra.of R M) '' S) ↔ m ∈ S


/-- Constructor for isomorphisms `F ≅ G` in `ComposableArrows C n` which takes as inputs
a family of isomorphisms `F.obj i ≅ G.obj i` and the naturality condition only for the
maps in `Fin (n + 1)` given by inequalities of the form `i ≤ i + 1`. -/
@[simps]
def isoMk {F G : ComposableArrows C n} (app : ∀ i, F.obj i ≅ G.obj i)
    (w : ∀ (i : ℕ) (hi : i < n),
      F.map' i (i + 1) ≫ (app _).hom = (app _).hom ≫ G.map' i (i + 1)) :
    F ≅ G

{F G : CategoryTheory.ComposableArrows C n}

(app : (i : Fin (n + 1)) → F.obj i ≅ G.obj i)

(w :
  ∀ (i : ℕ) (hi : i < n),
    CategoryTheory.CategoryStruct.comp (F.map' i (i + 1) ⋯ hi) (app ⟨i + 1, ⋯⟩).hom =
      CategoryTheory.CategoryStruct.comp (app ⟨i, ⋯⟩).hom (G.map' i (i + 1) ⋯ hi))

(CategoryTheory.ComposableArrows.isoMk app w).hom = CategoryTheory.ComposableArrows.homMk (fun i => (app i).hom) w


theorem isPrimitive_primPart (p : R[X]) : p.primPart.IsPrimitive

{R : Type u_1}
[CommRing R]
[IsDomain R]
[NormalizedGCDMonoid R]
(p : Polynomial R)


@[ext]
theorem ext {h h' : X ≃ₜ Y} (H : ∀ x, h x = h' x) : h = h'

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
{h h' : X ≃ₜ Y}
(H : ∀ (x : X), h x = h' x)


@[simp]
theorem commutator_bot_right : ⁅H₁, ⊥⁆ = (⊥ : Subgroup G)

{G : Type u_1}
[Group G]
(H₁ : Subgroup G)


@[simp, mfld_simps]
theorem refl_toPartialEquiv : (Equiv.refl α).toPartialEquiv = PartialEquiv.refl α


@[to_additive]
theorem eq_mul_of_inv_mul_eq (h : b⁻¹ * a = c) : a = b * c

{G : Type u_3}
[Group G]
{a b c : G}
(h : b⁻¹ * a = c)


protected theorem mdifferentiableWithinAt : MDifferentiableWithinAt 𝓘(𝕜, E) 𝓘(𝕜, E') f s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
(f : E ≃L[𝕜] E')
{s : Set E}
{x : E}

MDifferentiableWithinAt 𝓘(𝕜, E) 𝓘(𝕜, E') (⇑f) s x


theorem Finite.cast_ncard_eq (hs : s.Finite) : s.ncard = s.encard

{α : Type u_1}
{s : Set α}
(hs : s.Finite)


/-- Idempotents lift along nil ideals. -/
theorem exists_isIdempotentElem_eq_of_ker_isNilpotent (h : ∀ x ∈ RingHom.ker f, IsNilpotent x)
    (e : S) (he : e ∈ f.range) (he' : IsIdempotentElem e) :
    ∃ e' : R, IsIdempotentElem e' ∧ f e' = e


lemma negY_negY (x y : R) : W.negY x (W.negY x y) = y

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


@[to_additive (attr := simp)]
theorem prod_inv [∀ i, AddCommMonoid (β i)] [∀ (i) (x : β i), Decidable (x ≠ 0)] [CommGroup γ]
    {f : Π₀ i, β i} {h : ∀ i, β i → γ} : (f.prod fun i b => (h i b)⁻¹) = (f.prod h)⁻¹

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


@[to_additive]
theorem orbitRel.Quotient.mem_orbit {a : α} {x : orbitRel.Quotient G α} :
    a ∈ x.orbit ↔ Quotient.mk'' a = x

{G : Type u_1}
{α : Type u_2}
[Group G]
[MulAction G α]
{a : α}
{x : MulAction.orbitRel.Quotient G α}


/-- If `f` satisfies a boundedness property around `0`, one can deduce a bound on `f m₁ - f m₂`
using the multilinearity. Here, we give a usable but not very precise version. See
`norm_image_sub_le_of_bound'` for a more precise but less usable version. The bound is
`‖f m - f m'‖ ≤ C * card ι * ‖m - m'‖ * (max ‖m‖ ‖m'‖) ^ (card ι - 1)`. -/
theorem norm_image_sub_le_of_bound {C : ℝ} (hC : 0 ≤ C) (H : ∀ m, ‖f m‖ ≤ C * ∏ i, ‖m i‖)
    (m₁ m₂ : ∀ i, E i) :
    ‖f m₁ - f m₂‖ ≤ C * Fintype.card ι * max ‖m₁‖ ‖m₂‖ ^ (Fintype.card ι - 1) * ‖m₁ - m₂‖

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

(H : ∀ (m : (i : ι) → E i), ‖f m‖ ≤ C * ∏ i : ι, ‖m i‖)

‖f m₁ - f m₂‖ ≤ C * ↑(Fintype.card ι) * max ‖m₁‖ ‖m₂‖ ^ (Fintype.card ι - 1) * ‖m₁ - m₂‖


@[simp, norm_cast]
theorem coe_sub (f g : CauSeq β abv) : ⇑(f - g) = (f : ℕ → β) - g

{α : Type u_1}
{β : Type u_2}
[LinearOrderedField α]
[Ring β]
{abv : β → α}
[IsAbsoluteValue abv]
(f g : CauSeq β abv)


theorem Antitone.map_iSup_le [CompleteLattice β] {f : α → β} (hf : Antitone f) :
    f (iSup s) ≤ ⨅ i, f (s i)

{α : Type u_1}
{β : Type u_2}
{ι : Sort u_5}
[CompleteLattice α]
{s : ι → α}
[CompleteLattice β]
{f : α → β}
(hf : Antitone f)


/-- If `u` is a sequence which is unbounded below,
then it `Frequently` reaches a value strictly smaller than all previous values.
-/
theorem frequently_low_scores [LinearOrder β] [NoMinOrder β] {u : ℕ → β}
    (hu : Tendsto u atTop atBot) : ∃ᶠ n in atTop, ∀ k < n, u n < u k

(hu : Filter.Tendsto u Filter.atTop Filter.atBot)

∃ᶠ (n : ℕ) in Filter.atTop, ∀ k < n, u n < u k


@[simp]
lemma FixedPoints.mem_submonoid (a : α) : a ∈ submonoid M α ↔ ∀ m : M, m • a = a

(M : Type u)
(α : Type v)
[Monoid M]
[Monoid α]
[MulDistribMulAction M α]
(a : α)

a ∈ FixedPoints.submonoid M α ↔ ∀ (m : M), m • a = a


@[simp]
theorem mem_Ioo : x ∈ Ioo a b ↔ a < x ∧ x < b


/-- The symbol `J(a | b)` is nonzero when `a` and `b` are coprime. -/
protected theorem ne_zero {a : ℤ} {b : ℕ} (h : a.gcd b = 1) : J(a | b) ≠ 0


@[simp]
theorem coe_comp (f : BotHom β γ) (g : BotHom α β) : (f.comp g : α → γ) = f ∘ g

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[Bot α]
[Bot β]
[Bot γ]
(f : BotHom β γ)
(g : BotHom α β)


theorem compare_iff (a b : α) {o : Ordering} : compare a b = o ↔ o.toRel a b

{α : Type u}
[LinearOrder α]
(a b : α)
{o : Ordering}


protected theorem acc [RelHomClass F r s] (f : F) (a : α) : Acc s (f a) → Acc r a

{α : Type u_1}
{β : Type u_2}
{r : α → α → Prop}
{s : β → β → Prop}
{F : Type u_5}
[FunLike F α β]
[RelHomClass F r s]
(f : F)
(a : α)


theorem Sylow.smul_le {P : Sylow p G} {H : Subgroup G} (hP : ↑P ≤ H) (h : H) : ↑(h • P) ≤ H

{p : ℕ}
{G : Type u_1}
[Group G]
{P : Sylow p G}
{H : Subgroup G}
(hP : ↑P ≤ H)
(h : ↥H)


@[ext]
theorem ext {x y : ZFSet.{u}} : (∀ z : ZFSet.{u}, z ∈ x ↔ z ∈ y) → x = y


/-- A subspace is less than another if and only if it is less than or equal to the second subspace
and there is a point only in the second. -/
theorem lt_iff_le_and_exists (s1 s2 : AffineSubspace k P) :
    s1 < s2 ↔ s1 ≤ s2 ∧ ∃ p ∈ s2, p ∉ s1

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


@[to_additive]
lemma mem_ofUnits (S : Subgroup Mˣ) {x : M} {y : Mˣ} (h₁ : y ∈ S) (h₂ : y = x) : x ∈ S.ofUnits

{M : Type u_1}
[Monoid M]
(S : Subgroup Mˣ)
{x : M}
{y : Mˣ}
(h₁ : y ∈ S)
(h₂ : ↑y = x)


theorem ContinuousAt.preimage_mem_nhds {t : Set Y} (h : ContinuousAt f x)
    (ht : t ∈ 𝓝 (f x)) : f ⁻¹' t ∈ 𝓝 x

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
{f : X → Y}
{x : X}
{t : Set Y}
(h : ContinuousAt f x)
(ht : t ∈ 𝓝 (f x))

f ⁻¹' t ∈ 𝓝 x


@[simp]
theorem map_id : @map X Y Y _ id = id

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


theorem equiv_apply {π : P →+* R} (m : PerfectionMap p π) (x : P) :
    m.equiv x = Perfection.lift p P R π x

{p : ℕ}
[Fact (Nat.Prime p)]
{R : Type u₁}
[CommSemiring R]
[CharP R p]
{P : Type u₃}
[CommSemiring P]
[CharP P p]
[PerfectRing P p]
{π : P →+* R}
(m : PerfectionMap p π)
(x : P)

m.equiv x = ((Perfection.lift p P R) π) x


/--
A morphism between open covers `𝓤 ⟶ 𝓥` indicates that `𝓤` is a refinement of `𝓥`.
Since open covers of schemes are indexed, the definition also involves a map on the
indexing types.
-/
structure OpenCover.Hom {X : Scheme.{u}} (𝓤 𝓥 : OpenCover.{v} X) where
  /-- The map on indexing types associated to a morphism of open covers. -/
  idx : 𝓤.J → 𝓥.J
  /-- The morphism between open subsets associated to a morphism of open covers. -/
  app (j : 𝓤.J) : 𝓤.obj j ⟶ 𝓥.obj (idx j)
  isOpen (j : 𝓤.J) : IsOpenImmersion (app j) := by infer_instance
  w (j : 𝓤.J) : app j ≫ 𝓥.map _ = 𝓤.map _ := by aesop_cat

{X : AlgebraicGeometry.Scheme}
{𝓤 𝓥 : X.OpenCover}
(self : 𝓤.Hom 𝓥)
(j : 𝓤.J)

self.app j ≫ 𝓥.map (self.idx j) = 𝓤.map j


@[simp]
theorem succ_le_castSucc_iff {a b : Fin n} : succ a ≤ castSucc b ↔ a < b


@[to_additive (attr := simp)]
theorem mulIndicator_eq_one : (mulIndicator s f = fun x => 1) ↔ Disjoint (mulSupport f) s

{α : Type u_1}
{M : Type u_4}
[One M]
{s : Set α}
{f : α → M}

(s.mulIndicator f = fun x => 1) ↔ Disjoint (Function.mulSupport f) s


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

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


@[simp] lemma mul_top (h : a ≠ 0) : a * ⊤ = ⊤

{α : Type u_1}
[DecidableEq α]
[MulZeroClass α]
{a : WithTop α}
(h : a ≠ 0)


@[simp]
lemma mem_top (x : α) : x ∈ (⊤ : Opens α)

{α : Type u_2}
[TopologicalSpace α]
(x : α)


@[simp]
theorem xgcdAux_fst (x y : R) : ∀ s t s' t', (xgcdAux x s t y s' t').1 = gcd x y

{R : Type u}
[EuclideanDomain R]
[DecidableEq R]
(x y s t s' t' : R)

(EuclideanDomain.xgcdAux x s t y s' t').1 = EuclideanDomain.gcd x y


theorem contMDiff_subtype_val {n : ℕ∞} {U : Opens M} : ContMDiff I I n (Subtype.val : U → M)

{𝕜 : 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]
{n : ℕ∞}
{U : TopologicalSpace.Opens M}


@[to_additive finsum_nonneg]
theorem one_le_finprod' {M : Type*} [OrderedCommMonoid M] {f : α → M} (hf : ∀ i, 1 ≤ f i) :
    1 ≤ ∏ᶠ i, f i

{α : Sort u_4}
{M : Type u_7}
[OrderedCommMonoid M]
{f : α → M}
(hf : ∀ (i : α), 1 ≤ f i)


theorem cos_sin_inj {θ ψ : ℝ} (Hcos : cos θ = cos ψ) (Hsin : sin θ = sin ψ) : (θ : Angle) = ψ

{θ ψ : ℝ}
(Hcos : Real.cos θ = Real.cos ψ)
(Hsin : Real.sin θ = Real.sin ψ)


/--
A morphism is "quasi-compact" if the underlying map of topological spaces is, i.e. if the preimages
of quasi-compact open sets are quasi-compact.
-/
@[mk_iff]
class QuasiCompact (f : X ⟶ Y) : Prop where
  /-- Preimage of compact open set under a quasi-compact morphism between schemes is compact. -/
  isCompact_preimage : ∀ U : Set Y, IsOpen U → IsCompact U → IsCompact (f.1.base ⁻¹' U)

[self : AlgebraicGeometry.QuasiCompact f]

IsOpen U → IsCompact U → IsCompact (⇑f.val.base ⁻¹' U)


theorem ContinuousMultilinearMap.uncurry0_curry0 (f : G[×0]→L[𝕜] G') :
    ContinuousMultilinearMap.curry0 𝕜 G f.uncurry0 = f

(f : ContinuousMultilinearMap 𝕜 (fun i => G) G')


/-- The homogeneous submodules form a graded ring.
This instance is used by `DirectSum.commSemiring` and `DirectSum.algebra`. -/
lemma HomogeneousSubmodule.gradedMonoid :
    SetLike.GradedMonoid (homogeneousSubmodule σ R)

{σ : Type u_1}
{R : Type u_3}
[CommSemiring R]

SetLike.GradedMonoid (MvPolynomial.homogeneousSubmodule σ R)


@[to_additive]
theorem smul_set_union : a • (t₁ ∪ t₂) = a • t₁ ∪ a • t₂

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


theorem take_take : ∀ t : HolorIndex (ds₁ ++ ds₂ ++ ds₃), t.assocRight.take = t.take.take

{ds₁ ds₂ ds₃ : List ℕ}
(t : HolorIndex (ds₁ ++ ds₂ ++ ds₃))


protected lemma map_zero (f : α →*₀ β) : f 0 = 0

{α : Type u_2}
{β : Type u_3}
[MulZeroOneClass α]
[MulZeroOneClass β]
(f : α →*₀ β)


theorem Acc.sym2_gameAdd {a b} (ha : Acc rα a) (hb : Acc rα b) :
    Acc (Sym2.GameAdd rα) s(a, b)

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


theorem AddMonoid.End.one_apply [AddCommMonoid M] (m : M) : (1 : AddMonoid.End M) m = m


theorem lift_uniq (H' : Set.range g.1.base ⊆ Set.range f.1.base) (l : Y ⟶ X) (hl : l ≫ f = g) :
    l = lift f g H'

[H : AlgebraicGeometry.IsOpenImmersion f]

(H' : Set.range ⇑g.val.base ⊆ Set.range ⇑f.val.base)

l = AlgebraicGeometry.IsOpenImmersion.lift f g H'


@[simps! ωSup_coe]
instance omegaCompletePartialOrder : OmegaCompletePartialOrder (α →o β)

(c : OmegaCompletePartialOrder.Chain (α →o β))

(OmegaCompletePartialOrder.ωSup c) a = OmegaCompletePartialOrder.ωSup (c.map (OrderHom.apply a))


/-- The algebra structure which will be the apex of the new limit cone for `D`. -/
@[simps]
def conePoint : Algebra T

(D : CategoryTheory.Functor J T.Algebra)

(c : CategoryTheory.Limits.Cone (D.comp T.forget))

(CategoryTheory.Monad.ForgetCreatesLimits.conePoint D c t).A = c.pt


@[to_additive]
theorem image_list_prod (f : F) :
    ∀ l : List (Set α), (f : α → β) '' l.prod = (l.map fun s => f '' s).prod

{α : Type u_2}
{β : Type u_3}
{F : Type u_4}
[FunLike F α β]
[Monoid α]
[Monoid β]
[MonoidHomClass F α β]
(f : F)
(l : List (Set α))

⇑f '' l.prod = (List.map (fun s => ⇑f '' s) l).prod


/-- If the liminf and the limsup of a filter coincide, then this filter converges to
their common value, at least if the filter is eventually bounded above and below. -/
theorem le_nhds_of_limsSup_eq_limsInf {f : Filter α} {a : α} (hl : f.IsBounded (· ≤ ·))
    (hg : f.IsBounded (· ≥ ·)) (hs : f.limsSup = a) (hi : f.limsInf = a) : f ≤ 𝓝 a

(hl : Filter.IsBounded (fun x x_1 => x ≤ x_1) f)

(hg : Filter.IsBounded (fun x x_1 => x ≥ x_1) f)


@[to_additive]
protected theorem Specializes.pow {M : Type*} [Monoid M] [TopologicalSpace M] [ContinuousMul M]
    {a b : M} (h : a ⤳ b) (n : ℕ) : (a ^ n) ⤳ (b ^ n)

{M : Type u_6}
[AddMonoid M]
[TopologicalSpace M]
[ContinuousAdd M]
{a b : M}
(h : a ⤳ b)
(n : ℕ)


theorem aecover_Ioo_of_Ioc : AECover (μ.restrict <| Ioo A B) l fun i => Ioc (a i) (b i)

{α : Type u_1}
{ι : Type u_2}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
{l : Filter ι}
[LinearOrder α]
[TopologicalSpace α]
[OrderClosedTopology α]
[OpensMeasurableSpace α]
{a b : ι → α}
{A B : α}
(ha : Filter.Tendsto a l (𝓝 A))
(hb : Filter.Tendsto b l (𝓝 B))

MeasureTheory.AECover (μ.restrict (Set.Ioo A B)) l fun i => Set.Ioc (a i) (b i)


/-- The volume measure in a finite-dimensional inner product space gives measure `1` to the
parallelepiped spanned by any orthonormal basis. -/
theorem OrthonormalBasis.volume_parallelepiped (b : OrthonormalBasis ι ℝ F) :
    volume (parallelepiped b) = 1

{ι : Type u_1}
{F : Type u_3}
[Fintype ι]
[NormedAddCommGroup F]
[InnerProductSpace ℝ F]
[FiniteDimensional ℝ F]
[MeasurableSpace F]
[BorelSpace F]
(b : OrthonormalBasis ι ℝ F)

MeasureTheory.volume (parallelepiped ⇑b) = 1


theorem injectiveSeminorm_tprod_le (m : Π (i : ι), E i) :
    injectiveSeminorm (⨂ₜ[𝕜] i, m i) ≤ ∏ i, ‖m i‖

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

PiTensorProduct.injectiveSeminorm (⨂ₜ[𝕜] (i : ι), m i) ≤ ∏ i : ι, ‖m i‖


@[simp]
theorem quot_zero_mul (x : PGame) : (⟦0 * x⟧ : Game) = ⟦0⟧


@[simp]
theorem quot_add (x y) :
    (by exact Quot.mk Setoid.r (add x y) : ColimitType F) =
      (by exact Quot.mk _ x) + (by exact Quot.mk _ y)

(x y : CommRingCat.Colimits.Prequotient F)

Quot.mk Setoid.r (x.add y) = Quot.mk Setoid.r x + Quot.mk Setoid.r y


theorem subtype_comp_restrict {f : M →ₗ[R] M₁} {p : Submodule R M} {q : Submodule R M₁}
    (hf : ∀ x ∈ p, f x ∈ q) : q.subtype.comp (f.restrict hf) = f.domRestrict p

{R : Type u_1}
{M : Type u_5}
{M₁ : Type u_6}
[Semiring R]
[AddCommMonoid M]
[AddCommMonoid M₁]
[Module R M]
[Module R M₁]
{f : M →ₗ[R] M₁}
{p : Submodule R M}
{q : Submodule R M₁}
(hf : ∀ x ∈ p, f x ∈ q)

q.subtype ∘ₗ f.restrict hf = f.domRestrict p


@[reassoc (attr := simp)]
lemma homology_π_ι :
    S.homologyπ ≫ S.homologyι = S.iCycles ≫ S.pOpcycles

CategoryTheory.CategoryStruct.comp S.homologyπ S.homologyι = CategoryTheory.CategoryStruct.comp S.iCycles S.pOpcycles


theorem length_modifyNthTail (f : List α → List α) (H : ∀ l, length (f l) = length l) :
    ∀ n l, length (modifyNthTail f n l) = length l

(H : ∀ (l : List α), (f l).length = l.length)

(List.modifyNthTail f n l).length = l.length


@[simp]
theorem updateColumn_self [DecidableEq n] : updateColumn M j c i j = c i

{m : Type u_2}
{n : Type u_3}
{α : Type v}
{M : Matrix m n α}
{i : m}
{j : n}
{c : m → α}
[DecidableEq n]


theorem le_or_lt (a b : α) : a ≤ b ∨ b < a


@[simp, norm_cast]
theorem cast_ofNat (n : ℕ) [n.AtLeastTwo] :
    ((no_index (OfNat.ofNat n) : ℤ) : R) = OfNat.ofNat n

{R : Type u}
[AddGroupWithOne R]
(n : ℕ)
[n.AtLeastTwo]


lemma mono_left (h : Absorbs M s₁ t) (hs : s₁ ⊆ s₂) : Absorbs M s₂ t

{M : Type u_1}
{α : Type u_2}
[Bornology M]
[SMul M α]
{s₁ s₂ t : Set α}
(h : Absorbs M s₁ t)
(hs : s₁ ⊆ s₂)


theorem conj_natCast (n : ℕ) : conj (n : ℂ) = n


@[simp]
lemma leadingCoeff_ΨSq [NoZeroDivisors R] {n : ℤ} (h : (n : R) ≠ 0) :
    (W.ΨSq n).leadingCoeff = n ^ 2

{R : Type u}
[CommRing R]
(W : WeierstrassCurve R)
[NoZeroDivisors R]
{n : ℤ}
(h : ↑n ≠ 0)


lemma baseChange_φ (n : ℤ) : (W.baseChange B).φ n = ((W.baseChange A).φ n).map (mapRingHom f)

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

(W.baseChange B).φ n = Polynomial.map (Polynomial.mapRingHom ↑f) ((W.baseChange A).φ n)