lemma card_stabilizer [IsGalois k K] :
    Nat.card (Stab w) = if IsUnramified k w then 1 else 2

{k : Type u_1}
[Field k]
{K : Type u_2}
[Field K]
[Algebra k K]
{w : NumberField.InfinitePlace K}
[IsGalois k K]

Nat.card ↥(MulAction.stabilizer (K ≃ₐ[k] K) w) = if NumberField.InfinitePlace.IsUnramified k w then 1 else 2


/-- Sends a complex `X` with objects in `V` to the corresponding complex with objects in `Vᵒᵖ`. -/
@[simps]
protected def opSymm (X : HomologicalComplex V c.symm) : HomologicalComplex Vᵒᵖ c


lemma of_id_snd : IsPullback f (𝟙 _) (𝟙 _) f

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

CategoryTheory.IsPullback f (𝟙 X) (𝟙 Z) f


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

{M : Type u_1}
{P : Type u_3}
[MulOneClass M]
[MulOneClass P]
{c : Con M}
{f : M →* P}
(H : c ≤ Con.ker f)


theorem UniformInducing.isComplete_range [CompleteSpace α] {f : α → β} (hf : UniformInducing f) :
    IsComplete (range f)

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


/-- A set `s` is not bounded above if and only if for each `x` there exists `y ∈ s` such that `x`
is not greater than or equal to `y`. This version only assumes `Preorder` structure and uses
`¬(y ≤ x)`. A version for linear orders is called `not_bddAbove_iff`. -/
theorem not_bddAbove_iff' : ¬BddAbove s ↔ ∀ x, ∃ y ∈ s, ¬y ≤ x

¬BddAbove s ↔ ∀ (x : α), ∃ y ∈ s, ¬y ≤ x


/-- In a Turán-maximal graph, non-adjacency is transitive. -/
lemma not_adj_trans (h : G.IsTuranMaximal r) (hts : ¬G.Adj t s) (hsu : ¬G.Adj s u) :
    ¬G.Adj t u

{V : Type u_1}
[Fintype V]
[DecidableEq V]
{G : SimpleGraph V}
[DecidableRel G.Adj]
{r : ℕ}
{s t u : V}
(h : G.IsTuranMaximal r)
(hts : ¬G.Adj t s)
(hsu : ¬G.Adj s u)


theorem card_support_eq_one {f : α →₀ M} :
    card f.support = 1 ↔ ∃ a, f a ≠ 0 ∧ f = single a (f a)

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

f.support.card = 1 ↔ ∃ a, f a ≠ 0 ∧ f = Finsupp.single a (f a)


theorem injective_of_surjective_endomorphism
    (f : M →ₗ[R] M) (hf : Surjective f) : Injective f

{R : Type u}
[Semiring R]
[OrzechProperty R]
{M : Type v}
[AddCommMonoid M]
[Module R M]
[Module.Finite R M]
(f : M →ₗ[R] M)
(hf : Function.Surjective ⇑f)


theorem IsComplement'.index_eq_card (h : IsComplement' H K) : K.index = Nat.card H

