theorem Basis.of_restriction (hI : N.Basis I X) (hNM : N ≤r M) : M.Basis I X

{α : Type u_1}
{M : Matroid α}
{I X : Set α}
{N : Matroid α}
(hI : N.Basis I X)
(hNM : N.Restriction M)


@[simp]
theorem diag_mem_sym2_mem_iff : (∀ b, b ∈ Sym2.diag a → b ∈ s) ↔ a ∈ s


theorem setToL1S_mono (h_zero : ∀ s, MeasurableSet s → μ s = 0 → T s = 0)
    (h_add : FinMeasAdditive μ T)
    (hT_nonneg : ∀ s, MeasurableSet s → μ s < ∞ → ∀ x, 0 ≤ x → 0 ≤ T s x) {f g : α →₁ₛ[μ] G''}
    (hfg : f ≤ g) : setToL1S T f ≤ setToL1S T g

(h_zero : ∀ (s : Set α), MeasurableSet s → μ s = 0 → T s = 0)

(h_add : MeasureTheory.FinMeasAdditive μ T)

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

{f g : ↥(MeasureTheory.Lp.simpleFunc G'' 1 μ)}

MeasureTheory.L1.SimpleFunc.setToL1S T f ≤ MeasureTheory.L1.SimpleFunc.setToL1S T g


@[simp]
theorem coe_of (α : Type*) [SemilatticeSup α] [OrderBot α] : ↥(of α) = α

(α : Type u_1)
[SemilatticeSup α]
[OrderBot α]


theorem map_proj_nhds (ex : x ∈ e.source) : map proj (𝓝 x) = 𝓝 (proj x)

{B : Type u_2}
{F : Type u_3}
{Z : Type u_5}
[TopologicalSpace B]
[TopologicalSpace F]
{proj : Z → B}
[TopologicalSpace Z]
(e : Trivialization F proj)
{x : Z}
(ex : x ∈ e.source)


/-- For a group with zero, the center of the units is the same as the units of the center. -/
@[simps! apply_val_coe symm_apply_coe_val]
def centerUnitsEquivUnitsCenter (G₀ : Type*) [GroupWithZero G₀] :
    Subgroup.center (G₀ˣ) ≃* (Submonoid.center G₀)ˣ

(G₀ : Type u_2)
[GroupWithZero G₀]
(a : ↥(Subgroup.center G₀ˣ))

↑↑((Subgroup.centerUnitsEquivUnitsCenter G₀) a) = ↑↑a


/-- Coercion of a `MulHom` into a function is itself a `MulHom`.

See also `MulHom.eval`. -/
@[to_additive (attr := simps) "Coercion of an `AddHom` into a function is itself an `AddHom`.

See also `AddHom.eval`."]
def MulHom.coeFn (α β : Type*) [Mul α] [CommSemigroup β] :
    (α →ₙ* β) →ₙ* α → β

(α : Type u_3)
(β : Type u_4)
[Mul α]
[CommSemigroup β]
(g : α →ₙ* β)
(a : α)


theorem Nondegenerate.ker_eq_bot {B : BilinForm R M} (h : B.Nondegenerate) :
    LinearMap.ker B = ⊥

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
{B : LinearMap.BilinForm R M}
(h : B.Nondegenerate)


lemma nonsingular_iff' (x y : R) : W.Nonsingular x y ↔ W.Equation x y ∧
    (W.a₁ * y - (3 * x ^ 2 + 2 * W.a₂ * x + W.a₄) ≠ 0 ∨ 2 * y + W.a₁ * x + W.a₃ ≠ 0)

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


theorem map_sub [∀ i j, AddGroup (α i j)] {β : m → n → Type w} [∀ i j, AddGroup (β i j)]
    (f : ∀ ⦃i j⦄, α i j →+ β i j) (M N : DMatrix m n α) :
    ((M - N).map fun i j => @f i j) = (M.map fun i j => @f i j) - N.map fun i j => @f i j

(f : ⦃i : m⦄ → ⦃j : n⦄ → α i j →+ β i j)

((M - N).map fun i j => ⇑f) = (M.map fun i j => ⇑f) - N.map fun i j => ⇑f


/-- Naturally isomorphic endofunctors give equivalent categories of coalgebras.
Furthermore, they are equivalent as categories over `C`, that is,
we have `equiv_of_nat_iso h ⋙ forget = forget`.
-/
@[simps]
def equivOfNatIso {F G : C ⥤ C} (α : F ≅ G) : Coalgebra F ≌ Coalgebra G

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{F G : CategoryTheory.Functor C C}
(α : F ≅ G)

(CategoryTheory.Endofunctor.Coalgebra.equivOfNatIso α).unitIso =
  CategoryTheory.Endofunctor.Coalgebra.functorOfNatTransId.symm ≪≫
    CategoryTheory.Endofunctor.Coalgebra.functorOfNatTransEq ⋯ ≪≫
      CategoryTheory.Endofunctor.Coalgebra.functorOfNatTransComp α.hom α.inv


@[to_additive sum_primeFactors_gcd_add_sum_primeFactors_mul]
theorem prod_primeFactors_gcd_mul_prod_primeFactors_mul {β : Type*} [CommMonoid β] (m n : ℕ)
    (f : ℕ → β) :
    (m.gcd n).primeFactors.prod f * (m * n).primeFactors.prod f =
      m.primeFactors.prod f * n.primeFactors.prod f

{β : Type u_1}
[AddCommMonoid β]
(m n : ℕ)
(f : ℕ → β)

(m.gcd n).primeFactors.sum f + (m * n).primeFactors.sum f = m.primeFactors.sum f + n.primeFactors.sum f


/-- If the affine span of a set is `⊤`, then the vector span of the same set is the `⊤`. -/
theorem vectorSpan_eq_top_of_affineSpan_eq_top {s : Set P} (h : affineSpan k s = ⊤) :
    vectorSpan k s = ⊤

(k : Type u_1)
(V : Type u_2)
(P : Type u_3)
[Ring k]
[AddCommGroup V]
[Module k V]
[S : AffineSpace V P]
{s : Set P}
(h : affineSpan k s = ⊤)


/-- The closed ball of radius `δ` centered at a point of `E` is included in the closed
thickening of `E`. -/
theorem closedBall_subset_cthickening {α : Type*} [PseudoMetricSpace α] {x : α} {E : Set α}
    (hx : x ∈ E) (δ : ℝ) : closedBall x δ ⊆ cthickening δ E

{α : Type u_2}
[PseudoMetricSpace α]
{x : α}
{E : Set α}
(hx : x ∈ E)
(δ : ℝ)

Metric.closedBall x δ ⊆ Metric.cthickening δ E


theorem isZero_of_subsingleton (V : SemiNormedGrp₁) [Subsingleton V] : Limits.IsZero V


@[simp]
theorem fderiv_cos (hc : DifferentiableAt ℝ f x) :
    fderiv ℝ (fun x => Real.cos (f x)) x = -Real.sin (f x) • fderiv ℝ f x

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : E → ℝ}
{x : E}
(hc : DifferentiableAt ℝ f x)


@[simp]
theorem image_star [InvolutiveStar α] : Star.star '' s = s⋆

{α : Type u_1}
{s : Set α}
[InvolutiveStar α]


theorem ofNat_mod (m n : Nat) : (↑(m % n) : Int) = mod m n


@[to_additive (attr := simp)]
theorem coe_mk' : (c.mk' : M → c.Quotient) = ((↑) : M → c.Quotient)

{M : Type u_1}
[MulOneClass M]
{c : Con M}


lemma natAbs_sq (x : ℤ) : (x.natAbs : ℤ) ^ 2 = x ^ 2


lemma mul_self_nonneg [IsRightCancelAdd α]
    [ZeroLEOneClass α] [ExistsAddOfLE α] [PosMulMono α] [CovariantClass α α (· + ·) (· < ·)]
    (a : α) : 0 ≤ a * a

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


@[simp]
lemma rightHomologyMap_smul : rightHomologyMap (a • φ) = a • rightHomologyMap φ

{R : Type u_1}
{C : Type u_2}
[Semiring R]
[CategoryTheory.Category.{u_3, u_2} C]
[CategoryTheory.Preadditive C]
[CategoryTheory.Linear R C]
{S₁ S₂ : CategoryTheory.ShortComplex C}
(φ : S₁ ⟶ S₂)
(a : R)
[S₁.HasRightHomology]
[S₂.HasRightHomology]

CategoryTheory.ShortComplex.rightHomologyMap (a • φ) = a • CategoryTheory.ShortComplex.rightHomologyMap φ


@[to_additive]
theorem toSubmonoid_injective : Function.Injective (toSubmonoid : Subgroup G → Submonoid G)


theorem pow_prime_sub_pow_prime :
    multiplicity (↑p) (x ^ p - y ^ p) = multiplicity (↑p) (x - y) + 1

{R : Type u_1}
[CommRing R]
{x y : R}
{p : ℕ}
[IsDomain R]
[DecidableRel fun x x_1 => x ∣ x_1]
(hp : Prime ↑p)
(hp1 : Odd p)
(hxy : ↑p ∣ x - y)
(hx : ¬↑p ∣ x)


@[reassoc (attr := simp)]
theorem Sigma.ι_reindex_inv (b : β) :
    Sigma.ι f (ε b) ≫ (Sigma.reindex ε f).inv = Sigma.ι (f ∘ ε) b

[CategoryTheory.Limits.HasCoproduct (f ∘ ⇑ε)]

CategoryTheory.Limits.Sigma.ι f (ε b) ≫ (CategoryTheory.Limits.Sigma.reindex ε f).inv =
  CategoryTheory.Limits.Sigma.ι (f ∘ ⇑ε) b


@[simp] theorem interior_Iio : interior (Iio a) = Iio a

{α : Type u}
[TopologicalSpace α]
[LinearOrder α]
[ClosedIciTopology α]
{a : α}


@[gcongr]
lemma div_lt_div_of_pos_right (h : a < b) (hc : 0 < c) : a / c < b / c

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


lemma toNat_le_of_le_coe {m : ℕ∞} {n : ℕ} (h : m ≤ n) : toNat m ≤ n


/-- The composition of morphisms of squares. -/
@[simps]
def comp {sq₁ sq₂ sq₃ : Square C} (f : Hom sq₁ sq₂) (g : Hom sq₂ sq₃) : Hom sq₁ sq₃

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{sq₁ sq₂ sq₃ : CategoryTheory.Square C}
(f : sq₁.Hom sq₂)
(g : sq₂.Hom sq₃)

(f.comp g).τ₃ = CategoryTheory.CategoryStruct.comp f.τ₃ g.τ₃


@[simp]
theorem refl_comp (g : M ≃[L] N) : (refl L N).comp g = g

