@[simp]
theorem symmDiff_fst [GeneralizedCoheytingAlgebra α] [GeneralizedCoheytingAlgebra β]
    (a b : α × β) : (a ∆ b).1 = a.1 ∆ b.1

{α : Type u_2}
{β : Type u_3}
[GeneralizedCoheytingAlgebra α]
[GeneralizedCoheytingAlgebra β]
(a b : α × β)


theorem isOpen_iff (U : Set 𝖣.glued) : IsOpen U ↔ ∀ i, IsOpen (𝖣.ι i ⁻¹' U)

(D : TopCat.GlueData)
(U : Set ↑D.glued)

IsOpen U ↔ ∀ (i : D.J), IsOpen (⇑(D.ι i) ⁻¹' U)


theorem Tendsto.sup_sup {f : α → β} {x₁ x₂ : Filter α} {y₁ y₂ : Filter β}
    (h₁ : Tendsto f x₁ y₁) (h₂ : Tendsto f x₂ y₂) : Tendsto f (x₁ ⊔ x₂) (y₁ ⊔ y₂)

{α : Type u}
{β : Type v}
{f : α → β}
{x₁ x₂ : Filter α}
{y₁ y₂ : Filter β}
(h₁ : Filter.Tendsto f x₁ y₁)
(h₂ : Filter.Tendsto f x₂ y₂)


lemma mod_eq_iff_lt (hn : n ≠ 0) : m % n = m ↔ m < n


theorem iSup_restrict_spanningSets [SigmaFinite μ] (s : Set α) :
    ⨆ i, μ.restrict (spanningSets μ i) s = μ s

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

⨆ i, (μ.restrict (MeasureTheory.spanningSets μ i)) s = μ s


theorem mem_ωSup (x : α) (c : Chain (Part α)) : x ∈ ωSup c ↔ some x ∈ c

(c : OmegaCompletePartialOrder.Chain (Part α))

x ∈ OmegaCompletePartialOrder.ωSup c ↔ Part.some x ∈ c


@[to_additive]
theorem left_dom_of_div_dom [Div α] {a b : Part α} (hab : Dom (a / b)) : a.Dom

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


theorem inter_nonempty_iff_exists_right : (s ∩ t).Nonempty ↔ ∃ x ∈ t, x ∈ s


theorem mul_self_sub_one [NonAssocRing R] (a : R) : a * a - 1 = (a + 1) * (a - 1)


protected theorem R1Space.iInf {ι X : Type*} {t : ι → TopologicalSpace X}
    (ht : ∀ i, @R1Space X (t i)) : @R1Space X (iInf t)

{ι : Type u_3}
{X : Type u_4}
{t : ι → TopologicalSpace X}
(ht : ∀ (i : ι), R1Space X)


/-- Every element of the direct limit corresponds to some element in
some component of the directed system. -/
theorem exists_of (z : DirectLimit G f) : ∃ i x, of L ι G f i x = z

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

(z : FirstOrder.Language.DirectLimit G f)

∃ i x, (FirstOrder.Language.DirectLimit.of L ι G f i) x = z


lemma const (e : E) (x : 𝕜) : MeromorphicAt (fun _ ↦ e) x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
(e : E)
(x : 𝕜)


/-- Two maps into an equalizer are equal if they are equal when composed with the equalizer map. -/
@[ext]
theorem equalizer.hom_ext {W : C} {k l : W ⟶ equalizer f g}
    (h : k ≫ equalizer.ι f g = l ≫ equalizer.ι f g) : k = l

{k l : W ⟶ CategoryTheory.Limits.equalizer f g}

(h :
  CategoryTheory.CategoryStruct.comp k (CategoryTheory.Limits.equalizer.ι f g) =
    CategoryTheory.CategoryStruct.comp l (CategoryTheory.Limits.equalizer.ι f g))


/-- The identity lax monoidal functor. -/
@[simps]
def id : LaxMonoidalFunctor.{v₁, v₁} C C

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

(CategoryTheory.LaxMonoidalFunctor.id C).toFunctor = 𝟭 C


theorem mapsTo_iInter₂ {s : Set α} {t : ∀ i, κ i → Set β} {f : α → β} :
    MapsTo f s (⋂ (i) (j), t i j) ↔ ∀ i j, MapsTo f s (t i j)

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

Set.MapsTo f s (⋂ i, ⋂ j, t i j) ↔ ∀ (i : ι) (j : κ i), Set.MapsTo f s (t i j)


lemma mem_part (ha : a ∈ s) : a ∈ P.part a

{α : Type u_1}
[DecidableEq α]
{s : Finset α}
(P : Finpartition s)
{a : α}
(ha : a ∈ s)


/-- Equivalent definitions of a measure invariant under a multiplicative action of a group.

- 0: `SMulInvariantMeasure G α μ`;

- 1: for every `c : G` and a measurable set `s`, the measure of the preimage of `s` under scalar
     multiplication by `c` is equal to the measure of `s`;

- 2: for every `c : G` and a measurable set `s`, the measure of the image `c • s` of `s` under
     scalar multiplication by `c` is equal to the measure of `s`;

- 3, 4: properties 2, 3 for any set, including non-measurable ones;

- 5: for any `c : G`, scalar multiplication by `c` maps `μ` to `μ`;

- 6: for any `c : G`, scalar multiplication by `c` is a measure preserving map. -/
@[to_additive]
theorem smulInvariantMeasure_tfae :
    List.TFAE
      [SMulInvariantMeasure G α μ,
        ∀ (c : G) (s), MeasurableSet s → μ ((c • ·) ⁻¹' s) = μ s,
        ∀ (c : G) (s), MeasurableSet s → μ (c • s) = μ s,
        ∀ (c : G) (s), μ ((c • ·) ⁻¹' s) = μ s,
        ∀ (c : G) (s), μ (c • s) = μ s,
        ∀ c : G, Measure.map (c • ·) μ = μ,
        ∀ c : G, MeasurePreserving (c • ·) μ μ]

(G : Type u)
{α : Type w}
{m : MeasurableSpace α}
[AddGroup G]
[AddAction G α]
[MeasurableSpace G]
[MeasurableVAdd G α]
(μ : MeasureTheory.Measure α)

[MeasureTheory.VAddInvariantMeasure G α μ, ∀ (c : G) (s : Set α), MeasurableSet s → μ ((fun x => c +ᵥ x) ⁻¹' s) = μ s,
    ∀ (c : G) (s : Set α), MeasurableSet s → μ (c +ᵥ s) = μ s, ∀ (c : G) (s : Set α), μ ((fun x => c +ᵥ x) ⁻¹' s) = μ s,
    ∀ (c : G) (s : Set α), μ (c +ᵥ s) = μ s, ∀ (c : G), MeasureTheory.Measure.map (fun x => c +ᵥ x) μ = μ,
    ∀ (c : G), MeasureTheory.MeasurePreserving (fun x => c +ᵥ x) μ μ].TFAE


@[simp] theorem heq_eq_eq (a b : α) : HEq a b = (a = b)


/-- If a normed space is non-trivial, then the norm of the identity equals `1`. -/
@[simp]
theorem norm_id [Nontrivial E] : ‖id 𝕜 E‖ = 1

{𝕜 : Type u_1}
{E : Type u_4}
[NormedAddCommGroup E]
[NontriviallyNormedField 𝕜]
[NormedSpace 𝕜 E]
[Nontrivial E]


theorem Int.floor_toNat (a : α) : ⌊a⌋.toNat = ⌊a⌋₊

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


@[to_additive]
lemma HasCompactMulSupport.exists_bound_of_continuous [TopologicalSpace α]
    {f : α → E} (hf : HasCompactMulSupport f) (h'f : Continuous f) : ∃ C, ∀ x, ‖f x‖ ≤ C

{α : Type u_1}
{E : Type u_3}
[SeminormedAddGroup E]
[TopologicalSpace α]
{f : α → E}
(hf : HasCompactSupport f)
(h'f : Continuous f)


theorem sigmaLift_eq_empty : sigmaLift f a b = ∅ ↔ ∀ h : a.1 = b.1, f (h ▸ a.2) b.2 = ∅

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

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


nonrec theorem _root_.Function.RightInverse.list_map {f : α → β} {g : β → α}
    (h : RightInverse f g) : RightInverse (map f) (map g)

{α : Type u}
{β : Type v}
{f : α → β}
{g : β → α}
(h : Function.RightInverse f g)

Function.RightInverse (List.map f) (List.map g)


theorem setLIntegral_mono_ae' {s : Set α} {f g : α → ℝ≥0∞} (hs : MeasurableSet s)
    (hfg : ∀ᵐ x ∂μ, x ∈ s → f x ≤ g x) : ∫⁻ x in s, f x ∂μ ≤ ∫⁻ x in s, g x ∂μ

(hfg : ∀ᵐ (x : α) ∂μ, x ∈ s → f x ≤ g x)

∫⁻ (x : α) in s, f x ∂μ ≤ ∫⁻ (x : α) in s, g x ∂μ


/-- The relative product homotopy of `homotopies` between functions `f` and `g` -/
@[simps!]
def HomotopyRel.pi (homotopies : ∀ i : I, HomotopyRel (f i) (g i) S) :
    HomotopyRel (pi f) (pi g) S

(homotopies : (i : I) → (f i).HomotopyRel (g i) S)

(ContinuousMap.HomotopyRel.pi homotopies) a i = (homotopies i) a


protected theorem FastSubsingleton.helim {α β : Sort u} [FastSubsingleton α]
    (h₂ : α = β) (a : α) (b : β) : HEq a b

{α β : Sort u}
[Lean.Meta.FastSubsingleton α]
(h₂ : α = β)
(a : α)
(b : β)


theorem hasBasis_coclosedCompact :
    (Filter.coclosedCompact X).HasBasis (fun s => IsClosed s ∧ IsCompact s) compl


@[simp]
theorem toAut_inv (x : Mˣ) : (toAut M x).inv = SingleObj.toEnd M (x⁻¹ : Mˣ)

((Units.toAut M) x).inv = (CategoryTheory.SingleObj.toEnd M) ↑x⁻¹


theorem lt_mul_of_lt_mul_of_nonneg_left [PosMulMono α] (h : a < b * c) (hle : c ≤ d) (b0 : 0 ≤ b) :
    a < b * d

{α : Type u_1}
{a b c d : α}
[Mul α]
[Zero α]
[Preorder α]
[PosMulMono α]
(h : a < b * c)
(hle : c ≤ d)
(b0 : 0 ≤ b)


theorem tendsto_atTop_iInf (h_anti : Antitone f) : Tendsto f atTop (𝓝 (⨅ i, f i))

{α : Type u_1}
{ι : Type u_3}
[Preorder ι]
[TopologicalSpace α]
[CompleteLattice α]
[InfConvergenceClass α]
{f : ι → α}
(h_anti : Antitone f)

Filter.Tendsto f Filter.atTop (𝓝 (⨅ i, f i))


theorem LeftInverse.surjective {f : α → β} {g : β → α} (h : LeftInverse f g) : Surjective f

{α : Sort u_1}
{β : Sort u_2}
{f : α → β}
{g : β → α}
(h : Function.LeftInverse f g)


theorem trans_apply (γ : Path x y) (γ' : Path y z) (t : I) :
    (γ.trans γ') t =
      if h : (t : ℝ) ≤ 1 / 2 then γ ⟨2 * t, (mul_pos_mem_iff zero_lt_two).2 ⟨t.2.1, h⟩⟩
      else γ' ⟨2 * t - 1, two_mul_sub_one_mem_iff.2 ⟨(not_le.1 h).le, t.2.2⟩⟩

{X : Type u_1}
[TopologicalSpace X]
{x y z : X}
(γ : Path x y)
(γ' : Path y z)
(t : ↑I)

(γ.trans γ') t = if h : ↑t ≤ 1 / 2 then γ ⟨2 * ↑t, ⋯⟩ else γ' ⟨2 * ↑t - 1, ⋯⟩


theorem isTop_or_exists_gt [IsDirected α (· ≤ ·)] (a : α) : IsTop a ∨ ∃ b, a < b

{α : Type u}
[Preorder α]
[IsDirected α fun x x_1 => x ≤ x_1]
(a : α)


/-- A natural isomorphism between the functor `map (F ⋙ G) ` and `map F ⋙ map G `. -/
@[simps!]
def mapComp {D E : Type*} [Category D] [Category E] (F : C ⥤ D) (G : D ⥤ E) :
    map (F ⋙ G) ≅ map F ⋙ map G

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{D : Type u_1}
{E : Type u_2}
[CategoryTheory.Category.{u_3, u_1} D]
[CategoryTheory.Category.{u_4, u_2} E]
(F : CategoryTheory.Functor C D)
(G : CategoryTheory.Functor D E)
(X : CategoryTheory.WithTerminal C)

(CategoryTheory.WithTerminal.mapComp F G).hom.app X =
  (match X with
    | CategoryTheory.WithTerminal.of x => CategoryTheory.Iso.refl (CategoryTheory.WithTerminal.of (G.obj (F.obj x)))
    | CategoryTheory.WithTerminal.star => CategoryTheory.Iso.refl CategoryTheory.WithTerminal.star).hom


/-- To construct an isomorphism of structured arrows,
we need an isomorphism of the objects underlying the target,
and to check that the triangle commutes.
-/
@[simps!]
def isoMk {f f' : StructuredArrow S T} (g : f.right ≅ f'.right)
    (w : f.hom ≫ T.map g.hom = f'.hom := by aesop_cat) :
    f ≅ f'

{f f' : CategoryTheory.StructuredArrow S T}

(w : CategoryTheory.CategoryStruct.comp f.hom (T.map g.hom) = f'.hom := by aesop_cat)


@[to_additive (attr := simp)]
theorem inclusion_mk {h : H ≤ K} (x : G) (hx : x ∈ H) : inclusion h ⟨x, hx⟩ = ⟨x, h hx⟩

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

(SubgroupClass.inclusion h) ⟨x, hx⟩ = ⟨x, ⋯⟩


/-- Two continuous functions to a t2-space that agree on the dense range of a function are equal. -/
theorem DenseRange.equalizer (hfd : DenseRange f) {g h : β → γ} (hg : Continuous g)
    (hh : Continuous h) (H : g ∘ f = h ∘ f) : g = h

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[TopologicalSpace β]
[TopologicalSpace γ]
[T2Space γ]
{f : α → β}
(hfd : DenseRange f)
{g h : β → γ}
(hg : Continuous g)
(hh : Continuous h)
(H : g ∘ f = h ∘ f)


@[simp]
lemma cyclesMap_sub : cyclesMap (φ - φ') = cyclesMap φ - cyclesMap φ'

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Preadditive C]
{S₁ S₂ : CategoryTheory.ShortComplex C}
(φ φ' : S₁ ⟶ S₂)
[S₁.HasLeftHomology]
[S₂.HasLeftHomology]

CategoryTheory.ShortComplex.cyclesMap (φ - φ') =
  CategoryTheory.ShortComplex.cyclesMap φ - CategoryTheory.ShortComplex.cyclesMap φ'


theorem normalize_of_nonpos {z : ℤ} (h : z ≤ 0) : normalize z = -z


@[simp]
theorem compl_erase : (s.erase a)ᶜ = insert a sᶜ

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


@[integral_simps]
theorem integral_add (f g : α →₁[μ] E) : integral (f + g) = integral f + integral g

{α : Type u_1}
{E : Type u_2}
[NormedAddCommGroup E]
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedSpace ℝ E]
[CompleteSpace E]
(f g : ↥(MeasureTheory.Lp E 1 μ))

MeasureTheory.L1.integral (f + g) = MeasureTheory.L1.integral f + MeasureTheory.L1.integral g


theorem eval₂_eq_eval_map {x : S} : p.eval₂ f x = (p.map f).eval x

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

Polynomial.eval₂ f x p = Polynomial.eval x (Polynomial.map f p)


@[to_additive (attr := simp)]
theorem bot_mul : ⊥ * t = ⊥

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

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


theorem csSup_le (h₁ : s.Nonempty) (h₂ : ∀ b ∈ s, b ≤ a) : sSup s ≤ a

{α : Type u_1}
[ConditionallyCompleteLattice α]
{s : Set α}
{a : α}
(h₁ : s.Nonempty)
(h₂ : ∀ b ∈ s, b ≤ a)


theorem lintegral_one : ∫⁻ _, (1 : ℝ≥0∞) ∂μ = μ univ

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


theorem bmod_pos (x : Int) (m : Nat) (p : x % m < (m + 1) / 2) : bmod x m = x % m


theorem eq_of_xn_modEq' {i j n} (ipos : 0 < i) (hin : i ≤ n) (j4n : j ≤ 4 * n)
    (h : xn a1 j ≡ xn a1 i [MOD xn a1 n]) : j = i ∨ j + i = 4 * n

(h : Pell.xn a1 j ≡ Pell.xn a1 i [MOD Pell.xn a1 n])


theorem finSuccEquiv'_above {i : Fin (n + 1)} {m : Fin n} (h : i ≤ Fin.castSucc m) :
    (finSuccEquiv' i) m.succ = some m

{n : ℕ}
{i : Fin (n + 1)}
{m : Fin n}
(h : i ≤ m.castSucc)


theorem inverse'_comp {f : X →ₑ[φ] Y} {g : Y → X}
    {k₂ : Function.RightInverse φ' φ}
    {h₁ : Function.LeftInverse g f} {h₂ : Function.RightInverse g f} :
    f.comp (inverse' f g k₂ h₁ h₂) (κ := CompTriple.comp_inv k₂) = MulActionHom.id N

{M : Type u_2}
{N : Type u_3}
{φ : M → N}
{X : Type u_5}
[SMul M X]
{Y : Type u_6}
[SMul N Y]
{φ' : N → M}
{f : X →ₑ[φ] Y}
{g : Y → X}
{k₂ : Function.RightInverse φ' φ}
{h₁ : Function.LeftInverse g ⇑f}
{h₂ : Function.RightInverse g ⇑f}

f.comp (f.inverse' g k₂ h₁ h₂) = MulActionHom.id N


@[simp]
theorem coe_top : ((⊤ : L.ElementarySubstructure M) : Set M) = Set.univ

{L : FirstOrder.Language}
{M : Type u_1}
[L.Structure M]


lemma CompleteOrthogonalIdempotents.lift_of_isNilpotent_ker_aux
    (h : ∀ x ∈ RingHom.ker f, IsNilpotent x)
    {n} {e : Fin n → S} (he : CompleteOrthogonalIdempotents e) (he' : ∀ i, e i ∈ f.range) :
    ∃ e' : Fin n → R, CompleteOrthogonalIdempotents e' ∧ f ∘ e' = e

∃ e', CompleteOrthogonalIdempotents e' ∧ ⇑f ∘ e' = e


theorem smul_mulDistribActionHom_apply (c : Mᵈᵐᵃ) (f : A →+[N] B) (a : A) :
    (c • f) a = f (mk.symm c • a)

{M : Type u_1}
{N : Type u_2}
{A : Type u_3}
{B : Type u_4}
[AddMonoid A]
[DistribSMul M A]
[Monoid N]
[AddMonoid B]
[DistribMulAction N A]
[SMulCommClass M N A]
[DistribMulAction N B]
(c : Mᵈᵐᵃ)
(f : A →+[N] B)
(a : A)


/-- A strict vector subspace has measure zero. -/
theorem addHaar_submodule {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [MeasurableSpace E]
    [BorelSpace E] [FiniteDimensional ℝ E] (μ : Measure E) [IsAddHaarMeasure μ] (s : Submodule ℝ E)
    (hs : s ≠ ⊤) : μ s = 0

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[MeasurableSpace E]
[BorelSpace E]
[FiniteDimensional ℝ E]
(μ : MeasureTheory.Measure E)
[μ.IsAddHaarMeasure]
(s : Submodule ℝ E)
(hs : s ≠ ⊤)


theorem finrank_adjoin_simple_eq_one_iff :
    finrank F F⟮α⟯ = 1 ↔ α ∈ (⊥ : IntermediateField F E)

{F : Type u_1}
[Field F]
{E : Type u_2}
[Field E]
[Algebra F E]
{α : E}

FiniteDimensional.finrank F ↥F⟮α⟯ = 1 ↔ α ∈ ⊥


@[simp] theorem add_imI : (a + b).imI = a.imI + b.imI

{R : Type u_3}
[CommRing R]
(a b : ℍ[R])


theorem triangle_assoc_comp_left (f : a ⟶ b) (g : b ⟶ c) :
    (α_ f (𝟙 b) g).hom ≫ f ◁ (λ_ g).hom = (ρ_ f).hom ▷ g

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

CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.associator f (CategoryTheory.CategoryStruct.id b) g).hom
    (CategoryTheory.Bicategory.whiskerLeft f (CategoryTheory.Bicategory.leftUnitor g).hom) =
  CategoryTheory.Bicategory.whiskerRight (CategoryTheory.Bicategory.rightUnitor f).hom g


private theorem mul_eq_zero' {a b : Ordinal} : a * b = 0 ↔ a = 0 ∨ b = 0


lemma XYIdeal_mul_XYIdeal {x₁ x₂ y₁ y₂ : F} (h₁ : W.Equation x₁ y₁) (h₂ : W.Equation x₂ y₂)
    (hxy : x₁ = x₂ → y₁ ≠ W.negY x₂ y₂) :
    XIdeal W (W.addX x₁ x₂ <| W.slope x₁ x₂ y₁ y₂) * (XYIdeal W x₁ (C y₁) * XYIdeal W x₂ (C y₂)) =
      YIdeal W (linePolynomial x₁ y₁ <| W.slope x₁ x₂ y₁ y₂) *
        XYIdeal W (W.addX x₁ x₂ <| W.slope x₁ x₂ y₁ y₂)
          (C <| W.addY x₁ x₂ y₁ <| W.slope x₁ x₂ y₁ y₂)

{F : Type u}
[Field F]
{W : WeierstrassCurve.Affine F}
{x₁ x₂ y₁ y₂ : F}
(h₁ : W.Equation x₁ y₁)
(h₂ : W.Equation x₂ y₂)
(hxy : x₁ = x₂ → y₁ ≠ W.negY x₂ y₂)

WeierstrassCurve.Affine.CoordinateRing.XIdeal W (W.addX x₁ x₂ (W.slope x₁ x₂ y₁ y₂)) *
    (WeierstrassCurve.Affine.CoordinateRing.XYIdeal W x₁ (Polynomial.C y₁) *
      WeierstrassCurve.Affine.CoordinateRing.XYIdeal W x₂ (Polynomial.C y₂)) =
  WeierstrassCurve.Affine.CoordinateRing.YIdeal W (WeierstrassCurve.Affine.linePolynomial x₁ y₁ (W.slope x₁ x₂ y₁ y₂)) *
    WeierstrassCurve.Affine.CoordinateRing.XYIdeal W (W.addX x₁ x₂ (W.slope x₁ x₂ y₁ y₂))
      (Polynomial.C (W.addY x₁ x₂ y₁ (W.slope x₁ x₂ y₁ y₂)))


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

(c : CategoryTheory.Limits.Cone ((CategoryTheory.Pairwise.diagram U).op ⋙ F))

(TopCat.Presheaf.SheafConditionPairwiseIntersections.coneEquivFunctorObj F U c).π.app Z =
  CategoryTheory.Limits.WalkingParallelPair.casesOn Z
    (CategoryTheory.Limits.Pi.lift fun i => c.π.app (Opposite.op (CategoryTheory.Pairwise.single i)))
    (CategoryTheory.Limits.Pi.lift fun b => c.π.app (Opposite.op (CategoryTheory.Pairwise.pair b.1 b.2)))


theorem up_lt_up {s t : Set α} : Set.up s < Set.up t ↔ s ⊂ t


theorem KaehlerDifferential.span_range_derivation :
    Submodule.span S (Set.range <| KaehlerDifferential.D R S) = ⊤

(R : Type u)
(S : Type v)
[CommRing R]
[CommRing S]
[Algebra R S]

Submodule.span S (Set.range ⇑(KaehlerDifferential.D R S)) = ⊤


theorem ContinuousAt.comp₂_continuousWithinAt {f : β × γ → δ} {g : α → β} {h : α → γ} {x : α}
    {s : Set α} (hf : ContinuousAt f (g x, h x)) (hg : ContinuousWithinAt g s x)
    (hh : ContinuousWithinAt h s x) :
    ContinuousWithinAt (fun x ↦ f (g x, h x)) s x

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{δ : Type u_4}
[TopologicalSpace α]
[TopologicalSpace β]
[TopologicalSpace γ]
[TopologicalSpace δ]
{f : β × γ → δ}
{g : α → β}
{h : α → γ}
{x : α}
{s : Set α}
(hf : ContinuousAt f (g x, h x))
(hg : ContinuousWithinAt g s x)
(hh : ContinuousWithinAt h s x)

ContinuousWithinAt (fun x => f (g x, h x)) s x


/-- If the directions of two nonempty affine subspaces are complements of each other, they intersect
in exactly one point. -/
theorem inter_eq_singleton_of_nonempty_of_isCompl {s1 s2 : AffineSubspace k P}
    (h1 : (s1 : Set P).Nonempty) (h2 : (s2 : Set P).Nonempty)
    (hd : IsCompl s1.direction s2.direction) : ∃ p, (s1 : Set P) ∩ s2 = {p}


lemma _root_.fderiv_continuousLinearEquiv_comp (L : G ≃L[𝕜] G') (f : E → (F →L[𝕜] G)) (x : E) :
    fderiv 𝕜 (fun x ↦ (L : G →L[𝕜] G').comp (f x)) x =
      (((ContinuousLinearEquiv.refl 𝕜 F).arrowCongr L)) ∘L (fderiv 𝕜 f x)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{G' : Type u_5}
[NormedAddCommGroup G']
[NormedSpace 𝕜 G']
(L : G ≃L[𝕜] G')
(f : E → F →L[𝕜] G)
(x : E)

fderiv 𝕜 (fun x => (↑L).comp (f x)) x = (↑((ContinuousLinearEquiv.refl 𝕜 F).arrowCongr L)).comp (fderiv 𝕜 f x)


lemma IsUnramified.stabilizer_eq_bot (h : IsUnramified k w) : Stab w = ⊥

(h : NumberField.InfinitePlace.IsUnramified k w)


@[reassoc]
lemma ιTensorObj₃'_eq (i₁ i₂ i₃ j : I) (h : i₁ + i₂ + i₃ = j) (i₁₂ : I)
    (h' : i₁ + i₂ = i₁₂) :
    ιTensorObj₃' X₁ X₂ X₃ i₁ i₂ i₃ j h =
      (ιTensorObj X₁ X₂ i₁ i₂ i₁₂ h' ▷ X₃ i₃) ≫
        ιTensorObj (tensorObj X₁ X₂) X₃ i₁₂ i₃ j (by rw [← h', h])

(X₁ X₂ X₃ : CategoryTheory.GradedObject I C)

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

CategoryTheory.GradedObject.Monoidal.ιTensorObj₃' X₁ X₂ X₃ i₁ i₂ i₃ j h =
  CategoryTheory.CategoryStruct.comp
    (CategoryTheory.MonoidalCategory.whiskerRight (CategoryTheory.GradedObject.Monoidal.ιTensorObj X₁ X₂ i₁ i₂ i₁₂ h')
      (X₃ i₃))
    (CategoryTheory.GradedObject.Monoidal.ιTensorObj (CategoryTheory.GradedObject.Monoidal.tensorObj X₁ X₂) X₃ i₁₂ i₃ j
      ⋯)


theorem colorable [Fintype P.parts] : G.Colorable (Fintype.card P.parts)

{V : Type u}
{G : SimpleGraph V}
(P : G.Partition)
[Fintype ↑P.parts]


{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{s t : 𝕜 → 𝕜}
{U : Set 𝕜}
(hs : MeromorphicOn s U)
(ht : MeromorphicOn t U)


theorem ceil_add_ofNat (ha : 0 ≤ a) (n : ℕ) [n.AtLeastTwo] :
    ⌈a + (no_index (OfNat.ofNat n))⌉₊ = ⌈a⌉₊ + OfNat.ofNat n

{α : Type u_2}
[LinearOrderedSemiring α]
[FloorSemiring α]
{a : α}
(ha : 0 ≤ a)
(n : ℕ)
[n.AtLeastTwo]

⌈a + OfNat.ofNat n⌉₊ = ⌈a⌉₊ + OfNat.ofNat n


/-- An action of a monoid with zero `R` on a Type `M`, also with `0`, extends `MulAction` and
is compatible with `0` (both in `R` and in `M`), with `1 ∈ R`, and with associativity of
multiplication on the monoid `M`. -/
class MulActionWithZero extends MulAction R M where
  -- these fields are copied from `SMulWithZero`, as `extends` behaves poorly
  /-- Scalar multiplication by any element send `0` to `0`. -/
  smul_zero : ∀ r : R, r • (0 : M) = 0
  /-- Scalar multiplication by the scalar `0` is `0`. -/
  zero_smul : ∀ m : M, (0 : R) • m = 0

{R : Type u_1}
{M : Type u_3}
[MonoidWithZero R]
[Zero M]
[self : MulActionWithZero R M]
(r : R)


@[simp]
lemma commShiftIso_id_hom_app (a : A) (X : C) :
    (commShiftIso (𝟭 C) a).hom.app X = 𝟙 _

{C : Type u_1}
[CategoryTheory.Category.{u_6, u_1} C]
{A : Type u_4}
[AddMonoid A]
[CategoryTheory.HasShift C A]
(a : A)
(X : C)

((CategoryTheory.Functor.id C).commShiftIso a).hom.app X =
  CategoryTheory.CategoryStruct.id (((CategoryTheory.shiftFunctor C a).comp (CategoryTheory.Functor.id C)).obj X)


lemma odd_sub' : Odd (m - n) ↔ (Odd n ↔ Even m)


@[simp] lemma restrictSubtype_ground_basis_iff {I X : Set M.E} :
    (M.restrictSubtype M.E).Basis I X ↔ M.Basis I X

{α : Type u_1}
{M : Matroid α}
{I X : Set ↑M.E}

(M.restrictSubtype M.E).Basis I X ↔ M.Basis ↑I ↑X


@[to_additive]
theorem mem_sup' : x ∈ s ⊔ t ↔ ∃ (y : s) (z : t), (y : C) * z = x

{C : Type u_6}
[CommGroup C]
{s t : Subgroup C}
{x : C}


@[simp] lemma sum'_basis_iff {I X} :
    (Matroid.sum' M).Basis I X ↔ ∀ i, (M i).Basis (Prod.mk i ⁻¹' I) (Prod.mk i ⁻¹' X)

{α : Type u_1}
{ι : Type u_2}
{M : ι → Matroid α}
{I X : Set (ι × α)}

(Matroid.sum' M).Basis I X ↔ ∀ (i : ι), (M i).Basis (Prod.mk i ⁻¹' I) (Prod.mk i ⁻¹' X)


@[simp]
theorem piecewise_range_comp {ι : Sort*} (f : ι → α) [∀ j, Decidable (j ∈ range f)]
    (g₁ g₂ : α → β) : (range f).piecewise g₁ g₂ ∘ f = g₁ ∘ f

{α : Type u_1}
{β : Type u_2}
{ι : Sort u_7}
(f : ι → α)
[(j : α) → Decidable (j ∈ Set.range f)]
(g₁ g₂ : α → β)

(Set.range f).piecewise g₁ g₂ ∘ f = g₁ ∘ f


@[simp]
theorem isBigO_map {k : β → α} {l : Filter β} : f =O[map k l] g ↔ (f ∘ k) =O[l] (g ∘ k)

{α : Type u_1}
{β : Type u_2}
{E : Type u_3}
{F : Type u_4}
[Norm E]
[Norm F]
{f : α → E}
{g : α → F}
{k : β → α}
{l : Filter β}

f =O[Filter.map k l] g ↔ (f ∘ k) =O[l] (g ∘ k)


/-- Two additive monoid homomorphisms `f`, `g` from `ℤ` to an additive monoid are equal
if `f 1 = g 1`. -/
@[ext high]
theorem ext_int [AddMonoid A] {f g : ℤ →+ A} (h1 : f 1 = g 1) : f = g

{A : Type u_5}
[AddMonoid A]
{f g : ℤ →+ A}
(h1 : f 1 = g 1)


/-- Two finite Borel measures are equal if the integrals of all bounded continuous functions with
respect to both agree. -/
theorem ext_of_forall_lintegral_eq [HasOuterApproxClosed Ω] [BorelSpace Ω]
    {μ ν : FiniteMeasure Ω} (h : ∀ (f : Ω →ᵇ ℝ≥0), ∫⁻ x, f x ∂μ = ∫⁻ x, f x ∂ν) :
    μ = ν

(h : ∀ (f : Ω →ᵇ ℝ≥0), ∫⁻ (x : Ω), ↑(f x) ∂↑μ = ∫⁻ (x : Ω), ↑(f x) ∂↑ν)


/-- The **extreme value theorem**: if a continuous function `f` tends to negative infinity away from
compact sets, then it has a global maximum. -/
theorem Continuous.exists_forall_ge [ClosedIciTopology α] [Nonempty β] {f : β → α}
    (hf : Continuous f) (hlim : Tendsto f (cocompact β) atBot) : ∃ x, ∀ y, f y ≤ f x

(hlim : Filter.Tendsto f (Filter.cocompact β) Filter.atBot)


@[simp]
theorem mul_mod (x y : Ordinal) : x * y % x = 0


lemma charpoly_eq_X_pow_iff [IsNoetherian R M] (φ : Module.End R M) :
    φ.charpoly = X ^ finrank R M ↔ ∀ m : M, ∃ (n : ℕ), (φ ^ n) m = 0

{R : Type u_1}
{M : Type u_3}
[CommRing R]
[IsDomain R]
[AddCommGroup M]
[Module R M]
[Module.Finite R M]
[Module.Free R M]
[IsNoetherian R M]
(φ : Module.End R M)

LinearMap.charpoly φ = Polynomial.X ^ FiniteDimensional.finrank R M ↔ ∀ (m : M), ∃ n, (φ ^ n) m = 0


theorem span_preimage_eq [RingHomSurjective τ₁₂] {f : M →ₛₗ[τ₁₂] M₂} {s : Set M₂} (h₀ : s.Nonempty)
    (h₁ : s ⊆ range f) : span R (f ⁻¹' s) = (span R₂ s).comap f

{R : Type u_1}
{M : Type u_2}
[Ring R]
[AddCommGroup M]
[Module R M]
{R₂ : Type u_3}
{M₂ : Type u_4}
[Ring R₂]
[AddCommGroup M₂]
[Module R₂ M₂]
{τ₁₂ : R →+* R₂}
[RingHomSurjective τ₁₂]
{f : M →ₛₗ[τ₁₂] M₂}
{s : Set M₂}
(h₀ : s.Nonempty)
(h₁ : s ⊆ ↑(LinearMap.range f))

Submodule.span R (⇑f ⁻¹' s) = Submodule.comap f (Submodule.span R₂ s)


@[simp] lemma infIrredUpperSet_apply (a : α) : infIrredUpperSet a = ⟨Ici a, infIrred_Ici _⟩

OrderEmbedding.infIrredUpperSet a = ⟨UpperSet.Ici a, ⋯⟩


/-- The image of `canonicalEmbedding` lives in the `ℝ`-submodule of the `x ∈ ((K →+* ℂ) → ℂ)` such
that `conj x_φ = x_(conj φ)` for all `∀ φ : K →+* ℂ`. -/
theorem conj_apply {x : ((K →+* ℂ) → ℂ)} (φ : K →+* ℂ)
    (hx : x ∈ Submodule.span ℝ (Set.range (canonicalEmbedding K))) :
    conj (x φ) = x (ComplexEmbedding.conjugate φ)

(hx : x ∈ Submodule.span ℝ (Set.range ⇑(NumberField.canonicalEmbedding K)))

(starRingEnd ℂ) (x φ) = x (NumberField.ComplexEmbedding.conjugate φ)


/-- `Prod.snd ⁻¹' t` is null measurable w.r.t. `μ.prod ν` iff `t` is null measurable w.r.t. `ν`
provided that `μ ≠ 0`. -/
lemma nullMeasurableSet_preimage_snd [NeZero μ] {t : Set β} :
    NullMeasurableSet (Prod.snd ⁻¹' t) (μ.prod ν) ↔ NullMeasurableSet t ν

{α : Type u_1}
{β : Type u_3}
[MeasurableSpace α]
[MeasurableSpace β]
{μ : MeasureTheory.Measure α}
{ν : MeasureTheory.Measure β}
[MeasureTheory.SFinite ν]
[NeZero μ]
{t : Set β}

MeasureTheory.NullMeasurableSet (Prod.snd ⁻¹' t) (μ.prod ν) ↔ MeasureTheory.NullMeasurableSet t ν


theorem innerDualCone_insert (x : H) (s : Set H) :
    (insert x s).innerDualCone = Set.innerDualCone {x} ⊓ s.innerDualCone

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

(insert x s).innerDualCone = {x}.innerDualCone ⊓ s.innerDualCone


theorem birthday_one_add : (1 + a).birthday = Order.succ a.birthday


theorem bsup_le_iff {o f a} : bsup.{u, v} o f ≤ a ↔ ∀ i h, f i h ≤ a

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

o.bsup f ≤ a ↔ ∀ (i : Ordinal.{u}) (h : i < o), f i h ≤ a


@[simp]
theorem map_id : Completion.map (@id α) = id


theorem LinearMap.toMatrix₂'_compl₂ (B : (n → R) →ₗ[R] (m → R) →ₗ[R] R) (f : (m' → R) →ₗ[R] m → R) :
    toMatrix₂' R (B.compl₂ f) = toMatrix₂' R B * toMatrix' f

{n : Type u_12}
{m : Type u_13}
{m' : Type u_15}
{R : Type u_17}
[CommSemiring R]
[Fintype n]
[Fintype m]
[DecidableEq n]
[DecidableEq m]
[Fintype m']
[DecidableEq m']
(B : (n → R) →ₗ[R] (m → R) →ₗ[R] R)
(f : (m' → R) →ₗ[R] m → R)

(LinearMap.toMatrix₂' R) (B.compl₂ f) = (LinearMap.toMatrix₂' R) B * LinearMap.toMatrix' f


@[to_additive (attr := simp)]
theorem closure_univ : closure (univ : Set M) = ⊤


/-- Given any ring `R` and an ideal `I` of `R[X]`, we get a map `R → R[x] → R[x]/I`.
  If we let `R` be the image of `R` in `R[x]/I` then we also have a map `R[x] → R'[x]`.
  In particular we can map `I` across this map, to get `I'` and a new map `R' → R'[x] → R'[x]/I`.
  This theorem shows `I'` will not contain any non-zero constant polynomials. -/
theorem eq_zero_of_polynomial_mem_map_range (I : Ideal R[X]) (x : ((Quotient.mk I).comp C).range)
    (hx : C x ∈ I.map (Polynomial.mapRingHom ((Quotient.mk I).comp C).rangeRestrict)) : x = 0

(x : ↥((Ideal.Quotient.mk I).comp Polynomial.C).range)

(hx : Polynomial.C x ∈ Ideal.map (Polynomial.mapRingHom ((Ideal.Quotient.mk I).comp Polynomial.C).rangeRestrict) I)


theorem singleton_subset_singleton : ({a} : Set α) ⊆ {b} ↔ a = b


theorem lintegral_coe_le_coe_iff_integral_le {f : α → ℝ≥0} (hfi : Integrable (fun x => (f x : ℝ)) μ)
    {b : ℝ≥0} : ∫⁻ a, f a ∂μ ≤ b ↔ ∫ a, (f a : ℝ) ∂μ ≤ b

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

∫⁻ (a : α), ↑(f a) ∂μ ≤ ↑b ↔ ∫ (a : α), ↑(f a) ∂μ ≤ ↑b


theorem uIcc_subset_uIcc_iff_le :
    [[a₁, b₁]] ⊆ [[a₂, b₂]] ↔ min a₂ b₂ ≤ min a₁ b₁ ∧ max a₁ b₁ ≤ max a₂ b₂

{α : Type u_2}
[LinearOrder α]
[LocallyFiniteOrder α]
{a₁ a₂ b₁ b₂ : α}


/-- The natural isomorphism `(K⟦n⟧).sc i ≅ K.sc i'` when `n + i = i'`. -/
@[simps!]
noncomputable def shiftShortComplexFunctorIso (n i i' : ℤ) (hi : n + i = i') :
    shiftFunctor C n ⋙ shortComplexFunctor C _ i ≅ shortComplexFunctor C _ i'

(C : Type u_1)
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Preadditive C]
(n i i' : ℤ)
(hi : n + i = i')
(X : CochainComplex C ℤ)

((CochainComplex.shiftShortComplexFunctorIso C n i i' hi).inv.app X).τ₃ =
  n.negOnePow • (HomologicalComplex.XIsoOfEq X ⋯).inv


@[to_additive]
theorem Right.self_lt_inv (h : a < 1) : a < a⁻¹

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


/-- A cardinal lifted to the zero universe equals itself. -/
-- porting note (#10618): simp can prove this
-- @[simp]
theorem lift_uzero (a : Cardinal.{u}) : lift.{0} a = a


theorem InnerProductSpace.toInnerProductSpaceable [InnerProductSpace 𝕜 E] :
    InnerProductSpaceable E

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


/-- Arc-length is always less than a multiple of chord-length. -/
lemma angle_le_mul_norm_sub (hx : ‖x‖ = 1) (hy : ‖y‖ = 1) : angle x y ≤ π / 2 * ‖x - y‖

InnerProductGeometry.angle x y ≤ π / 2 * ‖x - y‖


theorem hasBasis_nhds_closure (x : X) : (𝓝 x).HasBasis (fun s => s ∈ 𝓝 x) closure

{X : Type u_1}
[TopologicalSpace X]
[RegularSpace X]
(x : X)


theorem ChartedSpace.secondCountable_of_sigma_compact [SecondCountableTopology H]
    [SigmaCompactSpace M] : SecondCountableTopology M

(H : Type u)
(M : Type u_2)
[TopologicalSpace H]
[TopologicalSpace M]
[ChartedSpace H M]
[SecondCountableTopology H]
[SigmaCompactSpace M]


@[simp, mfld_simps]
theorem trans_toPartialEquiv :
    (e.trans e').toPartialEquiv = e.toPartialEquiv.trans e'.toPartialEquiv

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
(e : α ≃ β)
(e' : β ≃ γ)


theorem single_eq_pi_single [DecidableEq α] (a : α) (b : M) : ⇑(single a b) = Pi.single a b

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


theorem isLeftInversion_of_mem_leftInvSeq {ω : List B} (hω : cs.IsReduced ω) {t : W}
    (ht : t ∈ lis ω) : cs.IsLeftInversion (π ω) t

{B : Type u_1}
{W : Type u_2}
[Group W]
{M : CoxeterMatrix B}
(cs : CoxeterSystem M W)
{ω : List B}
(hω : cs.IsReduced ω)
{t : W}
(ht : t ∈ cs.leftInvSeq ω)


theorem irreducible_X : Irreducible (X : R[X])


/-- If each partial application of `f` is injective, and images of `s` under those partial
applications are disjoint (but not necessarily distinct!), then the size of `t` divides the size of
`finset.image₂ f s t`. -/
theorem card_dvd_card_image₂_right (hf : ∀ a ∈ s, Injective (f a))
    (hs : ((fun a => t.image <| f a) '' s).PairwiseDisjoint id) : t.card ∣ (image₂ f s t).card

{f : α → β → γ}

(hf : ∀ a ∈ s, Function.Injective (f a))

(hs : ((fun a => Finset.image (f a) t) '' ↑s).PairwiseDisjoint id)


lemma ranAdjunction_unit_app (G : D ⥤ H) :
    (L.ranAdjunction H).unit.app G =
      liftOfIsRightKanExtension (L.ran.obj (L ⋙ G)) (L.ranCounit.app (L ⋙ G)) G (𝟙 (L ⋙ G))

[∀ (F : CategoryTheory.Functor C H), L.HasRightKanExtension F]

(L.ranAdjunction H).unit.app G =
  (L.ran.obj (L.comp G)).liftOfIsRightKanExtension (L.ranCounit.app (L.comp G)) G
    (CategoryTheory.CategoryStruct.id (L.comp G))


@[simp]
lemma cocone_app (A : PointedGaloisObject F) (B : C) (f : (A : C) ⟶ B) :
    ((cocone F).ι.app ⟨A⟩).app B f = F.map f A.pt

(F : CategoryTheory.Functor C FintypeCat)

(A : CategoryTheory.PreGaloisCategory.PointedGaloisObject F)

((CategoryTheory.PreGaloisCategory.PointedGaloisObject.cocone F).ι.app (Opposite.op A)).app B f = F.map f A.pt


theorem mem_center_iff {z : R} : z ∈ center R ↔ ∀ g, g * z = z * g

z ∈ NonUnitalSubring.center R ↔ ∀ (g : R), g * z = z * g


theorem condexp_neg (f : α → F') : μ[-f|m] =ᵐ[μ] -μ[f|m]

{α : Type u_1}
{F' : Type u_3}
[NormedAddCommGroup F']
[NormedSpace ℝ F']
[CompleteSpace F']
{m m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
(f : α → F')


theorem neg_one_smul (x : M) : (-1 : R) • x = -x

(R : Type u_2)
{M : Type u_5}
[Ring R]
[AddCommGroup M]
[Module R M]
(x : M)


/-- a variant of `Homotopy.compLeft` useful for dealing with homotopy equivalences. -/
@[simps!]
def compLeftId {f : D ⟶ D} (h : Homotopy f (𝟙 D)) (g : C ⟶ D) : Homotopy (g ≫ f) g

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

(h.compLeftId g).hom i j = g.f i ≫ h.hom i j


@[simp]
theorem symm_comp_self (e : α ≃ᵐ β) : e.symm ∘ e = id

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


theorem relabel_moveRight {x : PGame} {xl' xr'} (el : xl' ≃ x.LeftMoves) (er : xr' ≃ x.RightMoves)
    (j : x.RightMoves) : moveRight (relabel el er) (er.symm j) = x.moveRight j

{x : SetTheory.PGame}
{xl' xr' : Type u_1}
(el : xl' ≃ x.LeftMoves)
(er : xr' ≃ x.RightMoves)
(j : x.RightMoves)

(SetTheory.PGame.relabel el er).moveRight (er.symm j) = x.moveRight j


@[simp] lemma isLowerSet_toLowerSet_preimage {s : Set (WithLowerSet α)} :
    IsLowerSet (toLowerSet ⁻¹' s) ↔ IsOpen s

{α : Type u_1}
[Preorder α]
{s : Set (Topology.WithLowerSet α)}

IsLowerSet (⇑Topology.WithLowerSet.toLowerSet ⁻¹' s) ↔ IsOpen s


@[simp]
theorem coe_sub (s t : Cₛ^n⟮I; F, V⟯) : ⇑(s - t) = s - t

[TopologicalSpace (Bundle.TotalSpace F V)]


theorem inversion_injective (c : P) {R : ℝ} (hR : R ≠ 0) : Injective (inversion c R)

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

Function.Injective (EuclideanGeometry.inversion c R)


theorem smul_set_sdiff₀ (ha : a ≠ 0) : a • (s \ t) = a • s \ a • t

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


theorem mul : Nat.Primrec (unpaired (· * ·))

Nat.Primrec (Nat.unpaired fun x x_1 => x * x_1)


theorem uniformContinuous_ofMul : UniformContinuous (ofMul : α → Additive α)


@[to_additive (attr := simp)]
theorem mem_one : s ∈ (1 : Filter α) ↔ (1 : α) ∈ s


/-- This is used to prove the strictly stronger `ker_fg_of_surjective`. Use it instead. -/
theorem ker_fg_of_mvPolynomial {n : ℕ} (f : MvPolynomial (Fin n) R →ₐ[R] A)
    (hf : Function.Surjective f) [FinitePresentation R A] : f.toRingHom.ker.FG

{R : Type w₁}
{A : Type w₂}
[CommRing R]
[CommRing A]
[Algebra R A]
{n : ℕ}
(f : MvPolynomial (Fin n) R →ₐ[R] A)
(hf : Function.Surjective ⇑f)
[Algebra.FinitePresentation R A]


/-- The oriented angle between two vectors is zero or `π` if and only if those two vectors are
not linearly independent. -/
theorem oangle_eq_zero_or_eq_pi_iff_not_linearIndependent {x y : V} :
    o.oangle x y = 0 ∨ o.oangle x y = π ↔ ¬LinearIndependent ℝ ![x, y]

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

o.oangle x y = 0 ∨ o.oangle x y = ↑π ↔ ¬LinearIndependent ℝ ![x, y]


theorem le_of_le_mul_right (h : c ≠ 0) (hab : a * c ≤ b * c) : a ≤ b

{α : Type u_1}
[LinearOrderedCommGroupWithZero α]
{a b c : α}
(h : c ≠ 0)
(hab : a * c ≤ b * c)


@[measurability]
theorem smul_measure {R : Type*} [Monoid R] [DistribMulAction R ℝ≥0∞] [IsScalarTower R ℝ≥0∞ ℝ≥0∞]
    (h : AEStronglyMeasurable f μ) (c : R) : AEStronglyMeasurable f (c • μ)

(h : MeasureTheory.AEStronglyMeasurable f μ)

MeasureTheory.AEStronglyMeasurable f (c • μ)


protected theorem tendsto_atTop : Tendsto f atTop atTop

Filter.Tendsto (⇑f) Filter.atTop Filter.atTop


@[simp]
theorem mk_coe (f : M →ₛₗ[σ] M₃) (h) : (LinearMap.mk f h : M →ₛₗ[σ] M₃) = f

(h : ∀ (m : R) (x : M), (↑f).toFun (m • x) = σ m • (↑f).toFun x)


lemma sign_add_eq_of_sign_eq : ∀ {m n : ℤ}, m.sign = n.sign → (m + n).sign = n.sign


theorem Sorted.of_cons : Sorted r (a :: l) → Sorted r l

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

List.Sorted r (a :: l) → List.Sorted r l


/-- The Fourier transform satisfies `∫ 𝓕 f * g = ∫ f * 𝓕 g`, i.e., it is self-adjoint. -/
theorem integral_fourierIntegral_smul_eq_flip
    {f : V → ℂ} {g : W → F} (he : Continuous e)
    (hL : Continuous fun p : V × W ↦ L p.1 p.2) (hf : Integrable f μ) (hg : Integrable g ν) :
    ∫ ξ, (fourierIntegral e μ L f ξ) • (g ξ) ∂ν =
      ∫ x, (f x) • (fourierIntegral e ν L.flip g x) ∂μ

{𝕜 : Type u_1}
[CommRing 𝕜]
{V : Type u_2}
[AddCommGroup V]
[Module 𝕜 V]
[MeasurableSpace V]
{W : Type u_3}
[AddCommGroup W]
[Module 𝕜 W]
{F : Type u_5}
[NormedAddCommGroup F]
[NormedSpace ℂ F]
[TopologicalSpace 𝕜]
[TopologicalRing 𝕜]
[TopologicalSpace V]
[BorelSpace V]
[TopologicalSpace W]
[MeasurableSpace W]
[BorelSpace W]
{e : AddChar 𝕜 ↥𝕊}
{μ : MeasureTheory.Measure V}
{L : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜}
{ν : MeasureTheory.Measure W}
[MeasureTheory.SigmaFinite μ]
[MeasureTheory.SigmaFinite ν]
[SecondCountableTopology V]
[CompleteSpace F]
{f : V → ℂ}
{g : W → F}
(he : Continuous ⇑e)
(hL : Continuous fun p => (L p.1) p.2)
(hf : MeasureTheory.Integrable f μ)
(hg : MeasureTheory.Integrable g ν)

∫ (ξ : W), VectorFourier.fourierIntegral e μ L f ξ • g ξ ∂ν =
  ∫ (x : V), f x • VectorFourier.fourierIntegral e ν L.flip g x ∂μ


theorem EventuallyEq.cardinal_iUnion {s t : ι → Set α} (hic : #ι < c)
    (h : ∀ i, s i =ᶠ[l] t i) : ⋃ i, s i =ᶠ[l] ⋃ i, t i

{ι α : Type u}
{c : Cardinal.{u}}
{l : Filter α}
[CardinalInterFilter l c]
{s t : ι → Set α}
(hic : #ι < c)
(h : ∀ (i : ι), s i =ᶠ[l] t i)


@[simp]
protected theorem inv_le_inv : a⁻¹ ≤ b⁻¹ ↔ b ≤ a

a⁻¹ ≤ b⁻¹ ↔ b ≤ a


@[to_additive (attr := simp)] theorem snd_apply_inl (x : M) : snd (inl x : M ∗ N) = 1

{M : Type u_1}
{N : Type u_2}
[AddMonoid M]
[AddMonoid N]
(x : M)

AddMonoid.Coprod.snd (AddMonoid.Coprod.inl x) = 0


@[simp]
theorem lift_eq_ofNat_iff {a : Cardinal.{u}} {n : ℕ} [n.AtLeastTwo] :
    lift.{v} a = (no_index (OfNat.ofNat n)) ↔ a = OfNat.ofNat n

Cardinal.lift.{v, u} a = OfNat.ofNat n ↔ a = OfNat.ofNat n


@[simp]
theorem digits_one (n : ℕ) : digits 1 n = List.replicate n 1


@[simp]
theorem map_id : I.map (RingHom.id R) = I


theorem infty_mem_opensOfCompl {s : Set X} (h₁ : IsClosed s) (h₂ : IsCompact s) :
    ∞ ∈ opensOfCompl s h₁ h₂

{X : Type u_1}
[TopologicalSpace X]
{s : Set X}
(h₁ : IsClosed s)
(h₂ : IsCompact s)

OnePoint.infty ∈ OnePoint.opensOfCompl s h₁ h₂


lemma comm (a : A) : (F₁.commShiftIso a).hom ≫ whiskerRight τ _ =
    whiskerLeft _ τ ≫ (F₂.commShiftIso a).hom

{C : Type u_1}
{D : Type u_2}
[CategoryTheory.Category.{u_7, u_1} C]
[CategoryTheory.Category.{u_6, u_2} D]
{F₁ F₂ : CategoryTheory.Functor C D}
(τ : F₁ ⟶ F₂)
{A : Type u_5}
[AddMonoid A]
[CategoryTheory.HasShift C A]
[CategoryTheory.HasShift D A]
[F₁.CommShift A]
[F₂.CommShift A]
[CategoryTheory.NatTrans.CommShift τ A]
(a : A)

CategoryTheory.CategoryStruct.comp (F₁.commShiftIso a).hom
    (CategoryTheory.whiskerRight τ (CategoryTheory.shiftFunctor D a)) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.whiskerLeft (CategoryTheory.shiftFunctor C a) τ)
    (F₂.commShiftIso a).hom


/-- If a (unital or non-unital) star algebra morphism has an inverse, it is an isomorphism of
star algebras. -/
@[simps]
def ofStarAlgHom (f : F) (g : G) (h₁ : ∀ x, g (f x) = x) (h₂ : ∀ x, f (g x) = x) : A ≃⋆ₐ[R] B

{F : Type u_1}
{G : Type u_2}
{R : Type u_3}
{A : Type u_4}
{B : Type u_5}
[Monoid R]
[NonUnitalNonAssocSemiring A]
[DistribMulAction R A]
[Star A]
[NonUnitalNonAssocSemiring B]
[DistribMulAction R B]
[Star B]
[FunLike F A B]
[NonUnitalAlgHomClass F R A B]
[NonUnitalStarAlgHomClass F R A B]
[FunLike G B A]
(f : F)
(g : G)
(h₁ : ∀ (x : A), g (f x) = x)
(h₂ : ∀ (x : B), f (g x) = x)
(a : A)

(StarAlgEquiv.ofStarAlgHom f g h₁ h₂) a = f a


@[simp]
theorem extentClosure_intentClosure_extentClosure (t : Set β) :
    extentClosure r (intentClosure r <| extentClosure r t) = extentClosure r t

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

extentClosure r (intentClosure r (extentClosure r t)) = extentClosure r t


@[simp, norm_cast]
protected lemma coe_inf [SemilatticeInf α] {x y : Iic a} :
    (↑(x ⊓ y) : α) = (x : α) ⊓ (y : α)

{α : Type u_1}
{a : α}
[SemilatticeInf α]
{x y : ↑(Set.Iic a)}


theorem add_mem_Ioc_iff_right : a + b ∈ Set.Ioc c d ↔ b ∈ Set.Ioc (c - a) (d - a)

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


@[simp]
protected theorem cast_trans {α β γ : Type u} {r : α → α → Prop} {s : β → β → Prop}
    {t : γ → γ → Prop} (h₁ : α = β) (h₁' : β = γ) (h₂ : HEq r s) (h₂' : HEq s t) :
    (RelIso.cast h₁ h₂).trans (RelIso.cast h₁' h₂') = RelIso.cast (h₁.trans h₁') (h₂.trans h₂')

(RelIso.cast h₁ h₂).trans (RelIso.cast h₁' h₂') = RelIso.cast ⋯ ⋯


@[reassoc (attr := simp)]
lemma pushout_inr_inv_inl_of_right_isIso :
    pushout.inr f g ≫ inv (pushout.inl f g) = inv g ≫ f

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

CategoryTheory.Limits.pushout.inr f g ≫ CategoryTheory.inv (CategoryTheory.Limits.pushout.inl f g) =
  CategoryTheory.inv g ≫ f


/-- Baire theorem: if countably many closed sets cover the whole space, then their interiors
are dense. Formulated here with an index set which is a countable set in any type. -/
theorem dense_biUnion_interior_of_closed {S : Set α} {f : α → Set X} (hc : ∀ s ∈ S, IsClosed (f s))
    (hS : S.Countable) (hU : ⋃ s ∈ S, f s = univ) : Dense (⋃ s ∈ S, interior (f s))

{X : Type u_1}
{α : Type u_2}
[TopologicalSpace X]
[BaireSpace X]
{S : Set α}
{f : α → Set X}
(hc : ∀ s ∈ S, IsClosed (f s))
(hS : S.Countable)
(hU : ⋃ s ∈ S, f s = Set.univ)


/-- `invertibleOfMulInvertible` and `invertibleMul` as an equivalence. -/
@[simps apply symm_apply]
def Invertible.mulRight (a : α) {b : α} (_ : Invertible b) : Invertible a ≃ Invertible (a * b)

∀ (x : Invertible b) (x_1 : Invertible a), (Invertible.mulRight a x) x_1 = invertibleMul a b


theorem smeval_mul : (p * q).smeval x  = p.smeval x * q.smeval x

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


@[to_additive (attr := simp)]
protected theorem inv_mul_cancel : IsUnit a → a⁻¹ * a = 1

{α : Type u}
[SubtractionMonoid α]
{a : α}


theorem tan_mul_cos {x : ℂ} (hx : cos x ≠ 0) : tan x * cos x = sin x

Complex.tan x * Complex.cos x = Complex.sin x


theorem intrinsicClosure_subset_closure : intrinsicClosure 𝕜 s ⊆ closure s

{𝕜 : Type u_1}
{V : Type u_2}
{P : Type u_5}
[Ring 𝕜]
[AddCommGroup V]
[Module 𝕜 V]
[TopologicalSpace P]
[AddTorsor V P]
{s : Set P}


theorem intrinsicInterior_nonempty (hs : Convex ℝ s) :
    (intrinsicInterior ℝ s).Nonempty ↔ s.Nonempty

{V : Type u_2}
[NormedAddCommGroup V]
[NormedSpace ℝ V]
[FiniteDimensional ℝ V]
{s : Set V}
(hs : Convex ℝ s)


@[reassoc]
theorem associator_inv_naturality_right (X Y : C) {Z Z' : C} (f : Z ⟶ Z') :
    X ◁ Y ◁ f ≫ (α_ X Y Z').inv = (α_ X Y Z).inv ≫ (X ⊗ Y) ◁ f

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

CategoryTheory.CategoryStruct.comp
    (CategoryTheory.MonoidalCategory.whiskerLeft X (CategoryTheory.MonoidalCategory.whiskerLeft Y f))
    (CategoryTheory.MonoidalCategory.associator X Y Z').inv =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.associator X Y Z).inv
    (CategoryTheory.MonoidalCategory.whiskerLeft (CategoryTheory.MonoidalCategory.tensorObj X Y) f)


@[simp, norm_cast] lemma coe_mk (f : α → β) (hf) : ⇑(mk f hf) = f

(hf : ∀ (a b : α), f (a ⊔ b) = f a ⊔ f b)


@[to_additive]
theorem mulIndicator_mul (s : Set α) (f g : α → M) :
    (mulIndicator s fun a => f a * g a) = fun a => mulIndicator s f a * mulIndicator s g a

{α : Type u_1}
{M : Type u_4}
[MulOneClass M]
(s : Set α)
(f g : α → M)

(s.mulIndicator fun a => f a * g a) = fun a => s.mulIndicator f a * s.mulIndicator g a


@[simp]
theorem opRingEquiv_op_X : opRingEquiv R (op (X : R[X])) = X

(Polynomial.opRingEquiv R) (MulOpposite.op Polynomial.X) = Polynomial.X


@[to_additive (attr := simp)]
theorem fst_toProd (x : M ∗ N) : (toProd x).1 = fst x

{M : Type u_1}
{N : Type u_2}
[Monoid M]
[Monoid N]
(x : Monoid.Coprod M N)

(Monoid.Coprod.toProd x).1 = Monoid.Coprod.fst x


protected theorem smooth (h : M ≃ₘ⟮I, I'⟯ M') : Smooth I I' h

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{E' : Type u_3}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H : Type u_5}
[TopologicalSpace H]
{H' : Type u_6}
[TopologicalSpace H']
{I : ModelWithCorners 𝕜 E H}
{I' : ModelWithCorners 𝕜 E' H'}
{M : Type u_9}
[TopologicalSpace M]
[ChartedSpace H M]
{M' : Type u_10}
[TopologicalSpace M']
[ChartedSpace H' M']
(h : M ≃ₘ⟮I, I'⟯ M')


theorem decode_encodeNum : ∀ n, decodeNum (encodeNum n) = n

Computability.decodeNum (Computability.encodeNum n) = n


theorem Prod.left_inv {x : TotalSpace (F₁ × F₂) (E₁ ×ᵇ E₂)}
    (h : x ∈ π (F₁ × F₂) (E₁ ×ᵇ E₂) ⁻¹' (e₁.baseSet ∩ e₂.baseSet)) :
    Prod.invFun' e₁ e₂ (Prod.toFun' e₁ e₂ x) = x

[TopologicalSpace (Bundle.TotalSpace F₁ E₁)]

[TopologicalSpace (Bundle.TotalSpace F₂ E₂)]

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

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

{x : Bundle.TotalSpace (F₁ × F₂) fun x => E₁ x × E₂ x}

(h : x ∈ Bundle.TotalSpace.proj ⁻¹' (e₁.baseSet ∩ e₂.baseSet))

Trivialization.Prod.invFun' e₁ e₂ (Trivialization.Prod.toFun' e₁ e₂ x) = x


theorem Integrable.const_mul' {f : α → 𝕜} (h : Integrable f μ) (c : 𝕜) :
    Integrable ((fun _ : α => c) * f) μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{𝕜 : Type u_5}
[NormedRing 𝕜]
{f : α → 𝕜}
(h : MeasureTheory.Integrable f μ)
(c : 𝕜)

MeasureTheory.Integrable ((fun x => c) * f) μ


theorem restrict_apply (μ : FiniteMeasure Ω) (A : Set Ω) {s : Set Ω} (s_mble : MeasurableSet s) :
    (μ.restrict A) s = μ (s ∩ A)

{Ω : Type u_1}
[MeasurableSpace Ω]
(μ : MeasureTheory.FiniteMeasure Ω)
(A : Set Ω)
{s : Set Ω}
(s_mble : MeasurableSet s)


@[simp] theorem FilterBasis.mem_sets {s : Set α} {B : FilterBasis α} : s ∈ B.sets ↔ s ∈ B

{α : Type u_1}
{s : Set α}
{B : FilterBasis α}


theorem galois_poly_separable {K : Type*} [Field K] (p q : ℕ) [CharP K p] (h : p ∣ q) :
    Separable (X ^ q - X : K[X])

{K : Type u_1}
[Field K]
(p q : ℕ)
[CharP K p]
(h : p ∣ q)

(Polynomial.X ^ q - Polynomial.X).Separable


theorem IsInitial.strict_hom_ext (hI : IsInitial I) {A : C} (f g : A ⟶ I) : f = g

(hI : CategoryTheory.Limits.IsInitial I)


@[ext]
theorem ext : (∀ x, p x = q x) → p = q

{E : Type u_4}
[AddGroup E]
{p q : NonarchAddGroupNorm E}


@[simp]
theorem eval_monomial {n a} : (monomial n a).eval x = a * x ^ n

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

Polynomial.eval x ((Polynomial.monomial n) a) = a * x ^ n


theorem scheme_toScheme {X Y : Scheme.{u}} (f : X ⟶ Y) [AlgebraicGeometry.IsOpenImmersion f] :
    toScheme Y f.1 = X

{X Y : AlgebraicGeometry.Scheme}
(f : X ⟶ Y)
[AlgebraicGeometry.IsOpenImmersion f]

AlgebraicGeometry.PresheafedSpace.IsOpenImmersion.toScheme Y f.val = X


theorem isTorsionBySet_annihilator : IsTorsionBySet R M (Module.annihilator R M)

(R : Type u_1)
(M : Type u_2)
[CommSemiring R]
[AddCommMonoid M]
[Module R M]

Module.IsTorsionBySet R M ↑(Module.annihilator R M)


/-- A homology data for a short complex `S` in the opposite category
induces a homology data for `S.unop`. -/
@[simps]
def unop {S : ShortComplex Cᵒᵖ} (h : S.HomologyData) : S.unop.HomologyData


@[simp]
theorem Commute.smul_left_iff₀ [Mul β] [SMulCommClass α β β] [IsScalarTower α β β] {a b : β} {c : α}
    (hc : c ≠ 0) : Commute (c • a) b ↔ Commute a b

{α : Type u}
{β : Type v}
[GroupWithZero α]
[MulAction α β]
[Mul β]
[SMulCommClass α β β]
[IsScalarTower α β β]
{a b : β}
{c : α}
(hc : c ≠ 0)


@[to_additive]
theorem of_mulEquivOfMulEquiv {k : LocalizationMap T Q} {j : M ≃* P} (H : S.map j.toMonoidHom = T) :
    (f.ofMulEquivOfLocalizations (f.mulEquivOfMulEquiv k H)).toMap = k.toMap.comp j.toMonoidHom

{M : Type u_1}
[CommMonoid M]
{S : Submonoid M}
{N : Type u_2}
[CommMonoid N]
{P : Type u_3}
[CommMonoid P]
(f : S.LocalizationMap N)
{T : Submonoid P}
{Q : Type u_4}
[CommMonoid Q]
{k : T.LocalizationMap Q}
{j : M ≃* P}
(H : Submonoid.map j.toMonoidHom S = T)


@[ext]
theorem ext ⦃f g : CircleDeg1Lift⦄ (h : ∀ x, f x = g x) : f = g

⦃f g : CircleDeg1Lift⦄
(h : ∀ (x : ℝ), f x = g x)


/-- See `zero_lt_four'` for a version with the type explicit. -/
@[simp] lemma zero_lt_four : (0 : α) < 4

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


@[to_additive]
theorem singleton_smul_singleton (a : α) (b : β) : ({a} : Finset α) • ({b} : Finset β) = {a • b}

{α : Type u_2}
{β : Type u_3}
[DecidableEq β]
[VAdd α β]
(a : α)
(b : β)


theorem modEq_nine_digits_sum (n : ℕ) : n ≡ (digits 10 n).sum [MOD 9]


/--
This typeclass captures properties shared by ℝ and ℂ, with an API that closely matches that of ℂ.
-/
class RCLike (K : semiOutParam Type*) extends DenselyNormedField K, StarRing K,
    NormedAlgebra ℝ K, CompleteSpace K where
  re : K →+ ℝ
  im : K →+ ℝ
  /-- Imaginary unit in `K`. Meant to be set to `0` for `K = ℝ`. -/
  I : K
  I_re_ax : re I = 0
  I_mul_I_ax : I = 0 ∨ I * I = -1
  re_add_im_ax : ∀ z : K, 𝓚 (re z) + 𝓚 (im z) * I = z
  ofReal_re_ax : ∀ r : ℝ, re (𝓚 r) = r
  ofReal_im_ax : ∀ r : ℝ, im (𝓚 r) = 0
  mul_re_ax : ∀ z w : K, re (z * w) = re z * re w - im z * im w
  mul_im_ax : ∀ z w : K, im (z * w) = re z * im w + im z * re w
  conj_re_ax : ∀ z : K, re (conj z) = re z
  conj_im_ax : ∀ z : K, im (conj z) = -im z
  conj_I_ax : conj I = -I
  norm_sq_eq_def_ax : ∀ z : K, ‖z‖ ^ 2 = re z * re z + im z * im z
  mul_im_I_ax : ∀ z : K, im z * im I = im z
  /-- only an instance in the `ComplexOrder` locale -/
  [toPartialOrder : PartialOrder K]
  le_iff_re_im {z w : K} : z ≤ w ↔ re z ≤ re w ∧ im z = im w
  -- note we cannot put this in the `extends` clause
  [toDecidableEq : DecidableEq K]

{K : semiOutParam (Type u_1)}
[self : RCLike K]
(r : ℝ)


@[simp]
lemma natCast_mul_natCast_mul (h : SemiconjBy a x y) (m n : ℕ) :
    SemiconjBy (m * a) (n * x) (n * y)

{α : Type u_1}
[Semiring α]
{a x y : α}
(h : SemiconjBy a x y)
(m n : ℕ)


theorem Char.ne_of_val_ne {c d : Char} (h : Not (Eq c.val d.val)) : Not (Eq c d)


theorem iInf_true {s : True → α} : iInf s = s trivial

{α : Type u_1}
[CompleteLattice α]
{s : True → α}


@[simp]
theorem idZeroEquivIsoZero_apply_inv (X : C) (h : 𝟙 X = 0) : ((idZeroEquivIsoZero X) h).inv = 0

((CategoryTheory.Limits.idZeroEquivIsoZero X) h).inv = 0


@[simp]
theorem cos_add_int_mul_two_pi (x : ℝ) (n : ℤ) : cos (x + n * (2 * π)) = cos x

Real.cos (x + ↑n * (2 * Real.pi)) = Real.cos x


/-- A natural isomorphism `L₁ ≅ L₂` induces an equivalence of categories
    `Comma L₁ R ≌ Comma L₂ R`. -/
@[simps!]
def mapLeftIso (i : 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}
(i : L₁ ≅ L₂)
(X : CategoryTheory.Comma L₁ R)

((CategoryTheory.Comma.mapLeftIso R i).functor.obj X).right = X.right


theorem Filter.HasBasis.exists_inter_eq_singleton_of_mem_discrete {ι : Type*} {p : ι → Prop}
    {t : ι → Set X} {s : Set X} [DiscreteTopology s] {x : X} (hb : (𝓝 x).HasBasis p t)
    (hx : x ∈ s) : ∃ i, p i ∧ t i ∩ s = {x}

{X : Type u_1}
[TopologicalSpace X]
{ι : Type u_3}
{p : ι → Prop}
{t : ι → Set X}
{s : Set X}
[DiscreteTopology ↑s]
{x : X}
(hb : (𝓝 x).HasBasis p t)
(hx : x ∈ s)


theorem smul_Ioo : r • Ioo a b = Ioo (r • a) (r • b)

{K : Type u_2}
[LinearOrderedField K]
{a b r : K}
(hr : 0 < r)

r • Set.Ioo a b = Set.Ioo (r • a) (r • b)


/-- If `f` is a monoid homomorphism then `f (a * b) = f a * f b`. -/
@[to_additive "If `f` is an additive monoid homomorphism then `f (a + b) = f a + f b`."]
protected theorem MonoidHom.map_mul [MulOneClass M] [MulOneClass N] (f : M →* N) (a b : M) :
    f (a * b) = f a * f b

{M : Type u_4}
{N : Type u_5}
[MulOneClass M]
[MulOneClass N]
(f : M →* N)
(a b : M)


theorem hnot_hnot_sup_boundary (a : α) : ￢￢a ⊔ ∂ a = a

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

￢￢a ⊔ ∂ a = a


/-- Consider a series of functions `∑' n, f n x` on a preconnected open set. If the series converges
at a point, and all functions in the series are differentiable with a summable bound on the
derivatives, then the series is differentiable on the set and its derivative is the sum of the
derivatives. -/
theorem hasDerivAt_tsum_of_isPreconnected (hu : Summable u) (ht : IsOpen t)
    (h't : IsPreconnected t) (hg : ∀ n y, y ∈ t → HasDerivAt (g n) (g' n y) y)
    (hg' : ∀ n y, y ∈ t → ‖g' n y‖ ≤ u n) (hy₀ : y₀ ∈ t) (hg0 : Summable fun n => g n y₀)
    (hy : y ∈ t) : HasDerivAt (fun z => ∑' n, g n z) (∑' n, g' n y) y

(hg : ∀ (n : α), ∀ y ∈ t, HasDerivAt (g n) (g' n y) y)

(hg' : ∀ (n : α), ∀ y ∈ t, ‖g' n y‖ ≤ u n)

HasDerivAt (fun z => ∑' (n : α), g n z) (∑' (n : α), g' n y) y


theorem mapRange_comp (f : N → P) (hf : f 0 = 0) (f₂ : M → N) (hf₂ : f₂ 0 = 0) (h : (f ∘ f₂) 0 = 0)
    (g : α →₀ M) : mapRange (f ∘ f₂) h g = mapRange f hf (mapRange f₂ hf₂ g)

{α : Type u_1}
{M : Type u_5}
{N : Type u_7}
{P : Type u_8}
[Zero M]
[Zero N]
[Zero P]
(f : N → P)
(hf : f 0 = 0)
(f₂ : M → N)
(hf₂ : f₂ 0 = 0)
(h : (f ∘ f₂) 0 = 0)
(g : α →₀ M)

Finsupp.mapRange (f ∘ f₂) h g = Finsupp.mapRange f hf (Finsupp.mapRange f₂ hf₂ g)


@[to_additive]
theorem mul_right_injective (a : G) : Injective (a * ·)

{G : Type u_3}
[Add G]
[IsLeftCancelAdd G]
(a : G)


/-- A product of a function `f : Fin (n + 1) → β` over all `Fin (n + 1)`
is the product of `f (Fin.last n)` plus the remaining product -/
@[to_additive "A sum of a function `f : Fin (n + 1) → β` over all `Fin (n + 1)` is the sum of
`f (Fin.last n)` plus the remaining sum"]
theorem prod_univ_castSucc [CommMonoid β] {n : ℕ} (f : Fin (n + 1) → β) :
    ∏ i, f i = (∏ i : Fin n, f (Fin.castSucc i)) * f (last n)

{β : Type u_2}
[AddCommMonoid β]
{n : ℕ}
(f : Fin (n + 1) → β)

∑ i : Fin (n + 1), f i = ∑ i : Fin n, f i.castSucc + f (Fin.last n)


theorem conjugate {x : R} (hx : x ∈ skewAdjoint R) (z : R) : z * x * star z ∈ skewAdjoint R

{R : Type u_1}
[Ring R]
[StarRing R]
{x : R}
(hx : x ∈ skewAdjoint R)
(z : R)


/-- The equivalence of functor categories given by currying/uncurrying.
-/
@[simps!]
def currying : C ⥤ D ⥤ E ≌ C × D ⥤ E

{C : Type u₂}
[CategoryTheory.Category.{v₂, u₂} C]
{D : Type u₃}
[CategoryTheory.Category.{v₃, u₃} D]
{E : Type u₄}
[CategoryTheory.Category.{v₄, u₄} E]
(F : CategoryTheory.Functor (C × D) E)

∀ {X Y : C} (f : X ⟶ Y) (Y_1 : D),
  ((CategoryTheory.currying.inverse.obj F).map f).app Y_1 = F.map (f, CategoryTheory.CategoryStruct.id Y_1)


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₄ ∨ y ≠ -y - W.a₁ * x - W.a₃)

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


/-- `s` is an additive submonoid: a set containing 0 and closed under addition.
Note that this structure is deprecated, and the bundled variant `AddSubmonoid A` should be
preferred. -/
structure IsAddSubmonoid (s : Set A) : Prop where
  /-- The proposition that s contains 0. -/
  zero_mem : (0 : A) ∈ s
  /-- The proposition that s is closed under addition. -/
  add_mem {a b} : a ∈ s → b ∈ s → a + b ∈ s

{A : Type u_2}
[AddMonoid A]
{s : Set A}
(self : IsAddSubmonoid s)


/-- Multiplying the second vector passed to `oangle` by a negative real produces the same angle
as negating that vector. -/
@[simp]
theorem oangle_smul_right_of_neg (x y : V) {r : ℝ} (hr : r < 0) :
    o.oangle x (r • y) = o.oangle x (-y)

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


/-- In an s-finite space, among disjoint measurable sets, only countably many can have positive
measure. -/
theorem countable_meas_pos_of_disjoint_iUnion {ι : Type*} {_ : MeasurableSpace α} {μ : Measure α}
    [SFinite μ] {As : ι → Set α} (As_mble : ∀ i : ι, MeasurableSet (As i))
    (As_disj : Pairwise (Disjoint on As)) : Set.Countable { i : ι | 0 < μ (As i) }

∀ {x : MeasurableSpace α} {μ : MeasureTheory.Measure α} [inst : MeasureTheory.SFinite μ] {As : ι → Set α},
  (∀ (i : ι), MeasurableSet (As i)) → Pairwise (Disjoint on As) → {i | 0 < μ (As i)}.Countable


@[simp] lemma aleph0_mul_ofENat {m : ℕ∞} (hm : m ≠ 0) : ℵ₀ * m = ℵ₀


@[to_additive]
theorem multipliable_one : Multipliable (fun _ ↦ 1 : β → α)

{α : Type u_1}
{β : Type u_2}
[AddCommMonoid α]
[TopologicalSpace α]


@[simp] theorem MeasurableSpace.comap_not (p : α → Prop) :
    MeasurableSpace.comap (fun a ↦ ¬p a) inferInstance = MeasurableSpace.comap p inferInstance

MeasurableSpace.comap (fun a => ¬p a) inferInstance = MeasurableSpace.comap p inferInstance


theorem le_coe_iff {n : ℕ∞} {k : ℕ} : n ≤ ↑k ↔ ∃ (n₀ : ℕ), n = n₀ ∧ n₀ ≤ k

n ≤ ↑k ↔ ∃ n₀, n = ↑n₀ ∧ n₀ ≤ k


@[simp]
theorem constantBaseRingEquiv_symm (r : R) :
    (constantBaseRingEquiv ι R).symm r = algebraMap _ _ r

{ι : Type u_1}
{R : Type u_3}
[CommSemiring R]
[Fintype ι]
(r : R)

(PiTensorProduct.constantBaseRingEquiv ι R).symm r = (algebraMap R (⨂[R] (x : ι), R)) r


/-- This lemma relates `weightedTotalDegree` and `weightedTotalDegree'`. -/
theorem weightedTotalDegree_coe (w : σ → M) (p : MvPolynomial σ R) (hp : p ≠ 0) :
    weightedTotalDegree' w p = ↑(weightedTotalDegree w p)

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
{σ : Type u_3}
[AddCommMonoid M]
[SemilatticeSup M]
[OrderBot M]
(w : σ → M)
(p : MvPolynomial σ R)
(hp : p ≠ 0)

MvPolynomial.weightedTotalDegree' w p = ↑(MvPolynomial.weightedTotalDegree w p)


lemma norm_natCast_cpow_pos_of_pos {n : ℕ} (hn : 0 < n) (s : ℂ) : 0 < ‖(n : ℂ) ^ s‖


theorem inv_pow_strictAnti (a1 : 1 < a) : StrictAnti fun n : ℕ => (a ^ n)⁻¹

{α : Type u_2}
[LinearOrderedSemifield α]
{a : α}
(a1 : 1 < a)


@[simp, reassoc]
theorem pullbackFstιToV_fst (i j : 𝒰.J) :
    pullbackFstιToV 𝒰 f g i j ≫ pullback.fst _ _ = pullback.snd _ _

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

AlgebraicGeometry.Scheme.Pullback.pullbackFstιToV 𝒰 f g i j ≫
    CategoryTheory.Limits.pullback.fst (CategoryTheory.Limits.pullback.fst (𝒰.map j ≫ f) g ≫ 𝒰.map j) (𝒰.map i) =
  CategoryTheory.Limits.pullback.snd
    (CategoryTheory.Limits.pullback.fst (AlgebraicGeometry.Scheme.Pullback.p1 𝒰 f g) (𝒰.map i))
    ((AlgebraicGeometry.Scheme.Pullback.gluing 𝒰 f g).ι j)


@[simp]
theorem cone_snd (s : CommSq f g h i) : s.cone.snd = g

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{W X Y Z : C}
{f : W ⟶ X}
{g : W ⟶ Y}
{h : X ⟶ Z}
{i : Y ⟶ Z}
(s : CategoryTheory.CommSq f g h i)


@[to_additive (attr := simp)]
theorem comap_id (S : Submonoid P) : S.comap (MonoidHom.id P) = S

{P : Type u_3}
[AddZeroClass P]
(S : AddSubmonoid P)

AddSubmonoid.comap (AddMonoidHom.id P) S = S


@[to_additive]
theorem unop_sSup (S : Set (Subgroup Gᵐᵒᵖ)) : (sSup S).unop = sSup (.op ⁻¹' S)

{G : Type u_2}
[Group G]
(S : Set (Subgroup Gᵐᵒᵖ))

(sSup S).unop = sSup (Subgroup.op ⁻¹' S)


/-- Equivalence between `Fin m × Fin n` and `Fin (m * n)` -/
@[simps]
def finProdFinEquiv : Fin m × Fin n ≃ Fin (m * n)

finProdFinEquiv.symm x = (x.divNat, x.modNat)


/-- `lift.{max u v, u}` equals `lift.{v, u}`. -/
@[simp, nolint simpNF]
theorem lift_umax : lift.{max u v, u} = lift.{v, u}

Cardinal.lift.{max u v, u} = Cardinal.lift.{v, u}


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


lemma exists_norm_eq_mul_self (x : K) : ∃ c, ‖c‖ = 1 ∧ ↑‖x‖ = c * x


theorem sup_eq_of_range_eq {ι ι'} {f : ι → Ordinal} {g : ι' → Ordinal}
    (h : Set.range f = Set.range g) : sup.{u, max v w} f = sup.{v, max u w} g

{ι : Type u}
{ι' : Type v}
{f : ι → Ordinal.{max (max u v) w}}
{g : ι' → Ordinal.{max (max u v) w}}
(h : Set.range f = Set.range g)


@[to_additive]
theorem IsOpen.mul_closure (hs : IsOpen s) (t : Set G) : s * closure t = s * t

{G : Type w}
[TopologicalSpace G]
[Group G]
[TopologicalGroup G]
{s : Set G}
(hs : IsOpen s)
(t : Set G)


theorem finsuppTensorFinsupp'_symm_single_eq_tmul_single_one (i : ι × κ) (r : R) :
    (finsuppTensorFinsupp' R ι κ).symm (Finsupp.single i r) =
      Finsupp.single i.1 r ⊗ₜ Finsupp.single i.2 1

(R : Type u_1)
(ι : Type u_5)
(κ : Type u_6)
[CommSemiring R]
(i : ι × κ)
(r : R)

(finsuppTensorFinsupp' R ι κ).symm (Finsupp.single i r) = Finsupp.single i.1 r ⊗ₜ[R] Finsupp.single i.2 1


protected theorem Sized.isAntichain (hA : A.Sized r) : IsAntichain (· ⊆ ·) A

{α : Type u_1}
{A : Set (Finset α)}
{r : ℕ}
(hA : Set.Sized r A)


@[simp]
theorem isClosed_image (h : X ≃ₜ Y) {s : Set X} : IsClosed (h '' s) ↔ IsClosed s

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


/-- If a group satisfies the universal property of a free group with respect to a given type, then
it is free. Here the universal property is expressed as in `IsFreeGroup.unique_lift`.  -/
lemma ofUniqueLift {G : Type u} [Group G] (X : Type u) (of : X → G)
    (h : ∀ {H : Type u} [Group H] (f : X → H), ∃! F : G →* H, ∀ a, F (of a) = f a) :
    IsFreeGroup G

(h : ∀ {H : Type u} [inst : Group H] (f : X → H), ∃! F, ∀ (a : X), F (of a) = f a)


theorem isEmpty_iff (s : String) : isEmpty s ↔ s = ""


lemma measurable_densityProcess_countableFiltration_aux (κ : Kernel α (γ × β)) (ν : Kernel α γ)
    (n : ℕ) {s : Set β} (hs : MeasurableSet s) :
    Measurable[mα.prod (countableFiltration γ n)] (fun (p : α × γ) ↦
      κ p.1 (countablePartitionSet n p.2 ×ˢ s) / ν p.1 (countablePartitionSet n p.2))

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

Measurable fun p =>
  (κ p.1) (MeasurableSpace.countablePartitionSet n p.2 ×ˢ s) / (ν p.1) (MeasurableSpace.countablePartitionSet n p.2)


@[simp]
theorem Quotient.lift_mk [s : Setoid α] (f : α → β) (h : ∀ a b : α, a ≈ b → f a = f b) (x : α) :
    Quotient.lift f h (Quotient.mk s x) = f x

{α : Sort u_1}
{β : Sort u_2}
[s : Setoid α]
(f : α → β)
(h : ∀ (a b : α), a ≈ b → f a = f b)
(x : α)


@[simp]
theorem preimageHomeomorph_symm_apply {s : Set B} (hb : s ⊆ e.baseSet) (p : s × F) :
    (e.preimageHomeomorph hb).symm p =
      ⟨e.symm (p.1, p.2), ((preimageHomeomorph_symm_apply.aux e hb) p).2⟩

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

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


/-- In a compact space `α`, any function has compact support. -/
@[to_additive]
theorem HasCompactMulSupport.of_compactSpace (f : α → γ) :
    HasCompactMulSupport f

{α : Type u_2}
{γ : Type u_5}
[TopologicalSpace α]
[CompactSpace α]
[One γ]
(f : α → γ)


theorem equiv_symm_eq_conj (b : B) :
    (of (φ.symm b : G) : HNNExtension G A B φ) = t⁻¹ * of (b : G) * t

{G : Type u_1}
[Group G]
{A B : Subgroup G}
{φ : ↥A ≃* ↥B}
(b : ↥B)

HNNExtension.of ↑(φ.symm b) = HNNExtension.t⁻¹ * HNNExtension.of ↑b * HNNExtension.t


theorem neg_mk_mul_moveRight_inl {xl xr yl yr} {xL xR yL yR} {i j} :
    (-(mk xl xr xL xR * mk yl yr yL yR)).moveRight (Sum.inl (i, j)) =
      -(xL i * mk yl yr yL yR + mk xl xr xL xR * yL j - xL i * yL j)

{xl xr yl yr : Type u_1}
{xL : xl → SetTheory.PGame}
{xR : xr → SetTheory.PGame}
{yL : yl → SetTheory.PGame}
{yR : yr → SetTheory.PGame}
{i : xl}
{j : yl}

(-(SetTheory.PGame.mk xl xr xL xR * SetTheory.PGame.mk yl yr yL yR)).moveRight (Sum.inl (i, j)) =
  -(xL i * SetTheory.PGame.mk yl yr yL yR + SetTheory.PGame.mk xl xr xL xR * yL j - xL i * yL j)


theorem addInequality_sat (w : c + Coeffs.dot x y ≥ 0) :
    Constraint.sat' { lowerBound := some (-c), upperBound := none } x y

{c : Int}
{x y : Lean.Omega.Coeffs}
(w : c + x.dot y ≥ 0)

{ lowerBound := some (-c), upperBound := none }.sat' x y = true


lemma starCenterToCentroid_apply (z : NonUnitalStarSubsemiring.center α) (a : α) :
    (starCenterToCentroid z) a = z * a

(z : ↥(NonUnitalStarSubsemiring.center α))

(CentroidHom.starCenterToCentroid z) a = ↑z * a


theorem add_sat (w₁ : c₁.sat x₁) (w₂ : c₂.sat x₂) : (add c₁ c₂).sat (x₁ + x₂)

{c₁ c₂ : Lean.Omega.Constraint}
{x₁ x₂ : Int}
(w₁ : c₁.sat x₁ = true)
(w₂ : c₂.sat x₂ = true)


theorem fderivWithin_mul' (hxs : UniqueDiffWithinAt 𝕜 s x) (ha : DifferentiableWithinAt 𝕜 a s x)
    (hb : DifferentiableWithinAt 𝕜 b s x) :
    fderivWithin 𝕜 (fun y => a y * b y) s x =
      a x • fderivWithin 𝕜 b s x + (fderivWithin 𝕜 a s x).smulRight (b x)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{x : E}
{s : Set E}
{𝔸 : Type u_6}
[NormedRing 𝔸]
[NormedAlgebra 𝕜 𝔸]
{a b : E → 𝔸}
(hxs : UniqueDiffWithinAt 𝕜 s x)
(ha : DifferentiableWithinAt 𝕜 a s x)
(hb : DifferentiableWithinAt 𝕜 b s x)


@[to_additive (attr := simp)]
theorem inv_thickening : (thickening δ s)⁻¹ = thickening δ s⁻¹

{E : Type u_1}
[SeminormedAddCommGroup E]
(δ : ℝ)
(s : Set E)

-Metric.thickening δ s = Metric.thickening δ (-s)


theorem get_succ_scanl {i : ℕ} {h : i + 1 < (scanl f b l).length} :
    (scanl f b l).get ⟨i + 1, h⟩ =
      f ((scanl f b l).get ⟨i, Nat.lt_of_succ_lt h⟩)
        (l.get ⟨i, Nat.lt_of_succ_lt_succ (lt_of_lt_of_le h (le_of_eq (length_scanl b l)))⟩)

{α : Type u}
{β : Type v}
{f : β → α → β}
{b : β}
{l : List α}
{i : ℕ}
{h : i + 1 < (List.scanl f b l).length}

(List.scanl f b l).get ⟨i + 1, h⟩ = f ((List.scanl f b l).get ⟨i, ⋯⟩) (l.get ⟨i, ⋯⟩)


@[simp]
theorem mk_out (a : Associates α) : Associates.mk a.out = a

{α : Type u_1}
[CancelCommMonoidWithZero α]
[NormalizationMonoid α]
(a : Associates α)


/-- If the sign of the angle between two vectors is positive, the vectors are not equal. -/
theorem ne_of_oangle_sign_eq_one {x y : V} (h : (o.oangle x y).sign = 1) : x ≠ y

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


@[simp, norm_cast]
theorem coe_ssubset_coe {S T : A} : (S : Set B) ⊂ T ↔ S < T

{A : Type u_1}
{B : Type u_2}
[i : SetLike A B]
{S T : A}


/-- **Phragmen-Lindelöf principle** in the second quadrant. Let `f : ℂ → E` be a function such that

* `f` is differentiable in the open second quadrant and is continuous on its closure;
* `‖f z‖` is bounded from above by `A * exp(B * (abs z) ^ c)` on the open second quadrant
  for some `c < 2`;
* `‖f z‖` is bounded from above by a constant `C` on the boundary of the second quadrant.

Then `‖f z‖` is bounded from above by the same constant on the closed second quadrant. -/
theorem quadrant_II (hd : DiffContOnCl ℂ f (Iio 0 ×ℂ Ioi 0))
    (hB : ∃ c < (2 : ℝ), ∃ B,
      f =O[cobounded ℂ ⊓ 𝓟 (Iio 0 ×ℂ Ioi 0)] fun z => expR (B * abs z ^ c))
    (hre : ∀ x : ℝ, x ≤ 0 → ‖f x‖ ≤ C) (him : ∀ x : ℝ, 0 ≤ x → ‖f (x * I)‖ ≤ C) (hz_re : z.re ≤ 0)
    (hz_im : 0 ≤ z.im) : ‖f z‖ ≤ C

(hd : DiffContOnCl ℂ f (Set.Iio 0 ×ℂ Set.Ioi 0))

(hB : ∃ c < 2, ∃ B, f =O[Bornology.cobounded ℂ ⊓ 𝓟 (Set.Iio 0 ×ℂ Set.Ioi 0)] fun z => expR (B * Complex.abs z ^ c))

(him : ∀ (x : ℝ), 0 ≤ x → ‖f (↑x * Complex.I)‖ ≤ C)


@[simp]
theorem cliqueSet_zero (G : SimpleGraph α) : G.cliqueSet 0 = {∅}


lemma Continuous.finset_sup (hs : ∀ i ∈ s, Continuous (f i)) : Continuous (s.sup f)

{L : Type u_1}
{X : Type u_2}
[TopologicalSpace L]
[TopologicalSpace X]
{ι : Type u_3}
[SemilatticeSup L]
[OrderBot L]
[ContinuousSup L]
{s : Finset ι}
{f : ι → X → L}
(hs : ∀ i ∈ s, Continuous (f i))


/-- If `f` and `g` are locally Lipschitz, so is the induced map `f × g` to the product type. -/
protected lemma prod {f : α → β} (hf : LocallyLipschitz f) {g : α → γ} (hg : LocallyLipschitz g) :
    LocallyLipschitz fun x => (f x, g x)

{α : Type u}
{β : Type v}
{γ : Type w}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
[PseudoEMetricSpace γ]
{f : α → β}
(hf : LocallyLipschitz f)
{g : α → γ}
(hg : LocallyLipschitz g)


@[simp]
theorem mem_top {x : A} : x ∈ (⊤ : Subalgebra R A)

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


theorem CauchySeq.prod {γ} [UniformSpace β] [Preorder γ] {u : γ → α} {v : γ → β}
    (hu : CauchySeq u) (hv : CauchySeq v) : CauchySeq fun x => (u x, v x)

{α : Type u}
{β : Type v}
[uniformSpace : UniformSpace α]
{γ : Type u_1}
[UniformSpace β]
[Preorder γ]
{u : γ → α}
{v : γ → β}
(hu : CauchySeq u)
(hv : CauchySeq v)


theorem of_concat_eq_concat {as bs : List α} {a b : α} (h : as.concat a = bs.concat b) : as = bs ∧ a = b

{α : Type u}
{as bs : List α}
{a b : α}
(h : as.concat a = bs.concat b)


lemma iInf_eq_zero_iff {ι : Sort*} {f : ι → Cardinal} :
    (⨅ i, f i) = 0 ↔ IsEmpty ι ∨ ∃ i, f i = 0


theorem mem_cons_of_mem (h : a ∈ s) : a ∈ b ::ₛ s

{α : Type u_1}
{n : ℕ}
{s : Sym α n}
{a b : α}
(h : a ∈ s)


@[to_additive]
protected lemma IsOfFinOrder.orderOf_pow (h : IsOfFinOrder x) :
    orderOf (x ^ n) = orderOf x / gcd (orderOf x) n

{G : Type u_1}
[Monoid G]
(x : G)
(n : ℕ)
(h : IsOfFinOrder x)

orderOf (x ^ n) = orderOf x / (orderOf x).gcd n


@[to_additive (attr := aesop safe 20 apply (rule_sets := [Measurable]))]
protected theorem div [Group β] [TopologicalGroup β] (hf : AEStronglyMeasurable f μ)
    (hg : AEStronglyMeasurable g μ) : AEStronglyMeasurable (f / g) μ

(hf : MeasureTheory.AEStronglyMeasurable f μ)

(hg : MeasureTheory.AEStronglyMeasurable g μ)

MeasureTheory.AEStronglyMeasurable (f / g) μ


@[simp]
theorem support_seq : (seq q p).support = ⋃ f ∈ q.support, f '' p.support

{α : Type u_1}
{β : Type u_2}
(q : PMF (α → β))
(p : PMF α)

(q.seq p).support = ⋃ f ∈ q.support, f '' p.support


@[simp]
theorem toIocMod_sub_zsmul' (a b : α) (m : ℤ) :
    toIocMod hp (a - m • p) b = toIocMod hp a b - m • p

{α : Type u_1}
[LinearOrderedAddCommGroup α]
[hα : Archimedean α]
{p : α}
(hp : 0 < p)
(a b : α)
(m : ℤ)


theorem powersetCard_map {β : Type*} (f : α → β) (n : ℕ) (s : Multiset α) :
    powersetCard n (s.map f) = (powersetCard n s).map (map f)

{α : Type u_1}
{β : Type u_2}
(f : α → β)
(n : ℕ)
(s : Multiset α)

Multiset.powersetCard n (Multiset.map f s) = Multiset.map (Multiset.map f) (Multiset.powersetCard n s)


theorem measurableSet_cut (r : α → β → Prop) (f : α →ₛ β) (h : ∀ b, MeasurableSet { a | r a b }) :
    MeasurableSet { a | r a (f a) }

(h : ∀ (b : β), MeasurableSet {a | r a b})


@[ext]
theorem ext {X} {P : Cᵒᵖ ⥤ D} {S : J.Cover X} (x y : Meq P S) (h : ∀ I : S.Arrow, x I = y I) :
    x = y

{J : CategoryTheory.GrothendieckTopology C}

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


/-- The box product is commutative up to isomorphism. `Equiv.prodComm` as a graph isomorphism. -/
@[simps!]
def boxProdComm : G □ H ≃g H □ G

{α : Type u_1}
{β : Type u_2}
(G : SimpleGraph α)
(H : SimpleGraph β)

∀ (a : β × α), (RelIso.symm (G.boxProdComm H)) a = a.swap


theorem isLUB_Iio {a : γ} : IsLUB (Iio a) a

{γ : Type w}
[LinearOrder γ]
[DenselyOrdered γ]
{a : γ}


@[simp]
theorem summable_matrix_transpose {f : X → Matrix m n R} :
    (Summable fun x => (f x)ᵀ) ↔ Summable f

{X : Type u_1}
{m : Type u_4}
{n : Type u_5}
{R : Type u_8}
[AddCommMonoid R]
[TopologicalSpace R]
{f : X → Matrix m n R}


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

{G : Type u}
[AddCommMonoid G]
{H : AddCommMonCat}
(f : G →+ ↑H)


theorem isOpen_lt [TopologicalSpace β] {f g : β → α} (hf : Continuous f) (hg : Continuous g) :
    IsOpen { b | f b < g b }

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[LinearOrder α]
[OrderClosedTopology α]
[TopologicalSpace β]
{f g : β → α}
(hf : Continuous f)
(hg : Continuous g)


theorem disjoint_list_sum_right {a : Multiset α} {l : List (Multiset α)} :
    Multiset.Disjoint a l.sum ↔ ∀ b ∈ l, Multiset.Disjoint a b

{α : Type u_3}
{a : Multiset α}
{l : List (Multiset α)}

a.Disjoint l.sum ↔ ∀ b ∈ l, a.Disjoint b


@[simp] theorem uniqueBaseOn_indep_iff' : (uniqueBaseOn I E).Indep J ↔ J ⊆ I ∩ E

(Matroid.uniqueBaseOn I E).Indep J ↔ J ⊆ I ∩ E


theorem ball_subset_ball' (h : ε₁ + dist x y ≤ ε₂) : ball x ε₁ ⊆ ball y ε₂

{α : Type u}
[PseudoMetricSpace α]
{x y : α}
{ε₁ ε₂ : ℝ}
(h : ε₁ + dist x y ≤ ε₂)


theorem infsep_eq_iInf [Decidable s.Nontrivial] :
    s.infsep = if s.Nontrivial then ⨅ d : s.offDiag, (uncurry dist) (d : α × α) else 0

{α : Type u_1}
[PseudoMetricSpace α]
{s : Set α}
[Decidable s.Nontrivial]

s.infsep = if s.Nontrivial then ⨅ d, Function.uncurry dist ↑d else 0


@[to_additive]
theorem leftInv_eq_inv : S.leftInv = S⁻¹

{M : Type u_1}
[Group M]
(S : Submonoid M)


@[to_additive (attr := simp)]
theorem comap_map_comap {S : Submonoid N} {f : F} : ((S.comap f).map f).comap f = S.comap f

{M : Type u_1}
{N : Type u_2}
[AddZeroClass M]
[AddZeroClass N]
{F : Type u_4}
[FunLike F M N]
[mc : AddMonoidHomClass F M N]
{S : AddSubmonoid N}
{f : F}

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


theorem _root_.IsCompact.exists_infEdist_eq_edist (hs : IsCompact s) (hne : s.Nonempty) (x : α) :
    ∃ y ∈ s, infEdist x s = edist x y

{α : Type u}
[PseudoEMetricSpace α]
{s : Set α}
(hs : IsCompact s)
(hne : s.Nonempty)
(x : α)

∃ y ∈ s, EMetric.infEdist x s = edist x y


lemma additive_of_iso {G : C ⥤ D} (e : F ≅ G) : G.Additive

{C : Type u_1}
{D : Type u_2}
[CategoryTheory.Category.{u_4, u_1} C]
[CategoryTheory.Category.{u_5, u_2} D]
[CategoryTheory.Preadditive C]
[CategoryTheory.Preadditive D]
{F : CategoryTheory.Functor C D}
[F.Additive]
{G : CategoryTheory.Functor C D}
(e : F ≅ G)


theorem union_inter_distrib_left (s t u : Finset α) : s ∪ t ∩ u = (s ∪ t) ∩ (s ∪ u)

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


/-- The pigeonhole principle for finitely many pigeons counted by heads: given a function `f`, a
finite sets `s` and `t`, and a number `b` such that `card s ≤ card t • b`, there exists `y ∈ t` such
that its preimage in `s` has no more than `b` elements.
See also `Finset.exists_card_fiber_lt_of_card_lt_nsmul` for a stronger statement. -/
theorem exists_card_fiber_le_of_card_le_nsmul (ht : t.Nonempty) (hb : ↑s.card ≤ t.card • b) :
    ∃ y ∈ t, ↑(s.filter fun x => f x = y).card ≤ b

{α : Type u}
{β : Type v}
{M : Type w}
[DecidableEq β]
{s : Finset α}
{t : Finset β}
{f : α → β}
{b : M}
[LinearOrderedCommSemiring M]
(ht : t.Nonempty)
(hb : ↑s.card ≤ t.card • b)

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


@[to_additive]
theorem add_comp (f : F →* E) : (p + q).comp f = p.comp f + q.comp f

{E : Type u_4}
{F : Type u_5}
[AddGroup E]
[AddGroup F]
(p q : AddGroupSeminorm E)
(f : F →+ E)


@[simp] lemma map₂_bot_right (f : α → β → γ) (a) : map₂ f a ⊥ = ⊥

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
(f : α → β → γ)
(a : WithBot α)


@[simp]
theorem conjTranspose_add [AddMonoid α] [StarAddMonoid α] (M N : Matrix m n α) :
    (M + N)ᴴ = Mᴴ + Nᴴ

{m : Type u_2}
{n : Type u_3}
{α : Type v}
[AddMonoid α]
[StarAddMonoid α]
(M N : Matrix m n α)


@[simp]
lemma natTransEquiv_comp {F F' F'' : C ⥤ D} {G G' G'' : D ⥤ C}
    (adj1 : F ⊣ G) (adj2 : F' ⊣ G') (adj3 : F'' ⊣ G'') (f : G ⟶ G') (g : G' ⟶ G'') :
    natTransEquiv adj2 adj3 g ≫ natTransEquiv adj1 adj2 f = natTransEquiv adj1 adj3 (f ≫ g)

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

(adj2.natTransEquiv adj3) g ≫ (adj1.natTransEquiv adj2) f = (adj1.natTransEquiv adj3) (f ≫ g)


theorem symm_apply_apply_mk (e : Trivialization F (π F E)) {b : B} (hb : b ∈ e.baseSet) (y : E b) :
    e.symm b (e ⟨b, y⟩).2 = y

[TopologicalSpace (Bundle.TotalSpace F E)]

(e : Trivialization F Bundle.TotalSpace.proj)

e.symm b (↑e { proj := b, snd := y }).2 = y


@[simp, deprecated (since := "2024-06-05")]
theorem tailings_zero (f : M × N →ₗ[R] M) (i : Injective f) : tailings f i 0 = tailing f i 0

{R : Type u}
{M : Type v}
[Ring R]
{N : Type u_3}
[AddCommGroup M]
[Module R M]
[AddCommGroup N]
[Module R N]
(f : M × N →ₗ[R] M)
(i : Function.Injective ⇑f)


theorem Preadditive.isSeparator_iff (G : C) :
    IsSeparator G ↔ ∀ ⦃X Y : C⦄ (f : X ⟶ Y), (∀ h : G ⟶ X, h ≫ f = 0) → f = 0

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

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


@[continuity, fun_prop]
theorem continuous_proj : Continuous v.proj

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
(v : PicardLindelof E)


@[to_additive]
theorem Multipliable.tendsto_atTop_one {f : ℕ → G} (hf : Multipliable f) :
    Tendsto f atTop (𝓝 1)

{G : Type u_2}
[CommGroup G]
[TopologicalSpace G]
[TopologicalGroup G]
{f : ℕ → G}
(hf : Multipliable f)


/-- Reinterpret an upper clopen as an upper set. -/
@[simps]
def toUpperSet (s : ClopenUpperSet α) : UpperSet α

{α : Type u_1}
[TopologicalSpace α]
[LE α]
(s : ClopenUpperSet α)


theorem imp_iff_right_iff {a b : Prop} : (a → b ↔ b) ↔ a ∨ b


@[simp]
theorem one_coe_eq_one : ((1 : SlashInvariantForm Γ 0) : ℍ → ℂ) = 1


@[reassoc]
theorem neg_comp_neg : (-f) ≫ (-g) = f ≫ g

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Preadditive C]
{P Q R : C}
(f : P ⟶ Q)
(g : Q ⟶ R)


@[simp] theorem foldr_cons (l : List α) : (a :: l).foldr f b = f a (l.foldr f b)

∀ {α_1 : Type u_1} {f : α → α_1 → α_1} {b : α_1} (l : List α), List.foldr f b (a :: l) = f a (List.foldr f b l)


protected theorem image_symm_eq_preimage (s : Set M₂) : e.symm '' s = e ⁻¹' s

{R : Type u_1}
{S : Type u_7}
{M : Type u_8}
{M₂ : Type u_10}
[Semiring R]
[Semiring S]
[AddCommMonoid M]
[AddCommMonoid M₂]
{module_M : Module R M}
{module_S_M₂ : Module S M₂}
{σ : R →+* S}
{σ' : S →+* R}
{re₁ : RingHomInvPair σ σ'}
{re₂ : RingHomInvPair σ' σ}
(e : M ≃ₛₗ[σ] M₂)
(s : Set M₂)


@[simp]
theorem ball_eq_empty : ball x ε = ∅ ↔ ε ≤ 0

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


@[to_additive]
theorem unop_iSup (S : ι → Submonoid Mᵐᵒᵖ) : (iSup S).unop = ⨆ i, (S i).unop

{ι : Sort u_1}
{M : Type u_2}
[AddZeroClass M]
(S : ι → AddSubmonoid Mᵃᵒᵖ)


theorem congr_app {X Y : PresheafedSpace C} {α β : X ⟶ Y} (h : α = β) (U) :
    α.c.app U = β.c.app U ≫ X.presheaf.map (eqToHom (by subst h; rfl))

{X Y : AlgebraicGeometry.PresheafedSpace C}

α.c.app U = β.c.app U ≫ X.presheaf.map (CategoryTheory.eqToHom ⋯)


theorem foldr_map (f : α₁ → α₂) (g : α₂ → β → β) (l : List α₁) (init : β) :
    (l.map f).foldr g init = l.foldr (fun x y => g (f x) y) init

{α₁ : Type u_1}
{α₂ : Type u_2}
{β : Type u_3}
(f : α₁ → α₂)
(g : α₂ → β → β)
(l : List α₁)
(init : β)

List.foldr g init (List.map f l) = List.foldr (fun x y => g (f x) y) init l


protected lemma UniformContinuous.nndist [UniformSpace β] {f g : β → α} (hf : UniformContinuous f)
    (hg : UniformContinuous g) : UniformContinuous fun b => nndist (f b) (g b)

{α : Type u_1}
{β : Type u_2}
[PseudoMetricSpace α]
[UniformSpace β]
{f g : β → α}
(hf : UniformContinuous f)
(hg : UniformContinuous g)


@[reassoc]
lemma stalkMap_congr_point (x x' : X) (hxx' : x = x') :
    f.stalkMap x ≫ X.presheaf.stalkSpecializes (specializes_of_eq hxx'.symm) =
      Y.presheaf.stalkSpecializes (specializes_of_eq <| hxx' ▸ rfl) ≫ f.stalkMap x'

{X Y : AlgebraicGeometry.Scheme}
(f : X ⟶ Y)
(x x' : ↑↑X.toPresheafedSpace)
(hxx' : x = x')

AlgebraicGeometry.Scheme.Hom.stalkMap f x ≫ X.presheaf.stalkSpecializes ⋯ =
  Y.presheaf.stalkSpecializes ⋯ ≫ AlgebraicGeometry.Scheme.Hom.stalkMap f x'


@[ext] theorem ext {r s : Rel α β} : (∀ a, r a = s a) → r = s

{α : Type u_1}
{β : Type u_2}
{r s : Rel α β}


@[simp]
theorem single_add (i : ι) (b₁ b₂ : β i) : single i (b₁ + b₂) = single i b₁ + single i b₂

{ι : Type u}
{β : ι → Type v}
[DecidableEq ι]
[(i : ι) → AddZeroClass (β i)]
(i : ι)
(b₁ b₂ : β i)

DFinsupp.single i (b₁ + b₂) = DFinsupp.single i b₁ + DFinsupp.single i b₂


theorem SameCycle.cycleOf_eq (h : SameCycle f x y) : cycleOf f x = cycleOf f y

{α : Type u_2}
{f : Equiv.Perm α}
{x y : α}
[DecidableRel f.SameCycle]
(h : f.SameCycle x y)


lemma subst_into_smulg {α} [AddCommGroup α]
    (l r tl tr t) (prl : l = tl) (prr : r = tr)
    (prt : @smulg α _ tl tr = t) : smulg l r = t

(prt : Mathlib.Tactic.Abel.smulg tl tr = t)


@[simp, norm_cast]
theorem coe_add (x y : s) : (↑(x + y) : R) = ↑x + ↑y

{R : Type u}
[Ring R]
(s : Subring R)
(x y : ↥s)


@[trans]
theorem trans' (r : Setoid α) : ∀ {x y z}, r.Rel x y → r.Rel y z → r.Rel x z

{α : Type u_1}
(r : Setoid α)
{x y z : α}


theorem choose_spec (hp : ∃! a, p a) : p (choose p hp)

{α : Type u_1}
[Fintype α]
(p : α → Prop)
[DecidablePred p]
(hp : ∃! a, p a)


theorem aeSeq_eq_fun_ae [Countable ι] (hf : ∀ i, AEMeasurable (f i) μ)
    (hp : ∀ᵐ x ∂μ, p x fun n => f n x) : ∀ᵐ a : α ∂μ, ∀ i : ι, aeSeq hf p i a = f i a

{f : ι → α → β}

(hp : ∀ᵐ (x : α) ∂μ, p x fun n => f n x)

∀ᵐ (a : α) ∂μ, ∀ (i : ι), aeSeq hf p i a = f i a


lemma isSFiniteKernel_prodMkRight_unit {κ : Kernel α β} :
    IsSFiniteKernel (prodMkRight Unit κ) ↔ IsSFiniteKernel κ

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
{κ : ProbabilityTheory.Kernel α β}

ProbabilityTheory.IsSFiniteKernel (ProbabilityTheory.Kernel.prodMkRight Unit κ) ↔ ProbabilityTheory.IsSFiniteKernel κ


theorem natDegree_removeFactor' {f : K[X]} {n : ℕ} (hfn : f.natDegree = n + 1) :
    f.removeFactor.natDegree = n

{K : Type v}
[Field K]
{f : K[X]}
{n : ℕ}
(hfn : f.natDegree = n + 1)


theorem sumCompl_symm_apply_of_mem {α : Type u} {s : Set α} [DecidablePred (· ∈ s)] {x : α}
    (hx : x ∈ s) : (Equiv.Set.sumCompl s).symm x = Sum.inl ⟨x, hx⟩

{α : Type u}
{s : Set α}
[DecidablePred fun x => x ∈ s]
{x : α}
(hx : x ∈ s)


/--
The functor from `C` to `Over X` which sends `Y : C` to `π₁ : X ⨯ Y ⟶ X`, sometimes denoted `X*`.
-/
@[simps! obj_left obj_hom map_left]
def star [HasBinaryProducts C] : C ⥤ Over X

∀ (X_1 : C), ((CategoryTheory.Over.star X).obj X_1).left = (X ⨯ X_1)


theorem mem_of_mem_inter_left {a : α} {s₁ s₂ : Finset α} (h : a ∈ s₁ ∩ s₂) : a ∈ s₁

{α : Type u_1}
[DecidableEq α]
{a : α}
{s₁ s₂ : Finset α}
(h : a ∈ s₁ ∩ s₂)


/-- The natural embedding `α ⧸ (⨅ i, f i) ↪ Π i, α ⧸ f i`. -/
@[to_additive (attr := simps) "The natural embedding `α ⧸ (⨅ i, f i) ↪ Π i, α ⧸ f i`."]
def quotientiInfEmbedding {ι : Type*} (f : ι → Subgroup α) : (α ⧸ ⨅ i, f i) ↪ ∀ i, α ⧸ f i

{α : Type u_1}
[AddGroup α]
{ι : Type u_2}
(f : ι → AddSubgroup α)
(q : α ⧸ ⨅ i, f i)
(i : ι)

(AddSubgroup.quotientiInfEmbedding f) q i = AddSubgroup.quotientMapOfLE ⋯ q


@[simp]
theorem toMeasure_inj {p q : PMF α} : p.toMeasure = q.toMeasure ↔ p = q

{α : Type u_1}
[MeasurableSpace α]
[MeasurableSingletonClass α]
{p q : PMF α}


@[simp]
theorem log_one_right (b : ℕ) : log b (1 : R) = 0

{R : Type u_1}
[LinearOrderedSemifield R]
[FloorSemiring R]
(b : ℕ)


@[deprecated mod_mul_right_div_self (since := "2024-05-29")]
lemma div_mod_eq_mod_mul_div (a b c : ℕ) : a / b % c = a % (b * c) / b


@[simp]
theorem mkComplex_coe (φ : { φ : K →+* ℂ // ¬ComplexEmbedding.IsReal φ }) :
    (mkComplex φ : InfinitePlace K) = mk (φ : K →+* ℂ)

(φ : { φ // ¬NumberField.ComplexEmbedding.IsReal φ })

↑(NumberField.InfinitePlace.mkComplex φ) = NumberField.InfinitePlace.mk ↑φ


lemma isTorsionFree_iff_noZeroSMulDivisors_nat {M : Type*} [AddMonoid M] :
    AddMonoid.IsTorsionFree M ↔ NoZeroSMulDivisors ℕ M


@[ext]
theorem mulHom_ext' [MulOneClass N] {f g : Multiplicative (α →₀ M) →* N}
    (H : ∀ x, f.comp (AddMonoidHom.toMultiplicative (singleAddHom x)) =
              g.comp (AddMonoidHom.toMultiplicative (singleAddHom x))) :
    f = g

(H :
  ∀ (x : α),
    f.comp (AddMonoidHom.toMultiplicative (Finsupp.singleAddHom x)) =
      g.comp (AddMonoidHom.toMultiplicative (Finsupp.singleAddHom x)))


/-- The value of `weightedVSub`, where the given points are equal and the sum of the weights
is 0. -/
@[simp]
theorem weightedVSub_apply_const (w : ι → k) (p : P) (h : ∑ i ∈ s, w i = 0) :
    s.weightedVSub (fun _ => p) w = 0

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[S : AffineSpace V P]
{ι : Type u_4}
(s : Finset ι)
(w : ι → k)
(p : P)
(h : ∑ i ∈ s, w i = 0)


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

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


/-- The image of a finite Haar measure under a continuous surjective group homomorphism is again
a Haar measure. See also `isHaarMeasure_map`. -/
@[to_additive
"The image of a finite additive Haar measure under a continuous surjective additive group
homomorphism is again an additive Haar measure. See also `isAddHaarMeasure_map`."]
theorem isHaarMeasure_map_of_isFiniteMeasure
    [BorelSpace G] [TopologicalGroup G] {H : Type*} [Group H]
    [TopologicalSpace H] [MeasurableSpace H] [BorelSpace H] [TopologicalGroup H] [IsFiniteMeasure μ]
    (f : G →* H) (hf : Continuous f) (h_surj : Surjective f) :
    IsHaarMeasure (Measure.map f μ)

{G : Type u_2}
[MeasurableSpace G]
[Group G]
[TopologicalSpace G]
(μ : MeasureTheory.Measure G)
[μ.IsHaarMeasure]
[BorelSpace G]
[TopologicalGroup G]
{H : Type u_4}
[Group H]
[TopologicalSpace H]
[MeasurableSpace H]
[BorelSpace H]
[TopologicalGroup H]
[MeasureTheory.IsFiniteMeasure μ]
(f : G →* H)
(hf : Continuous ⇑f)
(h_surj : Function.Surjective ⇑f)


@[to_additive norm_add₃_le]
theorem norm_mul₃_le (a b c : E) : ‖a * b * c‖ ≤ ‖a‖ + ‖b‖ + ‖c‖

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


@[simp]
theorem nnnorm_one [SeminormedAddCommGroup α] [One α] [NormOneClass α] : ‖(1 : α)‖₊ = 1

{α : Type u_1}
[SeminormedAddCommGroup α]
[One α]
[NormOneClass α]


@[simp]
theorem factors_mul (a b : Associates α) : (a * b).factors = a.factors + b.factors

{α : Type u_1}
[CancelCommMonoidWithZero α]
[UniqueFactorizationMonoid α]
(a b : Associates α)


theorem lt_trans' : b < c → a < b → a < c


theorem contDiffOn_all_iff_nat : (∀ n, ContDiffOn 𝕜 n f s) ↔ ∀ n : ℕ, ContDiffOn 𝕜 n f s

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

(∀ (n : ℕ∞), ContDiffOn 𝕜 n f s) ↔ ∀ (n : ℕ), ContDiffOn 𝕜 (↑n) f s


/-- In an abelian category, the subobjects and quotient objects of an object `X` are
    order-isomorphic via taking kernels and cokernels.
    Implemented here using subobjects in the opposite category,
    since mathlib does not have a notion of quotient objects at the time of writing. -/
@[simps!]
def subobjectIsoSubobjectOp [Abelian C] (X : C) : Subobject X ≃o (Subobject (op X))ᵒᵈ

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Abelian C]
(X : C)
(a : CategoryTheory.Subobject X)

(CategoryTheory.Abelian.subobjectIsoSubobjectOp X) a =
  CategoryTheory.Subobject.lift (fun A f x => CategoryTheory.Subobject.mk (CategoryTheory.Limits.cokernel.π f).op) ⋯ a


theorem M.bisim' {α : TypeVec n} (R : P.M α → P.M α → Prop)
    (h : ∀ x y, R x y → (id ::: Quot.mk R) <$$> M.dest _ x = (id ::: Quot.mk R) <$$> M.dest _ y)
    (x y) (r : R x y) : x = y

(h :
  ∀ (x y : P.M α),
    R x y →
      (TypeVec.id ::: Quot.mk R) <$$> MvPFunctor.M.dest P x = (TypeVec.id ::: Quot.mk R) <$$> MvPFunctor.M.dest P y)


@[to_additive]
protected theorem Finset.hasProd (s : Finset β) (f : β → α) :
    HasProd (f ∘ (↑) : (↑s : Set β) → α) (∏ b ∈ s, f b)

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

HasProd (f ∘ Subtype.val) (∏ b ∈ s, f b)


@[simp] -- @[norm_cast] -- Porting note: This theorem can't be a `norm_cast` theorem.
theorem coe_restrictScalars (f : M →L[A] M₂) :
    (f.restrictScalars R : M →ₗ[R] M₂) = (f : M →ₗ[A] M₂).restrictScalars R

{A : Type u_1}
{M : Type u_2}
{M₂ : Type u_3}
[Ring A]
[AddCommGroup M]
[AddCommGroup M₂]
[Module A M]
[Module A M₂]
[TopologicalSpace M]
[TopologicalSpace M₂]
{R : Type u_4}
[Ring R]
[Module R M]
[Module R M₂]
[LinearMap.CompatibleSMul M M₂ R A]
(f : M →L[A] M₂)

↑(ContinuousLinearMap.restrictScalars R f) = ↑R ↑f


{α : Type u_1}
{Ω : Type u_3}
{mα : MeasurableSpace α}
{mΩ : MeasurableSpace Ω}
(ρ : MeasureTheory.Measure (α × Ω))
(ρCond : ProbabilityTheory.Kernel α Ω)
[ρ.IsCondKernel ρCond]


@[simp]
theorem id_inv_app {X : TopCat.{w}} (ℱ : X.Presheaf C) (U) :
    (id ℱ).inv.app U = 𝟙 _

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{X : TopCat}
(ℱ : TopCat.Presheaf C X)
(U : (TopologicalSpace.Opens ↑X)ᵒᵖ)

(TopCat.Presheaf.Pushforward.id ℱ).inv.app U = 𝟙 (ℱ.obj U)


/-- The measurable space structures generated by independent pi-systems are independent. -/
theorem IndepSets.indep {m1 m2 m : MeasurableSpace Ω} {κ : Kernel α Ω} {μ : Measure α}
    [IsMarkovKernel κ] {p1 p2 : Set (Set Ω)} (h1 : m1 ≤ m) (h2 : m2 ≤ m) (hp1 : IsPiSystem p1)
    (hp2 : IsPiSystem p2) (hpm1 : m1 = generateFrom p1) (hpm2 : m2 = generateFrom p2)
    (hyp : IndepSets p1 p2 κ μ) :
    Indep m1 m2 κ μ

(hpm1 : m1 = MeasurableSpace.generateFrom p1)

(hpm2 : m2 = MeasurableSpace.generateFrom p2)

(hyp : ProbabilityTheory.Kernel.IndepSets p1 p2 κ μ)

ProbabilityTheory.Kernel.Indep m1 m2 κ μ


/-- Symmetric statement to `Set.image_image2_right_comm`. -/
theorem image_image2_distrib_right {g : γ → δ} {f' : α → β' → δ} {g' : β → β'}
    (h_distrib : ∀ a b, g (f a b) = f' a (g' b)) :
    (image2 f s t).image g = image2 f' s (t.image g')

{f : α → β → γ}

(h_distrib : ∀ (a : α) (b : β), g (f a b) = f' a (g' b))

g '' Set.image2 f s t = Set.image2 f' s (g' '' t)


@[simp] lemma lowerBounds_closure (s : Set α) : lowerBounds (closure s : Set α) = lowerBounds s

{α : Type u}
[TopologicalSpace α]
[Preorder α]
[ClosedIciTopology α]
(s : Set α)


protected theorem _root_.Bornology.IsBounded.closure (h : IsBounded s) : IsBounded (closure s)

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


theorem exists_one_lt_norm : ∃ x : α, 1 < ‖x‖

(α : Type u_1)
[NontriviallyNormedField α]


theorem map_ne_zero_iff : f x ≠ 0 ↔ x ≠ 0

{R : Type u_4}
{S : Type u_5}
[NonUnitalNonAssocSemiring R]
[NonUnitalNonAssocSemiring S]
(f : R ≃+* S)
{x : R}


lemma iIndepFun.indepFun_prod_mk_prod_mk [IsMarkovKernel κ] (hf_indep : iIndepFun m f κ μ)
    (hf_meas : ∀ i, Measurable (f i))
    (i j k l : ι) (hik : i ≠ k) (hil : i ≠ l) (hjk : j ≠ k) (hjl : j ≠ l) :
    IndepFun (fun a ↦ (f i a, f j a)) (fun a ↦ (f k a, f l a)) κ μ

(hf_indep : ProbabilityTheory.Kernel.iIndepFun m f κ μ)

ProbabilityTheory.Kernel.IndepFun (fun a => (f i a, f j a)) (fun a => (f k a, f l a)) κ μ


theorem isReduced_of_isOpenImmersion {X Y : Scheme} (f : X ⟶ Y) [H : IsOpenImmersion f]
    [IsReduced Y] : IsReduced X

[H : AlgebraicGeometry.IsOpenImmersion f]


@[simp]
theorem compHahnSeries_smul (r : R) (u : U) :
    compHahnSeries A B (r • u) = r • compHahnSeries A B u

{Γ : Type u_5}
{Γ' : Type u_6}
[OrderedCancelAddCommMonoid Γ]
[OrderedCancelAddCommMonoid Γ']
{R : Type u_7}
[CommRing R]
{U : Type u_8}
{V : Type u_9}
{W : Type u_10}
[AddCommGroup U]
[Module R U]
[AddCommGroup V]
[Module R V]
[AddCommGroup W]
[Module R W]
(A : HVertexOperator Γ R V W)
(B : HVertexOperator Γ' R U V)
(r : R)
(u : U)

A.compHahnSeries B (r • u) = r • A.compHahnSeries B u


@[simp]
theorem trans_toBialgHom :
    (e₁₂.trans e₂₃ : A →ₐc[R] C) = (e₂₃ : B →ₐc[R] C).comp e₁₂

{R : Type u}
{A : Type v}
{B : Type w}
{C : Type u₁}
[CommSemiring R]
[Semiring A]
[Semiring B]
[Semiring C]
[Algebra R A]
[Algebra R B]
[Algebra R C]
[CoalgebraStruct R A]
[CoalgebraStruct R B]
[CoalgebraStruct R C]
{e₁₂ : A ≃ₐc[R] B}
{e₂₃ : B ≃ₐc[R] C}


theorem get_map {xs : IntList} (h : f 0 = 0) : get (xs.map f) i = f (xs.get i)

{f : Int → Int}
{i : Nat}
{xs : Lean.Omega.IntList}
(h : f 0 = 0)

Lean.Omega.IntList.get (List.map f xs) i = f (xs.get i)


@[simp] theorem exists_eq_left : (∃ a, a = a' ∧ p a) ↔ p a'


theorem inf_def (π₁ π₂ : Prepartition I) : π₁ ⊓ π₂ = π₁.biUnion fun J => π₂.restrict J

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


@[simp]
theorem range_cons (x : α) (u : Fin n → α) : Set.range (vecCons x u) = {x} ∪ Set.range u

{α : Type u}
{n : ℕ}
(x : α)
(u : Fin n → α)

Set.range (Matrix.vecCons x u) = {x} ∪ Set.range u


@[simp] theorem toIsometry_comp {M N U : QuadraticModuleCat.{v} R} (f : M ⟶ N) (g : N ⟶ U) :
    (f ≫ g).toIsometry = g.toIsometry.comp f.toIsometry

{R : Type u}
[CommRing R]
{M N U : QuadraticModuleCat R}
(f : M ⟶ N)
(g : N ⟶ U)


/-- Automorphization of a function into an `R`-`Module` distributes, that is, commutes with the
`R`-scalar multiplication. -/
lemma QuotientAddGroup.automorphize_smul_left (f : G → M) (g : G ⧸ Γ → R) :
    QuotientAddGroup.automorphize ((g ∘ (@Quotient.mk' _ (_))) • f)
      = g • (QuotientAddGroup.automorphize f : G ⧸ Γ → M)

{M : Type u_11}
[TopologicalSpace M]
[AddCommMonoid M]
[T2Space M]
{R : Type u_12}
[DivisionRing R]
[Module R M]
[ContinuousConstSMul R M]
{G : Type u_13}
[AddGroup G]
{Γ : AddSubgroup G}
(f : G → M)
(g : G ⧸ Γ → R)

QuotientAddGroup.automorphize (g ∘ Quotient.mk' • f) = g • QuotientAddGroup.automorphize f


/-- `convexHull` is an additive monoid morphism under pointwise addition. -/
@[simps]
def convexHullAddMonoidHom : Set E →+ Set E

(R : Type u_1)
(E : Type u_3)
[LinearOrderedField R]
[AddCommGroup E]
[Module R E]
(a : Set E)

(convexHullAddMonoidHom R E) a = (convexHull R) a


/-- An n-ary version of `Set.mul_subset_mul`. -/
@[to_additive " An n-ary version of `Set.add_subset_add`. "]
theorem finset_prod_subset_finset_prod (t : Finset ι) (f₁ f₂ : ι → Set α)
    (hf : ∀ i ∈ t, f₁ i ⊆ f₂ i) : ∏ i ∈ t, f₁ i ⊆ ∏ i ∈ t, f₂ i

{ι : Type u_1}
{α : Type u_2}
[CommMonoid α]
(t : Finset ι)
(f₁ f₂ : ι → Set α)
(hf : ∀ i ∈ t, f₁ i ⊆ f₂ i)


/-- A lattice is atomic iff every element other than `⊥` has an atom below it. -/
@[mk_iff]
class IsAtomic [OrderBot α] : Prop where
  /-- Every element other than `⊥` has an atom below it. -/
  eq_bot_or_exists_atom_le : ∀ b : α, b = ⊥ ∨ ∃ a : α, IsAtom a ∧ a ≤ b

(α : Type u_2)
[PartialOrder α]
[OrderBot α]

IsAtomic α ↔ ∀ (b : α), b = ⊥ ∨ ∃ a, IsAtom a ∧ a ≤ b


@[ext]
theorem unique_ext [Unique α] {f g : α →₀ M} (h : f default = g default) : f = g

{α : Type u_1}
{M : Type u_5}
[Zero M]
[Unique α]
{f g : α →₀ M}
(h : f default = g default)


@[simp]
theorem degree_spanningCoe {G' : G.Subgraph} (v : V) [Fintype (G'.neighborSet v)]
    [Fintype (G'.spanningCoe.neighborSet v)] : G'.spanningCoe.degree v = G'.degree v


theorem Summable.star (hf : Summable f) : Summable fun b ↦ star (f b)

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


theorem divInt_neg' (num den) : num /. -den = -num /. den


theorem append_def (x : BitVec v) (y : BitVec w) :
    x ++ y = (shiftLeftZeroExtend x w ||| zeroExtend' (Nat.le_add_left w v) y)

{v w : Nat}
(x : BitVec v)
(y : BitVec w)

x ++ y = x.shiftLeftZeroExtend w ||| BitVec.zeroExtend' ⋯ y


/-- The map between neighbor sets induced by a homomorphism. -/
@[simps]
def mapNeighborSet (v : V) (w : G.neighborSet v) : G'.neighborSet (f v)

{V : Type u_1}
{W : Type u_2}
{G : SimpleGraph V}
{G' : SimpleGraph W}
(f : G →g G')
(v : V)
(w : ↑(G.neighborSet v))


@[simp]
theorem powerset_nonempty : (𝒫 s).Nonempty


theorem mk_le_of_forall_le {f : CauSeq ℚ abs} {x : ℝ} (h : ∃ i, ∀ j ≥ i, (f j : ℝ) ≤ x) :
    mk f ≤ x

{f : CauSeq ℚ abs}
{x : ℝ}
(h : ∃ i, ∀ j ≥ i, ↑(↑f j) ≤ x)


theorem dvd_lcm_right {a b : Int} : b ∣ lcm a b


theorem IsArtinian.set_has_minimal [IsArtinian R M] (a : Set <| Submodule R M) (ha : a.Nonempty) :
    ∃ M' ∈ a, ∀ I ∈ a, ¬I < M'

{R : Type u_1}
{M : Type u_2}
[Ring R]
[AddCommGroup M]
[Module R M]
[IsArtinian R M]
(a : Set (Submodule R M))
(ha : a.Nonempty)


theorem apply_eq_zero_of_lt_order (hp : n < p.order) : p n = 0

{𝕜 : Type u}
{E : Type v}
{F : Type w}
[Ring 𝕜]
{n : ℕ}
[AddCommGroup E]
[Module 𝕜 E]
[TopologicalSpace E]
[TopologicalAddGroup E]
[ContinuousConstSMul 𝕜 E]
[AddCommGroup F]
[Module 𝕜 F]
[TopologicalSpace F]
[TopologicalAddGroup F]
[ContinuousConstSMul 𝕜 F]
{p : FormalMultilinearSeries 𝕜 E F}
(hp : n < p.order)


/-- A typeclass encoding the fact that a given Lie module has linear weights, vanishing on the
derived ideal. -/
class LinearWeights [LieAlgebra.IsNilpotent R L] : Prop :=
  map_add : ∀ χ : L → R, weightSpace M χ ≠ ⊥ → ∀ x y, χ (x + y) = χ x + χ y
  map_smul : ∀ χ : L → R, weightSpace M χ ≠ ⊥ → ∀ (t : R) x, χ (t • x) = t • χ x
  map_lie : ∀ χ : L → R, weightSpace M χ ≠ ⊥ → ∀ x y : L, χ ⁅x, y⁆ = 0

{R : Type u_1}
{L : Type u_2}
{M : Type u_3}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
[LieAlgebra.IsNilpotent R L]
[self : LieModule.LinearWeights R L M]
(χ : L → R)

LieModule.weightSpace M χ ≠ ⊥ → ∀ (x y : L), χ ⁅x, y⁆ = 0


@[simp, norm_cast]
protected theorem coe_le_coe_iff {x y : ℝ} : (x : EReal) ≤ (y : EReal) ↔ x ≤ y

↑x ≤ ↑y ↔ x ≤ y


theorem comp_right_hasFDerivAt_iff {f : F → G} {x : E} {f' : F →L[𝕜] G} :
    HasFDerivAt (f ∘ iso) (f'.comp (iso : E →L[𝕜] F)) x ↔ HasFDerivAt f f' (iso x)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
(iso : E ≃L[𝕜] F)
{f : F → G}
{x : E}
{f' : F →L[𝕜] G}

HasFDerivAt (f ∘ ⇑iso) (f'.comp ↑iso) x ↔ HasFDerivAt f f' (iso x)


theorem IsCycleOn.of_zpow {n : ℤ} (hf : (f ^ n).IsCycleOn s) (h : Set.BijOn f s s) :
    f.IsCycleOn s

{α : Type u_2}
{f : Equiv.Perm α}
{s : Set α}
{n : ℤ}
(hf : (f ^ n).IsCycleOn s)
(h : Set.BijOn (⇑f) s s)


theorem trans_assoc (f : α ≃. β) (g : β ≃. γ) (h : γ ≃. δ) :
    (f.trans g).trans h = f.trans (g.trans h)

{α : Type u}
{β : Type v}
{γ : Type w}
{δ : Type x}
(f : α ≃. β)
(g : β ≃. γ)
(h : γ ≃. δ)


@[simp]
lemma homMk₂_app_one : (homMk₂ app₀ app₁ app₂ w₀ w₁).app 1 = app₁

{f g : CategoryTheory.ComposableArrows C 2}

(w₀ :
  CategoryTheory.CategoryStruct.comp (f.map' 0 1 ⋯ ⋯) app₁ = CategoryTheory.CategoryStruct.comp app₀ (g.map' 0 1 ⋯ ⋯))

(w₁ :
  CategoryTheory.CategoryStruct.comp (f.map' 1 2 ⋯ ⋯) app₂ = CategoryTheory.CategoryStruct.comp app₁ (g.map' 1 2 ⋯ ⋯))

(CategoryTheory.ComposableArrows.homMk₂ app₀ app₁ app₂ w₀ w₁).app 1 = app₁


lemma not_mem_diffFinset (hC : IsSetSemiring C) (hs : s ∈ C) (ht : t ∈ C) :
    t ∉ hC.diffFinset hs ht

{α : Type u_1}
{C : Set (Set α)}
{s t : Set α}
(hC : MeasureTheory.IsSetSemiring C)
(hs : s ∈ C)
(ht : t ∈ C)


theorem range_val : NonUnitalAlgHom.range (NonUnitalSubalgebraClass.subtype S) = S

{R : Type u}
{A : Type v}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[Module R A]
(S : NonUnitalSubalgebra R A)


theorem mem_openSegment_of_ne_left_right (hx : x ≠ z) (hy : y ≠ z) (hz : z ∈ [x -[𝕜] y]) :
    z ∈ openSegment 𝕜 x y

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[Module 𝕜 E]
{x y z : E}
(hx : x ≠ z)
(hy : y ≠ z)
(hz : z ∈ [x-[𝕜]y])


@[simp 1100] theorem dropLast_concat : dropLast (l₁ ++ [b]) = l₁

∀ {α : Type u_1} {l₁ : List α} {b : α}, (l₁ ++ [b]).dropLast = l₁


@[simp]
theorem coe_top : ⇑(⊤ : TopHom α β) = ⊤

{α : Type u_2}
{β : Type u_3}
[Top α]
[LE β]
[OrderTop β]


/-- Given a presieve `R` on `X`, the predicate `R.hasPullbacks` means that for all arrows `f` and
    `g` in `R`, the pullback of `f` and `g` exists. -/
class hasPullbacks (R : Presieve X) : Prop where
  /-- For all arrows `f` and `g` in `R`, the pullback of `f` and `g` exists. -/
  has_pullbacks : ∀ {Y Z} {f : Y ⟶ X} (_ : R f) {g : Z ⟶ X} (_ : R g), HasPullback f g

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{X : C}
{R : CategoryTheory.Presieve X}
[self : R.hasPullbacks]
{Y Z : C}
{f : Y ⟶ X}

R f → ∀ {g : Z ⟶ X}, R g → CategoryTheory.Limits.HasPullback f g


protected theorem le_total (a b : Int) : a ≤ b ∨ b ≤ a


/-- There are `⌈(b - v % r) / r⌉` numbers in `[0, b)` congruent to `v` mod `r`. -/
theorem count_modEq_card_eq_ceil (v : ℕ) :
    b.count (· ≡ v [MOD r]) = ⌈(b - (v % r : ℕ)) / (r : ℚ)⌉

↑(Nat.count (fun x => x ≡ v [MOD r]) b) = ⌈(↑b - ↑(v % r)) / ↑r⌉