{G : Type u_1}
[Group G]
{H K : Subgroup G}
(h : H.IsComplement' K)


theorem countP_eq_countP_filter_add (l : List α) (p q : α → Bool) :
    l.countP p = (l.filter q).countP p + (l.filter fun a => !q a).countP p

{α : Type u_1}
(l : List α)
(p q : α → Bool)

List.countP p l = List.countP p (List.filter q l) + List.countP p (List.filter (fun a => !q a) l)


@[to_additive (attr := simp) mem_nonneg] lemma mem_oneLE : a ∈ oneLE M ↔ 1 ≤ a

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


@[to_additive]
theorem closure_union (s t : Set M) : closure (s ∪ t) = closure s ⊔ closure t

AddSubsemigroup.closure (s ∪ t) = AddSubsemigroup.closure s ⊔ AddSubsemigroup.closure t


lemma stableUnderGeneralization_empty : StableUnderGeneralization (∅ : Set X)


@[simp]
theorem disjoint_iUnion_left {ι : Sort*} {s : ι → Set α} :
    Disjoint (⋃ i, s i) t ↔ ∀ i, Disjoint (s i) t

{α : Type u_1}
{t : Set α}
{ι : Sort u_11}
{s : ι → Set α}

Disjoint (⋃ i, s i) t ↔ ∀ (i : ι), Disjoint (s i) t


lemma cfcₙ_comp (g f : R → R) (a : A)
    (hg : ContinuousOn g (f '' σₙ R a) := by cfc_cont_tac) (hg0 : g 0 = 0 := by cfc_zero_tac)
    (hf : ContinuousOn f (σₙ R a) := by cfc_cont_tac) (hf0 : f 0 = 0 := by cfc_zero_tac)
    (ha : p a := by cfc_tac) :
    cfcₙ (g ∘ f) a = cfcₙ g (cfcₙ f a)


theorem arg_of_im_nonneg_of_ne_zero {z : ℂ} (h₁ : 0 ≤ z.im) (h₂ : z ≠ 0) :
    arg z = Real.arccos (z.re / abs z)

z.arg = Real.arccos (z.re / Complex.abs z)


@[simp]
theorem map_coe (f : α → β) (a : α) : map f a = f a

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


theorem chromaticNumber_le_iff_colorable {n : ℕ} : G.chromaticNumber ≤ n ↔ G.Colorable n

{V : Type u}
{G : SimpleGraph V}
{n : ℕ}


@[simp]
theorem upcrossingsBefore_bot [Preorder ι] [OrderBot ι] [InfSet ι] {a b : ℝ} {f : ι → Ω → ℝ}
    {ω : Ω} : upcrossingsBefore a b f ⊥ ω = ⊥

{Ω : Type u_1}
{ι : Type u_2}
[Preorder ι]
[OrderBot ι]
[InfSet ι]
{a b : ℝ}
{f : ι → Ω → ℝ}
{ω : Ω}

MeasureTheory.upcrossingsBefore a b f ⊥ ω = ⊥


theorem SSameSide.not_sOppSide {s : AffineSubspace R P} {x y : P} (h : s.SSameSide x y) :
    ¬s.SOppSide x y

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


/-- The number of occurrences of p in the factor multiset of m
 is the same as the p-adic valuation of m. -/
theorem count_factorMultiset (m : ℕ+) (p : Nat.Primes) (k : ℕ) :
    (p : ℕ+) ^ k ∣ m ↔ k ≤ m.factorMultiset.count p

↑p ^ k ∣ m ↔ k ≤ Multiset.count p m.factorMultiset


@[deprecated getElem?_reverse' (since := "2024-06-12")]
theorem get?_reverse' {l : List α} (i j) (h : i + j + 1 = length l) : get? l.reverse i = get? l j

{α : Type u_1}
{l : List α}
(i j : Nat)
(h : i + j + 1 = l.length)


theorem head_terminates_of_get?_terminates {s : WSeq α} {n} :
    Terminates (get? s n) → Terminates (head s)

{α : Type u}
{s : Stream'.WSeq α}
{n : ℕ}

(s.get? n).Terminates → s.head.Terminates


@[to_additive comap_norm_nhdsWithin_Ioi_zero]
lemma comap_norm_nhdsWithin_Ioi_zero' : comap norm (𝓝[>] 0) = 𝓝[≠] (1 : E)


@[simp]
theorem gcd_zero_left [NormalizedGCDMonoid α] (a : α) : gcd 0 a = normalize a

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


@[elab_without_expected_type]
theorem symm_of [IsSymm α r] {a b : α} : a ≺ b → b ≺ a

{α : Sort u}
(r : α → α → Prop)
[IsSymm α r]
{a b : α}


theorem ContDiffOn.arctan (h : ContDiffOn ℝ n f s) : ContDiffOn ℝ n (fun x => arctan (f x)) s

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : E → ℝ}
{s : Set E}
{n : ℕ∞}
(h : ContDiffOn ℝ n f s)

ContDiffOn ℝ n (fun x => Real.arctan (f x)) s


/-- A function is interval integrable with respect to a given measure `μ` on `a..b` if and
  only if it is integrable on `uIoc a b` with respect to `μ`. This is an equivalent
  definition of `IntervalIntegrable`. -/
theorem intervalIntegrable_iff : IntervalIntegrable f μ a b ↔ IntegrableOn f (Ι a b) μ

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

IntervalIntegrable f μ a b ↔ MeasureTheory.IntegrableOn f (Ι a b) μ


@[simp]
theorem coe_mk (s : Compacts α) (h) : (mk s h : Set α) = s

{α : Type u_1}
[TopologicalSpace α]
(s : TopologicalSpace.Compacts α)
(h : (interior s.carrier).Nonempty)

↑{ toCompacts := s, interior_nonempty' := h } = ↑s


theorem Ideal.IsHomogeneous.isPrime_of_homogeneous_mem_or_mem {I : Ideal A} (hI : I.IsHomogeneous 𝒜)
    (I_ne_top : I ≠ ⊤)
    (homogeneous_mem_or_mem :
      ∀ {x y : A}, Homogeneous 𝒜 x → Homogeneous 𝒜 y → x * y ∈ I → x ∈ I ∨ y ∈ I) :
    Ideal.IsPrime I

(homogeneous_mem_or_mem : ∀ {x y : A}, SetLike.Homogeneous 𝒜 x → SetLike.Homogeneous 𝒜 y → x * y ∈ I → x ∈ I ∨ y ∈ I)


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

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

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


/-- If `E` is a vector space over a division semiring `R` and has a monoid action by `α`, then that
action commutes by scalar multiplication of inverses of natural numbers in `R`. -/
theorem inv_natCast_smul_comm {α E : Type*} (R : Type*) [AddCommMonoid E] [DivisionSemiring R]
    [Monoid α] [Module R E] [DistribMulAction α E] (n : ℕ) (s : α) (x : E) :
    (n⁻¹ : R) • s • x = s • (n⁻¹ : R) • x

{α : Type u_5}
{E : Type u_6}
(R : Type u_7)
[AddCommMonoid E]
[DivisionSemiring R]
[Monoid α]
[Module R E]
[DistribMulAction α E]
(n : ℕ)
(s : α)
(x : E)


theorem nodal_eq (s : Finset ι) (v : ι → R) : nodal s v = ∏ i ∈ s, (X - C (v i))

{R : Type u_1}
[CommRing R]
{ι : Type u_2}
(s : Finset ι)
(v : ι → R)

Lagrange.nodal s v = ∏ i ∈ s, (Polynomial.X - Polynomial.C (v i))


theorem getI_append (l l' : List α) (n : ℕ) (h : n < l.length) :
    (l ++ l').getI n = l.getI n

{α : Type u}
[Inhabited α]
(l l' : List α)
(n : ℕ)
(h : n < l.length)


/-- If two continuous maps are equal on `s`, then they are equal on the closure of `s`. See also
`Set.EqOn.of_subset_closure` for a more general version. -/
protected theorem Set.EqOn.closure [T2Space X] {s : Set Y} {f g : Y → X} (h : EqOn f g s)
    (hf : Continuous f) (hg : Continuous g) : EqOn f g (closure s)

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
[T2Space X]
{s : Set Y}
{f g : Y → X}
(h : Set.EqOn f g s)
(hf : Continuous f)
(hg : Continuous g)


@[to_additive]
theorem swap_surjective : Surjective (swap M N)

{M : Type u_1}
{N : Type u_2}
[AddZeroClass M]
[AddZeroClass N]

Function.Surjective ⇑(AddMonoid.Coprod.swap M N)


theorem exists_subalgebra_of_fg (hAC : (⊤ : Subalgebra A C).FG) (hBC : (⊤ : Submodule B C).FG) :
    ∃ B₀ : Subalgebra A B, B₀.FG ∧ (⊤ : Submodule B₀ C).FG

(A : Type w)
(B : Type u₁)
(C : Type u_1)
[CommSemiring A]
[CommSemiring B]
[Semiring C]
[Algebra A B]
[Algebra B C]
[Algebra A C]
[IsScalarTower A B C]
(hAC : ⊤.FG)
(hBC : ⊤.FG)


/-- (Impl) The natural transformation used to define the new cocone -/
@[simps]
def γ : D ⋙ T.forget ⟶ D ⋙ T.forget ⋙ ↑T

(D : CategoryTheory.Functor J T.Coalgebra)

(CategoryTheory.Comonad.ForgetCreatesColimits'.γ D).app j = (D.obj j).a


theorem measure_Ioc_lt_top : μ (Ioc a b) < ∞


@[to_additive]
theorem inv_eq_of_mul_eq_one_left (h : a * b = 1) : b⁻¹ = a

{G : Type u_1}
[DivisionMonoid G]
{a b : G}
(h : a * b = 1)


@[simp]
theorem id_hom' (M : Bimod A B) : (𝟙 M : Hom M M).hom = 𝟙 M.X

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.MonoidalCategory C]
{A B : Mon_ C}
(M : Bimod A B)


/-- Continuously polynomial everywhere implies continuous -/
theorem CPolynomialOn.continuous {f : E → F} (fa : CPolynomialOn 𝕜 f univ) : Continuous f

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
(fa : CPolynomialOn 𝕜 f Set.univ)


/-- Constructs an equivalence between bounded distributive lattices from an order isomorphism
between them. -/
@[simps]
def Iso.mk {α β : BddDistLat.{u}} (e : α ≃o β) : α ≅ β

{α β : BddDistLat}
(e : ↑α.toDistLat ≃o ↑β.toDistLat)
(a : ↑β.toDistLat)

(BddDistLat.Iso.mk e).inv.toSupHom a = e.symm a


theorem exp_bound {x : ℂ} (hx : abs x ≤ 1) {n : ℕ} (hn : 0 < n) :
    abs (exp x - ∑ m ∈ range n, x ^ m / m.factorial) ≤
      abs x ^ n * ((n.succ : ℝ) * (n.factorial * n : ℝ)⁻¹)

{x : ℂ}
(hx : Complex.abs x ≤ 1)
{n : ℕ}
(hn : 0 < n)

Complex.abs (Complex.exp x - ∑ m ∈ Finset.range n, x ^ m / ↑m.factorial) ≤
  Complex.abs x ^ n * (↑n.succ * (↑n.factorial * ↑n)⁻¹)


/-- An equivalent expression of `Structure.FG` in terms of `Set.Finite` instead of `Finset`. -/
theorem fg_iff : FG L M ↔ ∃ S : Set M, S.Finite ∧ closure L S = (⊤ : L.Substructure M)

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

FirstOrder.Language.Structure.FG L M ↔ ∃ S, S.Finite ∧ (FirstOrder.Language.Substructure.closure L).toFun S = ⊤


theorem restrictScalars_one_smulRight (x : ℂ) :
    ContinuousLinearMap.restrictScalars ℝ ((1 : ℂ →L[ℂ] ℂ).smulRight x : ℂ →L[ℂ] ℂ) =
    x • (1 : ℂ →L[ℝ] ℂ)

ContinuousLinearMap.restrictScalars ℝ (ContinuousLinearMap.smulRight 1 x) = x • 1


@[to_additive (attr := simp)]
lemma smul_eq_mul (α : Type*) [Mul α] {a a' : α} : a • a' = a * a'


theorem closure_mul_image_mul_eq_top
    (hR : R ∈ rightTransversals (H : Set G)) (hR1 : (1 : G) ∈ R) (hS : closure S = ⊤) :
    (closure ((R * S).image fun g => g * (toFun hR g : G)⁻¹)) * R = ⊤

(hR : R ∈ Subgroup.rightTransversals ↑H)

↑(Subgroup.closure ((fun g => g * (↑(Subgroup.MemRightTransversals.toFun hR g))⁻¹) '' (R * S))) * R = ⊤


/-- When `S₁.g` and `S₂.g` are zero and we have chosen colimit cokernel coforks `c₁` and `c₂`
for `S₁.f` and `S₂.f` respectively, the action on left homology of a morphism `φ : S₁ ⟶ S₂` of
short complexes is given by the unique morphism `f : c₁.pt ⟶ c₂.pt` such that
`φ.τ₂ ≫ c₂.π = c₁.π ≫ f`. -/
@[simps]
def ofIsColimitCokernelCofork (φ : S₁ ⟶ S₂)
    (hg₁ : S₁.g = 0) (c₁ : CokernelCofork S₁.f) (hc₁ : IsColimit c₁)
    (hg₂ : S₂.g = 0) (c₂ : CokernelCofork S₂.f) (hc₂ : IsColimit c₂) (f : c₁.pt ⟶ c₂.pt)
    (comm : φ.τ₂ ≫ c₂.π = c₁.π ≫ f) :
    LeftHomologyMapData φ (LeftHomologyData.ofIsColimitCokernelCofork S₁ hg₁ c₁ hc₁)
      (LeftHomologyData.ofIsColimitCokernelCofork S₂ hg₂ c₂ hc₂)

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

(hc₁ : CategoryTheory.Limits.IsColimit c₁)

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

(hc₂ : CategoryTheory.Limits.IsColimit c₂)

(comm :
  CategoryTheory.CategoryStruct.comp φ.τ₂ (CategoryTheory.Limits.Cofork.π c₂) =
    CategoryTheory.CategoryStruct.comp (CategoryTheory.Limits.Cofork.π c₁) f)

(CategoryTheory.ShortComplex.LeftHomologyMapData.ofIsColimitCokernelCofork φ hg₁ c₁ hc₁ hg₂ c₂ hc₂ f comm).φK = φ.τ₂


@[to_additive (attr := simp)]
theorem div_singleton : s / {b} = (· / b) '' s

{α : Type u_2}
[Sub α]
{s : Set α}
{b : α}


theorem pushoutInl_eq_pushout_inr (F : WalkingParallelPair ⥤ C) :
    pushoutInl F = pushout.inr _ _

(F : CategoryTheory.Limits.WalkingParallelPair ⥤ C)

CategoryTheory.Limits.HasCoequalizersOfHasPushoutsAndBinaryCoproducts.pushoutInl F =
  CategoryTheory.Limits.pushout.inr
    (CategoryTheory.Limits.coprod.desc (𝟙 (F.obj CategoryTheory.Limits.WalkingParallelPair.one))
      (F.map CategoryTheory.Limits.WalkingParallelPairHom.left))
    (CategoryTheory.Limits.coprod.desc (𝟙 (F.obj CategoryTheory.Limits.WalkingParallelPair.one))
      (F.map CategoryTheory.Limits.WalkingParallelPairHom.right))


@[ext]
theorem ext {F G : HomotopyWith f₀ f₁ P} (h : ∀ x, F x = G x) : F = G

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
{f₀ f₁ : C(X, Y)}
{P : C(X, Y) → Prop}
{F G : f₀.HomotopyWith f₁ P}
(h : ∀ (x : ↑I × X), F x = G x)


theorem coe_sub_def {r p : ℝ≥0} : ↑(r - p) = max (r - p : ℝ) 0


@[simp]
theorem coe_copy (S : IntermediateField K L) (s : Set L) (hs : s = ↑S) :
    (S.copy s hs : Set L) = s

{K : Type u_1}
{L : Type u_2}
[Field K]
[Field L]
[Algebra K L]
(S : IntermediateField K L)
(s : Set L)
(hs : s = ↑S)


/-- A slight variant of `hasFDerivAt_of_tendstoLocallyUniformlyOn` with the assumption stated
in terms of `DifferentiableOn` rather than `HasFDerivAt`. This makes a few proofs nicer in
complex analysis where holomorphicity is assumed but the derivative is not known a priori. -/
theorem hasFDerivAt_of_tendsto_locally_uniformly_on' [NeBot l] {s : Set E} (hs : IsOpen s)
    (hf' : TendstoLocallyUniformlyOn (fderiv 𝕜 ∘ f) g' l s) (hf : ∀ n, DifferentiableOn 𝕜 (f n) s)
    (hfg : ∀ x ∈ s, Tendsto (fun n => f n x) l (𝓝 (g x))) (hx : x ∈ s) :
    HasFDerivAt g (g' x) x

(hf : ∀ (n : ι), DifferentiableOn 𝕜 (f n) s)

(hfg : ∀ x ∈ s, Filter.Tendsto (fun n => f n x) l (𝓝 (g x)))


/-- Limit cones on `F` are unique up to isomorphism. -/
@[simps]
def uniqueUpToIso {s t : Cone F} (P : IsLimit s) (Q : IsLimit t) : s ≅ t

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{F : J ⥤ C}
{s t : CategoryTheory.Limits.Cone F}
(P : CategoryTheory.Limits.IsLimit s)
(Q : CategoryTheory.Limits.IsLimit t)

(P.uniqueUpToIso Q).inv = P.liftConeMorphism t


@[simp]
theorem map_id (s : AffineSubspace k P₁) : s.map (AffineMap.id k P₁) = s

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

AffineSubspace.map (AffineMap.id k P₁) s = s


/-- If `m ⊗ n ≅ 𝟙_M`, then `F.obj m` is a left inverse of `F.obj n`. -/
@[simps!]
noncomputable def unitOfTensorIsoUnit (m n : M) (h : m ⊗ n ≅ 𝟙_ M) : F.obj m ⋙ F.obj n ≅ 𝟭 C

(F : CategoryTheory.MonoidalFunctor M (CategoryTheory.Functor C C))

(h : CategoryTheory.MonoidalCategory.tensorObj m n ≅ 𝟙_ M)

(CategoryTheory.unitOfTensorIsoUnit F m n h).inv.app X =
  CategoryTheory.CategoryStruct.comp (F.ε.app X)
    (CategoryTheory.CategoryStruct.comp ((F.map h.inv).app X) ((F.μIso m n).inv.app X))


@[simp] theorem sub_eval (l₁ l₂ : LinearCombo) (v : Coeffs) :
    (l₁ - l₂).eval v = l₁.eval v - l₂.eval v

(l₁ l₂ : Lean.Omega.LinearCombo)
(v : Lean.Omega.Coeffs)


theorem rpow_lt_rpow_of_exponent_neg {x y z : ℝ} (hy : 0 < y) (hxy : y < x) (hz : z < 0) :
    x ^ z < y ^ z


@[to_additive succ_nsmul'] lemma pow_succ' (a : M) : ∀ n, a ^ (n + 1) = a * a ^ n

{M : Type u_2}
[Monoid M]
(a : M)
(n : ℕ)


theorem of_compHom : letI := MulAction.compHom M (algebraMap R A : R →* A); IsScalarTower R A M

(R : Type u)
(A : Type w)
(M : Type v₁)
[CommSemiring R]
[Semiring A]
[Algebra R A]
[MulAction A M]


@[simp] protected theorem div_self {a : Int} (H : a ≠ 0) : a.div a = 1


@[to_additive (attr := simp)]
lemma UniformOnFun.toFun_one [One β] : toFun 𝔖 (1 : α →ᵤ[𝔖] β) = 1

{α : Type u_1}
{β : Type u_2}
{𝔖 : Set (Set α)}
[Zero β]


theorem gcd_mul_left (i j k : ℤ) : gcd (i * j) (i * k) = natAbs i * gcd j k

(i * j).gcd (i * k) = i.natAbs * j.gcd k


/-- A split epi which is mono is an iso. -/
theorem isIso_of_mono_of_isSplitEpi {X Y : C} (f : X ⟶ Y) [Mono f] [IsSplitEpi f] : IsIso f

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{X Y : C}
(f : X ⟶ Y)
[CategoryTheory.Mono f]
[CategoryTheory.IsSplitEpi f]


theorem leadingCoeff_map' (hf : Injective f) (p : R[X]) :
    leadingCoeff (p.map f) = f (leadingCoeff p)

{R : Type u}
{S : Type v}
[Semiring R]
[Semiring S]
{f : R →+* S}
(hf : Function.Injective ⇑f)
(p : R[X])

(Polynomial.map f p).leadingCoeff = f p.leadingCoeff


@[to_additive (attr := measurability)]
theorem Measurable.const_smul' (hg : Measurable g) (c : M) : Measurable fun x => c • g x

{M : Type u_2}
{β : Type u_3}
{α : Type u_4}
[MeasurableSpace M]
[MeasurableSpace β]
[VAdd M β]
{m : MeasurableSpace α}
{g : α → β}
[MeasurableVAdd M β]
(hg : Measurable g)
(c : M)


lemma StrictMonoOn.image_Ico_subset (h : StrictMonoOn f (Icc a b)) :
    f '' Ico a b ⊆ Ico (f a) (f b)

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


theorem restrict_dirac [MeasurableSingletonClass α] [Decidable (a ∈ s)] :
    (Measure.dirac a).restrict s = if a ∈ s then Measure.dirac a else 0

{α : Type u_1}
[MeasurableSpace α]
{s : Set α}
{a : α}
[MeasurableSingletonClass α]
[Decidable (a ∈ s)]

(MeasureTheory.Measure.dirac a).restrict s = if a ∈ s then MeasureTheory.Measure.dirac a else 0


theorem isSeparator_sigma {β : Type w} (f : β → C) [HasCoproduct f] :
    IsSeparator (∐ f) ↔ IsSeparating (Set.range f)

CategoryTheory.IsSeparator (∐ f) ↔ CategoryTheory.IsSeparating (Set.range f)


theorem size_modifyM [Monad m] [LawfulMonad m] (a : Array α) (i : Nat) (f : α → m α) :
    SatisfiesM (·.size = a.size) (a.modifyM i f)

{m : Type u_1 → Type u_2}
{α : Type u_1}
[Monad m]
[LawfulMonad m]
(a : Array α)
(i : Nat)
(f : α → m α)

SatisfiesM (fun x => x.size = a.size) (a.modifyM i f)


theorem setToSimpleFunc_smul {E} [NormedAddCommGroup E] [NormedField 𝕜] [NormedSpace 𝕜 E]
    [NormedSpace ℝ E] [NormedSpace 𝕜 F] (T : Set α → E →L[ℝ] F) (h_add : FinMeasAdditive μ T)
    (h_smul : ∀ c : 𝕜, ∀ s x, T s (c • x) = c • T s x) (c : 𝕜) {f : α →ₛ E} (hf : Integrable f μ) :
    setToSimpleFunc T (c • f) = c • setToSimpleFunc T f

(h_add : MeasureTheory.FinMeasAdditive μ T)

(h_smul : ∀ (c : 𝕜) (s : Set α) (x : E), (T s) (c • x) = c • (T s) x)

MeasureTheory.SimpleFunc.setToSimpleFunc T (c • f) = c • MeasureTheory.SimpleFunc.setToSimpleFunc T f


theorem card [Fintype G] : Fintype.card (vectorsProdEqOne G n) = Fintype.card G ^ (n - 1)

(G : Type u_2)
[Group G]
(n : ℕ)
[Fintype G]

Fintype.card ↑(Equiv.Perm.vectorsProdEqOne G n) = Fintype.card G ^ (n - 1)


/-- Define a morphism between left extensions by cancelling the whiskered identities. -/
@[simps! right]
def whiskerIdCancel
    (s : LeftExtension f (g ≫ 𝟙 c)) {t : LeftExtension f g} (τ : s ⟶ t.whisker (𝟙 c)) :
    s.ofCompId ⟶ t

(s :
  CategoryTheory.Bicategory.LeftExtension f (CategoryTheory.CategoryStruct.comp g (CategoryTheory.CategoryStruct.id c)))

{t : CategoryTheory.Bicategory.LeftExtension f g}

(τ : s ⟶ t.whisker (CategoryTheory.CategoryStruct.id c))

(s.whiskerIdCancel τ).right =
  CategoryTheory.CategoryStruct.comp τ.right (CategoryTheory.Bicategory.rightUnitor t.extension).hom


@[to_additive]
theorem inv_mul_lt_one_iff_lt : a * b⁻¹ < 1 ↔ a < b

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


theorem derivativeFun_one : derivativeFun (1 : R⟦X⟧) = 0


theorem mem_range_mapToFractionRing_iff_ofField (B : Type*) [CommRing B] [Algebra A B]
    [IsLocalization S B] (x : K) :
    x ∈ (mapToFractionRing K S B hS).range ↔
      ∃ (a s : A) (_ : s ∈ S), x = algebraMap A K a * (algebraMap A K s)⁻¹

{A : Type u_1}
(K : Type u_2)
[CommRing A]
(S : Submonoid A)
(hS : S ≤ nonZeroDivisors A)
[Field K]
[Algebra A K]
[IsFractionRing A K]
(B : Type u_3)
[CommRing B]
[Algebra A B]
[IsLocalization S B]
(x : K)

x ∈ (Localization.mapToFractionRing K S B hS).range ↔
  ∃ a s, ∃ (_ : s ∈ S), x = (algebraMap A K) a * ((algebraMap A K) s)⁻¹


theorem support_add : (p + q).support ⊆ p.support ∪ q.support


@[simp]
theorem compl_union_self (s : Set α) : sᶜ ∪ s = univ


@[simp]
theorem toDualBotEquiv_symm_coe [LE α] (a : α) :
    WithTop.toDualBotEquiv.symm (toDual (a : WithBot α)) = ↑(toDual a)

WithTop.toDualBotEquiv.symm (OrderDual.toDual ↑a) = ↑(OrderDual.toDual a)


@[simp]
theorem coe_mulRight₀ {g : G₀} (hg : g ≠ 0) : ⇑(mulRight₀ g hg) = fun x => x * g

{G₀ : Type u_2}
[MeasurableSpace G₀]
[GroupWithZero G₀]
[MeasurableMul G₀]
{g : G₀}
(hg : g ≠ 0)

⇑(MeasurableEquiv.mulRight₀ g hg) = fun x => x * g


theorem untrop_prod [AddCommMonoid R] (s : Finset S) (f : S → Tropical R) :
    untrop (∏ i ∈ s, f i) = ∑ i ∈ s, untrop (f i)

{R : Type u_1}
{S : Type u_2}
[AddCommMonoid R]
(s : Finset S)
(f : S → Tropical R)

Tropical.untrop (∏ i ∈ s, f i) = ∑ i ∈ s, Tropical.untrop (f i)


@[simp] theorem IsOrtho.inr_inl {Q₁ : QuadraticMap R M₁ P} {Q₂ : QuadraticMap R M₂ P}
    (m₁ : M₁) (m₂ : M₂) :
    (Q₁.prod Q₂).IsOrtho (0, m₂) (m₁, 0)

{R : Type u_2}
{M₁ : Type u_3}
{M₂ : Type u_4}
{P : Type u_7}
[CommSemiring R]
[AddCommMonoid M₁]
[AddCommMonoid M₂]
[AddCommMonoid P]
[Module R M₁]
[Module R M₂]
[Module R P]
{Q₁ : QuadraticMap R M₁ P}
{Q₂ : QuadraticMap R M₂ P}
(m₁ : M₁)
(m₂ : M₂)


protected theorem neg_eq_neg {a b : ℤ} (h : -a = -b) : a = b


@[reassoc]
lemma toRightDerivedZero'_naturality {X Y : C} (f : X ⟶ Y)
    (P : InjectiveResolution X) (Q : InjectiveResolution Y)
    (φ : P.cocomplex ⟶ Q.cocomplex) (comm : P.ι.f 0 ≫ φ.f 0 = f ≫ Q.ι.f 0)
    (F : C ⥤ D) [F.Additive] :
    F.map f ≫ Q.toRightDerivedZero' F =
      P.toRightDerivedZero' F ≫
        HomologicalComplex.cyclesMap ((F.mapHomologicalComplex _).map φ) 0

(P : CategoryTheory.InjectiveResolution X)

(Q : CategoryTheory.InjectiveResolution Y)

(comm : CategoryTheory.CategoryStruct.comp (P.ι.f 0) (φ.f 0) = CategoryTheory.CategoryStruct.comp f (Q.ι.f 0))

CategoryTheory.CategoryStruct.comp (F.map f) (Q.toRightDerivedZero' F) =
  CategoryTheory.CategoryStruct.comp (P.toRightDerivedZero' F)
    (HomologicalComplex.cyclesMap ((F.mapHomologicalComplex (ComplexShape.up ℕ)).map φ) 0)


/-- **Divisibility by 3 Rule** -/
theorem three_dvd_iff (n : ℕ) : 3 ∣ n ↔ 3 ∣ (digits 10 n).sum


@[trans]
theorem trans (h₁₂ : v₁.IsEquiv v₂) (h₂₃ : v₂.IsEquiv v₃) : v₁.IsEquiv v₃


@[simp]
lemma coe_sub (z₁ z₂ : Cocycle F G n) :
    (↑(z₁ - z₂) : Cochain F G n) = (z₁ : Cochain F G n) - (z₂ : Cochain F G n)

(z₁ z₂ : CochainComplex.HomComplex.Cocycle F G n)


@[simp]
theorem symm_dual_comp (g : InfHom βᵒᵈ γᵒᵈ) (f : InfHom αᵒᵈ βᵒᵈ) :
    SupHom.dual.symm (g.comp f) =
      (SupHom.dual.symm g).comp (SupHom.dual.symm f)

{α : Type u_3}
{β : Type u_4}
{γ : Type u_5}
[Sup α]
[Sup β]
[Sup γ]
(g : InfHom βᵒᵈ γᵒᵈ)
(f : InfHom αᵒᵈ βᵒᵈ)


@[to_additive (attr := simp)]
theorem mk_div (a b : G) : ((a / b : G) : Q) = a / b

{G : Type u}
[Group G]
(N : Subgroup G)
[nN : N.Normal]
(a b : G)


theorem spectralRadius_le_nnnorm [NormOneClass A] (a : A) : spectralRadius 𝕜 a ≤ ‖a‖₊

{𝕜 : Type u_1}
{A : Type u_2}
[NormedField 𝕜]
[NormedRing A]
[NormedAlgebra 𝕜 A]
[CompleteSpace A]
[NormOneClass A]
(a : A)


@[simp] theorem head!_cons [Inhabited α] (a : α) (l : List α) : head! (a :: l) = a

{α : Type u}
[Inhabited α]
(a : α)
(l : List α)


lemma prod_int_mod (l : List ℤ) (n : ℤ) : l.prod % n = (l.map (· % n)).prod % n

l.prod % n = (List.map (fun x => x % n) l).prod % n


protected theorem le_tsub_of_add_le_right (hb : AddLECancellable b) (h : a + b ≤ c) : a ≤ c - b

{α : Type u_1}
[Preorder α]
[AddCommSemigroup α]
[Sub α]
[OrderedSub α]
{a b c : α}
(hb : AddLECancellable b)
(h : a + b ≤ c)


theorem set_fintype_card_le_univ [Fintype α] (s : Set α) [Fintype s] :
    Fintype.card s ≤ Fintype.card α

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


@[simp]
theorem valuation_one : valuation (1 : ℤ_[p]) = 0


@[simp]
theorem toBoolAlg_add_add_mul (a b : α) : toBoolAlg (a + b + a * b) = toBoolAlg a ⊔ toBoolAlg b

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


@[to_additive (attr := measurability)]
theorem Measurable.const_smul (hg : Measurable g) (c : M) : Measurable (c • g)

{M : Type u_2}
{β : Type u_3}
{α : Type u_4}
[MeasurableSpace M]
[MeasurableSpace β]
[VAdd M β]
{m : MeasurableSpace α}
{g : α → β}
[MeasurableVAdd M β]
(hg : Measurable g)
(c : M)


theorem xgcd_val (x y : R) : xgcd x y = (gcdA x y, gcdB x y)

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

EuclideanDomain.xgcd x y = (EuclideanDomain.gcdA x y, EuclideanDomain.gcdB x y)


theorem isSolvable_of_isScalarTower [Normal F K₁] [h1 : IsSolvable (K₁ ≃ₐ[F] K₁)]
    [h2 : IsSolvable (E ≃ₐ[K₁] E)] : IsSolvable (E ≃ₐ[F] E)

(F : Type u_1)
(K₁ : Type u_3)
[Field F]
[Field K₁]
[Algebra F K₁]
(E : Type u_6)
[Field E]
[Algebra F E]
[Algebra K₁ E]
[IsScalarTower F K₁ E]
[Normal F K₁]
[h1 : IsSolvable (K₁ ≃ₐ[F] K₁)]
[h2 : IsSolvable (E ≃ₐ[K₁] E)]


theorem lookmap_none : ∀ l : List α, (l.lookmap fun _ => none) = l


@[continuity, fun_prop]
theorem continuous_rpow_const {y : ℝ} : Continuous fun a : ℝ≥0∞ => a ^ y


/-- There is never an `s-t` edge in `G.replaceVertex s t`. -/
lemma not_adj_replaceVertex_same : ¬(G.replaceVertex s t).Adj s t

{V : Type u_1}
[DecidableEq V]
(G : SimpleGraph V)
(s t : V)


@[simp]
theorem toNatOrdinal_eq_one (a) : toNatOrdinal a = 1 ↔ a = 1


@[to_additive]
theorem Nonempty.of_div_left : (s / t).Nonempty → s.Nonempty


@[to_additive]
theorem prod_comm (f : α →₀ M) (g : β →₀ M') (h : α → M → β → M' → N) :
    (f.prod fun x v => g.prod fun x' v' => h x v x' v') =
      g.prod fun x' v' => f.prod fun x v => h x v x' v'

{α : Type u_1}
{β : Type u_7}
{M : Type u_8}
{M' : Type u_9}
{N : Type u_10}
[Zero M]
[Zero M']
[CommMonoid N]
(f : α →₀ M)
(g : β →₀ M')
(h : α → M → β → M' → N)


theorem iInter₂_mono {s t : ∀ i, κ i → Set α} (h : ∀ i j, s i j ⊆ t i j) :
    ⋂ (i) (j), s i j ⊆ ⋂ (i) (j), t i j

(h : ∀ (i : ι) (j : κ i), s i j ⊆ t i j)


theorem HasSum.star (h : HasSum f a) : HasSum (fun b ↦ star (f b)) (star a)

{α : Type u_1}
{β : Type u_2}
[AddCommMonoid α]
[TopologicalSpace α]
[StarAddMonoid α]
[ContinuousStar α]
{f : β → α}
{a : α}
(h : HasSum f a)


theorem ppow_mul' (x : M) (m n : ℕ+) : x ^ (m * n) = (x ^ n) ^ m

{M : Type u_1}
[Mul M]
[Pow M ℕ+]
[PNatPowAssoc M]
(x : M)
(m n : ℕ+)


@[simp]
theorem coe_mk (f : E →ₛₗ[σ₁₂] E₂) (hf) : ⇑(mk f hf) = f

{R : Type u_1}
{R₂ : Type u_2}
{E : Type u_5}
{E₂ : Type u_6}
[Semiring R]
[Semiring R₂]
{σ₁₂ : R →+* R₂}
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup E₂]
[Module R E]
[Module R₂ E₂]
(f : E →ₛₗ[σ₁₂] E₂)
(hf : ∀ (x : E), ‖f x‖ = ‖x‖)

⇑{ toLinearMap := f, norm_map' := hf } = ⇑f


@[to_additive]
theorem multiset_noncommProd_mem (K : Subgroup G) (g : Multiset G) (comm) :
    (∀ a ∈ g, a ∈ K) → g.noncommProd comm ∈ K

(comm : {x | x ∈ g}.Pairwise AddCommute)

(∀ a ∈ g, a ∈ K) → g.noncommSum comm ∈ K


lemma smul_floorDiv_le (ha : 0 < a) : a • (b ⌊/⌋ a) ≤ b

{α : Type u_2}
{β : Type u_3}
[OrderedAddCommMonoid α]
[OrderedAddCommMonoid β]
[SMulZeroClass α β]
[FloorDiv α β]
{a : α}
{b : β}
(ha : 0 < a)


@[simp]
theorem _root_.Basis.coe_toOrthonormalBasis_repr_symm (v : Basis ι 𝕜 E) (hv : Orthonormal 𝕜 v) :
    ((v.toOrthonormalBasis hv).repr.symm : EuclideanSpace 𝕜 ι → E) = v.equivFun.symm

{ι : Type u_1}
{𝕜 : Type u_3}
[RCLike 𝕜]
{E : Type u_4}
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[Fintype ι]
(v : Basis ι 𝕜 E)
(hv : Orthonormal 𝕜 ⇑v)

⇑(v.toOrthonormalBasis hv).repr.symm = ⇑v.equivFun.symm


theorem ClusterPt.of_inf_left {f g : Filter X} (H : ClusterPt x <| f ⊓ g) : ClusterPt x f

{X : Type u}
{x : X}
[TopologicalSpace X]
{f g : Filter X}
(H : ClusterPt x (f ⊓ g))


theorem ofMatroid_lt_iff {M M' : Matroid α} :
    Matroidᵣ.ofMatroid M < Matroidᵣ.ofMatroid M' ↔ M <r M'

{ toMatroid := M } < { toMatroid := M' } ↔ M.StrictRestriction M'


theorem sInf_image_Icc_le (h : ContinuousOn f <| Icc a b) (hc : c ∈ Icc a b) :
    sInf (f '' Icc a b) ≤ f c

{α : Type u_2}
{β : Type u_3}
[ConditionallyCompleteLinearOrder α]
[TopologicalSpace α]
[OrderTopology α]
[TopologicalSpace β]
[DenselyOrdered α]
[ConditionallyCompleteLinearOrder β]
[OrderTopology β]
{f : α → β}
{a b c : α}
(h : ContinuousOn f (Set.Icc a b))
(hc : c ∈ Set.Icc a b)


@[to_additive]
theorem mul_iInter_subset (s : Set α) (t : ι → Set α) : (s * ⋂ i, t i) ⊆ ⋂ i, s * t i

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


theorem pdf_eq_zero_of_measure_eq_zero_or_top {X : Ω → E} {s : Set E}
    (hu : IsUniform X s ℙ μ) (hμs : μ s = 0 ∨ μ s = ∞) : pdf X ℙ μ =ᵐ[μ] 0

{E : Type u_1}
[MeasurableSpace E]
{μ : MeasureTheory.Measure E}
{Ω : Type u_2}

∀ {x : MeasurableSpace Ω} {ℙ : MeasureTheory.Measure Ω} {X : Ω → E} {s : Set E},
  MeasureTheory.pdf.IsUniform X s ℙ μ → μ s = 0 ∨ μ s = ⊤ → MeasureTheory.pdf X ℙ μ =ᵐ[μ] 0


lemma uniformEquicontinuousOn_univ (F : ι → β → α) :
    UniformEquicontinuousOn F univ ↔ UniformEquicontinuous F

{ι : Type u_1}
{α : Type u_7}
{β : Type u_9}
[uα : UniformSpace α]
[uβ : UniformSpace β]
(F : ι → β → α)

UniformEquicontinuousOn F Set.univ ↔ UniformEquicontinuous F


@[reassoc (attr := simp)]
theorem lift_comp_conePointUniqueUpToIso_hom {r s t : Cone F} (P : IsLimit s) (Q : IsLimit t) :
    P.lift r ≫ (conePointUniqueUpToIso P Q).hom = Q.lift r

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{F : J ⥤ C}
{r s t : CategoryTheory.Limits.Cone F}
(P : CategoryTheory.Limits.IsLimit s)
(Q : CategoryTheory.Limits.IsLimit t)

P.lift r ≫ (P.conePointUniqueUpToIso Q).hom = Q.lift r


@[simp]
theorem inclusion_inclusion {S T U : NonUnitalStarSubalgebra R A} (hst : S ≤ T) (htu : T ≤ U)
    (x : S) : inclusion htu (inclusion hst x) = inclusion (le_trans hst htu) x

{R : Type u}
{A : Type v}
[CommSemiring R]
[StarRing R]
[NonUnitalSemiring A]
[StarRing A]
[Module R A]
[IsScalarTower R A A]
[SMulCommClass R A A]
[StarModule R A]
{S T U : NonUnitalStarSubalgebra R A}
(hst : S ≤ T)
(htu : T ≤ U)
(x : ↥S)

(NonUnitalStarSubalgebra.inclusion htu) ((NonUnitalStarSubalgebra.inclusion hst) x) =
  (NonUnitalStarSubalgebra.inclusion ⋯) x


/-- The right homology data on a short complex equipped with a splitting. -/
@[simps]
noncomputable def rightHomologyData [HasZeroObject C] (s : S.Splitting) :
    RightHomologyData S

{C : Type u_1}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Preadditive C]
{S : CategoryTheory.ShortComplex C}
[CategoryTheory.Limits.HasZeroObject C]
(s : S.Splitting)


@[ext]
theorem ext : (p : ℚ) = (q : ℚ) → p = q


theorem strictMono_int_of_lt_succ {f : ℤ → α} (hf : ∀ n, f n < f (n + 1)) : StrictMono f

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


@[simp]
theorem circleMap_eq_center_iff {c : ℂ} {R : ℝ} {θ : ℝ} : circleMap c R θ = c ↔ R = 0


/-- An orthogonal basis with respect to a left-separating bilinear map has no self-orthogonal
elements. -/
theorem IsOrthoᵢ.not_isOrtho_basis_self_of_separatingLeft [Nontrivial R]
    {B : M →ₛₗ[I] M →ₛₗ[I'] M₁} {v : Basis n R M} (h : B.IsOrthoᵢ v) (hB : B.SeparatingLeft)
    (i : n) : ¬B.IsOrtho (v i) (v i)

{R : Type u_1}
{M : Type u_5}
{M₁ : Type u_6}
{n : Type u_19}
[CommRing R]
[AddCommGroup M]
[Module R M]
[AddCommGroup M₁]
[Module R M₁]
{I I' : R →+* R}
[Nontrivial R]
{B : M →ₛₗ[I] M →ₛₗ[I'] M₁}
{v : Basis n R M}
(h : B.IsOrthoᵢ ⇑v)
(hB : B.SeparatingLeft)
(i : n)


@[ext]
theorem ext' {α β : F ⟶ G} (w : α.app = β.app) : α = β

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{F G : CategoryTheory.Functor C D}
{α β : F ⟶ G}
(w : α.app = β.app)


@[simp] theorem cond_true (a b : α) : cond true a b = a


lemma rightHomologyMap'_eq : rightHomologyMap' φ h₁ h₂ = γ.φH

(γ : CategoryTheory.ShortComplex.RightHomologyMapData φ h₁ h₂)

CategoryTheory.ShortComplex.rightHomologyMap' φ h₁ h₂ = γ.φH


/-- An antitone, bounded below sequence `f : ℕ → ℝ` has a finite limit. -/
theorem _root_.Real.tendsto_of_bddBelow_antitone {f : ℕ → ℝ} (h_bdd : BddBelow (Set.range f))
    (h_ant : Antitone f) : ∃ r : ℝ, Tendsto f atTop (𝓝 r)

∃ r, Filter.Tendsto f Filter.atTop (𝓝 r)


theorem cast_succ [AddMonoidWithOne α] (n) : (succ n : α) = n + 1

{α : Type u_1}
[AddMonoidWithOne α]
(n : Num)


theorem injective_of_map_injective (adj : F ⊣ G) [G.Full] [G.Faithful] (I : D)
    (hI : Injective (G.obj I)) : Injective I

(hI : CategoryTheory.Injective (G.obj I))


theorem ker_eq_bot_iff_range_eq_top [FiniteDimensional K V] {f : V →ₗ[K] V} :
    LinearMap.ker f = ⊥ ↔ LinearMap.range f = ⊤

{K : Type u}
{V : Type v}
[DivisionRing K]
[AddCommGroup V]
[Module K V]
[FiniteDimensional K V]
{f : V →ₗ[K] V}


theorem trichotomy (f : CauSeq α abs) : Pos f ∨ LimZero f ∨ Pos (-f)

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


@[simp, norm_cast]
theorem coe_zpow (r : ℝ≥0) (n : ℤ) : ((r ^ n : ℝ≥0) : ℝ) = (r : ℝ) ^ n


/-- Abbreviation for `mulSingle_eq_of_ne h.symm`, for ease of use by `simp`. -/
@[to_additive (attr := simp)
  "Abbreviation for `single_eq_of_ne h.symm`, for ease of use by `simp`."]
theorem mulSingle_eq_of_ne' {i i' : I} (h : i ≠ i') (x : f i) : mulSingle i x i' = 1

{I : Type u}
{f : I → Type v₁}
[DecidableEq I]
[(i : I) → Zero (f i)]
{i i' : I}
(h : i ≠ i')
(x : f i)


theorem ball_eq_preimage (x : E) (r : ℝ) :
    ball x r = toEuclidean ⁻¹' Metric.ball (toEuclidean x) r

{E : Type u_1}
[AddCommGroup E]
[TopologicalSpace E]
[TopologicalAddGroup E]
[T2Space E]
[Module ℝ E]
[ContinuousSMul ℝ E]
[FiniteDimensional ℝ E]
(x : E)
(r : ℝ)

Euclidean.ball x r = ⇑toEuclidean ⁻¹' Metric.ball (toEuclidean x) r


/-- If `i : α → β` is a dense embedding with dense complement of the range, then any compact set in
`α` has empty interior. -/
theorem interior_compact_eq_empty [T2Space β] (di : DenseInducing i) (hd : Dense (range i)ᶜ)
    {s : Set α} (hs : IsCompact s) : interior s = ∅

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
{i : α → β}
[T2Space β]
(di : DenseInducing i)
(hd : Dense (Set.range i)ᶜ)
{s : Set α}
(hs : IsCompact s)


@[simp]
theorem ssubset_singleton_iff {s : Finset α} {a : α} : s ⊂ {a} ↔ s = ∅


theorem monic_of_degree_le (n : ℕ) (H1 : degree p ≤ n) (H2 : coeff p n = 1) : Monic p

{R : Type u}
[Semiring R]
{p : R[X]}
(n : ℕ)
(H1 : p.degree ≤ ↑n)
(H2 : p.coeff n = 1)


@[to_additive]
lemma exists_mem_ofUnits_val_eq (S : Subgroup Mˣ) {x : M} (h : x ∈ S.ofUnits) :
    ∃ y ∈ S, y = x

{M : Type u_1}
[AddMonoid M]
(S : AddSubgroup (AddUnits M))
{x : M}
(h : x ∈ S.ofAddUnits)


theorem ContinuousOn.upperSemicontinuousOn {f : α → γ} (h : ContinuousOn f s) :
    UpperSemicontinuousOn f s

{α : Type u_1}
[TopologicalSpace α]
{s : Set α}
{γ : Type u_3}
[LinearOrder γ]
[TopologicalSpace γ]
[OrderTopology γ]
{f : α → γ}
(h : ContinuousOn f s)


lemma covBy_iff_exists_sdiff_singleton : s ⋖ t ↔ ∃ a ∈ t, t \ {a} = s


lemma continuous_from_compactlyGenerated {X : Type w} [TopologicalSpace X]
    {Y : Type*} [t : TopologicalSpace Y] (f : X → Y)
      (h : ∀ (S : CompHaus.{u}) (g : C(S, X)), Continuous (f ∘ g)) :
        Continuous[compactlyGenerated.{u} X, t] f

(h : ∀ (S : CompHaus) (g : C(↑S.toTop, X)), Continuous (f ∘ ⇑g))


@[simp]
theorem nndist_eq {α β F : Type*} [PseudoMetricSpace α] [PseudoMetricSpace β] [FunLike F α β]
    [DilationClass F α β] (f : F) (x y : α) :
    nndist (f x) (f y) = ratio f * nndist x y

{α : Type u_6}
{β : Type u_7}
{F : Type u_8}
[PseudoMetricSpace α]
[PseudoMetricSpace β]
[FunLike F α β]
[DilationClass F α β]
(f : F)
(x y : α)

nndist (f x) (f y) = Dilation.ratio f * nndist x y


theorem nonUnitalSubsemiringClosure_coe :
    (M.nonUnitalSubsemiringClosure : Set R) = AddSubmonoid.closure (M : Set R)

{R : Type u}
[NonUnitalNonAssocSemiring R]
(M : Subsemigroup R)

↑M.nonUnitalSubsemiringClosure = ↑(AddSubmonoid.closure ↑M)


@[simp]
lemma ΨSq_two : W.ΨSq 2 = W.Ψ₂Sq

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


theorem volumeForm_apply_le (v : Fin n → E) : o.volumeForm v ≤ ∏ i : Fin n, ‖v i‖

[_i : Fact (FiniteDimensional.finrank ℝ E = n)]


theorem extract_gcd (f : β → α) (hs : s.Nonempty) :
    ∃ g : β → α, (∀ b ∈ s, f b = s.gcd f * g b) ∧ s.gcd g = 1

{α : Type u_2}
{β : Type u_3}
[CancelCommMonoidWithZero α]
[NormalizedGCDMonoid α]
{s : Finset β}
(f : β → α)
(hs : s.Nonempty)

∃ g, (∀ b ∈ s, f b = s.gcd f * g b) ∧ s.gcd g = 1


@[simp]
theorem sup_singleton {a : α} : ({a} : Multiset α).sup = a

{α : Type u_1}
[SemilatticeSup α]
[OrderBot α]
{a : α}


/-- If the sign of the angle between three points is nonzero, the first two points are not
equal. -/
theorem left_ne_of_oangle_sign_ne_zero {p₁ p₂ p₃ : P} (h : (∡ p₁ p₂ p₃).sign ≠ 0) : p₁ ≠ p₂

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


theorem eq_of_factorization_eq {a b : ℕ} (ha : a ≠ 0) (hb : b ≠ 0)
    (h : ∀ p : ℕ, a.factorization p = b.factorization p) : a = b

(h : ∀ (p : ℕ), a.factorization p = b.factorization p)


/-- A complex of functors gives a functor to complexes. -/
@[simps obj map]
def asFunctor {T : Type*} [Category T] (C : HomologicalComplex (T ⥤ V) c) :
    T ⥤ HomologicalComplex V c

∀ {X Y : T} (h : X ⟶ Y), C.asFunctor.map h = { f := fun i => (C.X i).map h, comm' := ⋯ }


/-- See also `Complex.pow_cpow_ofNat_inv` for a version that also works for `x * I`, `0 ≤ x`. -/
lemma sq_cpow_two_inv {x : ℂ} (hx : 0 < x.re) : (x ^ (2 : ℕ)) ^ (2⁻¹ : ℂ) = x


@[to_additive]
theorem comap_le_comap_iff_of_surjective {S T : Subsemigroup N} : S.comap f ≤ T.comap f ↔ S ≤ T

{M : Type u_1}
{N : Type u_2}
[Add M]
[Add N]
{f : AddHom M N}
(hf : Function.Surjective ⇑f)
{S T : AddSubsemigroup N}

AddSubsemigroup.comap f S ≤ AddSubsemigroup.comap f T ↔ S ≤ T


@[simp]
theorem sbtw_zero_one_iff {x : R} : Sbtw R 0 x 1 ↔ x ∈ Set.Ioo (0 : R) 1


theorem sec_fst_ne_zero [Nontrivial R] [NoZeroDivisors S] (hM : M ≤ nonZeroDivisors R) {x : S}
    (hx : x ≠ 0) : (sec M x).fst ≠ 0

{R : Type u_1}
[CommRing R]
{M : Submonoid R}
{S : Type u_2}
[CommRing S]
[Algebra R S]
[IsLocalization M S]
[Nontrivial R]
[NoZeroDivisors S]
(hM : M ≤ nonZeroDivisors R)
{x : S}
(hx : x ≠ 0)


lemma op_comp_isSheafOfTypes [Functor.IsContinuous.{t} F J K] (G : SheafOfTypes.{t} K) :
    Presieve.IsSheaf J (F.op ⋙ G.val)

(J : CategoryTheory.GrothendieckTopology C)

(K : CategoryTheory.GrothendieckTopology D)

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


theorem Trident.ι_ofι [Nonempty J] {P : C} (ι : P ⟶ X) (w : ∀ j₁ j₂, ι ≫ f j₁ = ι ≫ f j₂) :
    (Trident.ofι ι w).ι = ι

(w : ∀ (j₁ j₂ : J), CategoryTheory.CategoryStruct.comp ι (f j₁) = CategoryTheory.CategoryStruct.comp ι (f j₂))

(CategoryTheory.Limits.Trident.ofι ι w).ι = ι


/-- The restriction of scalars functor `PresheafOfModules R' ⥤ PresheafOfModules R`
induced by a morphism of presheaves of rings `R ⟶ R'`. -/
@[simps]
noncomputable def restrictScalars (α : R ⟶ R') :
    PresheafOfModules.{v} R' ⥤ PresheafOfModules.{v} R

{C : Type u'}
[CategoryTheory.Category.{v', u'} C]
{R R' : Cᵒᵖ ⥤ RingCat}
(α : R ⟶ R')
(M' : PresheafOfModules R')

(PresheafOfModules.restrictScalars α).obj M' = (M'.restrictScalarsBundledCore α).toPresheafOfModules


theorem ncard_le_one_iff (hs : s.Finite := by toFinite_tac) :
    s.ncard ≤ 1 ↔ ∀ {a b}, a ∈ s → b ∈ s → a = b

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

s.ncard ≤ 1 ↔ ∀ {a b : α}, a ∈ s → b ∈ s → a = b


/-- The ith bit is the ith element of `n.bits`. -/
theorem testBit_eq_inth (n i : ℕ) : n.testBit i = n.bits.getI i


/-- A second-countable space is one with a countable basis. -/
class _root_.SecondCountableTopology : Prop where
  /-- There exists a countable set of sets that generates the topology. -/
  is_open_generated_countable : ∃ b : Set (Set α), b.Countable ∧ t = TopologicalSpace.generateFrom b

{α : Type u}
[t : TopologicalSpace α]
[self : SecondCountableTopology α]

∃ b, b.Countable ∧ t = TopologicalSpace.generateFrom b


@[to_additive] lemma oneLePart_inf_leOnePart_eq_one (a : α) : a⁺ᵐ ⊓ a⁻ᵐ = 1

[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 not_and_not_right : ¬(a ∧ ¬b) ↔ a → b


@[simp] theorem or_self_left  : a ∨ (a ∨ b) ↔ a ∨ b


theorem interior_smul₀ {c : G₀} (hc : c ≠ 0) (s : Set α) : interior (c • s) = c • interior s

{α : Type u_2}
{G₀ : Type u_4}
[TopologicalSpace α]
[GroupWithZero G₀]
[MulAction G₀ α]
[ContinuousConstSMul G₀ α]
{c : G₀}
(hc : c ≠ 0)
(s : Set α)


theorem superpolynomialDecay_iff_abs_isBoundedUnder (hk : Tendsto k l atTop) :
    SuperpolynomialDecay l k f ↔
    ∀ z : ℕ, IsBoundedUnder (· ≤ ·) l fun a : α => |k a ^ z * f a|

{α : Type u_1}
{β : Type u_2}
{l : Filter α}
{k : α → β}
(f : α → β)
[TopologicalSpace β]
[LinearOrderedField β]
[OrderTopology β]
(hk : Filter.Tendsto k l Filter.atTop)

Asymptotics.SuperpolynomialDecay l k f ↔
  ∀ (z : ℕ), Filter.IsBoundedUnder (fun x x_1 => x ≤ x_1) l fun a => |k a ^ z * f a|


@[simp]
theorem cliqueFreeOn_empty : G.CliqueFreeOn ∅ n ↔ n ≠ 0

{α : Type u_1}
(G : SimpleGraph α)
{n : ℕ}


@[simp, mfld_simps]
theorem baseSet_at : Z.baseSet i = (Z.localTriv i).baseSet

{R : Type u_1}
{B : Type u_2}
{F : Type u_3}
[NontriviallyNormedField R]
[NormedAddCommGroup F]
[NormedSpace R F]
[TopologicalSpace B]
{ι : Type u_5}
(Z : VectorBundleCore R B F ι)
(i : ι)


/-- Markov's inequality for `Finset.card` and `tsum` in `ℝ≥0∞`. -/
theorem finset_card_const_le_le_of_tsum_le {ι : Type*} {a : ι → ℝ≥0∞} {c : ℝ≥0∞} (c_ne_top : c ≠ ∞)
    (tsum_le_c : ∑' i, a i ≤ c) {ε : ℝ≥0∞} (ε_ne_zero : ε ≠ 0) :
    ∃ hf : { i : ι | ε ≤ a i }.Finite, ↑hf.toFinset.card ≤ c / ε

{ι : Type u_4}
{a : ι → ℝ≥0∞}
{c : ℝ≥0∞}
(c_ne_top : c ≠ ⊤)
(tsum_le_c : ∑' (i : ι), a i ≤ c)
{ε : ℝ≥0∞}
(ε_ne_zero : ε ≠ 0)

∃ (hf : {i | ε ≤ a i}.Finite), ↑hf.toFinset.card ≤ c / ε


@[to_additive]
theorem tprod_eq_prod {s : Finset β} (hf : ∀ b ∉ s, f b = 1) :
    ∏' b, f b = ∏ b ∈ s, f b

{α : Type u_1}
{β : Type u_2}
[CommMonoid α]
[TopologicalSpace α]
{f : β → α}
{s : Finset β}
(hf : ∀ b ∉ s, f b = 1)


@[simp] theorem arrowCongr'_symm {α₁ α₂ β₁ β₂ : Type*} (e₁ : α₁ ≃ α₂) (e₂ : β₁ ≃ β₂) :
    (arrowCongr' e₁ e₂).symm = arrowCongr' e₁.symm e₂.symm

{α₁ : Type u_1}
{α₂ : Type u_2}
{β₁ : Type u_3}
{β₂ : Type u_4}
(e₁ : α₁ ≃ α₂)
(e₂ : β₁ ≃ β₂)

(e₁.arrowCongr' e₂).symm = e₁.symm.arrowCongr' e₂.symm


@[to_additive (attr := simp)]
theorem pureMulHom_apply (a : α) : pureMulHom a = pure a


@[simp]
lemma reflection_same (x : M) :
    P.reflection i (P.reflection i x) = x

{ι : Type u_1}
{R : Type u_2}
{M : Type u_3}
{N : Type u_4}
[CommRing R]
[AddCommGroup M]
[Module R M]
[AddCommGroup N]
[Module R N]
(P : RootPairing ι R M N)
(i : ι)
(x : M)

(P.reflection i) ((P.reflection i) x) = x


/-- The square with `0 : 0 ⟶ 0` on the bottom and `𝟙 X` on the top is a pushout square. -/
@[simp]
theorem zero_bot (X : C) : IsPushout (𝟙 X) (0 : X ⟶ 0) (0 : X ⟶ 0) (0 : (0 : C) ⟶ 0)


@[to_additive] lemma AntivaryOn.div_left (h₁ : AntivaryOn f₁ g s) (h₂ : MonovaryOn f₂ g s) :
    AntivaryOn (f₁ / f₂) g s

{ι : Type u_1}
{α : Type u_2}
{β : Type u_3}
[OrderedAddCommGroup α]
[OrderedAddCommGroup β]
{s : Set ι}
{f₁ f₂ : ι → α}
{g : ι → β}
(h₁ : AntivaryOn f₁ g s)
(h₂ : MonovaryOn f₂ g s)


@[simp, norm_cast]
theorem coe_ennreal_eq_coe_ennreal_iff {x y : ℝ≥0∞} : (x : EReal) = (y : EReal) ↔ x = y


@[simp]
theorem range_subset {n m} : range n ⊆ range m ↔ n ≤ m


theorem diagonal_updateRow_single [DecidableEq n] [Zero α] (v : n → α) (i : n) (x : α) :
    (diagonal v).updateRow i (Pi.single i x) = diagonal (Function.update v i x)

{n : Type u_3}
{α : Type v}
[DecidableEq n]
[Zero α]
(v : n → α)
(i : n)
(x : α)

(Matrix.diagonal v).updateRow i (Pi.single i x) = Matrix.diagonal (Function.update v i x)


theorem opNorm_zero : ‖(0 : ContinuousMultilinearMap 𝕜 E G)‖ = 0

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


theorem mem_ker_modByMonic (hq : q.Monic) {p : R[X]} :
    p ∈ LinearMap.ker (modByMonicHom q) ↔ q ∣ p

{R : Type u}
[CommRing R]
{q : R[X]}
(hq : q.Monic)
{p : R[X]}

p ∈ LinearMap.ker q.modByMonicHom ↔ q ∣ p


theorem symmDiff_left_comm : a ∆ (b ∆ c) = b ∆ (a ∆ c)

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


@[simp]
theorem coe_normUnit {a : G₀} (h0 : a ≠ 0) : (↑(normUnit a) : G₀) = a⁻¹

(G₀ : Type u_2)
[CommGroupWithZero G₀]
[DecidableEq G₀]
{a : G₀}
(h0 : a ≠ 0)


@[simp]
theorem pullbackConeOfRightIso_snd : (pullbackConeOfRightIso f g).snd = f ≫ inv g

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

(CategoryTheory.Limits.pullbackConeOfRightIso f g).snd = f ≫ CategoryTheory.inv g


@[simp]
theorem coe_eq_one_iff : (φ : PowerSeries R) = 1 ↔ φ = 1

{R : Type u_2}
[CommSemiring R]
{φ : Polynomial R}

↑φ = 1 ↔ φ = 1


@[simp]
theorem add_apply {f g : 𝓢(E, F)} {x : E} : (f + g) x = f x + g x

{E : Type u_4}
{F : Type u_5}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[NormedAddCommGroup F]
[NormedSpace ℝ F]
{f g : SchwartzMap E F}
{x : E}


theorem toQuadraticMap_comp_same (B : BilinMap R M N) (f : N' →ₗ[R] M) :
    BilinMap.toQuadraticMap (B.compl₁₂ f f) = B.toQuadraticMap.comp f

{R : Type u_3}
{M : Type u_4}
{N : Type u_5}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
[AddCommMonoid N]
[Module R N]
{N' : Type u_8}
[AddCommMonoid N']
[Module R N']
(B : LinearMap.BilinMap R M N)
(f : N' →ₗ[R] M)

LinearMap.BilinMap.toQuadraticMap (LinearMap.compl₁₂ B f f) = B.toQuadraticMap.comp f


@[to_additive]
theorem closure_toSubmonoid (S : Set G) :
    (closure S).toSubmonoid = Submonoid.closure (S ∪ S⁻¹)

(Subgroup.closure S).toSubmonoid = Submonoid.closure (S ∪ S⁻¹)


theorem gameAdd_mk_iff {rα rβ} {a₁ a₂ : α} {b₁ b₂ : β} :
    GameAdd rα rβ (a₁, b₁) (a₂, b₂) ↔ rα a₁ a₂ ∧ b₁ = b₂ ∨ rβ b₁ b₂ ∧ a₁ = a₂

{α : Type u_1}
{β : Type u_2}
{rα : α → α → Prop}
{rβ : β → β → Prop}
{a₁ a₂ : α}
{b₁ b₂ : β}

Prod.GameAdd rα rβ (a₁, b₁) (a₂, b₂) ↔ rα a₁ a₂ ∧ b₁ = b₂ ∨ rβ b₁ b₂ ∧ a₁ = a₂


@[simp]
theorem isPWO_insert {a} : IsPWO (insert a s) ↔ IsPWO s

{α : Type u_2}
[Preorder α]
{s : Set α}
{a : α}


theorem edist_eq_iSup (f g : PiLp ∞ β) : edist f g = ⨆ i, edist (f i) (g i)

{ι : Type u_2}
{β : ι → Type u_4}
[Fintype ι]
[(i : ι) → EDist (β i)]
(f g : PiLp ⊤ β)


@[fun_prop]
theorem DifferentiableWithinAt.sub_const (hf : DifferentiableWithinAt 𝕜 f s x) (c : F) :
    DifferentiableWithinAt 𝕜 (fun y => f y - c) s x

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


/-- Simpler expression for the differential in the standard resolution of `k` as a
`G`-representation. It sends `(g₀, ..., gₙ₊₁) ↦ ∑ (-1)ⁱ • (g₀, ..., ĝᵢ, ..., gₙ₊₁)`. -/
theorem d_eq (n : ℕ) : ((groupCohomology.resolution k G).d (n + 1) n).hom = d k G (n + 1)

(k G : Type u)
[CommRing k]
[Monoid G]
(n : ℕ)

((groupCohomology.resolution k G).d (n + 1) n).hom = groupCohomology.resolution.d k G (n + 1)


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

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[Preorder α]
[Preorder β]
[Preorder γ]
[AddZeroClass α]
[AddZeroClass β]
[AddZeroClass γ]
(f : β →+o γ)
(g : α →+o β)
(a : α)


/-- This is a helper construction that can be useful when verifying that a category has all
    pullbacks. Given `F : WalkingCospan ⥤ C`, which is really the same as
    `cospan (F.map inl) (F.map inr)`, and a pullback cone on `F.map inl` and `F.map inr`, we
    get a cone on `F`.

    If you're thinking about using this, have a look at `hasPullbacks_of_hasLimit_cospan`,
    which you may find to be an easier way of achieving your goal. -/
@[simps]
def Cone.ofPullbackCone {F : WalkingCospan ⥤ C} (t : PullbackCone (F.map inl) (F.map inr)) :
    Cone F

{F : CategoryTheory.Limits.WalkingCospan ⥤ C}

(t :
  CategoryTheory.Limits.PullbackCone (F.map CategoryTheory.Limits.WalkingCospan.Hom.inl)
    (F.map CategoryTheory.Limits.WalkingCospan.Hom.inr))

(CategoryTheory.Limits.Cone.ofPullbackCone t).π = t.π ≫ (CategoryTheory.Limits.diagramIsoCospan F).inv


@[simp]
theorem lift_of (f : ∀ i, G i →* K) (k : H →* K)
    (hf : ∀ i, (f i).comp (φ i) = k)
    {i : ι} (g : G i) : (lift f k hf) (of i g : PushoutI φ) = f i g

{ι : Type u_1}
{G : ι → Type u_2}
{H : Type u_3}
{K : Type u_4}
[Monoid K]
[(i : ι) → Monoid (G i)]
[Monoid H]
{φ : (i : ι) → H →* G i}
(f : (i : ι) → G i →* K)
(k : H →* K)
(hf : ∀ (i : ι), (f i).comp (φ i) = k)
{i : ι}
(g : G i)

(Monoid.PushoutI.lift f k hf) ((Monoid.PushoutI.of i) g) = (f i) g


theorem extChartAt_target_mem_nhdsWithin' {x y : M} (hy : y ∈ (extChartAt I x).source) :
    (extChartAt I x).target ∈ 𝓝[range I] extChartAt I x y

{𝕜 : Type u_1}
{E : Type u_2}
{M : Type u_3}
{H : Type u_4}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[TopologicalSpace H]
[TopologicalSpace M]
(I : ModelWithCorners 𝕜 E H)
[ChartedSpace H M]
{x y : M}
(hy : y ∈ (extChartAt I x).source)

(extChartAt I x).target ∈ 𝓝[Set.range ↑I] ↑(extChartAt I x) y


/-- **Rearrangement Inequality**: Pointwise scalar multiplication of `f` and `g` is maximized when
`f` and `g` monovary together. Stated by permuting the entries of `g`. -/
theorem Monovary.sum_smul_comp_perm_le_sum_smul (hfg : Monovary f g) :
    ∑ i, f i • g (σ i) ≤ ∑ i, f i • g i

{ι : Type u_1}
{α : Type u_2}
{β : Type u_3}
[LinearOrderedRing α]
[LinearOrderedAddCommGroup β]
[Module α β]
[OrderedSMul α β]
{σ : Equiv.Perm ι}
{f : ι → α}
{g : ι → β}
[Fintype ι]
(hfg : Monovary f g)

∑ i : ι, f i • g (σ i) ≤ ∑ i : ι, f i • g i


protected theorem lt_of_le_of_lt {a b c : Int} (h₁ : a ≤ b) (h₂ : b < c) : a < c


lemma BiTotal.rel_forall (h : BiTotal R) :
    ((R ⇒ Iff) ⇒ Iff) (fun p => ∀i, p i) (fun q => ∀i, q i)

{α : Type u₁}
{β : Type u₂}
{R : α → β → Prop}
(h : Relator.BiTotal R)

((R ⇒ Iff) ⇒ Iff) (fun p => ∀ (i : α), p i) fun q => ∀ (i : β), q i


theorem single_mul_apply_of_not_exists_add [Add G] (r : k) {g g' : G} (x : k[G])
    (h : ¬∃ d, g' = g + d) : (single g r * x) g' = 0

{k : Type u₁}
{G : Type u₂}
[Semiring k]
[Add G]
(r : k)
{g g' : G}
(x : AddMonoidAlgebra k G)
(h : ¬∃ d, g' = g + d)

(AddMonoidAlgebra.single g r * x) g' = 0


@[simp] protected theorem mul_zero (n : Nat) : n * 0 = 0


theorem valuation_X_pow (s : ℕ) :
    Valued.v (((X : K⟦X⟧) : LaurentSeries K) ^ s) = Multiplicative.ofAdd (-(s : ℤ))

Valued.v ((HahnSeries.ofPowerSeries ℤ K) PowerSeries.X ^ s) = ↑(Multiplicative.ofAdd (-↑s))


@[to_additive (attr := simp)]
theorem centralizer_eq_top_iff_subset {s : Set M} : centralizer s = ⊤ ↔ s ⊆ center M

{M : Type u_1}
[AddMonoid M]
{s : Set M}

AddSubmonoid.centralizer s = ⊤ ↔ s ⊆ ↑(AddSubmonoid.center M)


@[simp]
theorem count_apply_eq_top' (s_mble : MeasurableSet s) : count s = ∞ ↔ s.Infinite

{α : Type u_1}
[MeasurableSpace α]
{s : Set α}
(s_mble : MeasurableSet s)

MeasureTheory.Measure.count s = ⊤ ↔ s.Infinite


/-- In a Banach algebra `A` over a nontrivially normed field `𝕜`, for any `a : A` the
power series with coefficients `a ^ n` represents the function `(1 - z • a)⁻¹` in a disk of
radius `‖a‖₊⁻¹`. -/
theorem hasFPowerSeriesOnBall_inverse_one_sub_smul [CompleteSpace A] (a : A) :
    HasFPowerSeriesOnBall (fun z : 𝕜 => Ring.inverse (1 - z • a))
      (fun n => ContinuousMultilinearMap.mkPiRing 𝕜 (Fin n) (a ^ n)) 0 ‖a‖₊⁻¹

(𝕜 : Type u_1)
{A : Type u_2}
[NontriviallyNormedField 𝕜]
[NormedRing A]
[NormedAlgebra 𝕜 A]
[CompleteSpace A]
(a : A)

HasFPowerSeriesOnBall (fun z => Ring.inverse (1 - z • a)) (fun n => ContinuousMultilinearMap.mkPiRing 𝕜 (Fin n) (a ^ n))
  0 (↑‖a‖₊)⁻¹


/-- Taking skyscraper presheaf at a point is functorial: `c ↦ skyscraper p₀ c` defines a functor by
sending every `f : a ⟶ b` to the natural transformation `α` defined as: `α(U) = f : a ⟶ b` if
`p₀ ∈ U` and the unique morphism to a terminal object in `C` if `p₀ ∉ U`.
-/
@[simps]
def skyscraperPresheafFunctor : C ⥤ Presheaf C X

[(U : TopologicalSpace.Opens ↑X) → Decidable (p₀ ∈ U)]

(skyscraperPresheafFunctor p₀).obj A = skyscraperPresheaf p₀ A


theorem smul (c : ℝ) (hf : Martingale f ℱ μ) : Martingale (c • f) ℱ μ

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


@[simp]
theorem comp_id (f : α →*₀o β) : f.comp (OrderMonoidWithZeroHom.id α) = f

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


@[simp]
theorem mem_transpose {μ : YoungDiagram} {c : ℕ × ℕ} : c ∈ μ.transpose ↔ c.swap ∈ μ


@[simp]
theorem lookmap_cons_some {a b : α} (l : List α) (h : f a = some b) :
    (a :: l).lookmap f = b :: l

{α : Type u}
(f : α → Option α)
{a b : α}
(l : List α)
(h : f a = some b)


@[simp]
theorem Fintype.card_bool : Fintype.card Bool = 2


theorem birthday_add_nat (n : ℕ) : (a + n).birthday = a.birthday + n


lemma succAbove_ne_last {a : Fin (n + 2)} {b : Fin (n + 1)} (ha : a ≠ last _) (hb : b ≠ last _) :
    a.succAbove b ≠ last _

{n : ℕ}
{a : Fin (n + 2)}
{b : Fin (n + 1)}
(ha : a ≠ Fin.last (n + 1))
(hb : b ≠ Fin.last n)


@[simp] lemma coe_toBoundedOrderHom (f : BoundedLatticeHom α β) : ⇑f.toBoundedOrderHom = f

{α : Type u_3}
{β : Type u_4}
[Lattice α]
[Lattice β]
[BoundedOrder α]
[BoundedOrder β]
(f : BoundedLatticeHom α β)


theorem differentiableAt_arccos {x : ℝ} : DifferentiableAt ℝ arccos x ↔ x ≠ -1 ∧ x ≠ 1

DifferentiableAt ℝ Real.arccos x ↔ x ≠ -1 ∧ x ≠ 1


lemma support_one_subset [Zero G] : (1 : k[G]).support ⊆ 0

{k : Type u₁}
{G : Type u₂}
[Semiring k]
[Zero G]


@[to_additive (attr := simp)]
theorem nndist_inv_inv [Group G] [PseudoMetricSpace G] [IsometricSMul G G]
    [IsometricSMul Gᵐᵒᵖ G] (a b : G) : nndist a⁻¹ b⁻¹ = nndist a b

{G : Type v}
[AddGroup G]
[PseudoMetricSpace G]
[IsometricVAdd G G]
[IsometricVAdd Gᵃᵒᵖ G]
(a b : G)


protected theorem map_add (x y : E) : f (x + y) = f x + f y

{R : Type u_1}
{R₂ : Type u_2}
{E : Type u_5}
{E₂ : Type u_6}
[Semiring R]
[Semiring R₂]
{σ₁₂ : R →+* R₂}
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup E₂]
[Module R E]
[Module R₂ E₂]
(f : E →ₛₗᵢ[σ₁₂] E₂)
(x y : E)


theorem continuousAt_iff_lower_upperSemicontinuousAt {f : α → γ} :
    ContinuousAt f x ↔ LowerSemicontinuousAt f x ∧ UpperSemicontinuousAt f x

{α : Type u_1}
[TopologicalSpace α]
{x : α}
{γ : Type u_3}
[LinearOrder γ]
[TopologicalSpace γ]
[OrderTopology γ]
{f : α → γ}


/-- Pushforwards of finite-dimensional submodules along a `LinearEquiv` have the same finrank. -/
theorem finrank_map_eq (f : M ≃ₗ[R] M₂) (p : Submodule R M) :
    finrank R (p.map (f : M →ₗ[R] M₂)) = finrank R p

{R : Type u_1}
{M : Type u_2}
{M₂ : Type u_3}
[Ring R]
[AddCommGroup M]
[AddCommGroup M₂]
[Module R M]
[Module R M₂]
(f : M ≃ₗ[R] M₂)
(p : Submodule R M)

FiniteDimensional.finrank R ↥(Submodule.map (↑f) p) = FiniteDimensional.finrank R ↥p


theorem dvd_cancel_right_coe_nonZeroDivisors {x y : R'} {c : R'⁰} : x * c ∣ y * c ↔ x ∣ y

{R' : Type u_6}
[CommRing R']
{x y : R'}
{c : ↥R'⁰}


theorem cancel_left_of_respectsIso
    (P : AffineTargetMorphismProperty) [P.toProperty.RespectsIso]
    {X Y Z : Scheme} (f : X ⟶ Y) (g : Y ⟶ Z) [IsIso f] [IsAffine Z] : P (f ≫ g) ↔ P g


theorem liftLie_apply (f : M →ₗ⁅R,L⁆ N →ₗ[R] P) (m : M) (n : N) :
    liftLie R L M N P f (m ⊗ₜ n) = f m n

(R : Type u)
[CommRing R]
(L : Type v)
(M : Type w)
(N : Type w₁)
(P : Type w₂)
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
[AddCommGroup N]
[Module R N]
[LieRingModule L N]
[LieModule R L N]
[AddCommGroup P]
[Module R P]
[LieRingModule L P]
[LieModule R L P]
(f : M →ₗ⁅R,L⁆ N →ₗ[R] P)
(m : M)
(n : N)

((TensorProduct.LieModule.liftLie R L M N P) f) (m ⊗ₜ[R] n) = (f m) n


lemma add_of_Y_ne' {P Q : Fin 3 → F} (hP : W.Equation P) (hQ : W.Equation Q) (hPz : P z ≠ 0)
    (hQz : Q z ≠ 0) (hx : P x * Q z ^ 2 = Q x * P z ^ 2) (hy : P y * Q z ^ 3 ≠ W.negY Q * P z ^ 3) :
    W.add P Q = W.dblZ P •
      ![W.toAffine.addX (P x / P z ^ 2) (Q x / Q z ^ 2)
          (W.toAffine.slope (P x / P z ^ 2) (Q x / Q z ^ 2) (P y / P z ^ 3) (Q y / Q z ^ 3)),
        W.toAffine.addY (P x / P z ^ 2) (Q x / Q z ^ 2) (P y / P z ^ 3)
          (W.toAffine.slope (P x / P z ^ 2) (Q x / Q z ^ 2) (P y / P z ^ 3) (Q y / Q z ^ 3)),
        1]


theorem IsBot.snd (hx : IsBot x) : IsBot x.2

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
{x : α × β}
(hx : IsBot x)


theorem lt_succ_iff_ne_top : a < succ a ↔ a ≠ ⊤

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


/-- The cosine of an angle in a right-angled triangle multiplied by the hypotenuse equals the
adjacent side, version subtracting vectors. -/
theorem cos_oangle_sub_left_mul_norm_of_oangle_eq_pi_div_two {x y : V}
    (h : o.oangle x y = ↑(π / 2)) : Real.Angle.cos (o.oangle (x - y) x) * ‖x - y‖ = ‖x‖

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

(o.oangle (x - y) x).cos * ‖x - y‖ = ‖x‖


/--
If the exponential comparison transformation (at `A`) is an isomorphism, then the Frobenius morphism
at `A` is an isomorphism.
-/
theorem frobeniusMorphism_iso_of_expComparison_iso (h : L ⊣ F) (A : C)
    [i : IsIso (expComparison F A)] : IsIso (frobeniusMorphism F h A)

[CategoryTheory.Limits.PreservesLimitsOfShape (CategoryTheory.Discrete CategoryTheory.Limits.WalkingPair) F]

[i : CategoryTheory.IsIso (CategoryTheory.expComparison F A)]

CategoryTheory.IsIso (CategoryTheory.frobeniusMorphism F h A)


theorem subtype_inseparable_iff {p : X → Prop} (x y : Subtype p) : (x ~ᵢ y) ↔ ((x : X) ~ᵢ y)

{X : Type u_1}
[TopologicalSpace X]
{p : X → Prop}
(x y : Subtype p)


/-- Theorems about `padicNormE` are named with a `'` so the names do not conflict with the
equivalent theorems about `norm` (`‖ ‖`). -/
theorem nonarchimedean' (q r : ℚ_[p]) :
    padicNormE (q + r : ℚ_[p]) ≤ max (padicNormE q) (padicNormE r)

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

padicNormE (q + r) ≤ max (padicNormE q) (padicNormE r)


@[simp]
theorem Finset.union_symm_inl (h : Disjoint s t) (x : s) :
    Equiv.Finset.union s t h (Sum.inl x) = ⟨x, Finset.mem_union.mpr <| Or.inl x.2⟩

{α : Type u_1}
[DecidableEq α]
{s t : Finset α}
(h : Disjoint s t)
(x : { x // x ∈ s })

(Equiv.Finset.union s t h) (Sum.inl x) = ⟨↑x, ⋯⟩


@[simp]
lemma preΨ_ofNat (n : ℕ) : W.preΨ n = W.preΨ' n

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


theorem sup_mul_eq_of_coprime_right (h : I ⊔ K = ⊤) : I ⊔ J * K = I ⊔ J

{R : Type u}
[CommSemiring R]
{I J K : Ideal R}
(h : I ⊔ K = ⊤)


@[simp]
theorem comm_trans_lTensorOne :
    (TensorProduct.comm R _ _).trans M.lTensorOne = M.rTensorOne

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

TensorProduct.comm R ↥M ↥⊥ ≪≫ₗ M.lTensorOne = M.rTensorOne


theorem neg_birthday_le : -x.birthday.toPGame ≤ x


/-- A variant of `incl_lift` with `Z` an initial object. -/
@[simps!]
def inclLiftToInitial {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (hZ : Limits.IsInitial Z) :
    incl ⋙ liftToInitial F hZ ≅ F

(hZ : CategoryTheory.Limits.IsInitial Z)

(CategoryTheory.WithInitial.inclLiftToInitial F hZ).hom.app X =
  CategoryTheory.CategoryStruct.id
    (match CategoryTheory.WithInitial.incl.obj X with
    | CategoryTheory.WithInitial.of x => F.obj x
    | CategoryTheory.WithInitial.star => Z)


/-- An ordered scalar multiplication is a bi-monotone scalar multiplication. Note that this is
different from `OrderedSMul`, which uses strict inequality, requires `G` to be a semiring, and the
defining conditions are restricted to positive elements of `G`. -/
@[to_additive]
class IsOrderedSMul (G P : Type*) [LE G] [LE P] [SMul G P] : Prop where
  protected smul_le_smul_left : ∀ a b : P, a ≤ b → ∀ c : G, c • a ≤ c • b
  protected smul_le_smul_right : ∀ c d : G, c ≤ d → ∀ a : P, c • a ≤ d • a

{G : Type u_3}
{P : Type u_4}
[LE G]
[LE P]
[SMul G P]
[self : IsOrderedSMul G P]
(c d : G)


theorem sup_ind (a b : α) {p : α → Prop} (ha : p a) (hb : p b) : p (a ⊔ b)

{α : Type u}
[LinearOrder α]
(a b : α)
{p : α → Prop}
(ha : p a)
(hb : p b)


/-- A total complex shape symmetry contains the data and properties which allow the
identification of the two total complex functors
`HomologicalComplex₂ C c₁ c₂ ⥤ HomologicalComplex C c₁₂`
and `HomologicalComplex₂ C c₂ c₁ ⥤ HomologicalComplex C c₁₂` via the flip. -/
class TotalComplexShapeSymmetry [TotalComplexShape c₁ c₂ c₁₂] [TotalComplexShape c₂ c₁ c₁₂] where
  symm (i₁ : I₁) (i₂ : I₂) : ComplexShape.π c₂ c₁ c₁₂ ⟨i₂, i₁⟩ = ComplexShape.π c₁ c₂ c₁₂ ⟨i₁, i₂⟩
  /-- the signs involved in the symmetry isomorphism of the total complex -/
  σ (i₁ : I₁) (i₂ : I₂) : ℤˣ
  σ_ε₁ {i₁ i₁' : I₁} (h₁ : c₁.Rel i₁ i₁') (i₂ : I₂) :
    σ i₁ i₂ * ComplexShape.ε₁ c₁ c₂ c₁₂ ⟨i₁, i₂⟩ = ComplexShape.ε₂ c₂ c₁ c₁₂ ⟨i₂, i₁⟩ * σ i₁' i₂
  σ_ε₂ (i₁ : I₁) {i₂ i₂' : I₂} (h₂ : c₂.Rel i₂ i₂') :
    σ i₁ i₂ * ComplexShape.ε₂ c₁ c₂ c₁₂ ⟨i₁, i₂⟩ = ComplexShape.ε₁ c₂ c₁ c₁₂ ⟨i₂, i₁⟩ * σ i₁ i₂'

[self : TotalComplexShapeSymmetry c₁ c₂ c₁₂]

TotalComplexShapeSymmetry.σ c₁ c₂ c₁₂ i₁ i₂ * c₁.ε₂ c₂ c₁₂ (i₁, i₂) =
  c₂.ε₁ c₁ c₁₂ (i₂, i₁) * TotalComplexShapeSymmetry.σ c₁ c₂ c₁₂ i₁ i₂'


/-- The diagram describing the universal property for quotients of monoids commutes. -/
@[to_additive (attr := simp) "The diagram describing the universal property for quotients of
`AddMonoid`s commutes."]
theorem lift_comp_mk' (H : c ≤ ker f) : (c.lift f H).comp c.mk' = f

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


@[to_additive (attr := simp)]
theorem coe_pureMulHom : (pureMulHom : α → Filter α) = pure


@[simp]
theorem fst_pow [Monoid R] [AddMonoid M] [DistribMulAction R M] [DistribMulAction Rᵐᵒᵖ M]
    (x : tsze R M) (n : ℕ) : fst (x ^ n) = x.fst ^ n

{R : Type u}
{M : Type v}
[Monoid R]
[AddMonoid M]
[DistribMulAction R M]
[DistribMulAction Rᵐᵒᵖ M]
(x : tsze R M)
(n : ℕ)


theorem mem_sup {α β} [DecidableEq β] {s : Finset α} {f : α → Multiset β} {x : β} :
    x ∈ s.sup f ↔ ∃ v ∈ s, x ∈ f v

{α : Type u_7}
{β : Type u_8}
[DecidableEq β]
{s : Finset α}
{f : α → Multiset β}
{x : β}


theorem IicSnd_mono {r r' : ℝ} (h_le : r ≤ r') : ρ.IicSnd r ≤ ρ.IicSnd r'

{α : Type u_1}
{mα : MeasurableSpace α}
(ρ : MeasureTheory.Measure (α × ℝ))
{r r' : ℝ}
(h_le : r ≤ r')


theorem iget_some [Inhabited α] {a : α} : (some a).iget = a


@[simp] theorem natAbs_zero : natAbs (0 : Int) = (0 : Nat)


@[gcongr]
theorem product_subset_product_right (ht : t ⊆ t') : s ×ˢ t ⊆ s ×ˢ t'

{α : Type u_1}
{β : Type u_2}
{s : Finset α}
{t t' : Finset β}
(ht : t ⊆ t')

s ×ˢ t ⊆ s ×ˢ t'


theorem single_eq_monomial (s : σ →₀ ℕ) (a : R) : Finsupp.single s a = monomial s a

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
(s : σ →₀ ℕ)
(a : R)

Finsupp.single s a = (MvPolynomial.monomial s) a


@[to_additive]
theorem mulIndicator_union_eventuallyEq (h : ∀ᶠ a in l, a ∉ s ∩ t) :
    mulIndicator (s ∪ t) f =ᶠ[l] mulIndicator s f * mulIndicator t f

{α : Type u_1}
{M : Type u_3}
[Monoid M]
{s t : Set α}
{f : α → M}
{l : Filter α}
(h : ∀ᶠ (a : α) in l, a ∉ s ∩ t)

(s ∪ t).mulIndicator f =ᶠ[l] s.mulIndicator f * t.mulIndicator f


theorem root_left_of_root_gcd [CommSemiring k] [DecidableEq R] {ϕ : R →+* k} {f g : R[X]} {α : k}
    (hα : (EuclideanDomain.gcd f g).eval₂ ϕ α = 0) : f.eval₂ ϕ α = 0

(hα : Polynomial.eval₂ ϕ α (EuclideanDomain.gcd f g) = 0)


@[fun_prop]
protected theorem hasFDerivWithinAt : HasFDerivWithinAt iso (iso : E →L[𝕜] F) s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{x : E}
{s : Set E}
(iso : E ≃L[𝕜] F)


@[simp]
theorem lift_top (K : IntermediateField F E) :
    lift (F := K) ⊤ = K

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


protected theorem exists_eq_add_of_le (h : m ≤ n) : ∃ k : Nat, n = m + k


@[simp]
theorem toIsometryEquiv_inj {f g : E ≃ₛₗᵢ[σ₁₂] E₂} :
    f.toIsometryEquiv = g.toIsometryEquiv ↔ f = g

{R : Type u_1}
{R₂ : Type u_2}
{E : Type u_5}
{E₂ : Type u_6}
[Semiring R]
[Semiring R₂]
{σ₁₂ : R →+* R₂}
{σ₂₁ : R₂ →+* R}
[RingHomInvPair σ₁₂ σ₂₁]
[RingHomInvPair σ₂₁ σ₁₂]
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup E₂]
[Module R E]
[Module R₂ E₂]
{f g : E ≃ₛₗᵢ[σ₁₂] E₂}


@[simp]
theorem ofSubalgebras_apply (h : L₁'.map ↑e = L₂') (x : L₁') : ↑(e.ofSubalgebras _ _ h x) = e x

(h : LieSubalgebra.map e.toLieHom L₁' = L₂')

↑((LieEquiv.ofSubalgebras L₁' L₂' e h) x) = e ↑x


@[to_additive]
theorem finprod_mem_inv_distrib [DivisionCommMonoid G] (f : α → G) (hs : s.Finite) :
    (∏ᶠ x ∈ s, (f x)⁻¹) = (∏ᶠ x ∈ s, f x)⁻¹

{α : Type u_1}
{G : Type u_4}
{s : Set α}
[SubtractionCommMonoid G]
(f : α → G)
(hs : s.Finite)


lemma le_of_mem_primeFactors (h : p ∈ n.primeFactors) : p ≤ n


@[reassoc]
theorem coprod.map_swap {A B X Y : C} (f : A ⟶ B) (g : X ⟶ Y)
    [HasColimitsOfShape (Discrete WalkingPair) C] :
    coprod.map (𝟙 X) f ≫ coprod.map g (𝟙 B) = coprod.map g (𝟙 A) ≫ coprod.map (𝟙 Y) f

[CategoryTheory.Limits.HasColimitsOfShape (CategoryTheory.Discrete CategoryTheory.Limits.WalkingPair) C]

CategoryTheory.Limits.coprod.map (𝟙 X) f ≫ CategoryTheory.Limits.coprod.map g (𝟙 B) =
  CategoryTheory.Limits.coprod.map g (𝟙 A) ≫ CategoryTheory.Limits.coprod.map (𝟙 Y) f


@[simp]
theorem neg_units_ne_self (u : Rˣ) : -u ≠ u

{R : Type u_1}
[Ring R]
[CharZero R]
(u : Rˣ)


@[simp]
protected theorem map_apply {G : Type*} [NormedAddCommGroup G] [InnerProductSpace 𝕜 G]
    (b : OrthonormalBasis ι 𝕜 E) (L : E ≃ₗᵢ[𝕜] G) (i : ι) : b.map L i = L (b i)

{ι : Type u_1}
{𝕜 : Type u_3}
[RCLike 𝕜]
{E : Type u_4}
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[Fintype ι]
{G : Type u_8}
[NormedAddCommGroup G]
[InnerProductSpace 𝕜 G]
(b : OrthonormalBasis ι 𝕜 E)
(L : E ≃ₗᵢ[𝕜] G)
(i : ι)


theorem wellPowered_of_isDetector [HasPullbacks C] (G : C) (hG : IsDetector G) : WellPowered C

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


@[simp]
theorem inl_add [Add R] [AddZeroClass A] (r₁ r₂ : R) :
    (inl (r₁ + r₂) : Unitization R A) = inl r₁ + inl r₂

{R : Type u_3}
(A : Type u_4)
[Add R]
[AddZeroClass A]
(r₁ r₂ : R)

Unitization.inl (r₁ + r₂) = Unitization.inl r₁ + Unitization.inl r₂


theorem comp_continuousAt_iff (h : X ≃ₜ Y) (f : Z → X) (z : Z) :
    ContinuousAt (h ∘ f) z ↔ ContinuousAt f z

{X : Type u_1}
{Y : Type u_2}
{Z : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
[TopologicalSpace Z]
(h : X ≃ₜ Y)
(f : Z → X)
(z : Z)

ContinuousAt (⇑h ∘ f) z ↔ ContinuousAt f z


theorem fdiv_add_fmod (a b : Int) : b * a.fdiv b + a.fmod b = a


@[simp]
protected theorem sup'_apply {C : β → Type*} [∀ b : β, SemilatticeSup (C b)]
    {s : Finset α} (H : s.Nonempty) (f : α → ∀ b : β, C b) (b : β) :
    s.sup' H f b = s.sup' H fun a => f a b

{α : Type u_2}
{β : Type u_3}
{C : β → Type u_7}
[(b : β) → SemilatticeSup (C b)]
{s : Finset α}
(H : s.Nonempty)
(f : α → (b : β) → C b)
(b : β)


theorem factorial_ne_zero (n : ℕ) : n ! ≠ 0


theorem toMultilinearMap_injective :
    Function.Injective
      (ContinuousMultilinearMap.toMultilinearMap :
        ContinuousMultilinearMap R M₁ M₂ → MultilinearMap R M₁ M₂)

{R : Type u}
{ι : Type v}
{M₁ : ι → Type w₁}
{M₂ : Type w₂}
[Semiring R]
[(i : ι) → AddCommMonoid (M₁ i)]
[AddCommMonoid M₂]
[(i : ι) → Module R (M₁ i)]
[Module R M₂]
[(i : ι) → TopologicalSpace (M₁ i)]
[TopologicalSpace M₂]


/-- Shrink `α` to a smaller universe preserves module structure. -/
@[simps!]
noncomputable def _root_.Shrink.linearEquiv [Small.{v} α] [AddCommMonoid α] [Module R α] :
    Shrink.{v} α ≃ₗ[R] α

(α : Type u)
(R : Type u_1)
[Semiring R]
[Small.{v, u} α]
[AddCommMonoid α]
[Module R α]

∀ (a : α), (Shrink.linearEquiv α R).symm a = (AddEquiv.symm (equivShrink α).symm.addEquiv) a


theorem abs_div (a b : α) : |a / b| = |a| / |b|

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


/-- Every continuous injective `f : (a, b) → δ` is strictly monotone
or antitone (increasing or decreasing). -/
theorem ContinuousOn.strictMonoOn_of_injOn_Ioo {a b : α} {f : α → δ} (hab : a < b)
    (hf_c : ContinuousOn f (Ioo a b)) (hf_i : InjOn f (Ioo a b)) :
    StrictMonoOn f (Ioo a b) ∨ StrictAntiOn f (Ioo a b)

{α : Type u}
[ConditionallyCompleteLinearOrder α]
[TopologicalSpace α]
[OrderTopology α]
[DenselyOrdered α]
{δ : Type u_1}
[LinearOrder δ]
[TopologicalSpace δ]
[OrderClosedTopology δ]
{a b : α}
{f : α → δ}
(hab : a < b)
(hf_c : ContinuousOn f (Set.Ioo a b))
(hf_i : Set.InjOn f (Set.Ioo a b))

StrictMonoOn f (Set.Ioo a b) ∨ StrictAntiOn f (Set.Ioo a b)


theorem mem_infPrepartition_comm :
    J ∈ π₁.infPrepartition π₂.toPrepartition ↔ J ∈ π₂.infPrepartition π₁.toPrepartition

{π₁ π₂ : BoxIntegral.TaggedPrepartition I}


@[simp]
theorem reverse_eq_id :
    (reverse : CliffordAlgebra (0 : QuadraticForm R Unit) →ₗ[R] _) = LinearMap.id


theorem trailingCoeff_mul {R : Type*} [Ring R] [NoZeroDivisors R] (p q : R[X]) :
    (p * q).trailingCoeff = p.trailingCoeff * q.trailingCoeff

{R : Type u_2}
[Ring R]
[NoZeroDivisors R]
(p q : Polynomial R)


@[simp]
theorem inf_eq_add : ((· ⊓ ·) : Tropical R → Tropical R → Tropical R) = (· + ·)


theorem card_roots_le_map_of_injective [IsDomain A] [IsDomain B] {p : A[X]} {f : A →+* B}
    (hf : Function.Injective f) : Multiset.card p.roots ≤ Multiset.card (p.map f).roots

{A : Type u_1}
{B : Type u_2}
[CommRing A]
[CommRing B]
[IsDomain A]
[IsDomain B]
{p : Polynomial A}
{f : A →+* B}
(hf : Function.Injective ⇑f)

Multiset.card p.roots ≤ Multiset.card (Polynomial.map f p).roots


theorem IsClosed.upperSemicontinuousAt_indicator (hs : IsClosed s) (hy : 0 ≤ y) :
    UpperSemicontinuousAt (indicator s fun _x => y) x

{α : Type u_1}
[TopologicalSpace α]
{β : Type u_2}
[Preorder β]
{x : α}
{s : Set α}
{y : β}
[Zero β]
(hs : IsClosed s)
(hy : 0 ≤ y)

UpperSemicontinuousAt (s.indicator fun _x => y) x


theorem forget₂_map_associator_hom (X Y Z : AlgebraCat.{u} R) :
    (forget₂ (AlgebraCat R) (ModuleCat R)).map (α_ X Y Z).hom =
      (α_
        (forget₂ _ (ModuleCat R) |>.obj X)
        (forget₂ _ (ModuleCat R) |>.obj Y)
        (forget₂ _ (ModuleCat R) |>.obj Z)).hom

{R : Type u}
[CommRing R]
(X Y Z : AlgebraCat R)

(CategoryTheory.forget₂ (AlgebraCat R) (ModuleCat R)).map (α_ X Y Z).hom =
  (α_ ((CategoryTheory.forget₂ (AlgebraCat R) (ModuleCat R)).obj X)
      ((CategoryTheory.forget₂ (AlgebraCat R) (ModuleCat R)).obj Y)
      ((CategoryTheory.forget₂ (AlgebraCat R) (ModuleCat R)).obj Z)).hom


theorem mem_prod_iff {s : Set (α × β)} {f : Filter α} {g : Filter β} :
    s ∈ f ×ˢ g ↔ ∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁ ×ˢ t₂ ⊆ s

{α : Type u_1}
{β : Type u_2}
{s : Set (α × β)}
{f : Filter α}
{g : Filter β}


@[to_additive]
theorem measure_mul_right_ne_zero (h2s : μ s ≠ 0) (y : G) : μ ((fun x => x * y) ⁻¹' s) ≠ 0

{G : Type u_1}
[MeasurableSpace G]
[AddGroup G]
[MeasurableAdd₂ G]
(μ : MeasureTheory.Measure G)
[MeasureTheory.SFinite μ]
{s : Set G}
[MeasurableNeg G]
[μ.IsAddLeftInvariant]
(h2s : μ s ≠ 0)
(y : G)


/-- If `x` is an `I`-multiple of the submodule spanned by `f '' s`,
then we can write `x` as an `I`-linear combination of the elements of `f '' s`. -/
theorem mem_ideal_smul_span_iff_exists_sum {ι : Type*} (f : ι → M) (x : M) :
    x ∈ I • span R (Set.range f) ↔
      ∃ (a : ι →₀ R) (_ : ∀ i, a i ∈ I), (a.sum fun i c => c • f i) = x

{R : Type u}
{M : Type v}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
(I : Ideal R)
{ι : Type u_4}
(f : ι → M)
(x : M)

x ∈ I • Submodule.span R (Set.range f) ↔ ∃ a, ∃ (_ : ∀ (i : ι), a i ∈ I), (a.sum fun i c => c • f i) = x


theorem lt_log2_self : n < 2 ^ (n.log2 + 1)


/-- Tensoring on the right gives a monoidal functor from `C` into endofunctors of `C`.
-/
@[simps!]
def tensoringRightMonoidal [MonoidalCategory.{v} C] : MonoidalFunctor C (C ⥤ C)

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

(CategoryTheory.tensoringRightMonoidal C).ε.app X = (CategoryTheory.MonoidalCategory.rightUnitor X).inv


@[simp]
theorem ofMul_eq_zero {A : Type*} [One A] {x : A} : Additive.ofMul x = 0 ↔ x = 1


/-- Linearly disjoint is symmetric if elements in the module commute. -/
theorem linearDisjoint_symm_of_commute
    (hc : ∀ (m : M) (n : N), Commute m.1 n.1) : M.LinearDisjoint N ↔ N.LinearDisjoint M

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


/-- This is a helper construction that can be useful when verifying that a category has all
    pushout. Given `F : WalkingSpan ⥤ C`, which is really the same as
    `span (F.map fst) (F.map snd)`, and a pushout cocone on `F.map fst` and `F.map snd`,
    we get a cocone on `F`.

    If you're thinking about using this, have a look at `hasPushouts_of_hasColimit_span`, which
    you may find to be an easier way of achieving your goal. -/
@[simps]
def Cocone.ofPushoutCocone {F : WalkingSpan ⥤ C} (t : PushoutCocone (F.map fst) (F.map snd)) :
    Cocone F

{F : CategoryTheory.Limits.WalkingSpan ⥤ C}

(t :
  CategoryTheory.Limits.PushoutCocone (F.map CategoryTheory.Limits.WalkingSpan.Hom.fst)
    (F.map CategoryTheory.Limits.WalkingSpan.Hom.snd))

(CategoryTheory.Limits.Cocone.ofPushoutCocone t).pt = t.pt


theorem coe_injective : @Function.Injective (L₁ →ₗ⁅R⁆ L₂) (L₁ → L₂) (↑)

{R : Type u}
{L₁ : Type v}
{L₂ : Type w}
[CommRing R]
[LieRing L₁]
[LieAlgebra R L₁]
[LieRing L₂]
[LieAlgebra R L₂]


@[simps]
instance assoc (f : a ⟶ b) (g : b ⟶ c) (h : c ⟶ d) (i : a ⟶ d)
    [BicategoricalCoherence (f ≫ g ≫ h) i] :
    BicategoricalCoherence ((f ≫ g) ≫ h) i

[CategoryTheory.BicategoricalCoherence (f ≫ g ≫ h) i]


theorem tendsto_atBot_add_nonpos_right' (hf : Tendsto f l atBot) (hg : ∀ᶠ x in l, g x ≤ 0) :
    Tendsto (fun x => f x + g x) l atBot

{α : Type u_3}
{β : Type u_4}
[OrderedAddCommMonoid β]
{l : Filter α}
{f g : α → β}
(hf : Filter.Tendsto f l Filter.atBot)
(hg : ∀ᶠ (x : α) in l, g x ≤ 0)

Filter.Tendsto (fun x => f x + g x) l Filter.atBot


@[to_additive (attr := simp)]
theorem ofDual_div [Div α] (a b : αᵒᵈ) : ofDual (a / b) = ofDual a / ofDual b

OrderDual.ofDual (a / b) = OrderDual.ofDual a / OrderDual.ofDual b


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


theorem coe_injective ⦃f g : α →ₛ β⦄ (H : (f : α → β) = g) : f = g

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
⦃f g : MeasureTheory.SimpleFunc α β⦄
(H : ↑f = ↑g)


@[simp 1001, mfld_simps 1001]
theorem TotalSpace.mk_inj {b : B} {y y' : E b} : mk' F b y = mk' F b y' ↔ y = y'

{B : Type u_1}
{F : Type u_2}
{E : B → Type u_3}
{b : B}
{y y' : E b}

Bundle.TotalSpace.mk' F b y = Bundle.TotalSpace.mk' F b y' ↔ y = y'


/-- Given a closed set `s` in a Polish space, one can construct a finer Polish topology for
which `s` is both open and closed. -/
theorem _root_.IsClosed.isClopenable [TopologicalSpace α] [PolishSpace α] {s : Set α}
    (hs : IsClosed s) : IsClopenable s

{α : Type u_1}
[TopologicalSpace α]
[PolishSpace α]
{s : Set α}
(hs : IsClosed s)


theorem supDegree_single_ne_zero (a : A) {r : R} (hr : r ≠ 0) :
    (single a r).supDegree D = D a

{R : Type u_1}
{A : Type u_3}
{B : Type u_5}
[Semiring R]
[SemilatticeSup B]
[OrderBot B]
{D : A → B}
(a : A)
{r : R}
(hr : r ≠ 0)

AddMonoidAlgebra.supDegree D (AddMonoidAlgebra.single a r) = D a


theorem extend_function_finite {α : Type u} {β : Type v} [Finite α] {s : Set α} (f : s ↪ β)
    (h : Nonempty (α ≃ β)) : ∃ g : α ≃ β, ∀ x : s, g x = f x

{α : Type u}
{β : Type v}
[Finite α]
{s : Set α}
(f : ↑s ↪ β)
(h : Nonempty (α ≃ β))


/-- Pull a subalgebra back to an opposite subalgebra along `MulOpposite.unop` -/
@[simps toSubsemiring]
protected def op (S : Subalgebra R A) : Subalgebra R Aᵐᵒᵖ

{R : Type u_2}
{A : Type u_3}
[CommSemiring R]
[Semiring A]
[Algebra R A]
(S : Subalgebra R A)


/--
If `a₀ -r→ a₁ -r→ ... -r→ aₙ` is an `r`-series and `a` is such that
`aᵢ -r→ a -r→ a_ᵢ₊₁`, then
`a₀ -r→ a₁ -r→ ... -r→ aᵢ -r→ a -r→ aᵢ₊₁ -r→ ... -r→ aₙ`
is another `r`-series
-/
@[simps]
def insertNth (p : RelSeries r) (i : Fin p.length) (a : α)
    (prev_connect : r (p (Fin.castSucc i)) a) (connect_next : r a (p i.succ)) : RelSeries r

(prev_connect : r (p.toFun i.castSucc) a)

(p.insertNth i a prev_connect connect_next).toFun j = i.succ.castSucc.insertNth a p.toFun j


theorem ω_pow_formula (p' : ℕ) (h : lucasLehmerResidue (p' + 2) = 0) :
    ∃ k : ℤ,
      (ω : X (q (p' + 2))) ^ 2 ^ (p' + 1) =
        k * mersenne (p' + 2) * (ω : X (q (p' + 2))) ^ 2 ^ p' - 1

∃ k, LucasLehmer.X.ω ^ 2 ^ (p' + 1) = ↑k * ↑(mersenne (p' + 2)) * LucasLehmer.X.ω ^ 2 ^ p' - 1


theorem Chain.eq_nil_of_well_founded [IsWellFounded α r] (h : Chain r s) : s = Cycle.nil

{α : Type u_1}
{r : α → α → Prop}
{s : Cycle α}
[IsWellFounded α r]
(h : Cycle.Chain r s)


theorem zero_apply {a : α} : (0 : SummableFamily Γ R α) a = 0

{Γ : Type u_1}
{R : Type u_2}
[PartialOrder Γ]
[AddCommMonoid R]
{α : Type u_3}
{a : α}


@[simp]
theorem coneOfHom_homOfCone (s : Cone F) : coneOfHom h (homOfCone h s) = s

(h : CategoryTheory.yoneda.obj X ⋙ CategoryTheory.uliftFunctor.{u₁, v₃} ≅ F.cones)

CategoryTheory.Limits.IsLimit.OfNatIso.coneOfHom h (CategoryTheory.Limits.IsLimit.OfNatIso.homOfCone h s) = s


/-- A subset of `ℕ` containing zero and closed under `Nat.succ` contains all of `ℕ`. -/
lemma set_induction {S : Set ℕ} (hb : 0 ∈ S) (h_ind : ∀ k : ℕ, k ∈ S → k + 1 ∈ S) (n : ℕ) :
    n ∈ S

{S : Set ℕ}
(hb : 0 ∈ S)
(h_ind : ∀ (k : ℕ), k ∈ S → k + 1 ∈ S)
(n : ℕ)


theorem sum_comapDomain [Zero M] [AddCommMonoid N] (f : α → β) (l : β →₀ M) (g : β → M → N)
    (hf : Set.BijOn f (f ⁻¹' ↑l.support) ↑l.support) :
    (comapDomain f l hf.injOn).sum (g ∘ f) = l.sum g

(Finsupp.comapDomain f l ⋯).sum (g ∘ f) = l.sum g


lemma succ_min (a b : α) : succ (min a b) = min (succ a) (succ b)

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

Order.succ (min a b) = min (Order.succ a) (Order.succ b)


@[simp]
theorem rid_symm_apply (a : A) : (TensorProduct.rid R S A).symm a = a ⊗ₜ 1

(R : Type uR)
(S : Type uS)
{A : Type uA}
[CommSemiring R]
[CommSemiring S]
[Algebra R S]
[Semiring A]
[Algebra R A]
[Algebra S A]
[IsScalarTower R S A]
(a : A)

(Algebra.TensorProduct.rid R S A).symm a = a ⊗ₜ[R] 1


theorem prod_toNonUnitalSubalgebra :
    (S.prod S₁).toNonUnitalSubalgebra = S.toNonUnitalSubalgebra.prod S₁.toNonUnitalSubalgebra

{R : Type u}
{A : Type v}
{B : Type w}
[CommSemiring R]
[NonUnitalSemiring A]
[StarRing A]
[Module R A]
[NonUnitalSemiring B]
[StarRing B]
[Module R B]
(S : NonUnitalStarSubalgebra R A)
(S₁ : NonUnitalStarSubalgebra R B)

(S.prod S₁).toNonUnitalSubalgebra = S.prod S₁.toNonUnitalSubalgebra


@[to_additive (attr := simp)]
theorem one_ne_coe {a : α} : (1 : WithOne α) ≠ a


/-- Given any adjunction `L ⊣ R`, there is a comparison functor `CategoryTheory.Monad.comparison R`
sending objects `Y : D` to Eilenberg-Moore algebras for `L ⋙ R` with underlying object `R.obj X`.

We later show that this is full when `R` is full, faithful when `R` is faithful,
and essentially surjective when `R` is reflective.
-/
@[simps]
def Monad.comparison (h : L ⊣ R) : D ⥤ h.toMonad.Algebra

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{L : CategoryTheory.Functor C D}
{R : CategoryTheory.Functor D C}
(h : L ⊣ R)

∀ {X Y : D} (f : X ⟶ Y), ((CategoryTheory.Monad.comparison h).map f).f = R.map f


@[to_additive]
theorem inv_comp [Inv γ] (x : β → γ) (y : α → β) : x⁻¹ ∘ y = (x ∘ y)⁻¹

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[Inv γ]
(x : β → γ)
(y : α → β)


@[simp, norm_cast]
theorem coe_div (x y : s) : (↑(x / y) : K) = ↑x / ↑y

{K : Type u}
[DivisionRing K]
(s : Subfield K)
(x y : ↥s)


@[ext]
theorem ext {S T : NonUnitalSubalgebra R A} (h : ∀ x : A, x ∈ S ↔ x ∈ T) : S = T

{R : Type u}
{A : Type v}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[Module R A]
{S T : NonUnitalSubalgebra R A}
(h : ∀ (x : A), x ∈ S ↔ x ∈ T)


theorem join_mem_kstar {L : List (List α)} (h : ∀ y ∈ L, y ∈ l) : L.join ∈ l∗

{α : Type u_1}
{l : Language α}
{L : List (List α)}
(h : ∀ y ∈ L, y ∈ l)


/-- If `D ⋙ forget T` has a colimit, then `D` has a colimit. -/
theorem hasColimit_of_comp_forget_hasColimit (D : J ⥤ Coalgebra T) [HasColimit (D ⋙ forget T)] :
    HasColimit D

(D : CategoryTheory.Functor J T.Coalgebra)


/-- The identity map commutes with any self-map. -/
theorem id_left : Commute id f


theorem orderTop_single_le : a ≤ (single a r).orderTop

{Γ : Type u_1}
{R : Type u_2}
[PartialOrder Γ]
[Zero R]
{a : Γ}
{r : R}


@[to_additive]
theorem mem_iSup_of_mem {S : ι → Subsemigroup M} (i : ι) : ∀ {x : M}, x ∈ S i → x ∈ iSup S

{ι : Sort u_1}
{M : Type u_2}
[Mul M]
{S : ι → Subsemigroup M}
(i : ι)
{x : M}


theorem coeff_def {s : Unit →₀ ℕ} {n : ℕ} (h : s () = n) : coeff R n = MvPowerSeries.coeff R s

{R : Type u_1}
[Semiring R]
{s : Unit →₀ ℕ}
{n : ℕ}
(h : s () = n)

PowerSeries.coeff R n = MvPowerSeries.coeff R s


@[simp]
theorem swap_leftInverse : Function.LeftInverse (@swap α β) swap


/-- The difference with `NonUnitalSubring.closure_induction` is that this acts on the
subtype. -/
@[elab_as_elim]
theorem closure_induction' {s : Set R} {p : closure s → Prop} (a : closure s)
    (mem : ∀ (x) (hx : x ∈ s), p ⟨x, subset_closure hx⟩) (zero : p 0)
    (add : ∀ x y, p x → p y → p (x + y)) (neg : ∀ x, p x → p (-x))
    (mul : ∀ x y, p x → p y → p (x * y)) : p a

{p : ↥(NonUnitalSubring.closure s) → Prop}

(mem : ∀ (x : R) (hx : x ∈ s), p ⟨x, ⋯⟩)

(add : ∀ (x y : ↥(NonUnitalSubring.closure s)), p x → p y → p (x + y))

(neg : ∀ (x : ↥(NonUnitalSubring.closure s)), p x → p (-x))

(mul : ∀ (x y : ↥(NonUnitalSubring.closure s)), p x → p y → p (x * y))


theorem StrictMono.comp_strictAnti (hg : StrictMono g) (hf : StrictAnti f) : StrictAnti (g ∘ f)

{α : Type u}
{β : Type v}
{γ : Type w}
[Preorder α]
[Preorder β]
[Preorder γ]
{g : β → γ}
{f : α → β}
(hg : StrictMono g)
(hf : StrictAnti f)


lemma Ici_eq_singleton_iff_isTop {x : α} : (Ici x = {x}) ↔ IsTop x


@[to_additive (attr := simp)]
theorem fst_comp_inl : (fst M N).comp (inl M N) = id M

{M : Type u_5}
{N : Type u_6}
[AddZeroClass M]
[AddZeroClass N]

(AddMonoidHom.fst M N).comp (AddMonoidHom.inl M N) = AddMonoidHom.id M


theorem encode_iff {f : α → σ} : (Computable fun a => encode (f a)) ↔ Computable f

{α : Type u_1}
{σ : Type u_4}
[Primcodable α]
[Primcodable σ]
{f : α → σ}

(Computable fun a => Encodable.encode (f a)) ↔ Computable f


theorem span_singleton_eq_span_singleton {R M : Type*} [Ring R] [AddCommGroup M] [Module R M]
    [NoZeroSMulDivisors R M] {x y : M} : ((R ∙ x) = R ∙ y) ↔ ∃ z : Rˣ, z • x = y

{R : Type u_9}
{M : Type u_10}
[Ring R]
[AddCommGroup M]
[Module R M]
[NoZeroSMulDivisors R M]
{x y : M}

Submodule.span R {x} = Submodule.span R {y} ↔ ∃ z, z • x = y


@[simp]
theorem smuld_val (n x y : ℤ) : sqrtd * (n : ℤ√d) * ⟨x, y⟩ = ⟨d * n * y, n * x⟩

Zsqrtd.sqrtd * ↑n * { re := x, im := y } = { re := d * n * y, im := n * x }


@[simp]
theorem toIdeal_inf (I J : HomogeneousIdeal 𝒜) : (I ⊓ J).toIdeal = I.toIdeal ⊓ J.toIdeal

{ι : Type u_1}
{σ : Type u_2}
{A : Type u_4}
[Semiring A]
[DecidableEq ι]
[AddMonoid ι]
[SetLike σ A]
[AddSubmonoidClass σ A]
{𝒜 : ι → σ}
[GradedRing 𝒜]
(I J : HomogeneousIdeal 𝒜)


@[elab_as_elim]
theorem nat_induction {P : ℕ∞ → Prop} (a : ℕ∞) (h0 : P 0) (hsuc : ∀ n : ℕ, P n → P n.succ)
    (htop : (∀ n : ℕ, P n) → P ⊤) : P a

{P : ℕ∞ → Prop}
(a : ℕ∞)
(h0 : P 0)
(hsuc : ∀ (n : ℕ), P ↑n → P ↑n.succ)
(htop : (∀ (n : ℕ), P ↑n) → P ⊤)


/-- `LTCmp cmp` asserts that `cmp x y = .lt` and `x < y` coincide. -/
class LTCmp [LT α] (cmp : α → α → Ordering) extends OrientedCmp cmp : Prop where
  /-- `cmp x y = .lt` holds iff `x < y` is true. -/
  cmp_iff_lt : cmp x y = .lt ↔ x < y

{α : Type u_1}
[LT α]
{cmp : α → α → Ordering}
[self : Batteries.LTCmp cmp]
{x y : α}


@[simp]
theorem opAlgEquiv_symm_tmul (a : A) (b : B) :
    (opAlgEquiv R S A B).symm (op <| a ⊗ₜ[R] b) = op a ⊗ₜ op b

(R : Type u_1)
(S : Type u_2)
(A : Type u_3)
(B : Type u_4)
[CommSemiring R]
[CommSemiring S]
[Semiring A]
[Semiring B]
[Algebra R S]
[Algebra R A]
[Algebra R B]
[Algebra S A]
[IsScalarTower R S A]
(a : A)
(b : B)

(Algebra.TensorProduct.opAlgEquiv R S A B).symm (MulOpposite.op (a ⊗ₜ[R] b)) = MulOpposite.op a ⊗ₜ[R] MulOpposite.op b


theorem Sylow.smul_def {g : G} {P : Sylow p G} : g • P = MulAut.conj g • P

{p : ℕ}
{G : Type u_1}
[Group G]
{g : G}
{P : Sylow p G}


theorem cos_pi_sub (x : ℂ) : cos (π - x) = -cos x

Complex.cos (↑Real.pi - x) = -Complex.cos x


theorem upperSemicontinuousAt_ciInf {f : ι → α → δ'}
    (bdd : ∀ᶠ y in 𝓝 x, BddBelow (range fun i => f i y)) (h : ∀ i, UpperSemicontinuousAt (f i) x) :
    UpperSemicontinuousAt (fun x' => ⨅ i, f i x') x

{f : ι → α → δ'}

(bdd : ∀ᶠ (y : α) in 𝓝 x, BddBelow (Set.range fun i => f i y))

(h : ∀ (i : ι), UpperSemicontinuousAt (f i) x)


theorem coe_mapRingHom_eq_coe_map [RingHomClass F R[X] S[X]] (φ : F) (hφ : R[X]⁰ ≤ S[X]⁰.comap φ) :
    (mapRingHom φ hφ : RatFunc R → RatFunc S) = map φ hφ

{R : Type u_3}
{S : Type u_4}
{F : Type u_5}
[CommRing R]
[CommRing S]
[FunLike F R[X] S[X]]
[RingHomClass F R[X] S[X]]
(φ : F)
(hφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰)

⇑(RatFunc.mapRingHom φ hφ) = ⇑(RatFunc.map φ hφ)


/-- The neighborhood filter of a compact set is disjoint with a filter `l` if and only if the
neighborhood filter of each point of this set is disjoint with `l`. -/
theorem IsCompact.disjoint_nhdsSet_left {l : Filter X} (hs : IsCompact s) :
    Disjoint (𝓝ˢ s) l ↔ ∀ x ∈ s, Disjoint (𝓝 x) l

{X : Type u}
[TopologicalSpace X]
{s : Set X}
{l : Filter X}
(hs : IsCompact s)


@[simp]
theorem symm_apply_apply (b : M) : e.symm (e b) = b

{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₂)
(b : M)


/-- `LocallyDiscrete C` is equivalent to the original type `C`. -/
@[simps]
def locallyDiscreteEquiv : LocallyDiscrete C ≃ C

(self : CategoryTheory.LocallyDiscrete C)

CategoryTheory.LocallyDiscrete.locallyDiscreteEquiv self = self.as


@[to_additive]
protected theorem right_comm (h : IsMulCentral c) (a b) : a * b * c = a * c * b

{M : Type u_1}
{c : M}
[Add M]
(h : IsAddCentral c)
(a b : M)


/-- For nonzero `a` and `b`, the power of `p` in `a * b` is the sum of the powers in `a` and `b` -/
@[simp]
theorem factorization_mul {a b : ℕ} (ha : a ≠ 0) (hb : b ≠ 0) :
    (a * b).factorization = a.factorization + b.factorization


lemma contractible_distinguished (X : Cᵒᵖ) :
    contractibleTriangle X ∈ distinguishedTriangles C

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

CategoryTheory.Pretriangulated.contractibleTriangle X ∈ CategoryTheory.Pretriangulated.Opposite.distinguishedTriangles C


theorem ofCauchy_neg (a) : (⟨-a⟩ : ℝ) = -⟨a⟩


theorem coequalizer.π_colimMap_desc {X' Y' Z : C} (f' g' : X' ⟶ Y') [HasCoequalizer f' g']
    (p : X ⟶ X') (q : Y ⟶ Y') (wf : f ≫ q = p ≫ f') (wg : g ≫ q = p ≫ g') (h : Y' ⟶ Z)
    (wh : f' ≫ h = g' ≫ h) :
    coequalizer.π f g ≫ colimMap (parallelPairHom f g f' g' p q wf wg) ≫ coequalizer.desc h wh =
      q ≫ h

(wf : CategoryTheory.CategoryStruct.comp f q = CategoryTheory.CategoryStruct.comp p f')

(wg : CategoryTheory.CategoryStruct.comp g q = CategoryTheory.CategoryStruct.comp p g')

(wh : CategoryTheory.CategoryStruct.comp f' h = CategoryTheory.CategoryStruct.comp g' h)

CategoryTheory.CategoryStruct.comp (CategoryTheory.Limits.coequalizer.π f g)
    (CategoryTheory.CategoryStruct.comp
      (CategoryTheory.Limits.colimMap (CategoryTheory.Limits.parallelPairHom f g f' g' p q wf wg))
      (CategoryTheory.Limits.coequalizer.desc h wh)) =
  CategoryTheory.CategoryStruct.comp q h


@[to_additive AddCommute.prod]
theorem Commute.prod {x y : M × N} (hm : Commute x.1 y.1) (hn : Commute x.2 y.2) : Commute x y

{M : Type u_5}
{N : Type u_6}
[Mul M]
[Mul N]
{x y : M × N}
(hm : Commute x.1 y.1)
(hn : Commute x.2 y.2)


/-- Any object with non-empty fiber admits a hom from a Galois object. -/
lemma exists_hom_from_galois_of_fiber_nonempty (X : C) (h : Nonempty (F.obj X)) :
    ∃ (A : C) (_ : A ⟶ X), IsGalois A

(F : CategoryTheory.Functor C FintypeCat)

∃ A x, CategoryTheory.PreGaloisCategory.IsGalois A


lemma Scheme.Hom.surjective (f : X.Hom Y) [Surjective f] : Function.Surjective f.1.base

{X Y : AlgebraicGeometry.Scheme}
(f : X.Hom Y)
[AlgebraicGeometry.Surjective f]


/-- If each `f i`, `i ∈ s` belongs to `[0, 1]`, then their product is less than or equal to one.
See also `Finset.prod_le_one'` for the case of an ordered commutative multiplicative monoid. -/
lemma prod_le_one (h0 : ∀ i ∈ s, 0 ≤ f i) (h1 : ∀ i ∈ s, f i ≤ 1) : ∏ i ∈ s, f i ≤ 1

{ι : Type u_1}
{R : Type u_2}
[CommMonoidWithZero R]
[PartialOrder R]
[ZeroLEOneClass R]
[PosMulMono R]
{f : ι → R}
{s : Finset ι}
(h0 : ∀ i ∈ s, 0 ≤ f i)
(h1 : ∀ i ∈ s, f i ≤ 1)


theorem setToFun_mono {T : Set α → G' →L[ℝ] G''} {C : ℝ} (hT : DominatedFinMeasAdditive μ T C)
    (hT_nonneg : ∀ s, MeasurableSet s → μ s < ∞ → ∀ x, 0 ≤ x → 0 ≤ T s x) {f g : α → G'}
    (hf : Integrable f μ) (hg : Integrable g μ) (hfg : f ≤ᵐ[μ] g) :
    setToFun μ T hT f ≤ setToFun μ T hT g

(hT : MeasureTheory.DominatedFinMeasAdditive μ T C)

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

MeasureTheory.setToFun μ T hT f ≤ MeasureTheory.setToFun μ T hT g


theorem prod_nndist_eq_sup [PseudoMetricSpace α] [PseudoMetricSpace β] (x y : WithLp ∞ (α × β)) :
    nndist x y = nndist x.fst y.fst ⊔ nndist x.snd y.snd

{α : Type u_2}
{β : Type u_3}
[PseudoMetricSpace α]
[PseudoMetricSpace β]
(x y : WithLp ⊤ (α × β))

nndist x y = nndist x.1 y.1 ⊔ nndist x.2 y.2


@[to_additive VAddAntidiagonal.eq_of_snd_eq_snd]
theorem eq_of_snd_eq_snd (h : (x : G × P).snd = (y : G × P).snd) : x = y

{G : Type u_1}
{P : Type u_2}
{s : Set G}
{t : Set P}
{a : P}
[SMul G P]
[IsCancelSMul G P]
{x y : ↑(s.smulAntidiagonal t a)}
(h : (↑x).2 = (↑y).2)


@[simp] lemma lowerClosure_le {t : LowerSet α} : lowerClosure s ≤ t ↔ s ⊆ t

{α : Type u_1}
[Preorder α]
{s : Set α}
{t : LowerSet α}


theorem inf_sup_inf (s : Finset ι) (t : Finset κ) (f : ι → α) (g : κ → α) :
    s.inf f ⊔ t.inf g = (s ×ˢ t).inf fun i => f i.1 ⊔ g i.2

{α : Type u_2}
{ι : Type u_5}
{κ : Type u_6}
[DistribLattice α]
[OrderTop α]
(s : Finset ι)
(t : Finset κ)
(f : ι → α)
(g : κ → α)


theorem nullMeasurableSet_eq {a : α} : NullMeasurableSet { x | x = a } μ

[MeasurableSingletonClass (MeasureTheory.NullMeasurableSpace α μ)]

MeasureTheory.NullMeasurableSet {x | x = a} μ


@[simp]
theorem gauge_closure_zero : gauge (closure (0 : Set E)) = 0

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


theorem mem_closure_iff {s : Set R} {x} :
    x ∈ closure s ↔ x ∈ AddSubmonoid.closure (Submonoid.closure s : Set R)

{R : Type u}
[NonAssocSemiring R]
{s : Set R}
{x : R}

x ∈ Subsemiring.closure s ↔ x ∈ AddSubmonoid.closure ↑(Submonoid.closure s)


theorem padicValInt_dvd (a : ℤ) : (p : ℤ) ^ padicValInt p a ∣ a

{p : ℕ}
[hp : Fact (Nat.Prime p)]
(a : ℤ)


@[to_additive]
theorem relindex_ker (f : G →* G') (K : Subgroup G) :
    f.ker.relindex K = Nat.card (f '' K)

{G : Type u_1}
{G' : Type u_2}
[AddGroup G]
[AddGroup G']
(f : G →+ G')
(K : AddSubgroup G)


@[to_additive]
theorem range_subgroup {f : G → H} (hf : IsGroupHom f) : IsSubgroup (Set.range f)

{G : Type u_1}
{H : Type u_2}
[AddGroup G]
[AddGroup H]
{f : G → H}
(hf : IsAddGroupHom f)


@[to_additive]
lemma fn_min_mul_fn_max  (f : α → β) (a b : α) : f (min a b) * f (max a b) = f a * f b

{α : Type u_1}
{β : Type u_2}
[LinearOrder α]
[AddCommSemigroup β]
(f : α → β)
(a b : α)


/-- If `Y` is a compact topological space, then `Prod.fst : X × Y → X` is a closed map. -/
theorem isClosedMap_fst_of_compactSpace [CompactSpace Y] : IsClosedMap (Prod.fst : X × Y → X)

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
[CompactSpace Y]


theorem RingHom.isIntegralElem_localization_at_leadingCoeff {R S : Type*} [CommRing R] [CommRing S]
    (f : R →+* S) (x : S) (p : R[X]) (hf : p.eval₂ f x = 0) (M : Submonoid R)
    (hM : p.leadingCoeff ∈ M) {Rₘ Sₘ : Type*} [CommRing Rₘ] [CommRing Sₘ] [Algebra R Rₘ]
    [IsLocalization M Rₘ] [Algebra S Sₘ] [IsLocalization (M.map f : Submonoid S) Sₘ] :
    (map Sₘ f M.le_comap_map : Rₘ →+* _).IsIntegralElem (algebraMap S Sₘ x)

{R : Type u_6}
{S : Type u_7}
[CommRing R]
[CommRing S]
(f : R →+* S)
(x : S)
(p : R[X])
(hf : Polynomial.eval₂ f x p = 0)
(M : Submonoid R)
(hM : p.leadingCoeff ∈ M)
{Rₘ : Type u_8}
{Sₘ : Type u_9}
[CommRing Rₘ]
[CommRing Sₘ]
[Algebra R Rₘ]
[IsLocalization M Rₘ]
[Algebra S Sₘ]
[IsLocalization (Submonoid.map f M) Sₘ]

(IsLocalization.map Sₘ f ⋯).IsIntegralElem ((algebraMap S Sₘ) x)


theorem ker_rangeRestrict (f : A →ₐ[R] B) : RingHom.ker f.rangeRestrict = RingHom.ker f

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[Semiring B]
[Algebra R B]
(f : A →ₐ[R] B)


theorem lie_inf : ⁅I, N ⊓ N'⁆ ≤ ⁅I, N⁆ ⊓ ⁅I, N'⁆

{R : Type u}
{L : Type v}
{M : Type w}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
(N N' : LieSubmodule R L M)
(I : LieIdeal R L)


/-- The natural `ℝ`-linear isometry equivalence between `𝕜` satisfying `RCLike 𝕜` and `ℂ` when
`RCLike.im RCLike.I = 1`. -/
@[simps]
def _root_.RCLike.complexLinearIsometryEquiv {𝕜 : Type*} [RCLike 𝕜]
    (h : RCLike.im (RCLike.I : 𝕜) = 1) : 𝕜 ≃ₗᵢ[ℝ] ℂ

{𝕜 : Type u_2}
[RCLike 𝕜]
(h : RCLike.im RCLike.I = 1)

∀ (a : ℂ), (RCLike.complexLinearIsometryEquiv h).symm a = (RCLike.complexRingEquiv h).invFun a


@[simp, norm_cast]
theorem natCast_lt_iff {m n : ℕ} : (m : EReal) < (n : EReal) ↔ m < n


@[simp]
theorem comp_continuous_iff {f : α → E} : Continuous (e ∘ f) ↔ Continuous f

{R : Type u_1}
{R₂ : Type u_2}
{E : Type u_5}
{E₂ : Type u_6}
[Semiring R]
[Semiring R₂]
{σ₁₂ : R →+* R₂}
{σ₂₁ : R₂ →+* R}
[RingHomInvPair σ₁₂ σ₂₁]
[RingHomInvPair σ₂₁ σ₁₂]
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup E₂]
[Module R E]
[Module R₂ E₂]
(e : E ≃ₛₗᵢ[σ₁₂] E₂)
{α : Type u_11}
[TopologicalSpace α]
{f : α → E}


theorem Filter.HasBasis.uniformEmbedding_iff' {ι ι'} {p : ι → Prop} {p' : ι' → Prop} {s s'}
    (h : (𝓤 α).HasBasis p s) (h' : (𝓤 β).HasBasis p' s') {f : α → β} :
    UniformEmbedding f ↔ Injective f ∧
      (∀ i, p' i → ∃ j, p j ∧ ∀ x y, (x, y) ∈ s j → (f x, f y) ∈ s' i) ∧
        (∀ j, p j → ∃ i, p' i ∧ ∀ x y, (f x, f y) ∈ s' i → (x, y) ∈ s j)

{α : Type u}
{β : Type v}
[UniformSpace α]
[UniformSpace β]
{ι : Sort u_1}
{ι' : Sort u_2}
{p : ι → Prop}
{p' : ι' → Prop}
{s : ι → Set (α × α)}
{s' : ι' → Set (β × β)}
(h : (𝓤 α).HasBasis p s)
(h' : (𝓤 β).HasBasis p' s')
{f : α → β}

UniformEmbedding f ↔
  Function.Injective f ∧
    (∀ (i : ι'), p' i → ∃ j, p j ∧ ∀ (x y : α), (x, y) ∈ s j → (f x, f y) ∈ s' i) ∧
      ∀ (j : ι), p j → ∃ i, p' i ∧ ∀ (x y : α), (f x, f y) ∈ s' i → (x, y) ∈ s j


theorem fromRel_prop {sym : Symmetric r} {a b : α} : s(a, b) ∈ fromRel sym ↔ r a b

{α : Type u_1}
{r : α → α → Prop}
{sym : Symmetric r}
{a b : α}


theorem neg_left (x y : M₁) : B₁ (-x) y = -B₁ x y

{R₁ : Type u_4}
{M₁ : Type u_5}
[CommRing R₁]
[AddCommGroup M₁]
[Module R₁ M₁]
{B₁ : LinearMap.BilinForm R₁ M₁}
(x y : M₁)


@[simp]
theorem projectQuotient_mk [HasColimits C] [PreservesColimits S] {A : CostructuredArrow S T}
    {P : (CostructuredArrow S T)ᵒᵖ} (f : P ⟶ op A) [Mono f] :
    projectQuotient (Subobject.mk f) = Subobject.mk f.unop.left.op

{A : CategoryTheory.CostructuredArrow S T}

{P : (CategoryTheory.CostructuredArrow S T)ᵒᵖ}

CategoryTheory.CostructuredArrow.projectQuotient (CategoryTheory.Subobject.mk f) =
  CategoryTheory.Subobject.mk f.unop.left.op


@[simp]
theorem RelEmbedding.codRestrict_apply (p) (f : r ↪r s) (H a) :
    RelEmbedding.codRestrict p f H a = ⟨f a, H a⟩

{α : Type u_1}
{β : Type u_2}
{r : α → α → Prop}
{s : β → β → Prop}
(p : Set β)
(f : r ↪r s)
(H : ∀ (a : α), f a ∈ p)
(a : α)

(RelEmbedding.codRestrict p f H) a = ⟨f a, ⋯⟩


protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries 𝕜 E F) {x : E}
    (hx : x ∈ EMetric.ball (0 : E) p.radius) : HasSum (fun n : ℕ => p n fun _ => x) (p.sum x)

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[CompleteSpace F]
(p : FormalMultilinearSeries 𝕜 E F)
{x : E}
(hx : x ∈ EMetric.ball 0 p.radius)

HasSum (fun n => (p n) fun x_1 => x) (p.sum x)


@[to_additive]
theorem normal_subgroupOf_iff {H K : Subgroup G} (hHK : H ≤ K) :
    (H.subgroupOf K).Normal ↔ ∀ h k, h ∈ H → k ∈ K → k * h * k⁻¹ ∈ H

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

(H.addSubgroupOf K).Normal ↔ ∀ (h k : G), h ∈ H → k ∈ K → k + h + -k ∈ H


@[to_additive]
theorem prod_congr' {M : Type*} [CommMonoid M] {a b : ℕ} (f : Fin b → M) (h : a = b) :
    (∏ i : Fin a, f (cast h i)) = ∏ i : Fin b, f i

{M : Type u_3}
[AddCommMonoid M]
{a b : ℕ}
(f : Fin b → M)
(h : a = b)

∑ i : Fin a, f (Fin.cast h i) = ∑ i : Fin b, f i


@[to_additive]
theorem _root_.isCompact_range_of_mulSupport_subset_isCompact [TopologicalSpace β]
    (hf : Continuous f) {k : Set α} (hk : IsCompact k) (h'f : mulSupport f ⊆ k) :
    IsCompact (range f)

{α : Type u_2}
{β : Type u_4}
[TopologicalSpace α]
[One β]
{f : α → β}
[TopologicalSpace β]
(hf : Continuous f)
{k : Set α}
(hk : IsCompact k)
(h'f : Function.mulSupport f ⊆ k)


@[simp]
theorem setIntegral_restrict {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
    {f : β → E} {a : α} (hs : MeasurableSet s) (t : Set β) :
    ∫ x in t, f x ∂κ.restrict hs a = ∫ x in t ∩ s, f x ∂κ a

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
{κ : ProbabilityTheory.Kernel α β}
{s : Set β}
{E : Type u_4}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : β → E}
{a : α}
(hs : MeasurableSet s)
(t : Set β)

∫ (x : β) in t, f x ∂(κ.restrict hs) a = ∫ (x : β) in t ∩ s, f x ∂κ a


theorem linear_ne_zero (cd : Fin 2 → ℝ) (z : ℍ) (h : cd ≠ 0) : (cd 0 : ℂ) * z + cd 1 ≠ 0


theorem measurable_map (f : α → β) (hf : Measurable f) :
    Measurable fun μ : Measure α => map f μ

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

Measurable fun μ => MeasureTheory.Measure.map f μ