{L : FirstOrder.Language}
{M : Type w}
{N : Type w'}
[L.Structure M]
[L.Structure N]
(g : L.Equiv M N)

(FirstOrder.Language.Equiv.refl L N).comp g = g


theorem uniformity_basis_dist_rat :
    (𝓤 α).HasBasis (fun r : ℚ => 0 < r) fun r => { p : α × α | dist p.1 p.2 < r }

(𝓤 α).HasBasis (fun r => 0 < r) fun r => {p | dist p.1 p.2 < ↑r}


theorem zeroLocus_iUnion₂ {ι : Sort*} {κ : (i : ι) → Sort*} (s : ∀ i, κ i → Set R) :
    zeroLocus (⋃ (i) (j), s i j) = ⋂ (i) (j), zeroLocus (s i j)

{R : Type u}
[CommSemiring R]
{ι : Sort u_1}
{κ : ι → Sort u_2}
(s : (i : ι) → κ i → Set R)

PrimeSpectrum.zeroLocus (⋃ i, ⋃ j, s i j) = ⋂ i, ⋂ j, PrimeSpectrum.zeroLocus (s i j)


theorem coeff_C : coeff (C a) n = ite (n = 0) a 0

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

(Polynomial.C a).coeff n = if n = 0 then a else 0


@[simp]
theorem ofList_nil : ofList [] = (nil : WSeq α)


theorem toNat_strictMonoOn : StrictMonoOn toNat (Iio ℵ₀)

StrictMonoOn (⇑Cardinal.toNat) (Set.Iio Cardinal.aleph0)


theorem Cofork.IsColimit.existsUnique {s : Cofork f g} (hs : IsColimit s) {W : C} (k : Y ⟶ W)
    (h : f ≫ k = g ≫ k) : ∃! d : s.pt ⟶ W, Cofork.π s ≫ d = k

(hs : CategoryTheory.Limits.IsColimit s)

(h : CategoryTheory.CategoryStruct.comp f k = CategoryTheory.CategoryStruct.comp g k)

∃! d, CategoryTheory.CategoryStruct.comp s.π d = k


@[simp]
theorem Bool.sup_eq_bor : (· ⊔ ·) = or


theorem injOn_insert {f : α → β} {s : Set α} {a : α} (has : a ∉ s) :
    Set.InjOn f (insert a s) ↔ Set.InjOn f s ∧ f a ∉ f '' s

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


{α : Sort u}
{f : α → α}
(h : Function.Involutive f)


theorem AdjoinMonic.algebraMap : algebraMap k (AdjoinMonic k) = (Ideal.Quotient.mk _).comp
    (C : k →+* MvPolynomial (MonicIrreducible k) k)

algebraMap k (AlgebraicClosure.AdjoinMonic k) = (Ideal.Quotient.mk (AlgebraicClosure.maxIdeal k)).comp MvPolynomial.C


theorem not_disjoint_iff : ¬Disjoint s t ↔ ∃ a, a ∈ s ∧ a ∈ t


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


@[to_additive (attr := simp)]
theorem prod_zero_index {h : α → M → N} : (0 : α →₀ M).prod h = 1

{α : Type u_1}
{M : Type u_8}
{N : Type u_10}
[Zero M]
[AddCommMonoid N]
{h : α → M → N}


/-- Given `pb : PowerBasis K S`, then the norm of `pb.gen` is
`(-1) ^ pb.dim * coeff (minpoly K pb.gen) 0`. -/
theorem PowerBasis.norm_gen_eq_coeff_zero_minpoly (pb : PowerBasis R S) :
    norm R pb.gen = (-1) ^ pb.dim * coeff (minpoly R pb.gen) 0

{R : Type u_1}
{S : Type u_2}
[CommRing R]
[Ring S]
[Algebra R S]
(pb : PowerBasis R S)

(Algebra.norm R) pb.gen = (-1) ^ pb.dim * (minpoly R pb.gen).coeff 0


theorem image_coe_Ioc : (some : α → WithBot α) '' Ioc a b = Ioc (a : WithBot α) b

WithBot.some '' Set.Ioc a b = Set.Ioc ↑a ↑b


theorem lintegral_coe_eq_integral (f : α → ℝ≥0) (hfi : Integrable (fun x => (f x : ℝ)) μ) :
    ∫⁻ a, f a ∂μ = ENNReal.ofReal (∫ a, f a ∂μ)

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

∫⁻ (a : α), ↑(f a) ∂μ = ENNReal.ofReal (∫ (a : α), ↑(f a) ∂μ)


/-- Same as `Polynomial.natSepDegree_eq_natDegree_of_separable`, but enables the use of
dot notation. -/
theorem Separable.natSepDegree_eq_natDegree (h : f.Separable) :
    f.natSepDegree = f.natDegree

{F : Type u}
[Field F]
{f : F[X]}
(h : f.Separable)


theorem le_pow_toAddSubmonoid {n : ℕ} : M.toAddSubmonoid ^ n ≤ (M ^ n).toAddSubmonoid

{R : Type u}
[CommSemiring R]
{A : Type v}
[Semiring A]
[Algebra R A]
(M : Submodule R A)
{n : ℕ}


@[simp]
theorem zipWith_get (x : Vector α n) (y : Vector β n) (i) :
    (Vector.zipWith f x y).get i = f (x.get i) (y.get i)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{n : ℕ}
(f : α → β → γ)
(x : Mathlib.Vector α n)
(y : Mathlib.Vector β n)
(i : Fin n)

(Mathlib.Vector.zipWith f x y).get i = f (x.get i) (y.get i)


@[simp]
theorem map_comp_id (F : C × D ⥤ E) (X Y Z : C) (W : D) (f : X ⟶ Y) (g : Y ⟶ Z) :
    F.map ((f ≫ g, 𝟙 W) : (X, W) ⟶ (Z, W)) =
      F.map ((f, 𝟙 W) : (X, W) ⟶ (Y, W)) ≫ F.map ((g, 𝟙 W) : (Y, W) ⟶ (Z, W))

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

F.map (f ≫ g, 𝟙 W) = F.map (f, 𝟙 W) ≫ F.map (g, 𝟙 W)


@[simp, reassoc]
lemma Scheme.restrictRestrict_hom_restrict (X : Scheme.{u}) (U : X.Opens)
    (V : U.toScheme.Opens) :
    (X.restrictRestrict U V).hom ≫ Opens.ι _ = V.ι ≫ U.ι

(X : AlgebraicGeometry.Scheme)
(U : X.Opens)
(V : (↑U).Opens)

(X.restrictRestrict U V).hom ≫ ((AlgebraicGeometry.Scheme.Hom.opensFunctor U.ι).obj V).ι = V.ι ≫ U.ι


/-- Version of `isProperMap_iff_isCompact_preimage` in terms of `cocompact`. -/
lemma isProperMap_iff_tendsto_cocompact [T2Space Y]
    (compactlyGenerated : ∀ s : Set Y, IsClosed s ↔ ∀ ⦃K⦄, IsCompact K → IsClosed (s ∩ K)) :
    IsProperMap f ↔ Continuous f ∧ Tendsto f (cocompact X) (cocompact Y)

(compactlyGenerated : ∀ (s : Set Y), IsClosed s ↔ ∀ ⦃K : Set Y⦄, IsCompact K → IsClosed (s ∩ K))

IsProperMap f ↔ Continuous f ∧ Filter.Tendsto f (Filter.cocompact X) (Filter.cocompact Y)


/-- Baire theorem: a countable intersection of dense open sets is dense. Formulated here with
an index set which is a countable set in any type. -/
theorem dense_biInter_of_isOpen {S : Set α} {f : α → Set X} (ho : ∀ s ∈ S, IsOpen (f s))
    (hS : S.Countable) (hd : ∀ s ∈ S, Dense (f s)) : Dense (⋂ s ∈ S, f s)

{X : Type u_1}
{α : Type u_2}
[TopologicalSpace X]
[BaireSpace X]
{S : Set α}
{f : α → Set X}
(ho : ∀ s ∈ S, IsOpen (f s))
(hS : S.Countable)
(hd : ∀ s ∈ S, Dense (f s))


@[simp]
theorem inv_mul_integral_comp_div : (c⁻¹ * ∫ x in a..b, f (x / c)) = ∫ x in a / c..b / c, f x

c⁻¹ * ∫ (x : ℝ) in a..b, f (x / c) = ∫ (x : ℝ) in a / c..b / c, f x


theorem frobenius_pow {p : ℕ} [Fact p.Prime] [CharP K p] {n : ℕ} (hcard : q = p ^ n) :
    frobenius K p ^ n = 1

{K : Type u_1}
[Field K]
[Fintype K]
{p : ℕ}
[Fact (Nat.Prime p)]
[CharP K p]
{n : ℕ}
(hcard : q = p ^ n)


@[to_additive sum_mono_set]
theorem prod_mono_set' (f : ι → M) : Monotone fun s ↦ ∏ x ∈ s, f x

{ι : Type u_1}
{M : Type u_4}
[CanonicallyOrderedCommMonoid M]
(f : ι → M)


/-- A function which can be locally uniformly approximated by functions which are continuous
on a set is continuous on this set. -/
theorem continuousOn_of_locally_uniform_approx_of_continuousWithinAt
    (L : ∀ x ∈ s, ∀ u ∈ 𝓤 β, ∃ t ∈ 𝓝[s] x, ∃ F,
      ContinuousWithinAt F s x ∧ ∀ y ∈ t, (f y, F y) ∈ u) :
    ContinuousOn f s


@[simp]
theorem ofNat_le_ofNat {m n : ℕ} [NeZero m] [NeZero n] :
    (no_index (OfNat.ofNat m) : ℕ+) ≤ no_index (OfNat.ofNat n) ↔ OfNat.ofNat m ≤ OfNat.ofNat n

OfNat.ofNat m ≤ OfNat.ofNat n ↔ OfNat.ofNat m ≤ OfNat.ofNat n


theorem Nodup.getElem_inj_iff {l : List α} (h : Nodup l)
    {i : Nat} {hi : i < l.length} {j : Nat} {hj : j < l.length} :
    l[i] = l[j] ↔ i = j

{α : Type u}
{l : List α}
(h : l.Nodup)
{i : ℕ}
{hi : i < l.length}
{j : ℕ}
{hj : j < l.length}


@[to_additive]
theorem sup_eq_closure_mul (H K : Submonoid M) : H ⊔ K = closure ((H : Set M) * (K : Set M))

{M : Type u_3}
[Monoid M]
(H K : Submonoid M)


theorem one_le_rpow_of_pos_of_le_one_of_neg {x : ℝ≥0∞} {z : ℝ} (hx1 : 0 < x) (hx2 : x ≤ 1)
    (hz : z < 0) : 1 ≤ x ^ z


@[simp]
theorem lookup_erase (a) (s : Finmap β) : lookup a (erase a s) = none

{α : Type u}
{β : α → Type v}
[DecidableEq α]
(a : α)
(s : Finmap β)

Finmap.lookup a (Finmap.erase a s) = none


lemma even_xor_odd' (n : ℕ) : ∃ k, Xor' (n = 2 * k) (n = 2 * k + 1)


theorem inner_eq_zero_symm {x y : E} : ⟪x, y⟫ = 0 ↔ ⟪y, x⟫ = 0

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


/-- The obvious functor `(J ⥤ ShortComplex C) ⥤ ShortComplex (J ⥤ C)`. -/
@[simps]
def inverse : (J ⥤ ShortComplex C) ⥤ ShortComplex (J ⥤ C)

∀ {X Y : CategoryTheory.Functor J (CategoryTheory.ShortComplex C)} (φ : X ⟶ Y),
  ((CategoryTheory.ShortComplex.FunctorEquivalence.inverse J C).map φ).τ₃ =
    CategoryTheory.whiskerRight φ CategoryTheory.ShortComplex.π₃


lemma IsLocallyFiniteMeasure.withDensity_coe {f : α → ℝ≥0} (hf : Continuous f) :
    IsLocallyFiniteMeasure (μ.withDensity fun x ↦ f x)

MeasureTheory.IsLocallyFiniteMeasure (μ.withDensity fun x => ↑(f x))


/-- If left-multiplication by any element is cancellative, left-multiplication by `g` is an
embedding. -/
@[to_additive (attr := simps)
      "If left-addition by any element is cancellative, left-addition by `g` is an
        embedding."]
def mulLeftEmbedding [Mul G] [IsLeftCancelMul G] (g : G) : G ↪ G

{G : Type u_1}
[Add G]
[IsLeftCancelAdd G]
(g h : G)


theorem Coprime.dvd_of_dvd_mul_right (H1 : Coprime k n) (H2 : k ∣ m * n) : k ∣ m

{k n m : Nat}
(H1 : k.Coprime n)
(H2 : k ∣ m * n)


protected theorem IsMax.eq_of_ge (ha : IsMax a) (h : a ≤ b) : b = a

{α : Type u_1}
[PartialOrder α]
{a b : α}
(ha : IsMax a)
(h : a ≤ b)


@[simp]
theorem integralSum_smul (c : ℝ) (f : ℝⁿ → E) (vol : ι →ᵇᵃ E →L[ℝ] F) (π : TaggedPrepartition I) :
    integralSum (c • f) vol π = c • integralSum f vol π

{ι : Type u}
{E : Type v}
{F : Type w}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[NormedAddCommGroup F]
[NormedSpace ℝ F]
{I : BoxIntegral.Box ι}
(c : ℝ)
(f : (ι → ℝ) → E)
(vol : ι →ᵇᵃ[⊤] E →L[ℝ] F)
(π : BoxIntegral.TaggedPrepartition I)

BoxIntegral.integralSum (c • f) vol π = c • BoxIntegral.integralSum f vol π


/-- An inner product space is a vector space with an additional operation called inner product.
The norm could be derived from the inner product, instead we require the existence of a norm and
the fact that `‖x‖^2 = re ⟪x, x⟫` to be able to put instances on `𝕂` or product
spaces.

To construct a norm from an inner product, see `InnerProductSpace.ofCore`.
-/
class InnerProductSpace (𝕜 : Type*) (E : Type*) [RCLike 𝕜] [NormedAddCommGroup E] extends
  NormedSpace 𝕜 E, Inner 𝕜 E where
  /-- The inner product induces the norm. -/
  norm_sq_eq_inner : ∀ x : E, ‖x‖ ^ 2 = re (inner x x)
  /-- The inner product is *hermitian*, taking the `conj` swaps the arguments. -/
  conj_symm : ∀ x y, conj (inner y x) = inner x y
  /-- The inner product is additive in the first coordinate. -/
  add_left : ∀ x y z, inner (x + y) z = inner x z + inner y z
  /-- The inner product is conjugate linear in the first coordinate. -/
  smul_left : ∀ x y r, inner (r • x) y = conj r * inner x y

{𝕜 : Type u_4}
{E : Type u_5}
[RCLike 𝕜]
[NormedAddCommGroup E]
[self : InnerProductSpace 𝕜 E]
(x y : E)
(r : 𝕜)

⟪r • x, y⟫_𝕜 = (starRingEnd 𝕜) r * ⟪x, y⟫_𝕜


lemma FarFromTriangleFree.lt_half (hG : G.FarFromTriangleFree ε) : ε < 2⁻¹

{α : Type u_1}
{𝕜 : Type u_3}
[LinearOrderedField 𝕜]
{G : SimpleGraph α}
{ε : 𝕜}
[Fintype α]
[DecidableRel G.Adj]
[Nonempty α]
(hG : G.FarFromTriangleFree ε)


@[simp]
theorem coe_zero : ⇑(0 : Derivation R A M) = 0

{R : Type u_1}
{A : Type u_2}
{M : Type u_4}
[CommSemiring R]
[CommSemiring A]
[AddCommMonoid M]
[Algebra R A]
[Module A M]
[Module R M]


theorem lcm_dvd {m n k : Nat} (H1 : m ∣ k) (H2 : n ∣ k) : lcm m n ∣ k


theorem isBounded_of_image2_left (f : α → β → γ) {K₁ : ℝ≥0}
    (hf : ∀ b, AntilipschitzWith K₁ fun a => f a b) {s : Set α} {t : Set β}
    (hst : IsBounded (Set.image2 f s t)) : IsBounded s ∨ IsBounded t

(f : α → β → γ)

(hf : ∀ (b : β), AntilipschitzWith K₁ fun a => f a b)

(hst : Bornology.IsBounded (Set.image2 f s t))

Bornology.IsBounded s ∨ Bornology.IsBounded t


/-- Conjugation acting on fixed element of the group is continuous when both `mul` and
`inv` are continuous. -/
@[to_additive (attr := continuity)
  "Conjugation acting on fixed element of the additive group is continuous when both
    `add` and `neg` are continuous."]
theorem TopologicalGroup.continuous_conj' [ContinuousInv G] (h : G) :
    Continuous fun g : G => g * h * g⁻¹

{G : Type w}
[TopologicalSpace G]
[Inv G]
[Mul G]
[ContinuousMul G]
[ContinuousInv G]
(h : G)


@[simp]
theorem trunc_add (n) (φ ψ : R⟦X⟧) : trunc n (φ + ψ) = trunc n φ + trunc n ψ

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

PowerSeries.trunc n (φ + ψ) = PowerSeries.trunc n φ + PowerSeries.trunc n ψ


@[reassoc]
theorem leftUnitor_naturality {f g : a ⟶ b} (η : f ⟶ g) :
    𝟙 a ◁ η ≫ (λ_ g).hom = (λ_ f).hom ≫ η

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

CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.whiskerLeft (CategoryTheory.CategoryStruct.id a) η)
    (CategoryTheory.Bicategory.leftUnitor g).hom =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.leftUnitor f).hom η


theorem isBoundedUnder_const [IsRefl α r] {l : Filter β} {a : α} : IsBoundedUnder r l fun _ => a

{α : Type u_1}
{β : Type u_2}
{r : α → α → Prop}
[IsRefl α r]
{l : Filter β}
{a : α}


theorem pi_le_borel_pi {ι : Type*} {π : ι → Type*} [∀ i, TopologicalSpace (π i)]
    [∀ i, MeasurableSpace (π i)] [∀ i, BorelSpace (π i)] :
      MeasurableSpace.pi ≤ borel (∀ i, π i)

{ι : Type u_6}
{π : ι → Type u_7}
[(i : ι) → TopologicalSpace (π i)]
[(i : ι) → MeasurableSpace (π i)]
[∀ (i : ι), BorelSpace (π i)]

MeasurableSpace.pi ≤ borel ((i : ι) → π i)


/-- If a 2-vector `p` satisfies `IsCoprime (p 0) (p 1)`, then `p ≠ 0`. -/
theorem IsCoprime.ne_zero [Nontrivial R] {p : Fin 2 → R} (h : IsCoprime (p 0) (p 1)) : p ≠ 0

{R : Type u}
[CommSemiring R]
[Nontrivial R]
{p : Fin 2 → R}
(h : IsCoprime (p 0) (p 1))


@[to_additive]
theorem mul_lt_of_mul_lt_right [CovariantClass α α (swap (· * ·)) (· ≤ ·)] {a b c d : α}
    (h : a * b < c) (hle : d ≤ a) :
    d * b < c

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


theorem one_sub_mem {t : β} (ht : t ∈ Icc (0 : β) 1) : 1 - t ∈ Icc (0 : β) 1

{β : Type u_2}
[OrderedRing β]
{t : β}
(ht : t ∈ Set.Icc 0 1)


/-- A bilinear map is right-separating if and only if its flip has a trivial kernel. -/
theorem separatingRight_iff_flip_ker_eq_bot {B : M₁ →ₛₗ[I₁] M₂ →ₛₗ[I₂] M} :
    B.SeparatingRight ↔ LinearMap.ker B.flip = ⊥

{R : Type u_1}
{R₁ : Type u_2}
{R₂ : Type u_3}
{M : Type u_5}
{M₁ : Type u_6}
{M₂ : Type u_7}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
[CommSemiring R₁]
[AddCommMonoid M₁]
[Module R₁ M₁]
[CommSemiring R₂]
[AddCommMonoid M₂]
[Module R₂ M₂]
{I₁ : R₁ →+* R}
{I₂ : R₂ →+* R}
{B : M₁ →ₛₗ[I₁] M₂ →ₛₗ[I₂] M}


lemma coe_inv (x : ℝ) : (x⁻¹ : ℝ) = (x : EReal)⁻¹

↑x⁻¹ = (↑x)⁻¹


theorem ExprCnstr.eq_false_of_isUnsat (ctx : Context) (c : ExprCnstr) (h : c.toNormPoly.isUnsat) : c.denote ctx = False

(ctx : Nat.Linear.Context)
(c : Nat.Linear.ExprCnstr)
(h : c.toNormPoly.isUnsat = true)

Nat.Linear.ExprCnstr.denote ctx c = False


@[simp]
lemma smoothNumbers_zero : smoothNumbers 0 = {1}


protected theorem isTop (a : α) : IsTop a

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


@[simp]
theorem map_bot (f : F) : map f (⊥ : NonUnitalSubsemiring R) = (⊥ : NonUnitalSubsemiring S)

{R : Type u}
{S : Type v}
[NonUnitalNonAssocSemiring R]
[NonUnitalNonAssocSemiring S]
{F : Type u_1}
[FunLike F R S]
[NonUnitalRingHomClass F R S]
(f : F)


/-- The type of lines that are only one color except possibly at their endpoints. -/
structure AlmostMono {α ι κ : Type*} (C : (ι → Option α) → κ) where
  /-- The underlying line of an almost monochromatic line, where the coordinate dimension `α` is
  extended by an additional symbol `none`, thought to be marking the endpoint of the line. -/
  line : Line (Option α) ι
  /-- The main color of an almost monochromatic line. -/
  color : κ
  /-- The proposition that the underlying line of an almost monochromatic line assumes its main
  color except possibly at the endpoints. -/
  has_color : ∀ x : α, C (line (some x)) = color

(self : Combinatorics.Line.AlmostMono C)

C ((fun x i => (self.line.idxFun i).getD x) (some x)) = self.color


@[simp]
theorem encode_inj [Encodable α] {a b : α} : encode a = encode b ↔ a = b

Encodable.encode a = Encodable.encode b ↔ a = b


theorem foldl_data_eq_bind (l : List α) (acc : Array β)
    (F : Array β → α → Array β) (G : α → List β)
    (H : ∀ acc a, (F acc a).data = acc.data ++ G a) :
    (l.foldl F acc).data = acc.data ++ l.bind G

(H : ∀ (acc : Array β) (a : α), (F acc a).data = acc.data ++ G a)

(List.foldl F acc l).data = acc.data ++ l.bind G


theorem u_exists :
    ∃ u : E → ℝ,
      ContDiff ℝ ⊤ u ∧ (∀ x, u x ∈ Icc (0 : ℝ) 1) ∧ support u = ball 0 1 ∧ ∀ x, u (-x) = u x

(E : Type u_1)
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[FiniteDimensional ℝ E]

∃ u, ContDiff ℝ ⊤ u ∧ (∀ (x : E), u x ∈ Set.Icc 0 1) ∧ Function.support u = Metric.ball 0 1 ∧ ∀ (x : E), u (-x) = u x


@[to_additive (attr := simps tensorObj_as leftUnitor rightUnitor associator) Discrete.addMonoidal]
instance Discrete.monoidal : MonoidalCategory (Discrete M)

(M : Type u)
[AddMonoid M]
(X : CategoryTheory.Discrete M)

ρ_ X = CategoryTheory.Discrete.eqToIso ⋯


@[simp 1100]
lemma mk₀_comp_mk₀ (f : X ⟶ Y) (g : Y ⟶ Z) :
    (mk₀ f).comp (mk₀ g) (zero_add 0) = mk₀ (f ≫ g)

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Abelian C]
[CategoryTheory.HasExt C]
{X Y Z : C}
(f : X ⟶ Y)
(g : Y ⟶ Z)

(CategoryTheory.Abelian.Ext.mk₀ f).comp (CategoryTheory.Abelian.Ext.mk₀ g) ⋯ =
  CategoryTheory.Abelian.Ext.mk₀ (CategoryTheory.CategoryStruct.comp f g)


lemma LSeriesSummable.LSeriesHasSum {f : ℕ → ℂ} {s : ℂ} (h : LSeriesSummable f s) :
    LSeriesHasSum f s (LSeries f s)


@[simp]
theorem map_comp_coe {α β} (h : α → β) :
    Functor.map h ∘ Coe.coe = (Coe.coe ∘ Functor.map h : List α → Multiset β)

Functor.map h ∘ Coe.coe = Coe.coe ∘ Functor.map h


@[simp] theorem concat_and_concat (x y : BitVec w) (a b : Bool) :
    (concat x a) &&& (concat y b) = concat (x &&& y) (a && b)

x.concat a &&& y.concat b = (x &&& y).concat (a && b)


theorem nats_eq : nats = cons 0 (map succ nats)

Stream'.nats = Stream'.cons 0 (Stream'.map Nat.succ Stream'.nats)


theorem Function.Surjective.lieModuleIsNilpotent [IsNilpotent R L M] : IsNilpotent R L₂ M₂

(hfg : ∀ (x : L) (m : M), ⁅f x, g m⁆ = g ⁅x, m⁆)


@[simp, norm_cast]
theorem coe_sups : (↑(s ⊻ t) : Set α) = ↑s ⊻ ↑t

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


theorem card_set_walk_length_eq (u v : V) (n : ℕ) :
    Fintype.card {p : G.Walk u v | p.length = n} = (G.finsetWalkLength n u v).card

{V : Type u}
(G : SimpleGraph V)
[DecidableEq V]
[G.LocallyFinite]
(u v : V)
(n : ℕ)

Fintype.card ↑{p | p.length = n} = (G.finsetWalkLength n u v).card


@[simp]
theorem map₂Right'_nil_right : map₂Right' f as [] = ([], as)

{α : Type u}
{β : Type v}
{γ : Type w}
(f : Option α → β → γ)
(as : List α)


/-- The equivalence between the category of elements `F.Elements`
    and the comma category `(*, F)`. -/
@[simps! functor_obj functor_map inverse_obj inverse_map unitIso_hom
  unitIso_inv counitIso_hom counitIso_inv]
def structuredArrowEquivalence : F.Elements ≌ StructuredArrow PUnit F

{C : Type u}
[CategoryTheory.Category.{v, u} C]
(F : CategoryTheory.Functor C (Type w))

(CategoryTheory.CategoryOfElements.structuredArrowEquivalence F).unitIso.inv =
  CategoryTheory.CategoryStruct.comp
    ((CategoryTheory.CategoryOfElements.toStructuredArrow F).comp
          (CategoryTheory.CategoryOfElements.fromStructuredArrow F)).leftUnitor.inv
    (CategoryTheory.CategoryStruct.comp
      (CategoryTheory.whiskerRight (CategoryTheory.NatIso.ofComponents (fun X => CategoryTheory.Iso.refl X) ⋯).hom
        ((CategoryTheory.CategoryOfElements.toStructuredArrow F).comp
          (CategoryTheory.CategoryOfElements.fromStructuredArrow F)))
      (CategoryTheory.CategoryStruct.comp
        ((CategoryTheory.CategoryOfElements.toStructuredArrow F).associator
            (CategoryTheory.CategoryOfElements.fromStructuredArrow F)
            ((CategoryTheory.CategoryOfElements.toStructuredArrow F).comp
              (CategoryTheory.CategoryOfElements.fromStructuredArrow F))).hom
        (CategoryTheory.CategoryStruct.comp
          (CategoryTheory.whiskerLeft (CategoryTheory.CategoryOfElements.toStructuredArrow F)
            ((CategoryTheory.CategoryOfElements.fromStructuredArrow F).associator
                (CategoryTheory.CategoryOfElements.toStructuredArrow F)
                (CategoryTheory.CategoryOfElements.fromStructuredArrow F)).inv)
          (CategoryTheory.CategoryStruct.comp
            (CategoryTheory.whiskerLeft (CategoryTheory.CategoryOfElements.toStructuredArrow F)
              (CategoryTheory.whiskerRight
                (CategoryTheory.NatIso.ofComponents
                    (fun X => CategoryTheory.StructuredArrow.isoMk (CategoryTheory.Iso.refl X.right) ⋯) ⋯).hom
                (CategoryTheory.CategoryOfElements.fromStructuredArrow F)))
            (CategoryTheory.CategoryStruct.comp
              (CategoryTheory.whiskerLeft (CategoryTheory.CategoryOfElements.toStructuredArrow F)
                (CategoryTheory.CategoryOfElements.fromStructuredArrow F).leftUnitor.hom)
              (CategoryTheory.NatIso.ofComponents (fun X => CategoryTheory.Iso.refl X) ⋯).inv)))))


@[reassoc (attr := simp)]
theorem μ_inv_hom_id (X Y : C) : (F.μIso X Y).inv ≫ F.μ X Y = 𝟙 _

(F : CategoryTheory.MonoidalFunctor C D)

(F.μIso X Y).inv ≫ F.μ X Y = 𝟙 (F.obj (CategoryTheory.MonoidalCategory.tensorObj X Y))


theorem Sorted.le_head! [Inhabited α] [Preorder α] {a : α} {l : List α} (h : Sorted (· > ·) l)
    (ha : a ∈ l) : a ≤ l.head!

(h : List.Sorted (fun x x_1 => x > x_1) l)


@[simp]
theorem rightZigzagIso_symm : (rightZigzagIso η ε).symm = leftZigzagIso ε.symm η.symm

(η : CategoryTheory.CategoryStruct.id a ≅ CategoryTheory.CategoryStruct.comp f g)

(ε : CategoryTheory.CategoryStruct.comp g f ≅ CategoryTheory.CategoryStruct.id b)

(CategoryTheory.Bicategory.rightZigzagIso η ε).symm = CategoryTheory.Bicategory.leftZigzagIso ε.symm η.symm


theorem boundary_sup_sup_boundary_inf (a b : α) : ∂ (a ⊔ b) ⊔ ∂ (a ⊓ b) = ∂ a ⊔ ∂ b

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


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

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


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

{α : Type u_1}
{β : Type u_2}
{f : α → β}
[Preorder α]
[Preorder β]
{a b : α}
(h : AntitoneOn f (Set.Icc a b))


@[deprecated measure_iUnion_null_iff (since := "2024-05-14")]
theorem iUnion_null_iff {ι : Sort*} [Countable ι] (m : OuterMeasure α) {s : ι → Set α} :
    m (⋃ i, s i) = 0 ↔ ∀ i, m (s i) = 0

{α : Type u_1}
{ι : Sort u_3}
[Countable ι]
(m : MeasureTheory.OuterMeasure α)
{s : ι → Set α}


/-- If the image of a set is nontrivial, the set is nontrivial. -/
theorem nontrivial_of_image (f : α → β) (s : Set α) (hs : (f '' s).Nontrivial) : s.Nontrivial

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


@[simp]
theorem sinh_nonpos_iff : sinh x ≤ 0 ↔ x ≤ 0


theorem outer_trim : f.outer.trim = f.outer


theorem card_Ico_eq_card_Icc_sub_one (a b : α) : card (Ico a b) = card (Icc a b) - 1

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

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


@[to_additive (attr := simp)]
theorem smul_some : a • some b = some (a • b)

{M : Type u_1}
{α : Type u_3}
[SMul M α]
(a : M)
(b : α)


@[simp]
theorem coe_lt_top (a : α) : (a : WithTop α) < ⊤


@[simp]
theorem eval_nil : M.eval [] = M.start


/-- A finite group of order dividing a prime is cyclic. -/
@[to_additive "A finite group of order dividing a prime is cyclic."]
theorem isCyclic_of_card_dvd_prime {α : Type u} [Group α] {p : ℕ} [hp : Fact p.Prime]
    (h : Nat.card α ∣ p) : IsCyclic α

{α : Type u}
[Group α]
{p : ℕ}
[hp : Fact (Nat.Prime p)]
(h : Nat.card α ∣ p)


@[to_additive]
theorem index_map (f : G →* G') :
    (H.map f).index = (H ⊔ f.ker).index * f.range.index

{G : Type u_1}
{G' : Type u_2}
[Group G]
[Group G']
(H : Subgroup G)
(f : G →* G')

(Subgroup.map f H).index = (H ⊔ f.ker).index * f.range.index


@[simp]
theorem cons_zero : cons y s 0 = y

{n : ℕ}
{M : Type u_1}
[Zero M]
(y : M)
(s : Fin n →₀ M)


theorem adjoin_rootSet (n : ℕ) :
    ∀ {K : Type u} [Field K],
      ∀ (f : K[X]) (_hfn : f.natDegree = n),
        Algebra.adjoin K (f.rootSet (SplittingFieldAux n f)) = ⊤

(n : ℕ)
{K : Type u}
[Field K]
(f : K[X])
(_hfn : f.natDegree = n)

Algebra.adjoin K (f.rootSet (Polynomial.SplittingFieldAux n f)) = ⊤


theorem mem_carrier {s : Subfield K} {x : K} : x ∈ s.carrier ↔ x ∈ s

{K : Type u}
[DivisionRing K]
{s : Subfield K}
{x : K}


lemma map_preNormEDS' (n : ℕ) : f (preNormEDS' b c d n) = preNormEDS' (f b) (f c) (f d) n

{R : Type u}
{S : Type v}
[CommRing R]
[CommRing S]
(f : R →+* S)
(b c d : R)
(n : ℕ)


theorem IsSuffix.filter (p : α → Bool) ⦃l₁ l₂ : List α⦄ (h : l₁ <:+ l₂) :
    l₁.filter p <:+ l₂.filter p

{α : Type u_1}
(p : α → Bool)
⦃l₁ l₂ : List α⦄
(h : l₁ <:+ l₂)


theorem Reduced.exists_normalWord_prod_eq (d : Transversal φ) {w : Word G} (hw : Reduced φ w) :
    ∃ w' : NormalWord d, w'.prod = ofCoprodI w.prod ∧
      w'.toList.map Sigma.fst = w.toList.map Sigma.fst

(d : Monoid.PushoutI.NormalWord.Transversal φ)

∃ w', w'.prod = Monoid.PushoutI.ofCoprodI w.prod ∧ List.map Sigma.fst w'.toList = List.map Sigma.fst w.toList


@[simp]
theorem degree_of_d_eq_zero (ha : P.a = 0) (hb : P.b = 0) (hc : P.c = 0) (hd : P.d = 0) :
    P.toPoly.degree = ⊥

{R : Type u_1}
{P : Cubic R}
[Semiring R]
(ha : P.a = 0)
(hb : P.b = 0)
(hc : P.c = 0)
(hd : P.d = 0)


theorem inf_mem_closed_subalgebra (A : Subalgebra ℝ C(X, ℝ)) (h : IsClosed (A : Set C(X, ℝ)))
    (f g : A) : (f : C(X, ℝ)) ⊓ (g : C(X, ℝ)) ∈ A

{X : Type u_1}
[TopologicalSpace X]
[CompactSpace X]
(A : Subalgebra ℝ C(X, ℝ))
(h : IsClosed ↑A)
(f g : ↥A)


@[simp]
theorem preimage_coe_Ico : (some : α → WithTop α) ⁻¹' Ico a b = Ico a b

WithTop.some ⁻¹' Set.Ico ↑a ↑b = Set.Ico a b


theorem concat_eq_reverse_cons (a : α) (l : List α) : concat l a = reverse (a :: reverse l)


/-- Constructor for objects of the category `Functor.LeftExtension L F`. -/
@[simps!]
def LeftExtension.mk (F' : D ⥤ H) {L : C ⥤ D} {F : C ⥤ H} (α : F ⟶ L ⋙ F') :
    LeftExtension L F

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

(CategoryTheory.Functor.LeftExtension.mk F' α).right = F'


@[to_additive]
theorem mulIndicator_const (h : EventuallyConst s l) (c : β) :
    EventuallyConst (s.mulIndicator fun _ ↦ c) l

{α : Type u_1}
{β : Type u_2}
{l : Filter α}
[One β]
{s : Set α}
(h : Filter.EventuallyConst s l)
(c : β)

Filter.EventuallyConst (s.mulIndicator fun x => c) l


lemma growsPolynomially_pow (p : ℕ) : GrowsPolynomially fun x => x ^ p

AkraBazziRecurrence.GrowsPolynomially fun x => x ^ p


theorem norm_le_pow_iff_le_valuation (x : ℤ_[p]) (hx : x ≠ 0) (n : ℕ) :
    ‖x‖ ≤ (p : ℝ) ^ (-n : ℤ) ↔ ↑n ≤ x.valuation

{p : ℕ}
[hp : Fact (Nat.Prime p)]
(x : ℤ_[p])
(hx : x ≠ 0)
(n : ℕ)


theorem HasFiniteIntegral.right_of_add_measure {f : α → β} (h : HasFiniteIntegral f (μ + ν)) :
    HasFiniteIntegral f ν

(h : MeasureTheory.HasFiniteIntegral f (μ + ν))


/-- Auxiliary definition for `grothendieckTypeToCat`, to speed up elaboration. -/
@[simps!]
def grothendieckTypeToCatFunctor : Grothendieck (G ⋙ typeToCat) ⥤ G.Elements

{C : Type u_1}
[CategoryTheory.Category.{u_3, u_1} C]
(G : CategoryTheory.Functor C (Type w))

∀ {X Y : CategoryTheory.Grothendieck (G.comp CategoryTheory.typeToCat)} (f : X ⟶ Y),
  ↑((CategoryTheory.Grothendieck.grothendieckTypeToCatFunctor G).map f) = f.base


theorem injOn_image (h : Semiconj f fa fb) (ha : InjOn fa s) (hf : InjOn f (fa '' s)) :
    InjOn fb (f '' s)

{α : Type u_1}
{β : Type u_2}
{fa : α → α}
{fb : β → β}
{f : α → β}
{s : Set α}
(h : Function.Semiconj f fa fb)
(ha : Set.InjOn fa s)
(hf : Set.InjOn f (fa '' s))


theorem ext_iff' {f g : α →₀ M} : f = g ↔ f.support = g.support ∧ ∀ x ∈ f.support, f x = g x

{α : Type u_1}
{M : Type u_5}
[Zero M]
{f g : α →₀ M}


theorem mul_sub_one (a b : α) : a * (b - 1) = a * b - a


/-- The (limit) cone for `F : J ⥤ PresheafOfModules.{v} R` that is constructed for the limit
of `F ⋙ evaluation R X` for all `X`. -/
@[simps]
noncomputable def limitCone : Cone F

[∀ (X : Cᵒᵖ),
    Small.{v, max u₂ v}
      ↑((F ⋙ PresheafOfModules.evaluation R X) ⋙ CategoryTheory.forget (ModuleCat ↑(R.obj X))).sections]

(PresheafOfModules.limitCone F).π.app j = PresheafOfModules.limitConeπApp F j


theorem midpoint_vsub_midpoint (p₁ p₂ p₃ p₄ : P) :
    midpoint R p₁ p₂ -ᵥ midpoint R p₃ p₄ = midpoint R (p₁ -ᵥ p₃) (p₂ -ᵥ p₄)

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


/-- A `CommApplicative` functor `m` is a (lawful) applicative functor which behaves identically on
`α × β` and `β × α`, so computations can occur in either order. -/
class CommApplicative (m : Type u → Type v) [Applicative m] extends LawfulApplicative m : Prop where
  /-- Computations performed first on `a : α` and then on `b : β` are equal to those performed in
  the reverse order. -/
  commutative_prod : ∀ {α β} (a : m α) (b : m β),
    Prod.mk <$> a <*> b = (fun (b : β) a => (a, b)) <$> b <*> a

{m : Type u → Type v}
[Applicative m]
[self : CommApplicative m]
{α β : Type u}
(a : m α)
(b : m β)

(Seq.seq (Prod.mk <$> a) fun x => b) = Seq.seq ((fun b a => (a, b)) <$> b) fun x => a


theorem nonemptyFinLinOrd_dual_comp_forget_to_linOrd :
    NonemptyFinLinOrd.dual ⋙ forget₂ NonemptyFinLinOrd LinOrd =
      forget₂ NonemptyFinLinOrd LinOrd ⋙ LinOrd.dual

NonemptyFinLinOrd.dual ⋙ CategoryTheory.forget₂ NonemptyFinLinOrd LinOrd =
  CategoryTheory.forget₂ NonemptyFinLinOrd LinOrd ⋙ LinOrd.dual


/-- In degree `0`, the null homotopic map `Hσ` is zero. -/
theorem Hσ_eq_zero (q : ℕ) : (Hσ q : K[X] ⟶ K[X]).f 0 = 0

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Preadditive C]
{X : CategoryTheory.SimplicialObject C}
(q : ℕ)

(AlgebraicTopology.DoldKan.Hσ q).f 0 = 0


@[to_additive (attr := mono)]
theorem inv_subset_inv (h : s ⊆ t) : s⁻¹ ⊆ t⁻¹

{α : Type u_2}
[DecidableEq α]
[Inv α]
{s t : Finset α}
(h : s ⊆ t)


theorem mk'_add (x₁ x₂ : R) (y₁ y₂ : M) :
    mk' S (x₁ * y₂ + x₂ * y₁) (y₁ * y₂) = mk' S x₁ y₁ + mk' S x₂ y₂

{R : Type u_1}
[CommSemiring R]
{M : Submonoid R}
{S : Type u_2}
[CommSemiring S]
[Algebra R S]
[IsLocalization M S]
(x₁ x₂ : R)
(y₁ y₂ : ↥M)

IsLocalization.mk' S (x₁ * ↑y₂ + x₂ * ↑y₁) (y₁ * y₂) = IsLocalization.mk' S x₁ y₁ + IsLocalization.mk' S x₂ y₂


theorem Raised.dist_le {n m} (H : Raised n m) : Nat.dist n m ≤ 1


theorem induced_const [t : TopologicalSpace α] {x : α} : (t.induced fun _ : β => x) = ⊤

{α : Type u_1}
{β : Type u_2}
[t : TopologicalSpace α]
{x : α}

TopologicalSpace.induced (fun x_1 => x) t = ⊤


/-- Given the following diagram with `S ⟶ S'` a monomorphism,

```
    X ⟶ X'
      ↘      ↘
        S ⟶ S'
      ↗      ↗
    Y ⟶ Y'
```

This iso witnesses the fact that

```
      X ×[S] Y ⟶ (X' ×[S'] Y') ×[Y'] Y
          |                  |
          |                  |
          ↓                  ↓
(X' ×[S'] Y') ×[X'] X ⟶ X' ×[S'] Y'
```

is a pullback square. The diagonal map of this square is `pullback.map`.
Also see `pullback_lift_map_is_pullback`.
-/
@[simps]
def pullbackFstFstIso {X Y S X' Y' S' : C} (f : X ⟶ S) (g : Y ⟶ S) (f' : X' ⟶ S') (g' : Y' ⟶ S')
    (i₁ : X ⟶ X') (i₂ : Y ⟶ Y') (i₃ : S ⟶ S') (e₁ : f ≫ i₃ = i₁ ≫ f') (e₂ : g ≫ i₃ = i₂ ≫ g')
    [Mono i₃] :
    pullback (pullback.fst _ _ : pullback (pullback.fst _ _ : pullback f' g' ⟶ _) i₁ ⟶ _)
        (pullback.fst _ _ : pullback (pullback.snd _ _ : pullback f' g' ⟶ _) i₂ ⟶ _) ≅
      pullback f g

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Limits.HasPullbacks C]
{X Y S X' Y' S' : C}
(f : X ⟶ S)
(g : Y ⟶ S)
(f' : X' ⟶ S')
(g' : Y' ⟶ S')
(i₁ : X ⟶ X')
(i₂ : Y ⟶ Y')
(i₃ : S ⟶ S')
(e₁ : f ≫ i₃ = i₁ ≫ f')
(e₂ : g ≫ i₃ = i₂ ≫ g')
[CategoryTheory.Mono i₃]

(CategoryTheory.Limits.pullbackFstFstIso f g f' g' i₁ i₂ i₃ e₁ e₂).inv =
  CategoryTheory.Limits.pullback.lift
    (CategoryTheory.Limits.pullback.lift (CategoryTheory.Limits.pullback.map f g f' g' i₁ i₂ i₃ e₁ e₂)
      (CategoryTheory.Limits.pullback.fst f g) ⋯)
    (CategoryTheory.Limits.pullback.lift (CategoryTheory.Limits.pullback.map f g f' g' i₁ i₂ i₃ e₁ e₂)
      (CategoryTheory.Limits.pullback.snd f g) ⋯)
    ⋯


theorem HasDerivWithinAt.finset_prod (hf : ∀ i ∈ u, HasDerivWithinAt (f i) (f' i) s x) :
    HasDerivWithinAt (∏ i ∈ u, f i ·) (∑ i ∈ u, (∏ j ∈ u.erase i, f j x) • f' i) s x

{f : ι → 𝕜 → 𝔸'}

HasDerivWithinAt (fun x => ∏ i ∈ u, f i x) (∑ i ∈ u, (∏ j ∈ u.erase i, f j x) • f' i) s x


/-- The "evaluation of `F` at `X`" functor,
as a functor `C × (C ⥤ D) ⥤ D`.
-/
@[simps]
def evaluationUncurried : C × (C ⥤ D) ⥤ D

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

(CategoryTheory.evaluationUncurried C D).obj p = p.2.obj p.1


lemma negAddY_smul (P Q : Fin 3 → R) (u v : R) :
    W'.negAddY (u • P) (v • Q) = ((u * v) ^ 2) ^ 3 * W'.negAddY P Q

{R : Type u}
[CommRing R]
{W' : WeierstrassCurve.Jacobian R}
(P Q : Fin 3 → R)
(u v : R)


@[simp]
theorem coe_finset_sum {_m : MeasurableSpace α} (I : Finset ι) (μ : ι → Measure α) :
    ⇑(∑ i ∈ I, μ i) = ∑ i ∈ I, ⇑(μ i)

{α : Type u_1}
{ι : Type u_5}
{_m : MeasurableSpace α}
(I : Finset ι)
(μ : ι → MeasureTheory.Measure α)


@[simp]
theorem out_nonempty_iff_ne_zero {o : Ordinal} : Nonempty o.out.α ↔ o ≠ 0


theorem uniformInducing_coe : UniformInducing ((↑) : α → Completion α)


theorem degree_pos_of_irreducible (hp : Irreducible p) : 0 < p.degree

{R : Type u}
[Field R]
{p : R[X]}
(hp : Irreducible p)


theorem isLeft_iff : x.isLeft ↔ ∃ y, x = Sum.inl y

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


@[to_additive finsum_pos']
theorem one_lt_finprod' {M : Type*} [OrderedCancelCommMonoid M] {f : ι → M}
    (h : ∀ i, 1 ≤ f i) (h' : ∃ i, 1 < f i) (hf : (mulSupport f).Finite) : 1 < ∏ᶠ i, f i

{ι : Type u_3}
{M : Type u_7}
[OrderedCancelAddCommMonoid M]
{f : ι → M}
(h : ∀ (i : ι), 0 ≤ f i)
(h' : ∃ i, 0 < f i)
(hf : (Function.support f).Finite)


@[to_additive (attr := simp)]
theorem coe_liftRight {f : M →* N} {g : M → Nˣ} (h : ∀ x, ↑(g x) = f x) (x) :
    (liftRight f g h x : N) = f x

{M : Type u}
{N : Type v}
[AddMonoid M]
[AddMonoid N]
{f : M →+ N}
{g : M → AddUnits N}
(h : ∀ (x : M), ↑(g x) = f x)
(x : M)


@[simp]
theorem sUnion_range (f : ι → Set β) : ⋃₀range f = ⋃ x, f x

{β : Type u_2}
{ι : Sort u_4}
(f : ι → Set β)


theorem rpow_lt_rpow_of_exponent_gt {x : ℝ≥0∞} {y z : ℝ} (hx0 : 0 < x) (hx1 : x < 1) (hyz : z < y) :
    x ^ y < x ^ z


@[to_additive, field_simps] -- The attributes are out of order on purpose
theorem mul_div_assoc' (a b c : G) : a * (b / c) = a * b / c

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


@[simp, mfld_simps]
theorem modelWithCorners_prod_coe (I : ModelWithCorners 𝕜 E H) (I' : ModelWithCorners 𝕜 E' H') :
    (I.prod I' : _ × _ → _ × _) = Prod.map I I'

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


theorem _root_.IsPrimitiveRoot.adjoin_isCyclotomicExtension {ζ : B} {n : ℕ+}
    (h : IsPrimitiveRoot ζ n) : IsCyclotomicExtension {n} A (adjoin A ({ζ} : Set B))

(A : Type u)
{B : Type v}
[CommRing A]
[CommRing B]
[Algebra A B]
{ζ : B}
{n : ℕ+}
(h : IsPrimitiveRoot ζ ↑n)

IsCyclotomicExtension {n} A ↥(Algebra.adjoin A {ζ})


lemma mul_nonZeroDivisor_mem_finiteIntegralAdeles (a : FiniteAdeleRing R K) :
    ∃ (b : R⁰) (c : R_hat R K), a * ((b : R) : FiniteAdeleRing R K) = c

(a : DedekindDomain.FiniteAdeleRing R K)


lemma natCast_add_one_le_iff {n : ℕ} {c : Cardinal} : n + 1 ≤ c ↔ n < c


/-- If `n > 0` then `m` is not divisible by `n` iff it is between `n * k` and `n * (k + 1)`
  for some `k`. -/
lemma exists_lt_and_lt_iff_not_dvd (m : ℤ) (hn : 0 < n) :
    (∃ k, n * k < m ∧ m < n * (k + 1)) ↔ ¬n ∣ m


@[simp]
theorem toDual_symm_eq : (@toDual α).symm = ofDual


lemma getD_maximum?_eq_unbot'_maximum (l : List α) (d : α) :
    l.maximum?.getD d = l.maximum.unbot' d

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

l.maximum?.getD d = WithBot.unbot' d l.maximum


theorem LinearMap.toMatrix'_mul [Fintype m] [DecidableEq m] (f g : (m → R) →ₗ[R] m → R) :
    LinearMap.toMatrix' (f * g) = LinearMap.toMatrix' f * LinearMap.toMatrix' g

{R : Type u_1}
[CommSemiring R]
{m : Type u_4}
[Fintype m]
[DecidableEq m]
(f g : (m → R) →ₗ[R] m → R)


lemma Module.support_subset_of_surjective (hf : Function.Surjective f) :
    Module.support R N ⊆ Module.support R M

{R : Type u_1}
{M : Type u_2}
[CommRing R]
[AddCommGroup M]
[Module R M]
{N : Type u_3}
[AddCommGroup N]
[Module R N]
(f : M →ₗ[R] N)
(hf : Function.Surjective ⇑f)


@[to_additive vadd_filter.instNeBot]
lemma smul_filter.instNeBot [NeBot f] : NeBot (a • f)

{α : Type u_2}
{β : Type u_3}
[VAdd α β]
{f : Filter β}
{a : α}
[f.NeBot]


/-- Transfer `Algebra.IsSeparable` across an `AlgEquiv`. -/
theorem AlgEquiv.isSeparable [Algebra.IsSeparable F K] : Algebra.IsSeparable F E

{F : Type u_1}
{K : Type u_2}
[CommRing F]
[Ring K]
[Algebra F K]
{E : Type u_3}
[Ring E]
[Algebra F E]
(e : K ≃ₐ[F] E)
[Algebra.IsSeparable F K]


/-- A right homology data for a short complex `S` consists of morphisms `p : S.X₂ ⟶ Q` and
`ι : H ⟶ Q` such that `p` identifies `Q` to the kernel of `f : S.X₁ ⟶ S.X₂`,
and that `ι` identifies `H` to the kernel of the induced map `g' : Q ⟶ S.X₃` -/
structure RightHomologyData where
  /-- a choice of cokernel of `S.f : S.X₁ ⟶ S.X₂`-/
  Q : C
  /-- a choice of kernel of the induced morphism `S.g' : S.Q ⟶ X₃`-/
  H : C
  /-- the projection from `S.X₂` -/
  p : S.X₂ ⟶ Q
  /-- the inclusion of the (right) homology in the chosen cokernel of `S.f` -/
  ι : H ⟶ Q
  /-- the cokernel condition for `p` -/
  wp : S.f ≫ p = 0
  /-- `p : S.X₂ ⟶ Q` is a cokernel of `S.f : S.X₁ ⟶ S.X₂` -/
  hp : IsColimit (CokernelCofork.ofπ p wp)
  /-- the kernel condition for `ι` -/
  wι : ι ≫ hp.desc (CokernelCofork.ofπ _ S.zero) = 0
  /-- `ι : H ⟶ Q` is a kernel of `S.g' : Q ⟶ S.X₃` -/
  hι : IsLimit (KernelFork.ofι ι wι)

CategoryTheory.CategoryStruct.comp self.ι (self.hp.desc (CategoryTheory.Limits.CokernelCofork.ofπ S.g ⋯)) = 0


@[simp]
theorem lift_mul (a b : Ordinal.{v}) : lift.{u} (a * b) = lift.{u} a * lift.{u} b

Ordinal.lift.{u, v} (a * b) = Ordinal.lift.{u, v} a * Ordinal.lift.{u, v} b


theorem exists_pos_measure_of_cover [Countable ι] {U : ι → Set α} (hU : ⋃ i, U i = univ)
    (hμ : μ ≠ 0) : ∃ i, 0 < μ (U i)

{α : Type u_1}
{ι : Type u_4}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[Countable ι]
{U : ι → Set α}
(hU : ⋃ i, U i = Set.univ)
(hμ : μ ≠ 0)


theorem eq_true_of_and_eq_true_left {a b : Prop} (h : (a ∧ b) = True) : a = True


/-- A function is continuous if and only if its composition with a partial homeomorphism
on the left is continuous and its image is contained in the source. -/
theorem continuous_iff_continuous_comp_left {f : Z → X} (h : f ⁻¹' e.source = univ) :
    Continuous f ↔ Continuous (e ∘ f)

{X : Type u_1}
{Y : Type u_3}
{Z : Type u_5}
[TopologicalSpace X]
[TopologicalSpace Y]
[TopologicalSpace Z]
(e : PartialHomeomorph X Y)
{f : Z → X}
(h : f ⁻¹' e.source = Set.univ)


@[simp]
theorem support_neg (a : FreeAbelianGroup X) : support (-a) = support a


@[simp]
theorem L_apply : (𝑳 I g) h = g * h

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{H : Type u_2}
[TopologicalSpace H]
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
(I : ModelWithCorners 𝕜 E H)
{G : Type u_4}
[Mul G]
[TopologicalSpace G]
[ChartedSpace H G]
[SmoothMul I G]
(g h : G)


theorem expand_card {p : ℕ} [Fact p.Prime] (f : Polynomial (ZMod p)) :
    expand (ZMod p) p f = f ^ p

{p : ℕ}
[Fact (Nat.Prime p)]
(f : (ZMod p)[X])

(Polynomial.expand (ZMod p) p) f = f ^ p


theorem fixInduction'_fwd {C : α → Sort*} {f : α →. β ⊕ α} {b : β} {a a' : α} (h : b ∈ f.fix a)
    (h' : b ∈ f.fix a') (fa : Sum.inr a' ∈ f a)
    (hbase : ∀ a_final : α, Sum.inl b ∈ f a_final → C a_final)
    (hind : ∀ a₀ a₁ : α, b ∈ f.fix a₁ → Sum.inr a₁ ∈ f a₀ → C a₁ → C a₀) :
    @fixInduction' _ _ C _ _ _ h hbase hind = hind a a' h' fa (fixInduction' h' hbase hind)

{f : α →. β ⊕ α}

(hbase : (a_final : α) → Sum.inl b ∈ f a_final → C a_final)

(hind : (a₀ a₁ : α) → b ∈ f.fix a₁ → Sum.inr a₁ ∈ f a₀ → C a₁ → C a₀)

PFun.fixInduction' h hbase hind = hind a a' h' fa (PFun.fixInduction' h' hbase hind)


/-- Right multiplication in a ring is an additive monoid morphism. -/
theorem isAddMonoidHom_mul_right {γ : Type*} [NonUnitalNonAssocSemiring γ] (x : γ) :
    IsAddMonoidHom fun y : γ => y * x

{γ : Type u_1}
[NonUnitalNonAssocSemiring γ]
(x : γ)


lemma prod_ne_zero_iff : ∏ x ∈ s, f x ≠ 0 ↔ ∀ a ∈ s, f a ≠ 0

{ι : Type u_1}
{M₀ : Type u_4}
[CommMonoidWithZero M₀]
{f : ι → M₀}
{s : Finset ι}
[Nontrivial M₀]
[NoZeroDivisors M₀]


theorem tendsto_pow_atTop_nhds_zero_of_abs_lt_one {r : ℝ} (h : |r| < 1) :
    Tendsto (fun n : ℕ ↦ r ^ n) atTop (𝓝 0)

Filter.Tendsto (fun n => r ^ n) Filter.atTop (𝓝 0)


@[simp] lemma toSubspace_apply (l : Line (η → α) ι) (a ie) :
    ⇑l.toSubspace a ie = l a ie.1 ie.2

{η : Type u_1}
{α : Type u_2}
{ι : Type u_3}
(l : Combinatorics.Line (η → α) ι)
(a : η → α)
(ie : ι × η)

↑l.toSubspace a ie = (fun x i => (l.idxFun i).getD x) a ie.1 ie.2


/-- A point in a collinear set of points lies in the affine span of any two distinct points of
that set. -/
theorem Collinear.mem_affineSpan_of_mem_of_ne {s : Set P} (h : Collinear k s) {p₁ p₂ p₃ : P}
    (hp₁ : p₁ ∈ s) (hp₂ : p₂ ∈ s) (hp₃ : p₃ ∈ s) (hp₁p₂ : p₁ ≠ p₂) : p₃ ∈ line[k, p₁, p₂]

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[DivisionRing k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
{s : Set P}
(h : Collinear k s)
{p₁ p₂ p₃ : P}
(hp₁ : p₁ ∈ s)
(hp₂ : p₂ ∈ s)
(hp₃ : p₃ ∈ s)
(hp₁p₂ : p₁ ≠ p₂)


lemma LSeriesHasSum.sub {f g : ℕ → ℂ} {s a b : ℂ} (hf : LSeriesHasSum f s a)
    (hg : LSeriesHasSum g s b) :
    LSeriesHasSum (f - g) s (a - b)


lemma closure_upperClosure_comm_pi (hs : BddBelow s) :
    closure (upperClosure s : Set (ι → ℝ)) = upperClosure (closure s)

{ι : Type u_2}
[Finite ι]
{s : Set (ι → ℝ)}
(hs : BddBelow s)

closure ↑(upperClosure s) = ↑(upperClosure (closure s))


theorem interior_union_isClosed_of_interior_empty (h₁ : IsClosed s)
    (h₂ : interior t = ∅) : interior (s ∪ t) = interior s

{X : Type u}
{s t : Set X}
[TopologicalSpace X]
(h₁ : IsClosed s)
(h₂ : interior t = ∅)


theorem card_perms_of_finset : ∀ s : Finset α, (permsOfFinset s).card = s.card !

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


@[reassoc (attr := simp)]
theorem limMap_π {F G : J ⥤ C} [HasLimit F] [HasLimit G] (α : F ⟶ G) (j : J) :
    limMap α ≫ limit.π G j = limit.π F j ≫ α.app j

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u}
[CategoryTheory.Category.{v, u} C]
{F G : J ⥤ C}
[CategoryTheory.Limits.HasLimit F]
[CategoryTheory.Limits.HasLimit G]
(α : F ⟶ G)
(j : J)

CategoryTheory.Limits.limMap α ≫ CategoryTheory.Limits.limit.π G j = CategoryTheory.Limits.limit.π F j ≫ α.app j


theorem Integrable.integral_prod_left ⦃f : α × β → E⦄ (hf : Integrable f (μ.prod ν)) :
    Integrable (fun x => ∫ y, f (x, y) ∂ν) μ

⦃f : α × β → E⦄

(hf : MeasureTheory.Integrable f (μ.prod ν))

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


lemma ε_app (X₁ : C₁) :
    (ε adj L₁ W₁ L₂ G' F').app (L₁.obj X₁) =
      L₁.map (adj.unit.app X₁) ≫ (CatCommSq.iso F L₂ L₁ F').hom.app (G.obj X₁) ≫
        F'.map ((CatCommSq.iso G L₁ L₂ G').hom.app X₁)

(W₁ : CategoryTheory.MorphismProperty C₁)

(CategoryTheory.Adjunction.Localization.ε adj L₁ W₁ L₂ G' F').app (L₁.obj X₁) =
  CategoryTheory.CategoryStruct.comp (L₁.map (adj.unit.app X₁))
    (CategoryTheory.CategoryStruct.comp ((CategoryTheory.CatCommSq.iso F L₂ L₁ F').hom.app (G.obj X₁))
      (F'.map ((CategoryTheory.CatCommSq.iso G L₁ L₂ G').hom.app X₁)))


/-- `-2` is a square modulo an odd prime `p` iff `p` is congruent to `1` or `3` mod `8`. -/
theorem exists_sq_eq_neg_two_iff : IsSquare (-2 : ZMod p) ↔ p % 8 = 1 ∨ p % 8 = 3

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


/-- A module object for a monoid object, all internal to some monoidal category. -/
structure Mod_ (A : Mon_ C) where
  X : C
  act : A.X ⊗ X ⟶ X
  one_act : (A.one ▷ X) ≫ act = (λ_ X).hom := by aesop_cat
  assoc : (A.mul ▷ X) ≫ act = (α_ A.X A.X X).hom ≫ (A.X ◁ act) ≫ act := by aesop_cat

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.MonoidalCategory C]
{A : Mon_ C}
(self : Mod_ A)

A.mul ▷ self.X ≫ self.act = (α_ A.X A.X self.X).hom ≫ A.X ◁ self.act ≫ self.act


theorem sinh_mul_I : sinh (x * I) = sin x * I

Complex.sinh (x * Complex.I) = Complex.sin x * Complex.I


theorem cobounded_eq_aux :
    @cobounded _ (Bornology.induced <| addEquiv 𝕜 A) = cobounded (Unitization 𝕜 A)

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

Bornology.cobounded (Unitization 𝕜 A) = Bornology.cobounded (Unitization 𝕜 A)


theorem HasDerivWithinAt.cexp (hf : HasDerivWithinAt f f' s x) :
    HasDerivWithinAt (fun x => Complex.exp (f x)) (Complex.exp (f x) * f') s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
[NormedAlgebra 𝕜 ℂ]
{f : 𝕜 → ℂ}
{f' : ℂ}
{x : 𝕜}
{s : Set 𝕜}
(hf : HasDerivWithinAt f f' s x)


theorem WCovBy.Icc_eq (h : a ⩿ b) : Icc a b = {a, b}

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


theorem inner_def (f g : α →₂[μ] E) : ⟪f, g⟫ = ∫ a : α, ⟪f a, g a⟫ ∂μ

{α : Type u_1}
{E : Type u_2}
{𝕜 : Type u_4}
[RCLike 𝕜]
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
(f g : ↥(MeasureTheory.Lp E 2 μ))

⟪f, g⟫_𝕜 = ∫ (a : α), ⟪↑↑f a, ↑↑g a⟫_𝕜 ∂μ


theorem constant_on {f : α → E} {s : Set α} (hf : (f '' s).Subsingleton) :
    eVariationOn f s = 0

{α : Type u_1}
[LinearOrder α]
{E : Type u_2}
[PseudoEMetricSpace E]
{f : α → E}
{s : Set α}
(hf : (f '' s).Subsingleton)


theorem ofPowerSeries_apply (x : PowerSeries R) :
    ofPowerSeries Γ R x =
      HahnSeries.embDomain
        ⟨⟨((↑) : ℕ → Γ), Nat.strictMono_cast.injective⟩, by
          simp only [Function.Embedding.coeFn_mk]
          exact Nat.cast_le⟩
        (toPowerSeries.symm x)

{Γ : Type u_1}
{R : Type u_2}
[Semiring R]
[StrictOrderedSemiring Γ]
(x : PowerSeries R)

(HahnSeries.ofPowerSeries Γ R) x =
  HahnSeries.embDomain { toFun := Nat.cast, inj' := ⋯, map_rel_iff' := ⋯ } (HahnSeries.toPowerSeries.symm x)


theorem isClosedMap_ofDual : IsClosedMap (ofDual : Xᵒᵈ → X)


@[simp]
theorem length_join (L : List (List α)) : length (join L) = sum (map length L)

L.join.length = (List.map List.length L).sum


/-- Any injection from a set `s` in a fintype `α` to a finset `t` of the same cardinality as `α`
can be extended to a bijection between `α` and `t`. -/
theorem Set.MapsTo.exists_equiv_extend_of_card_eq [Fintype α] {t : Finset β}
    (hαt : Fintype.card α = t.card) {s : Set α} {f : α → β} (hfst : s.MapsTo f t)
    (hfs : Set.InjOn f s) : ∃ g : α ≃ t, ∀ i ∈ s, (g i : β) = f i

{α : Type u_1}
{β : Type u_2}
[Fintype α]
{t : Finset β}
(hαt : Fintype.card α = t.card)
{s : Set α}
{f : α → β}
(hfst : Set.MapsTo f s ↑t)
(hfs : Set.InjOn f s)


@[to_additive add_prehaar_le_addIndex]
theorem prehaar_le_index (K₀ : PositiveCompacts G) {U : Set G} (K : Compacts G)
    (hU : (interior U).Nonempty) : prehaar (K₀ : Set G) U K ≤ index (K : Set G) K₀

(K₀ : TopologicalSpace.PositiveCompacts G)

MeasureTheory.Measure.haar.addPrehaar (↑K₀) U K ≤ ↑(MeasureTheory.Measure.haar.addIndex ↑K ↑K₀)


@[simp]
theorem eraseNone_image_some [DecidableEq (Option α)] (s : Finset α) :
    eraseNone (s.image some) = s

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

Finset.eraseNone (Finset.image some s) = s


@[simp]
theorem coprime_one {n : ℕ+} : n.Coprime 1


theorem Ioi_union_left : Ioi a ∪ {a} = Ici a


theorem setOf_isOpen (hf : Inducing f) :
    {s : Set X | IsOpen s} = preimage f '' {t | IsOpen t}

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

{s | IsOpen s} = Set.preimage f '' {t | IsOpen t}


theorem componentComplMk_eq_of_adj (G : SimpleGraph V) {v w : V} (vK : v ∉ K) (wK : w ∉ K)
    (a : G.Adj v w) : G.componentComplMk vK = G.componentComplMk wK

{V : Type u}
{K : Set V}
(G : SimpleGraph V)
{v w : V}
(vK : v ∉ K)
(wK : w ∉ K)
(a : G.Adj v w)


theorem compProd_eq_tsum_compProd (κ : Kernel α β) [IsSFiniteKernel κ] (η : Kernel (α × β) γ)
    [IsSFiniteKernel η] (a : α) (hs : MeasurableSet s) :
    (κ ⊗ₖ η) a s = ∑' (n : ℕ) (m : ℕ), (seq κ n ⊗ₖ seq η m) a s

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

((κ.compProd η) a) s = ∑' (n : ℕ) (m : ℕ), (((κ.seq n).compProd (η.seq m)) a) s


@[simp] theorem replace_nil [BEq α] : ([] : List α).replace a b = []


protected theorem isCountablySpanning (h : μ.FiniteSpanningSetsIn C) : IsCountablySpanning C

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{C : Set (Set α)}
(h : μ.FiniteSpanningSetsIn C)


@[simp]
theorem DifferentiableAt.log (hf : DifferentiableAt ℝ f x) (hx : f x ≠ 0) :
    DifferentiableAt ℝ (fun x => log (f x)) x

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : E → ℝ}
{x : E}
(hf : DifferentiableAt ℝ f x)
(hx : f x ≠ 0)

DifferentiableAt ℝ (fun x => Real.log (f x)) x


/-- **Divergence of the Harmonic Series** -/
theorem tendsto_sum_range_one_div_nat_succ_atTop :
    Tendsto (fun n => ∑ i ∈ Finset.range n, (1 / (i + 1) : ℝ)) atTop atTop

Filter.Tendsto (fun n => ∑ i ∈ Finset.range n, 1 / (↑i + 1)) Filter.atTop Filter.atTop


@[to_additive eventually_cobounded_le_norm]
lemma eventually_cobounded_le_norm' (a : ℝ) : ∀ᶠ x in cobounded E, a ≤ ‖x‖

{E : Type u_3}
[SeminormedGroup E]
(a : ℝ)

∀ᶠ (x : E) in Bornology.cobounded E, a ≤ ‖x‖


/-- The isomorphism obtained from an isomorphism in the opposite category. -/
@[simps]
def unop {X Y : Cᵒᵖ} (f : X ≅ Y) : Y.unop ≅ X.unop

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


/-- The Grothendieck construction applied to a functor to `Type`
(thought of as a functor to `Cat` by realising a type as a discrete category)
is the same as the 'category of elements' construction.
-/
-- See porting note on grothendieckTypeToCatInverse.
-- We just want to turn off grothendieckTypeToCat_inverse_map_fiber_down_down,
-- so have to list the complement here for `@[simps]`.
@[simps! functor_obj_fst functor_obj_snd functor_map_coe inverse_obj_base inverse_obj_fiber_as
  inverse_map_base unitIso_hom_app_base unitIso_hom_app_fiber unitIso_inv_app_base
  unitIso_inv_app_fiber counitIso_hom_app_coe counitIso_inv_app_coe]
def grothendieckTypeToCat : Grothendieck (G ⋙ typeToCat) ≌ G.Elements

{C : Type u_1}
[CategoryTheory.Category.{u_3, u_1} C]
(G : CategoryTheory.Functor C (Type w))
(X : G.Elements)

↑((CategoryTheory.Grothendieck.grothendieckTypeToCat G).counitIso.inv.app X) = CategoryTheory.CategoryStruct.id X.fst


/-- The functor `HomologicalComplex C c ⥤ ShortComplex C` which sends a homological
complex `K` to the short complex `K.X i ⟶ K.X j ⟶ K.X k` for arbitrary indices `i`, `j` and `k`. -/
@[simps]
def shortComplexFunctor' (i j k : ι) : HomologicalComplex C c ⥤ ShortComplex C

((HomologicalComplex.shortComplexFunctor' C c i j k).obj K).g = K.d j k


@[to_additive]
theorem eq' {a b : α} : (mk a : α ⧸ s) = mk b ↔ a⁻¹ * b ∈ s

{α : Type u_1}
[AddGroup α]
{s : AddSubgroup α}
{a b : α}


theorem ext_iff {f g : M ≃[L] N} : f = g ↔ ∀ x, f x = g x

{L : FirstOrder.Language}
{M : Type w}
{N : Type w'}
[L.Structure M]
[L.Structure N]
{f g : L.Equiv M N}


@[to_additive]
theorem one {U : Set G} : U ∈ B → (1 : G) ∈ U

{G : Type u}
[Group G]
{B : GroupFilterBasis G}
{U : Set G}


@[simp]
lemma rightUnitor_inv_app (F : J ⥤ C) (j : J) :
    (ρ_ F).inv.app j = (ρ_ (F.obj j)).inv

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

(CategoryTheory.MonoidalCategory.rightUnitor F).inv.app j = (CategoryTheory.MonoidalCategory.rightUnitor (F.obj j)).inv


theorem eq_of_degree_sub_lt_of_eval_finset_eq (degree_fg_lt : (f - g).degree < s.card)
    (eval_fg : ∀ x ∈ s, f.eval x = g.eval x) : f = g

(degree_fg_lt : (f - g).degree < ↑s.card)

(eval_fg : ∀ x ∈ s, Polynomial.eval x f = Polynomial.eval x g)


protected theorem div_self (h0 : a ≠ 0) (hI : a ≠ ∞) : a / a = 1


@[simp]
theorem inf_snd (c d : Concept α β r) : (c ⊓ d).snd = intentClosure r (c.fst ∩ d.fst)

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

(c ⊓ d).toProd.2 = intentClosure r (c.toProd.1 ∩ d.toProd.1)


@[to_additive]
theorem mulTSupport_extend_one_subset :
    mulTSupport (g.extend f 1) ⊆ g '' mulTSupport f

{α : Type u_2}
{α' : Type u_3}
{β : Type u_4}
[TopologicalSpace α]
[TopologicalSpace α']
[One β]
{f : α → β}
[T2Space α']
(hf : HasCompactMulSupport f)
{g : α → α'}
(cont : Continuous g)

mulTSupport (Function.extend g f 1) ⊆ g '' mulTSupport f


@[simp]
theorem coe_codRestrict_apply (f : M₁ →SL[σ₁₂] M₂) (p : Submodule R₂ M₂) (h : ∀ x, f x ∈ p) (x) :
    (f.codRestrict p h x : M₂) = f x

{R₁ : Type u_1}
{R₂ : Type u_2}
[Semiring R₁]
[Semiring R₂]
{σ₁₂ : R₁ →+* R₂}
{M₁ : Type u_4}
[TopologicalSpace M₁]
[AddCommMonoid M₁]
{M₂ : Type u_6}
[TopologicalSpace M₂]
[AddCommMonoid M₂]
[Module R₁ M₁]
[Module R₂ M₂]
(f : M₁ →SL[σ₁₂] M₂)
(p : Submodule R₂ M₂)
(h : ∀ (x : M₁), f x ∈ p)
(x : M₁)


/-- In a cowell-founded lattice, any element is the infimum of finitely many inf-irreducible
elements. This is the order-theoretic analogue of prime factorisation. -/
theorem exists_infIrred_decomposition (a : α) :
    ∃ s : Finset α, s.inf id = a ∧ ∀ ⦃b⦄, b ∈ s → InfIrred b

{α : Type u_2}
[SemilatticeInf α]
[OrderTop α]
[WellFoundedGT α]
(a : α)

∃ s, s.inf id = a ∧ ∀ ⦃b : α⦄, b ∈ s → InfIrred b


/-- A constructor for `PosSMulReflectLT` requiring you to prove `a • b₁ < a • b₂ → b₁ < b₂` only
when `0 < a`-/
lemma PosSMulReflectLT.of_pos (h₀ : ∀ a : α, 0 < a → ∀ b₁ b₂ : β, a • b₁ < a • b₂ → b₁ < b₂) :
    PosSMulReflectLT α β

(h₀ : ∀ (a : α), 0 < a → ∀ (b₁ b₂ : β), a • b₁ < a • b₂ → b₁ < b₂)


protected theorem Nat.le_refl (n : Nat) : LE.le n n


theorem frontier_cthickening_disjoint (A : Set α) :
    Pairwise (Disjoint on fun r : ℝ≥0 => frontier (cthickening r A))

{α : Type u}
[PseudoEMetricSpace α]
(A : Set α)

Pairwise (Disjoint on fun r => frontier (Metric.cthickening (↑r) A))


/-- A topological space is said to be a *normal space* if any two disjoint closed sets
have disjoint open neighborhoods. -/
class NormalSpace (X : Type u) [TopologicalSpace X] : Prop where
  /-- Two disjoint sets in a normal space admit disjoint neighbourhoods. -/
  normal : ∀ s t : Set X, IsClosed s → IsClosed t → Disjoint s t → SeparatedNhds s t

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


theorem mem_closure_iff_nhds_ne_bot : x ∈ closure s ↔ 𝓝 x ⊓ 𝓟 s ≠ ⊥

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


/-- A set is eventually carried into any open neighbourhood of its ω-limit:
if `c` is a compact set such that `closure {ϕ t x | t ∈ v, x ∈ s} ⊆ c` for some `v ∈ f`
and `n` is an open neighbourhood of `ω f ϕ s`, then for some `u ∈ f` we have
`closure {ϕ t x | t ∈ u, x ∈ s} ⊆ n`. -/
theorem eventually_closure_subset_of_isCompact_absorbing_of_isOpen_of_omegaLimit_subset' {c : Set β}
    (hc₁ : IsCompact c) (hc₂ : ∃ v ∈ f, closure (image2 ϕ v s) ⊆ c) {n : Set β} (hn₁ : IsOpen n)
    (hn₂ : ω f ϕ s ⊆ n) : ∃ u ∈ f, closure (image2 ϕ u s) ⊆ n

(ϕ : τ → α → β)

(hc₂ : ∃ v ∈ f, closure (Set.image2 ϕ v s) ⊆ c)


/-- A local diffeomorphism is a local homeomorphism. -/
theorem IsLocalDiffeomorph.isLocalHomeomorph (hf : IsLocalDiffeomorph I J n f) :
    IsLocalHomeomorph f

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


theorem setToL1S_eq_setToSimpleFunc (T : Set α → E →L[ℝ] F) (f : α →₁ₛ[μ] E) :
    setToL1S T f = (toSimpleFunc f).setToSimpleFunc T

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

MeasureTheory.L1.SimpleFunc.setToL1S T f =
  MeasureTheory.SimpleFunc.setToSimpleFunc T (MeasureTheory.Lp.simpleFunc.toSimpleFunc f)


theorem card_fintypeInsertOfNotMem {a : α} (s : Set α) [Fintype s] (h : a ∉ s) :
    @Fintype.card _ (fintypeInsertOfNotMem s h) = Fintype.card s + 1

{α : Type u}
{a : α}
(s : Set α)
[Fintype ↑s]
(h : a ∉ s)

Fintype.card ↑(insert a s) = Fintype.card ↑s + 1


theorem IsNilpotent.isUnit_one_sub [Ring R] {r : R} (hnil : IsNilpotent r) : IsUnit (1 - r)

{R : Type u_1}
[Ring R]
{r : R}
(hnil : IsNilpotent r)


lemma toList_injective : Function.Injective (RelSeries.toList (r := r))


@[simp]
lemma prodEquiv_apply_snd (x : (forget C).obj (X₁ ⨯ X₂)) :
    (prodEquiv X₁ X₂ x).snd = (Limits.prod.snd : X₁ ⨯ X₂ ⟶ X₂) x

[CategoryTheory.Limits.PreservesLimit (CategoryTheory.Limits.pair X₁ X₂) (CategoryTheory.forget C)]

(x : (CategoryTheory.forget C).obj (X₁ ⨯ X₂))

((CategoryTheory.Limits.Concrete.prodEquiv X₁ X₂) x).2 = CategoryTheory.Limits.prod.snd x


theorem coe_mk (a h) : (@mk α p a h : α) = a

{α : Sort u_1}
{p : α → Prop}
(a : α)
(h : p a)


theorem logb_le_iff_le_rpow_of_base_lt_one (hx : 0 < x) : logb b x ≤ y ↔ b ^ y ≤ x


@[deprecated DifferentiableAt.sub_iff_right (since := "2024-07-11")]
theorem differentiableAt_const_sub_iff (c : F) :
    DifferentiableAt 𝕜 (fun y => c - f y) x ↔ DifferentiableAt 𝕜 f x

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


@[simp]
theorem map_formula (f : M ↪ₑ[L] N) {α : Type*} (φ : L.Formula α) (x : α → M) :
    φ.Realize (f ∘ x) ↔ φ.Realize x

{L : FirstOrder.Language}
{M : Type u_1}
{N : Type u_2}
[L.Structure M]
[L.Structure N]
(f : M ↪ₑ[L] N)
{α : Type u_5}
(φ : L.Formula α)
(x : α → M)


nonrec theorem HasDerivAtFilter.isBigO_sub_rev (hf : HasDerivAtFilter f f' x L) (hf' : f' ≠ 0) :
    (fun x' => x' - x) =O[L] fun x' => f x' - f x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : 𝕜 → F}
{f' : F}
{x : 𝕜}
{L : Filter 𝕜}
(hf : HasDerivAtFilter f f' x L)
(hf' : f' ≠ 0)


nonrec theorem IsLocalMinOn.congr {f g : α → β} {a : α} (h : IsLocalMinOn f s a)
    (heq : f =ᶠ[𝓝[s] a] g) (hmem : a ∈ s) : IsLocalMinOn g s a

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[Preorder β]
{s : Set α}
{f g : α → β}
{a : α}
(h : IsLocalMinOn f s a)
(heq : f =ᶠ[𝓝[s] a] g)
(hmem : a ∈ s)


@[simp]
theorem singleMapHomologicalComplex_inv_app_ne {i j : ι} (h : i ≠ j) (X : W₁) :
    ((singleMapHomologicalComplex F c j).inv.app X).f i = 0

((HomologicalComplex.singleMapHomologicalComplex F c j).inv.app X).f i = 0


/-- Any two algebras whose quadratic forms differ by a bilinear form are isomorphic as modules.

This is $\bar \lambda_B$ from [bourbaki2007][] $9 Proposition 3. -/
@[simps apply]
def changeFormEquiv : CliffordAlgebra Q ≃ₗ[R] CliffordAlgebra Q'

(h : LinearMap.BilinMap.toQuadraticMap B = Q' - Q)

(CliffordAlgebra.changeFormEquiv h) a = (CliffordAlgebra.changeForm h) a


@[simp]
theorem bind_assoc (s : Seq1 α) (f : α → Seq1 β) (g : β → Seq1 γ) :
    bind (bind s f) g = bind s fun x : α => bind (f x) g

{α : Type u}
{β : Type v}
{γ : Type w}
(s : Stream'.Seq1 α)
(f : α → Stream'.Seq1 β)
(g : β → Stream'.Seq1 γ)

(s.bind f).bind g = s.bind fun x => (f x).bind g


/-- This cannot be an instance as there is no way to infer `σ₁₂` and `σ₂₃`. -/
theorem comp [RingHomCompTriple σ₁₂ σ₂₃ σ₁₃] [RingHomSurjective σ₁₂] [RingHomSurjective σ₂₃] :
    RingHomSurjective σ₁₃

{R₁ : Type u_1}
{R₂ : Type u_2}
{R₃ : Type u_3}
[Semiring R₁]
[Semiring R₂]
[Semiring R₃]
{σ₁₂ : R₁ →+* R₂}
{σ₂₃ : R₂ →+* R₃}
{σ₁₃ : R₁ →+* R₃}
[RingHomCompTriple σ₁₂ σ₂₃ σ₁₃]
[RingHomSurjective σ₁₂]
[RingHomSurjective σ₂₃]


lemma image_subset_diffs_right : a ∈ s → t.image (a \ ·) ⊆ s \\ t

{α : Type u_2}
[DecidableEq α]
[GeneralizedBooleanAlgebra α]
{s t : Finset α}
{a : α}

a ∈ s → Finset.image (fun x => a \ x) t ⊆ s.diffs t


theorem IsPreconnected.Iio_csSup_subset {s : Set α} (hs : IsPreconnected s) (hb : ¬BddBelow s)
    (ha : BddAbove s) : Iio (sSup s) ⊆ s

{α : Type u}
[ConditionallyCompleteLinearOrder α]
[TopologicalSpace α]
[OrderTopology α]
{s : Set α}
(hs : IsPreconnected s)
(hb : ¬BddBelow s)
(ha : BddAbove s)


@[simp]
theorem finrank_top : finrank R (⊤ : Submodule R M) = finrank R M

(R : Type u)
(M : Type v)
[Ring R]
[AddCommGroup M]
[Module R M]

FiniteDimensional.finrank R ↥⊤ = FiniteDimensional.finrank R M


lemma Monotone.isCoboundedUnder_le_of_isCobounded {f : R → S} (f_incr : Monotone f)
    [NeBot F] (cobdd : IsCobounded (· ≤ ·) F) :
    F.IsCoboundedUnder (· ≤ ·) f

(cobdd : Filter.IsCobounded (fun x x_1 => x ≤ x_1) F)

Filter.IsCoboundedUnder (fun x x_1 => x ≤ x_1) F f


lemma isIso_f' (hS : S.Exact) (h : S.LeftHomologyData) [Mono S.f] :
    IsIso h.f'

{C : Type u_1}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Preadditive C]
{S : CategoryTheory.ShortComplex C}
[CategoryTheory.Balanced C]
(hS : S.Exact)
(h : S.LeftHomologyData)
[CategoryTheory.Mono S.f]


@[to_additive]
theorem mul_mem_cancel_right {x y : G} (h : x ∈ H) : y * x ∈ H ↔ y ∈ H

{G : Type u_1}
[Group G]
{S : Type u_6}
{H : S}
[SetLike S G]
[SubgroupClass S G]
{x y : G}
(h : x ∈ H)


theorem add_lf_add_right {y z : PGame} (h : y ⧏ z) (x) : y + x ⧏ z + x

{y z : SetTheory.PGame}
(h : y.LF z)
(x : SetTheory.PGame)


/-- A variation around the emetric characterization of Cauchy sequences -/
theorem cauchySeq_iff' [Nonempty β] [SemilatticeSup β] {u : β → α} :
    CauchySeq u ↔ ∀ ε > (0 : ℝ≥0∞), ∃ N, ∀ n ≥ N, edist (u n) (u N) < ε

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

CauchySeq u ↔ ∀ ε > 0, ∃ N, ∀ n ≥ N, edist (u n) (u N) < ε


theorem and_and_right : (a ∧ b) ∧ c ↔ (a ∧ c) ∧ b ∧ c


theorem hasMFDerivAt_iff_hasFDerivAt {f'} :
    HasMFDerivAt 𝓘(𝕜, E) 𝓘(𝕜, E') f x f' ↔ HasFDerivAt f f' x

{f' : TangentSpace 𝓘(𝕜, E) x →L[𝕜] TangentSpace 𝓘(𝕜, E') (f x)}


theorem eq_singletonSubgraph_iff_verts_eq (H : G.Subgraph) {v : V} :
    H = G.singletonSubgraph v ↔ H.verts = {v}

{V : Type u}
{G : SimpleGraph V}
(H : G.Subgraph)
{v : V}


@[simp]
theorem eLpNorm'_zero' (hq0_ne : q ≠ 0) (hμ : μ ≠ 0) : eLpNorm' (0 : α → F) q μ = 0

{α : Type u_1}
{F : Type u_3}
{m0 : MeasurableSpace α}
{q : ℝ}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup F]
(hq0_ne : q ≠ 0)
(hμ : μ ≠ 0)


@[simp]
theorem zsmul_hom [Preadditive C] {P Q : Karoubi C} (n : ℤ) (f : P ⟶ Q) : (n • f).f = n • f.f

{P Q : CategoryTheory.Idempotents.Karoubi C}


@[simp]
theorem _root_.NonUnitalAlgHom.coe_lmul_eq_mul : ⇑(NonUnitalAlgHom.lmul R A) = mul R A

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[NonUnitalSemiring A]
[Module R A]
[SMulCommClass R A A]
[IsScalarTower R A A]

⇑(NonUnitalAlgHom.lmul R A) = ⇑(LinearMap.mul R A)


lemma Subtype.nndist_eq {p : α → Prop} (x y : Subtype p) : nndist x y = nndist (x : α) y

{α : Type u_1}
[PseudoMetricSpace α]
{p : α → Prop}
(x y : Subtype p)


/-- The reification of the empty clause is `True`: `¬⟦⊥⟧_v ≡ True`. -/
theorem Clause.reify_zero : Clause.reify v Clause.nil True


private lemma upper_aux : a ∈ upperClosure ↑(s ∪ t) ↔ a ∈ upperClosure s ∨ a ∈ upperClosure t

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

a ∈ upperClosure ↑(s ∪ t) ↔ a ∈ upperClosure ↑s ∨ a ∈ upperClosure ↑t


@[to_additive]
theorem HasProd.div (hf : HasProd f a₁) (hg : HasProd g a₂) :
    HasProd (fun b ↦ f b / g b) (a₁ / a₂)

{α : Type u_1}
{β : Type u_2}
[AddCommGroup α]
[TopologicalSpace α]
[TopologicalAddGroup α]
{f g : β → α}
{a₁ a₂ : α}
(hf : HasSum f a₁)
(hg : HasSum g a₂)


{α : Type u}
[PartialOrder α]
[OrderTop α]
{a : α}

a = ⊤ ↔ ⊤ ≤ a


theorem univLE_iff_cardinal_le : UnivLE.{u, v} ↔ univ.{u, v+1} ≤ univ.{v, u+1}

UnivLE.{u, v} ↔ Cardinal.univ.{u, v + 1} ≤ Cardinal.univ.{v, u + 1}


/-- If `p` lifts and `(r : R)` then `r • p` lifts. -/
theorem smul_mem_lifts {p : S[X]} (r : R) (hp : p ∈ lifts (algebraMap R S)) :
    r • p ∈ lifts (algebraMap R S)

(hp : p ∈ Polynomial.lifts (algebraMap R S))

r • p ∈ Polynomial.lifts (algebraMap R S)


/-- Pullback a `Nontrivial` instance along a function sending `0` to `0` and `1` to `1`. -/
theorem pullback_nonzero [Zero M₀'] [One M₀'] (f : M₀' → M₀) (zero : f 0 = 0) (one : f 1 = 1) :
    Nontrivial M₀'

{M₀ : Type u_1}
{M₀' : Type u_2}
[MulZeroOneClass M₀]
[Nontrivial M₀]
[Zero M₀']
[One M₀']
(f : M₀' → M₀)
(zero : f 0 = 0)
(one : f 1 = 1)


@[simp]
theorem untrop_lt_iff [LT R] {x y : Tropical R} : untrop x < untrop y ↔ x < y

Tropical.untrop x < Tropical.untrop y ↔ x < y


theorem aleph'_pos {o : Ordinal} (ho : 0 < o) : 0 < aleph' o


/-- When `S₁.f`, `S₁.g`, `S₂.f` and `S₂.g` are all zero, the action on right homology of a
morphism `φ : S₁ ⟶ S₂` is given by the action `φ.τ₂` on the middle objects. -/
@[simps]
def ofZeros (φ : S₁ ⟶ S₂) (hf₁ : S₁.f = 0) (hg₁ : S₁.g = 0) (hf₂ : S₂.f = 0) (hg₂ : S₂.g = 0) :
    RightHomologyMapData φ (RightHomologyData.ofZeros S₁ hf₁ hg₁)
    (RightHomologyData.ofZeros S₂ hf₂ hg₂)

(CategoryTheory.ShortComplex.RightHomologyMapData.ofZeros φ hf₁ hg₁ hf₂ hg₂).φH = φ.τ₂


theorem Associated.eq_zero_iff [MonoidWithZero α] {a b : α} (h : a ~ᵤ b) : a = 0 ↔ b = 0

{α : Type u_1}
[MonoidWithZero α]
{a b : α}
(h : a ~ᵤ b)


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

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

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


@[ext]
lemma tensorObj₃'_ext {j : I} {A : C} (f g : tensorObj (tensorObj X₁ X₂) X₃ j ⟶ A)
    [H : HasGoodTensor₁₂Tensor X₁ X₂ X₃]
    (h : ∀ (i₁ i₂ i₃ : I) (h : i₁ + i₂ + i₃ = j),
      ιTensorObj₃' X₁ X₂ X₃ i₁ i₂ i₃ j h ≫ f = ιTensorObj₃' X₁ X₂ X₃ i₁ i₂ i₃ j h ≫ g) :
      f = g

{X₁ X₂ X₃ : CategoryTheory.GradedObject I C}

[(CategoryTheory.GradedObject.Monoidal.tensorObj X₁ X₂).HasTensor X₃]

(f g : CategoryTheory.GradedObject.Monoidal.tensorObj (CategoryTheory.GradedObject.Monoidal.tensorObj X₁ X₂) X₃ j ⟶ A)

(h :
  ∀ (i₁ i₂ i₃ : I) (h : i₁ + i₂ + i₃ = j),
    CategoryTheory.CategoryStruct.comp (CategoryTheory.GradedObject.Monoidal.ιTensorObj₃' X₁ X₂ X₃ i₁ i₂ i₃ j h) f =
      CategoryTheory.CategoryStruct.comp (CategoryTheory.GradedObject.Monoidal.ιTensorObj₃' X₁ X₂ X₃ i₁ i₂ i₃ j h) g)


theorem exists_of_mem_parallel {S : WSeq (Computation α)} {a} (h : a ∈ parallel S) :
    ∃ c ∈ S, a ∈ c

{α : Type u}
{S : Stream'.WSeq (Computation α)}
{a : α}
(h : a ∈ Computation.parallel S)


@[simp]
theorem mk'_one (m : M) : mk' f m (1 : S) = f m

{R : Type u_1}
[CommSemiring R]
(S : Submonoid R)
{M : Type u_2}
{M' : Type u_3}
[AddCommMonoid M]
[AddCommMonoid M']
[Module R M]
[Module R M']
(f : M →ₗ[R] M')
[IsLocalizedModule S f]
(m : M)


theorem liftPropWithinAt_indep_chart_target_aux {g : X → M'} {e : PartialHomeomorph X H} {x : X}
    {s : Set X} (xe : x ∈ e.source) (hf : f ∈ G'.maximalAtlas M') (xf : g x ∈ f.source)
    (hf' : f' ∈ G'.maximalAtlas M') (xf' : g x ∈ f'.source) (hgs : ContinuousWithinAt g s x) :
    P (f ∘ g ∘ e.symm) (e.symm ⁻¹' s) (e x) ↔ P (f' ∘ g ∘ e.symm) (e.symm ⁻¹' s) (e x)

(hf : f ∈ StructureGroupoid.maximalAtlas M' G')

(hf' : f' ∈ StructureGroupoid.maximalAtlas M' G')

P (↑f ∘ g ∘ ↑e.symm) (↑e.symm ⁻¹' s) (↑e x) ↔ P (↑f' ∘ g ∘ ↑e.symm) (↑e.symm ⁻¹' s) (↑e x)


@[simp]
theorem toAlternatingMap_smul (c : R') (f : M [⋀^ι]→L[A] N) :
    (c • f).toAlternatingMap = c • f.toAlternatingMap

{M : Type u_2}
{N : Type u_4}
{ι : Type u_6}
[AddCommMonoid M]
[TopologicalSpace M]
[AddCommMonoid N]
[TopologicalSpace N]
{R' : Type u_7}
{A : Type u_9}
[Monoid R']
[Semiring A]
[Module A M]
[Module A N]
[DistribMulAction R' N]
[ContinuousConstSMul R' N]
[SMulCommClass A R' N]
(c : R')
(f : M [⋀^ι]→L[A] N)


theorem ext_iff {e e' : P₁ ≃ᵃL[k] P₂} : e = e' ↔ ∀ x, e x = e' x

{k : Type u_1}
{P₁ : Type u_2}
{P₂ : Type u_3}
{V₁ : Type u_6}
{V₂ : Type u_7}
[Ring k]
[AddCommGroup V₁]
[Module k V₁]
[AddTorsor V₁ P₁]
[AddCommGroup V₂]
[Module k V₂]
[AddTorsor V₂ P₂]
[TopologicalSpace P₁]
[TopologicalSpace P₂]
{e e' : P₁ ≃ᵃL[k] P₂}


/-- Any simple object in a preadditive category is indecomposable. -/
theorem indecomposable_of_simple (X : C) [Simple X] : Indecomposable X


/-- **Strict inequality case of the Rearrangement Inequality**: Pointwise multiplication of
`f` and `g`, which antivary together, is strictly decreased by a permutation if and only if
`f ∘ σ` and `g` do not antivary together. Stated by permuting the entries of `f`. -/
theorem Antivary.sum_mul_lt_sum_comp_perm_mul_iff (hfg : Antivary f g) :
    ∑ i, f i * g i < ∑ i, f (σ i) * g i ↔ ¬Antivary (f ∘ σ) g

{ι : Type u_1}
{α : Type u_2}
[LinearOrderedRing α]
{σ : Equiv.Perm ι}
{f g : ι → α}
[Fintype ι]
(hfg : Antivary f g)

∑ i : ι, f i * g i < ∑ i : ι, f (σ i) * g i ↔ ¬Antivary (f ∘ ⇑σ) g


/-- The values before the squashed position stay the same. -/
theorem squashGCF_nth_of_lt {m : ℕ} (m_lt_n : m < n) :
    (squashGCF g (n + 1)).s.get? m = g.s.get? m

{K : Type u_1}
{n : ℕ}
{g : GenContFract K}
[DivisionRing K]
{m : ℕ}
(m_lt_n : m < n)

(g.squashGCF (n + 1)).s.get? m = g.s.get? m


{R : Type u}
[CommRing R]
{W' : WeierstrassCurve.Jacobian R}

W'.polynomialZ =
  MvPolynomial.C W'.a₁ * MvPolynomial.X x * MvPolynomial.X y +
      MvPolynomial.C (3 * W'.a₃) * MvPolynomial.X y * MvPolynomial.X z ^ 2 -
    (MvPolynomial.C (2 * W'.a₂) * MvPolynomial.X x ^ 2 * MvPolynomial.X z +
        MvPolynomial.C (4 * W'.a₄) * MvPolynomial.X x * MvPolynomial.X z ^ 3 +
      MvPolynomial.C (6 * W'.a₆) * MvPolynomial.X z ^ 5)


/-- The image under a semigroup hom of the subsemigroup generated by a set equals the subsemigroup
generated by the image of the set. -/
@[to_additive
      "The image under an `AddSemigroup` hom of the `AddSubsemigroup` generated by a set
      equals the `AddSubsemigroup` generated by the image of the set."]
theorem map_mclosure (f : M →ₙ* N) (s : Set M) : (closure s).map f = closure (f '' s)

{M : Type u_1}
{N : Type u_2}
[Mul M]
[Mul N]
(f : M →ₙ* N)
(s : Set M)

Subsemigroup.map f (Subsemigroup.closure s) = Subsemigroup.closure (⇑f '' s)


@[to_additive (attr := norm_cast, simp)]
theorem coe_list_prod (l : List S) : (l.prod : M) = (l.map (↑)).prod

{M : Type u_1}
{B : Type u_3}
[AddMonoid M]
[SetLike B M]
[AddSubmonoidClass B M]
{S : B}
(l : List ↥S)


/-- The inclusion of an empty language into any other language. -/
@[simps]
protected def ofIsEmpty [L.IsAlgebraic] [L.IsRelational] : L →ᴸ L'

(L : FirstOrder.Language)
(L' : FirstOrder.Language)
[L.IsAlgebraic]
[L.IsRelational]
(n : ℕ)
(a : L.Functions n)

(FirstOrder.Language.LHom.ofIsEmpty L L').onFunction a = ⋯.elim a


theorem coe_comp_continuousMap (f : SpectralMap β γ) (g : SpectralMap α β) :
    f ∘ g = (f : ContinuousMap β γ) ∘ (g : ContinuousMap α β)

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

⇑f ∘ ⇑g = ⇑↑f ∘ ⇑↑g


theorem commute_cast (a : α) (r : ℚ) : Commute a r

{α : Type u_3}
[DivisionRing α]
(a : α)
(r : ℚ)


/-- A natural transformation `L₁ ⟶ L₂` induces a functor `Comma L₂ R ⥤ Comma L₁ R`. -/
@[simps]
def mapLeft (l : L₁ ⟶ L₂) : Comma L₂ R ⥤ Comma L₁ R

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

∀ {X Y : CategoryTheory.Comma L₂ R} (f : X ⟶ Y), ((CategoryTheory.Comma.mapLeft R l).map f).right = f.right


theorem uniformity_basis_dist :
    (𝓤 α).HasBasis (fun ε : ℝ => 0 < ε) fun ε => { p : α × α | dist p.1 p.2 < ε }

(𝓤 α).HasBasis (fun ε => 0 < ε) fun ε => {p | dist p.1 p.2 < ε}


theorem foldl_loop_lt (f : α → Fin n → α) (x) (h : m < n) :
    foldl.loop n f x m = foldl.loop n f (f x ⟨m, h⟩) (m+1)

{α : Sort u_1}
{n m : Nat}
(f : α → Fin n → α)
(x : α)
(h : m < n)

Fin.foldl.loop n f x m = Fin.foldl.loop n f (f x ⟨m, h⟩) (m + 1)


theorem AntitoneOn.map_min (hf : AntitoneOn f s) (ha : a ∈ s) (hb : b ∈ s) : f (min a b) =
    max (f a) (f b)

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


protected
theorem «forall» {p : Interval α → Prop} : (∀ s, p s) ↔ p ⊥ ∧ ∀ s : NonemptyInterval α, p s

{α : Type u_1}
[LE α]
{p : Interval α → Prop}

(∀ (s : Interval α), p s) ↔ p ⊥ ∧ ∀ (s : NonemptyInterval α), p ↑s


protected theorem sq [Pow γ ℕ] [MeasurablePow γ ℕ] (h : IdentDistrib f g μ ν) :
    IdentDistrib (fun x => f x ^ 2) (fun x => g x ^ 2) μ ν

(h : ProbabilityTheory.IdentDistrib f g μ ν)

ProbabilityTheory.IdentDistrib (fun x => f x ^ 2) (fun x => g x ^ 2) μ ν


/-- If the product of `f i` over `i ∈ s` is not equal to `1`, then there is some `x ∈ s` such that
`f x ≠ 1`. -/
@[to_additive
      "If the product of `f i` over `i ∈ s` is not equal to `0`, then there is some `x ∈ s`
      such that `f x ≠ 0`."]
theorem exists_ne_one_of_finprod_mem_ne_one (h : ∏ᶠ i ∈ s, f i ≠ 1) : ∃ x ∈ s, f x ≠ 1

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


@[simp]
theorem prod_range_add_one_eq_factorial : ∀ n : ℕ, (∏ x ∈ range n, (x + 1)) = n !


theorem StrictMono.injective (hf : StrictMono f) : Injective f

{α : Type u}
{β : Type v}
[LinearOrder α]
[Preorder β]
{f : α → β}
(hf : StrictMono f)


theorem intCast_dvd (z : ℤ) (a : ℤ√d) : ↑z ∣ a ↔ z ∣ a.re ∧ z ∣ a.im


theorem realize_all_liftAt_one_self {n : ℕ} {φ : L.BoundedFormula α n} {v : α → M}
    {xs : Fin n → M} : (φ.liftAt 1 n).all.Realize v xs ↔ φ.Realize v xs

{L : FirstOrder.Language}
{M : Type w}
[L.Structure M]
{α : Type u'}
[Nonempty M]
{n : ℕ}
{φ : L.BoundedFormula α n}
{v : α → M}
{xs : Fin n → M}

(FirstOrder.Language.BoundedFormula.liftAt 1 n φ).all.Realize v xs ↔ φ.Realize v xs


/-- A product space `α × β` is equivalent to the space `Π i : Fin 2, γ i`, where
`γ = Fin.cons α (Fin.cons β finZeroElim)`. See also `piFinTwoEquiv` and
`finTwoArrowEquiv`. -/
@[simps! (config := .asFn)]
def prodEquivPiFinTwo (α β : Type u) : α × β ≃ ∀ i : Fin 2, ![α, β] i

⇑(prodEquivPiFinTwo α β) = fun p => Fin.cons p.1 (Fin.cons p.2 finZeroElim)


/-- The discriminant of a power basis. -/
theorem discr_powerBasis_eq_prod (e : Fin pb.dim ≃ (L →ₐ[K] E)) [Algebra.IsSeparable K L] :
    algebraMap K E (discr K pb.basis) =
      ∏ i : Fin pb.dim, ∏ j ∈ Ioi i, (e j pb.gen - e i pb.gen) ^ 2

(K : Type u)
{L : Type v}
(E : Type z)
[Field K]
[Field L]
[Field E]
[Algebra K L]
[Algebra K E]
[Module.Finite K L]
[IsAlgClosed E]
(pb : PowerBasis K L)
(e : Fin pb.dim ≃ (L →ₐ[K] E))
[Algebra.IsSeparable K L]

(algebraMap K E) (Algebra.discr K ⇑pb.basis) = ∏ i : Fin pb.dim, ∏ j ∈ Finset.Ioi i, ((e j) pb.gen - (e i) pb.gen) ^ 2


theorem Convex.lineMap_mem (h : Convex 𝕜 s) {x y : E} (hx : x ∈ s) (hy : y ∈ s) {t : 𝕜}
    (ht : t ∈ Icc 0 1) : AffineMap.lineMap x y t ∈ s

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedRing 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
{s : Set E}
(h : Convex 𝕜 s)
{x y : E}
(hx : x ∈ s)
(hy : y ∈ s)
{t : 𝕜}
(ht : t ∈ Set.Icc 0 1)


/-- The Löwenheim–Skolem Theorem: If `κ` is a cardinal greater than the cardinalities of `L`
and an infinite `L`-structure `M`, then there is an elementary embedding in the appropriate
direction between then `M` and a structure of cardinality `κ`. -/
theorem exists_elementaryEmbedding_card_eq (M : Type w') [L.Structure M] [iM : Infinite M]
    (κ : Cardinal.{w}) (h1 : ℵ₀ ≤ κ) (h2 : lift.{w} L.card ≤ Cardinal.lift.{max u v} κ) :
    ∃ N : Bundled L.Structure, (Nonempty (N ↪ₑ[L] M) ∨ Nonempty (M ↪ₑ[L] N)) ∧ #N = κ

(h2 : Cardinal.lift.{w, max u v} L.card ≤ Cardinal.lift.{max u v, w} κ)

∃ N, (Nonempty (↑N ↪ₑ[L] M) ∨ Nonempty (M ↪ₑ[L] ↑N)) ∧ #↑N = κ


@[simp]
theorem formPerm_apply_getLast (x : α) (xs : List α) :
    formPerm (x :: xs) ((x :: xs).getLast (cons_ne_nil x xs)) = x

{α : Type u_1}
[DecidableEq α]
(x : α)
(xs : List α)

(x :: xs).formPerm ((x :: xs).getLast ⋯) = x


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

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


theorem ringEquivOfRingEquiv_eq {j : R ≃+* P} (H : M.map j.toMonoidHom = T) (x) :
    ringEquivOfRingEquiv S Q j H ((algebraMap R S) x) = algebraMap P Q (j x)

{R : Type u_1}
[CommSemiring R]
{M : Submonoid R}
{S : Type u_2}
[CommSemiring S]
[Algebra R S]
{P : Type u_3}
[CommSemiring P]
[IsLocalization M S]
{T : Submonoid P}
{Q : Type u_4}
[CommSemiring Q]
[Algebra P Q]
[IsLocalization T Q]
{j : R ≃+* P}
(H : Submonoid.map j.toMonoidHom M = T)
(x : R)

(IsLocalization.ringEquivOfRingEquiv S Q j H) ((algebraMap R S) x) = (algebraMap P Q) (j x)


theorem ite_continuous' {p : Prop} [hp : Decidable p] (f g : α → β) (hf : Continuous' f)
    (hg : Continuous' g) : Continuous' fun x => if p then f x else g x

(hf : OmegaCompletePartialOrder.Continuous' f)

(hg : OmegaCompletePartialOrder.Continuous' g)

OmegaCompletePartialOrder.Continuous' fun x => if p then f x else g x


/-- The product of group homomorphisms is a group homomorphism if the target is commutative. -/
@[to_additive
      "The sum of two additive group homomorphisms is an additive group homomorphism
      if the target is commutative."]
theorem mul {α β} [Group α] [CommGroup β] {f g : α → β} (hf : IsGroupHom f) (hg : IsGroupHom g) :
    IsGroupHom fun a => f a * g a

{α : Type u_1}
{β : Type u_2}
[Group α]
[CommGroup β]
{f g : α → β}
(hf : IsGroupHom f)
(hg : IsGroupHom g)


/-- The number of roots of a real polynomial (counted with multiplicities) is at most the number of
roots of its derivative (counted with multiplicities) plus one. -/
theorem card_roots_le_derivative (p : ℝ[X]) :
    Multiset.card p.roots ≤ Multiset.card (derivative p).roots + 1

Multiset.card p.roots ≤ Multiset.card (Polynomial.derivative p).roots + 1


/-- The cokernel of the image inclusion of a morphism `f` is isomorphic to the cokernel of `f`.

(This result requires that the factorisation through the image is an epimorphism.
This holds in any category with equalizers.)
-/
@[simps]
def cokernelImageι {X Y : C} (f : X ⟶ Y) [HasImage f] [HasCokernel (image.ι f)] [HasCokernel f]
    [Epi (factorThruImage f)] : cokernel (image.ι f) ≅ cokernel f

(CategoryTheory.Limits.cokernelImageι f).hom =
  CategoryTheory.Limits.cokernel.desc (CategoryTheory.Limits.image.ι f) (CategoryTheory.Limits.cokernel.π f) ⋯


protected theorem Sublist.eraseP : l₁ <+ l₂ → l₁.eraseP p <+ l₂.eraseP p

∀ {α : Type u_1} {l₁ l₂ : List α} {p : α → Bool}, l₁ <+ l₂ → List.eraseP p l₁ <+ List.eraseP p l₂


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

{s t : TopologicalSpace.PositiveCompacts α}


theorem liftIco_eq_lift_Icc {f : 𝕜 → B} (h : f a = f (a + p)) :
    liftIco p a f =
      Quot.lift (restrict (Icc a <| a + p) f)
          (by
            rintro _ _ ⟨_⟩
            exact h) ∘
        equivIccQuot p a

{𝕜 : Type u_1}
{B : Type u_2}
[LinearOrderedAddCommGroup 𝕜]
[TopologicalSpace 𝕜]
[OrderTopology 𝕜]
{p a : 𝕜}
[hp : Fact (0 < p)]
[Archimedean 𝕜]
{f : 𝕜 → B}
(h : f a = f (a + p))

AddCircle.liftIco p a f = Quot.lift ((Set.Icc a (a + p)).restrict f) ⋯ ∘ ⇑(AddCircle.equivIccQuot p a)


@[simp]
theorem nnnorm_constOfIsEmpty [IsEmpty ι] (x : G) : ‖constOfIsEmpty 𝕜 E x‖₊ = ‖x‖₊

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

‖ContinuousMultilinearMap.constOfIsEmpty 𝕜 E x‖₊ = ‖x‖₊


theorem eval₂Hom_eq_constantCoeff_of_vars (f : R →+* S) {g : σ → S} {p : MvPolynomial σ R}
    (hp : ∀ i ∈ p.vars, g i = 0) : eval₂Hom f g p = f (constantCoeff p)

{R : Type u}
{S : Type v}
{σ : Type u_1}
[CommSemiring R]
[CommSemiring S]
(f : R →+* S)
{g : σ → S}
{p : MvPolynomial σ R}
(hp : ∀ i ∈ p.vars, g i = 0)

(MvPolynomial.eval₂Hom f g) p = f (MvPolynomial.constantCoeff p)


@[to_additive (attr := simp)]
theorem prod_mul [∀ i, AddCommMonoid (β i)] [∀ (i) (x : β i), Decidable (x ≠ 0)] [CommMonoid γ]
    {f : Π₀ i, β i} {h₁ h₂ : ∀ i, β i → γ} :
    (f.prod fun i b => h₁ i b * h₂ i b) = f.prod h₁ * f.prod h₂

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

(f.sum fun i b => h₁ i b + h₂ i b) = f.sum h₁ + f.sum h₂


theorem derivWithin_of_mem_nhds (h : s ∈ 𝓝 x) : derivWithin f s x = deriv f x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : 𝕜 → F}
{x : 𝕜}
{s : Set 𝕜}
(h : s ∈ 𝓝 x)


lemma lift_injective [IsDirected ι (· ≤ ·)]
    (injective : ∀ i, Function.Injective <| g i) :
    Function.Injective (lift G f P g Hg)

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

(injective : ∀ (i : ι), Function.Injective ⇑(g i))

Function.Injective ⇑(AddCommGroup.DirectLimit.lift G f P g Hg)


lemma isUnit_iff : IsUnit u ↔ u = 1 ∨ u = -1


/-- A morphism of homological complexes consists of maps between the chain groups,
commuting with the differentials.
-/
@[ext]
structure Hom (A B : HomologicalComplex V c) where
  f : ∀ i, A.X i ⟶ B.X i
  comm' : ∀ i j, c.Rel i j → f i ≫ B.d i j = A.d i j ≫ f j := by aesop_cat

c.Rel i j → self.f i ≫ B.d i j = A.d i j ≫ self.f j


lemma one_lt_div_of_mem_properDivisors {m n : ℕ} (h : m ∈ n.properDivisors) :
    1 < n / m


@[simp]
theorem map_smul'' (f : M →ₗ[R] M') : (I • N).map f = I • N.map f

{R : Type u}
{M : Type v}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
(I : Ideal R)
(N : Submodule R M)
{M' : Type w}
[AddCommMonoid M']
[Module R M']
(f : M →ₗ[R] M')

Submodule.map f (I • N) = I • Submodule.map f N


theorem exists_of_kerase {a : α} {l : List (Sigma β)} (h : a ∈ l.keys) :
    ∃ (b : β a) (l₁ l₂ : List (Sigma β)),
      a ∉ l₁.keys ∧ l = l₁ ++ ⟨a, b⟩ :: l₂ ∧ kerase a l = l₁ ++ l₂

{α : Type u}
{β : α → Type v}
[DecidableEq α]
{a : α}
{l : List (Sigma β)}
(h : a ∈ l.keys)

∃ b l₁ l₂, a ∉ l₁.keys ∧ l = l₁ ++ ⟨a, b⟩ :: l₂ ∧ List.kerase a l = l₁ ++ l₂


theorem toFun_eq_coe (f : α →+* β) : f.toFun = f

∀ {x : NonAssocSemiring α} {x_1 : NonAssocSemiring β} (f : α →+* β), (↑↑f).toFun = ⇑f


theorem toNNReal_eq_toNNReal_iff' {x y : ℝ≥0∞} (hx : x ≠ ⊤) (hy : y ≠ ⊤) :
    x.toNNReal = y.toNNReal ↔ x = y


/-- Converse to the mean value inequality: if `f` is line differentiable at `x₀` and `C`-lipschitz
on a neighborhood of `x₀` then its line derivative at `x₀` in the direction `v` has norm
bounded by `C * ‖v‖`. This version only assumes that `‖f x - f x₀‖ ≤ C * ‖x - x₀‖` in a
neighborhood of `x`. -/
theorem HasLineDerivAt.le_of_lip' {f : E → F} {f' : F} {x₀ : E} (hf : HasLineDerivAt 𝕜 f f' x₀ v)
    {C : ℝ} (hC₀ : 0 ≤ C) (hlip : ∀ᶠ x in 𝓝 x₀, ‖f x - f x₀‖ ≤ C * ‖x - x₀‖) :
    ‖f'‖ ≤ C * ‖v‖

(hlip : ∀ᶠ (x : E) in 𝓝 x₀, ‖f x - f x₀‖ ≤ C * ‖x - x₀‖)

‖f'‖ ≤ C * ‖v‖


@[simp, norm_cast]
theorem cast_mul [Semiring α] : ∀ m n, ((m * n : Num) : α) = m * n


theorem grade_injective : Function.Injective (grade 𝕆 : α → 𝕆)

{𝕆 : Type u_1}
{α : Type u_3}
[Preorder 𝕆]
[LinearOrder α]
[GradeOrder 𝕆 α]


/-- If each point of `α` admits a neighbourhood `V ∈ 𝔖`,
then the evaluation of `f : α →ᵤ[𝔖] β` at `x : α` is continuous in `(f, x)`
on the set of `(f, x)` such that `f` is continuous at `x`. -/
protected theorem continuousOn_eval₂ [TopologicalSpace α] (h𝔖 : ∀ x, ∃ V ∈ 𝔖, V ∈ 𝓝 x) :
    ContinuousOn (fun fx : (α →ᵤ[𝔖] β) × α ↦ toFun 𝔖 fx.1 fx.2)
      {fx | ContinuousAt (toFun 𝔖 fx.1) fx.2}

{α : Type u_1}
{β : Type u_2}
[UniformSpace β]
{𝔖 : Set (Set α)}
[TopologicalSpace α]
(h𝔖 : ∀ (x : α), ∃ V ∈ 𝔖, V ∈ 𝓝 x)

ContinuousOn (fun fx => (UniformOnFun.toFun 𝔖) fx.1 fx.2) {fx | ContinuousAt ((UniformOnFun.toFun 𝔖) fx.1) fx.2}


/-- `Over.map f` is left adjoint to `Over.pullback f`. -/
@[simps! unit_app counit_app]
def mapPullbackAdj {X Y : C} (f : X ⟶ Y) : Over.map f ⊣ pullback f

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

∀ (Y_1 : CategoryTheory.Over Y),
  (CategoryTheory.Over.mapPullbackAdj f).counit.app Y_1 =
    CategoryTheory.Over.homMk (CategoryTheory.Limits.pullback.fst Y_1.hom f) ⋯


theorem HasGradientWithinAt.differentiableWithinAt (h : HasGradientWithinAt f f' s x) :
    DifferentiableWithinAt 𝕜 f s x

{𝕜 : Type u_1}
{F : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup F]
[InnerProductSpace 𝕜 F]
[CompleteSpace F]
{f : F → 𝕜}
{f' x : F}
{s : Set F}
(h : HasGradientWithinAt f f' s x)


@[simp, norm_cast]
theorem cast_ite (P : Prop) [Decidable P] (m n : ℕ) :
    ((ite P m n : ℕ) : R) = ite P (m : R) (n : R)

{R : Type u_1}
[AddMonoidWithOne R]
(P : Prop)
[Decidable P]
(m n : ℕ)

↑(if P then m else n) = if P then ↑m else ↑n


@[norm_cast]
theorem ofReal_zero : ((0 : ℝ) : K) = 0


theorem isPathConnected_iff_pathConnectedSpace : IsPathConnected F ↔ PathConnectedSpace F

{X : Type u_1}
[TopologicalSpace X]
{F : Set X}

IsPathConnected F ↔ PathConnectedSpace ↑F


theorem lift_down {a : Cardinal.{u}} {b : Cardinal.{max u v}} :
    b ≤ lift.{v,u} a → ∃ a', lift.{v,u} a' = b

b ≤ Cardinal.lift.{v, u} a → ∃ a', Cardinal.lift.{v, u} a' = b


theorem measurableSet_min_iff (hτ : IsStoppingTime f τ) (hπ : IsStoppingTime f π) (s : Set Ω) :
    MeasurableSet[(hτ.min hπ).measurableSpace] s ↔
      MeasurableSet[hτ.measurableSpace] s ∧ MeasurableSet[hπ.measurableSpace] s

{Ω : Type u_1}
{ι : Type u_3}
{m : MeasurableSpace Ω}
[LinearOrder ι]
{f : MeasureTheory.Filtration ι m}
{τ π : Ω → ι}
(hτ : MeasureTheory.IsStoppingTime f τ)
(hπ : MeasureTheory.IsStoppingTime f π)
(s : Set Ω)

MeasurableSet s ↔ MeasurableSet s ∧ MeasurableSet s


theorem lcs_add_le_iff (l k : ℕ) : N₁.lcs (l + k) ≤ N₂ ↔ N₁.lcs l ≤ N₂.ucs k

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

LieSubmodule.lcs (l + k) N₁ ≤ N₂ ↔ LieSubmodule.lcs l N₁ ≤ LieSubmodule.ucs k N₂


theorem norm_fderivWithin_iteratedFDerivWithin {n : ℕ} :
    ‖fderivWithin 𝕜 (iteratedFDerivWithin 𝕜 n f s) s x‖ =
      ‖iteratedFDerivWithin 𝕜 (n + 1) f s x‖

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{s : Set E}
{f : E → F}
{x : E}
{n : ℕ}


/-- **Radon's theorem on convex sets**.

Any family `f` of affine dependent vectors contains a set `I` with the property that convex hulls of
`I` and `Iᶜ` intersect nontrivially. -/
theorem radon_partition {f : ι → E} (h : ¬ AffineIndependent 𝕜 f) :
    ∃ I, (convexHull 𝕜 (f '' I) ∩ convexHull 𝕜 (f '' Iᶜ)).Nonempty

{ι : Type u_1}
{𝕜 : Type u_2}
{E : Type u_3}
[LinearOrderedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
{f : ι → E}
(h : ¬AffineIndependent 𝕜 f)

∃ I, ((convexHull 𝕜) (f '' I) ∩ (convexHull 𝕜) (f '' Iᶜ)).Nonempty


/-- The image of the closed-open interval `[a, a + p)` under the quotient map `𝕜 → AddCircle p` is
the entire space. -/
@[simp]
theorem coe_image_Ioc_eq : ((↑) : 𝕜 → AddCircle p) '' Ioc a (a + p) = univ

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

QuotientAddGroup.mk '' Set.Ioc a (a + p) = Set.univ


theorem mk_ne_zero_of_degree_lt (hf : Monic f) {g : R[X]} (h0 : g ≠ 0) (hd : degree g < degree f) :
    mk f g ≠ 0

{R : Type u}
[CommRing R]
{f : R[X]}
(hf : f.Monic)
{g : R[X]}
(h0 : g ≠ 0)
(hd : g.degree < f.degree)


/-- In a complete normed additive group, every absolutely convergent series converges in the
space.  -/
lemma NormedAddCommGroup.summable_imp_tendsto_of_complete [CompleteSpace E] (u : ℕ → E)
    (hu : Summable (‖u ·‖)) : ∃ a, Tendsto (fun n => ∑ i ∈ range n, u i) atTop (𝓝 a)

{E : Type u_1}
[NormedAddCommGroup E]
[CompleteSpace E]
(u : ℕ → E)
(hu : Summable fun x => ‖u x‖)

∃ a, Filter.Tendsto (fun n => ∑ i ∈ Finset.range n, u i) Filter.atTop (𝓝 a)


@[simp]
theorem sameCycle_inv_apply_left : SameCycle f (f⁻¹ x) y ↔ SameCycle f x y

{α : Type u_2}
{f : Equiv.Perm α}
{x y : α}


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

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

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


theorem eq_zero_of_comapDomain_eq_zero [AddCommMonoid M] (f : α → β) (l : β →₀ M)
    (hf : Set.BijOn f (f ⁻¹' ↑l.support) ↑l.support) : comapDomain f l hf.injOn = 0 → l = 0


theorem hasGroupoid_of_le {G₁ G₂ : StructureGroupoid H} (h : HasGroupoid M G₁) (hle : G₁ ≤ G₂) :
    HasGroupoid M G₂

{H : Type u}
{M : Type u_2}
[TopologicalSpace H]
[TopologicalSpace M]
[ChartedSpace H M]
{G₁ G₂ : StructureGroupoid H}
(h : HasGroupoid M G₁)
(hle : G₁ ≤ G₂)


@[simp]
protected theorem repr_symm_single [DecidableEq ι] (b : OrthonormalBasis ι 𝕜 E) (i : ι) :
    b.repr.symm (EuclideanSpace.single i (1 : 𝕜)) = b i

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

b.repr.symm (EuclideanSpace.single i 1) = b i


@[simp]
lemma equivShrink_symm_sub [Sub α] [Small α] (x y : Shrink α) :
    (equivShrink α).symm (x - y) = (equivShrink α).symm x - (equivShrink α).symm y

{α : Type u_1}
[Sub α]
[Small.{u_2, u_1} α]
(x y : Shrink.{u_2, u_1} α)


@[simp]
theorem rank_zero [Nontrivial R] : rank (0 : Matrix m n R) = 0

{m : Type u_2}
{n : Type u_3}
{R : Type u_5}
[Fintype n]
[CommRing R]
[Nontrivial R]


theorem rename_monomial (f : σ → τ) (d : σ →₀ ℕ) (r : R) :
    rename f (monomial d r) = monomial (d.mapDomain f) r

{σ : Type u_1}
{τ : Type u_2}
{R : Type u_4}
[CommSemiring R]
(f : σ → τ)
(d : σ →₀ ℕ)
(r : R)

(MvPolynomial.rename f) ((MvPolynomial.monomial d) r) = (MvPolynomial.monomial (Finsupp.mapDomain f d)) r


theorem dvd_bmod_dot_sub_dot_bmod (m : Nat) (xs ys : IntList) :
    (m : Int) ∣ bmod_dot_sub_dot_bmod m xs ys

↑m ∣ Lean.Omega.IntList.bmod_dot_sub_dot_bmod m xs ys


theorem not_gt_eq (a b : Nat) : (¬ (a > b)) = (a ≤ b)


theorem edgeSet_mono {H₁ H₂ : Subgraph G} (h : H₁ ≤ H₂) : H₁.edgeSet ≤ H₂.edgeSet

{V : Type u}
{G : SimpleGraph V}
{H₁ H₂ : G.Subgraph}
(h : H₁ ≤ H₂)


theorem norm_def (a : 𝓜(𝕜, A)) : ‖a‖ = ‖toProdHom a‖

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


theorem _root_.GroupWithZero.eq_zero_or_unit (a : G₀) : a = 0 ∨ ∃ u : G₀ˣ, a = u

{G₀ : Type u_3}
[GroupWithZero G₀]
(a : G₀)


theorem choice_eq {α : Type _} [Subsingleton α] (a : α) : choice α = some a


@[simp]
theorem single_mul_single {a b : Γ} {r s : R} :
    single a r * single b s = single (a + b) (r * s)

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

(HahnSeries.single a) r * (HahnSeries.single b) s = (HahnSeries.single (a + b)) (r * s)


@[simp]
theorem support_of (x : X) : support (of x) = {x}


@[simp]
theorem nnnorm_prod (s : Finset β) (f : β → α) : ‖∏ b ∈ s, f b‖₊ = ∏ b ∈ s, ‖f b‖₊

{α : Type u_1}
{β : Type u_2}
[NormedField α]
(s : Finset β)
(f : β → α)


theorem map_subtype_embedding_Iio : (Iio a).map (Embedding.subtype p) = (Iio a : Finset α)

{α : Type u_1}
[Preorder α]
(p : α → Prop)
[DecidablePred p]
[LocallyFiniteOrderBot α]
(a : Subtype p)
(hp : ∀ ⦃a x : α⦄, x ≤ a → p a → p x)

Finset.map (Function.Embedding.subtype p) (Finset.Iio a) = Finset.Iio ↑a