@[simp]
theorem mem_submodule (f : PolynomialModule R M) : f ∈ F.submodule ↔ ∀ i, f i ∈ F.N i

{R M : Type u}
[CommRing R]
[AddCommGroup M]
[Module R M]
{I : Ideal R}
(F : I.Filtration M)
(f : PolynomialModule R M)

f ∈ F.submodule ↔ ∀ (i : ℕ), f i ∈ F.N i


theorem symm_image_target_inter_eq (s : Set Y) :
    e.symm '' (e.target ∩ s) = e.source ∩ e ⁻¹' (e.target ∩ s)

{X : Type u_1}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
(e : PartialHomeomorph X Y)
(s : Set Y)

↑e.symm '' (e.target ∩ s) = e.source ∩ ↑e ⁻¹' (e.target ∩ s)


@[simp]
theorem coeff_invUnitsSub (u : Rˣ) (n : ℕ) : coeff R n (invUnitsSub u) = 1 /ₚ u ^ (n + 1)

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

(PowerSeries.coeff R n) (PowerSeries.invUnitsSub u) = 1 /ₚ u ^ (n + 1)


@[to_additive]
lemma IsSquare.map [MulOneClass α] [MulOneClass β] [FunLike F α β] [MonoidHomClass F α β]
    {m : α} (f : F) :
    IsSquare m → IsSquare (f m)

{F : Type u_1}
{α : Type u_2}
{β : Type u_3}
[AddZeroClass α]
[AddZeroClass β]
[FunLike F α β]
[AddMonoidHomClass F α β]
{m : α}
(f : F)


theorem basisSets_mem (i : Finset ι) {r : ℝ} (hr : 0 < r) : (i.sup p).ball 0 r ∈ p.basisSets

{𝕜 : Type u_1}
{E : Type u_5}
{ι : Type u_8}
[NormedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
(p : SeminormFamily 𝕜 E ι)
(i : Finset ι)
{r : ℝ}
(hr : 0 < r)


theorem parts_eq_empty_iff : P.parts = ∅ ↔ a = ⊥

{α : Type u_1}
[Lattice α]
[OrderBot α]
{a : α}
{P : Finpartition a}


theorem Lex.mono (hr : ∀ a b, r₁ a b → r₂ a b) (hs : ∀ a b, s₁ a b → s₂ a b) (h : Lex r₁ s₁ x y) :
    Lex r₂ s₂ x y

∀ {α : Type u_1} {r₁ r₂ : α → α → Prop} {β : Type u_2} {s₁ s₂ : β → β → Prop} {x y : α ⊕ β},
  (∀ (a b : α), r₁ a b → r₂ a b) → (∀ (a b : β), s₁ a b → s₂ a b) → Sum.Lex r₁ s₁ x y → Sum.Lex r₂ s₂ x y


/-- If `x` is an accumulation point of `F` and `F ≤ G`, then
`x` is an accumulation point of `G`. -/
theorem AccPt.mono {F G : Filter X} (h : AccPt x F) (hFG : F ≤ G) : AccPt x G

{X : Type u}
{x : X}
[TopologicalSpace X]
{F G : Filter X}
(h : AccPt x F)
(hFG : F ≤ G)


theorem adjugate_subsingleton [Subsingleton n] (A : Matrix n n α) : adjugate A = 1

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


nonrec theorem ContinuousAt.cpow (hf : ContinuousAt f a) (hg : ContinuousAt g a)
    (h0 : f a ∈ slitPlane) : ContinuousAt (fun x => f x ^ g x) a

{α : Type u_1}
[TopologicalSpace α]
{f g : α → ℂ}
{a : α}
(hf : ContinuousAt f a)
(hg : ContinuousAt g a)
(h0 : f a ∈ Complex.slitPlane)


theorem intermediate_value_Ico' {a b : α} (hab : a ≤ b) {f : α → δ}
    (hf : ContinuousOn f (Icc a b)) : Ioc (f b) (f a) ⊆ f '' Ico a b

{α : Type u}
[ConditionallyCompleteLinearOrder α]
[TopologicalSpace α]
[OrderTopology α]
[DenselyOrdered α]
{δ : Type u_1}
[LinearOrder δ]
[TopologicalSpace δ]
[OrderClosedTopology δ]
{a b : α}
(hab : a ≤ b)
{f : α → δ}
(hf : ContinuousOn f (Set.Icc a b))


@[to_additive]
theorem pow_self (a : M) (n : ℕ) : Commute (a ^ n) a

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


lemma norm_integral_le_mul_norm [IsFiniteMeasure μ] (f : X →ᵇ E) :
    ‖∫ x, f x ∂μ‖ ≤ ENNReal.toReal (μ Set.univ) * ‖f‖

{X : Type u_1}
[MeasurableSpace X]
[TopologicalSpace X]
[OpensMeasurableSpace X]
(μ : MeasureTheory.Measure X)
{E : Type u_2}
[NormedAddCommGroup E]
[SecondCountableTopology E]
[MeasurableSpace E]
[BorelSpace E]
[NormedSpace ℝ E]
[MeasureTheory.IsFiniteMeasure μ]
(f : X →ᵇ E)

‖∫ (x : X), f x ∂μ‖ ≤ (μ Set.univ).toReal * ‖f‖


@[simp] theorem ofBaseChange_toBaseChange
    (Q : QuadraticForm R V) (x : CliffordAlgebra (Q.baseChange A)) :
    ofBaseChange A Q (toBaseChange A Q x) = x

(x : CliffordAlgebra (QuadraticForm.baseChange A Q))

(CliffordAlgebra.ofBaseChange A Q) ((CliffordAlgebra.toBaseChange A Q) x) = x


lemma ofArrows_le_ofObjects
    {I : Type*} (Y : I → C) {X : C} (f : ∀ i, Y i ⟶ X) :
    Sieve.ofArrows Y f ≤ Sieve.ofObjects Y X

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{I : Type u_1}
(Y : I → C)
{X : C}
(f : (i : I) → Y i ⟶ X)

CategoryTheory.Sieve.ofArrows Y f ≤ CategoryTheory.Sieve.ofObjects Y X


theorem range_ite_subset {p : α → Prop} [DecidablePred p] {f g : α → β} :
    (range fun x => if p x then f x else g x) ⊆ range f ∪ range g

{α : Type u_1}
{β : Type u_2}
{p : α → Prop}
[DecidablePred p]
{f g : α → β}

(Set.range fun x => if p x then f x else g x) ⊆ Set.range f ∪ Set.range g


@[simp]
theorem unzip_enumFrom_eq_prod (l : List α) {n : ℕ} :
    (l.enumFrom n).unzip = (range' n l.length, l)

(List.enumFrom n l).unzip = (List.range' n l.length, l)


lemma toAffineLift_eq {P : Fin 3 → F} (hP : W.NonsingularLift ⟦P⟧) :
    toAffineLift ⟨hP⟩ = toAffine W P

{F : Type v}
[Field F]
{W : WeierstrassCurve.Jacobian F}
{P : Fin 3 → F}
(hP : W.NonsingularLift ⟦P⟧)

(WeierstrassCurve.Jacobian.Point.mk hP).toAffineLift = WeierstrassCurve.Jacobian.Point.toAffine W P


@[simp]
theorem sumAddHom_single [∀ i, AddZeroClass (β i)] [AddCommMonoid γ] (φ : ∀ i, β i →+ γ) (i)
    (x : β i) : sumAddHom φ (single i x) = φ i x

{ι : Type u}
{γ : Type w}
{β : ι → Type v}
[DecidableEq ι]
[(i : ι) → AddZeroClass (β i)]
[AddCommMonoid γ]
(φ : (i : ι) → β i →+ γ)
(i : ι)
(x : β i)

(DFinsupp.sumAddHom φ) (DFinsupp.single i x) = (φ i) x


theorem abs_eq_one_iff (z : ℂ) : abs z = 1 ↔ ∃ θ : ℝ, exp (θ * I) = z

Complex.abs z = 1 ↔ ∃ θ, Complex.exp (↑θ * Complex.I) = z


protected theorem Monotone.measurable [LinearOrder β] [OrderClosedTopology β] {f : β → α}
    (hf : Monotone f) : Measurable f

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[MeasurableSpace α]
[BorelSpace α]
[TopologicalSpace β]
[MeasurableSpace β]
[BorelSpace β]
[LinearOrder α]
[OrderTopology α]
[SecondCountableTopology α]
[LinearOrder β]
[OrderClosedTopology β]
{f : β → α}
(hf : Monotone f)


/-- In a topological vector space, the interior of a convex set is convex. -/
protected theorem Convex.interior {s : Set E} (hs : Convex 𝕜 s) : Convex 𝕜 (interior s)

{𝕜 : Type u_2}
{E : Type u_3}
[LinearOrderedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
[TopologicalSpace E]
[TopologicalAddGroup E]
[ContinuousConstSMul 𝕜 E]
{s : Set E}
(hs : Convex 𝕜 s)


@[to_additive]
theorem Set.preimage_one {α β : Type*} [One β] (s : Set β) [Decidable ((1 : β) ∈ s)] :
    (1 : α → β) ⁻¹' s = if (1 : β) ∈ s then Set.univ else ∅

{α : Type u_3}
{β : Type u_4}
[One β]
(s : Set β)
[Decidable (1 ∈ s)]


@[simp] theorem mem_sphere : y ∈ sphere x ε ↔ dist y x = ε

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


@[simp, norm_cast]
theorem cast_one [One α] [Add α] : ((1 : PosNum) : α) = 1


/-- See also `Finset.prod_pi_mulSingle`. -/
@[to_additive "See also `Finset.sum_pi_single`."]
lemma prod_pi_mulSingle {α : ι → Type*} [∀ i, CommMonoid (α i)] (i : ι) (f : ∀ i, α i) :
    ∏ j, Pi.mulSingle j (f j) i = f i

{ι : Type u_6}
[Fintype ι]
[DecidableEq ι]
{α : ι → Type u_9}
[(i : ι) → AddCommMonoid (α i)]
(i : ι)
(f : (i : ι) → α i)


@[simp]
theorem coe_lTensorHom : (lTensorHom M : (N →ₗ[R] P) → M ⊗[R] N →ₗ[R] M ⊗[R] P) = lTensor M

{R : Type u_1}
[CommSemiring R]
(M : Type u_4)
{N : Type u_5}
{P : Type u_6}
[AddCommMonoid M]
[AddCommMonoid N]
[AddCommMonoid P]
[Module R M]
[Module R N]
[Module R P]

⇑(LinearMap.lTensorHom M) = LinearMap.lTensor M


/-- The one-edge subgraph. -/
@[simps]
def subgraphOfAdj (G : SimpleGraph V) {v w : V} (hvw : G.Adj v w) : G.Subgraph

{V : Type u}
(G : SimpleGraph V)
{v w : V}
(hvw : G.Adj v w)


theorem coe_comp_inf_hom (f : BoundedLatticeHom β γ) (g : BoundedLatticeHom α β) :
    (f.comp g : InfHom α γ) = (f : InfHom β γ).comp g

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

{ toFun := ⇑(f.comp g), map_inf' := ⋯ } = { toFun := ⇑f, map_inf' := ⋯ }.comp { toFun := ⇑g, map_inf' := ⋯ }


@[simp]
theorem pi_val (s : Finset α) (t : ∀ a, Finset (β a)) : (s.pi t).1 = s.1.pi fun a => (t a).1

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

(s.pi t).val = s.val.pi fun a => (t a).val


theorem not_mem_uIcc_of_lt : c < a → c < b → c ∉ [[a, b]]

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


/-- The oscillation of `f` at `x` is 0 if and only if `f` is continuous at `x`. -/
theorem eq_zero_iff_continuousAt [TopologicalSpace E] (f : E → F) (x : E) :
    oscillation f x = 0 ↔ ContinuousAt f x

{E : Type u}
{F : Type v}
[PseudoEMetricSpace F]
[TopologicalSpace E]
(f : E → F)
(x : E)


lemma Ico_filter_dvd_eq : (Ico a b).filter (r ∣ ·) =
    (Ico ⌈a / (r : ℚ)⌉ ⌈b / (r : ℚ)⌉).map ⟨(· * r), mul_left_injective₀ hr.ne'⟩

Finset.filter (fun x => r ∣ x) (Finset.Ico a b) =
  Finset.map { toFun := fun x => x * r, inj' := ⋯ } (Finset.Ico ⌈↑a / ↑r⌉ ⌈↑b / ↑r⌉)


lemma support_smul_subset_right [Zero M] [SMulZeroClass R M] (f : α → R) (g : α → M) :
    support (f • g) ⊆ support g

{α : Type u_1}
{R : Type u_2}
{M : Type u_3}
[Zero M]
[SMulZeroClass R M]
(f : α → R)
(g : α → M)

Function.support (f • g) ⊆ Function.support g


@[to_additive]
theorem smul_finset_def : a • s = s.image (a • ·)

{α : Type u_2}
{β : Type u_3}
[DecidableEq β]
[SMul α β]
{s : Finset β}
{a : α}


theorem IsSupClosedCompact.wellFounded (h : IsSupClosedCompact α) :
    WellFounded ((· > ·) : α → α → Prop)

(h : CompleteLattice.IsSupClosedCompact α)


@[to_additive]
theorem IsWF.smul [LinearOrder G] [LinearOrder P] [SMul G P] [IsOrderedCancelSMul G P] {s : Set G}
    {t : Set P} (hs : s.IsWF) (ht : t.IsWF) : IsWF (s • t)

{G : Type u_1}
{P : Type u_2}
[LinearOrder G]
[LinearOrder P]
[VAdd G P]
[IsOrderedCancelVAdd G P]
{s : Set G}
{t : Set P}
(hs : s.IsWF)
(ht : t.IsWF)


lemma coeff_preΨ'_ne_zero {n : ℕ} (h : (n : R) ≠ 0) :
    (W.preΨ' n).coeff ((n ^ 2 - if Even n then 4 else 1) / 2) ≠ 0

{R : Type u}
[CommRing R]
(W : WeierstrassCurve R)
{n : ℕ}
(h : ↑n ≠ 0)


@[simp]
theorem frobenius_nnnorm_diagonal [DecidableEq n] (v : n → α) :
    ‖diagonal v‖₊ = ‖(WithLp.equiv 2 _).symm v‖₊

{n : Type u_4}
{α : Type u_5}
[Fintype n]
[SeminormedAddCommGroup α]
[DecidableEq n]
(v : n → α)

‖Matrix.diagonal v‖₊ = ‖(WithLp.equiv 2 (n → α)).symm v‖₊


theorem coeff_X : coeff (X : R[X]) n = if 1 = n then 1 else 0

Polynomial.X.coeff n = if 1 = n then 1 else 0


lemma equiv_of_Z_eq_zero {P Q : Fin 3 → F} (hP : W.Nonsingular P) (hQ : W.Nonsingular Q)
    (hPz : P z = 0) (hQz : Q z = 0) : P ≈ Q

{F : Type u}
[Field F]
{W : WeierstrassCurve.Projective F}
{P Q : Fin 3 → F}
(hP : W.Nonsingular P)
(hQ : W.Nonsingular Q)
(hPz : P 2 = 0)
(hQz : Q 2 = 0)


@[simp]
theorem dotProduct_zero : v ⬝ᵥ 0 = 0

{m : Type u_2}
{α : Type v}
[Fintype m]
[NonUnitalNonAssocSemiring α]
(v : m → α)


@[trans]
theorem Equiv.trans : ∀ {s t u : WSeq α}, s ~ʷ t → t ~ʷ u → s ~ʷ u


@[to_additive]
theorem smul_set_range [SMul α β] {ι : Sort*} (a : α) (f : ι → β) :
    a • range f = range fun i ↦ a • f i

{α : Type u_2}
{β : Type u_3}
[SMul α β]
{ι : Sort u_5}
(a : α)
(f : ι → β)

a • Set.range f = Set.range fun i => a • f i


@[reassoc (attr := simp)]
theorem coprodComparison_inl : coprod.inl ≫ coprodComparison F A B = F.map coprod.inl

[CategoryTheory.Limits.HasBinaryCoproduct (F.obj A) (F.obj B)]

CategoryTheory.Limits.coprod.inl ≫ CategoryTheory.Limits.coprodComparison F A B = F.map CategoryTheory.Limits.coprod.inl


protected theorem tsub_tsub_cancel_of_le (hba : AddLECancellable (b - a)) (h : a ≤ b) :
    b - (b - a) = a

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


theorem Γ_obj_op (X : Scheme) : Γ.obj (op X) = Γ(X, ⊤)

AlgebraicGeometry.Scheme.Γ.obj (Opposite.op X) = X.presheaf.obj (Opposite.op ⊤)


theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
    ∀ᶠ y in 𝓝 x, HasSum (fun n : ℕ => p n fun _ : Fin n => y - x) (f y)

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{p : FormalMultilinearSeries 𝕜 E F}
{x : E}
{r : ℝ≥0∞}
(hf : HasFPowerSeriesOnBall f p x r)

∀ᶠ (y : E) in 𝓝 x, HasSum (fun n => (p n) fun x_1 => y - x) (f y)


theorem Coprime.coprime_dvd_left {m k n : ℕ+} : m ∣ k → k.Coprime n → m.Coprime n


@[simp] protected theorem not_le {a b : Fin n} : ¬ a ≤ b ↔ b < a


@[simp]
theorem xor_left_inj {n m m' : ℕ} : m ^^^ n = m' ^^^ n ↔ m = m'


/-- A `C^n` local diffeomorphism is `C^n`. -/
lemma IsLocalDiffeomorph.contMDiff (hf : IsLocalDiffeomorph I J n f) : ContMDiff I J n f

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


@[to_additive (attr := simp)]
lemma continuous_inv_iff : Continuous f⁻¹ ↔ Continuous f

{G : Type w}
{α : Type u}
[TopologicalSpace G]
[InvolutiveInv G]
[ContinuousInv G]
[TopologicalSpace α]
{f : α → G}


theorem eq_iff [CommRing K] [IsReduced K] (p : ℕ) [Fact p.Prime] [CharP K p] (x y : ℕ × K) :
    mk K p x = mk K p y ↔ (frobenius K p)^[y.1] x.2 = (frobenius K p)^[x.1] y.2

(K : Type u)
[CommRing K]
[IsReduced K]
(p : ℕ)
[Fact (Nat.Prime p)]
[CharP K p]
(x y : ℕ × K)

PerfectClosure.mk K p x = PerfectClosure.mk K p y ↔ (⇑(frobenius K p))^[y.1] x.2 = (⇑(frobenius K p))^[x.1] y.2


theorem Nodup.pairwise_of_set_pairwise {l : List α} {r : α → α → Prop} (hl : l.Nodup)
    (h : { x | x ∈ l }.Pairwise r) : l.Pairwise r

{α : Type u}
{l : List α}
{r : α → α → Prop}
(hl : l.Nodup)
(h : {x | x ∈ l}.Pairwise r)


theorem max_zero_right : ∀ a : Ordinal, max a 0 = a


@[simp] theorem reverse_balLeft (l : RBNode α) (v : α) (r : RBNode α) :
    (balLeft l v r).reverse = balRight r.reverse v l.reverse

{α : Type u_1}
(l : Batteries.RBNode α)
(v : α)
(r : Batteries.RBNode α)

(l.balLeft v r).reverse = r.reverse.balRight v l.reverse


theorem card_eq_one_iff_exists : Nat.card α = 1 ↔ ∃ x : α, ∀ y : α, y = x


@[simp]
theorem closure_closure : closure (closure s) = closure s

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


@[simp]
theorem swap_le_swap_iff : c.swap ≤ d.swap ↔ d ≤ c

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


@[simp]
lemma δ_comp_ofHom {n : ℤ} (z₁ : Cochain F G n) (f : G ⟶ K) (m : ℤ) :
    δ n m (z₁.comp (Cochain.ofHom f) (add_zero n)) =
      (δ n m z₁).comp (Cochain.ofHom f) (add_zero m)

(z₁ : CochainComplex.HomComplex.Cochain F G n)

CochainComplex.HomComplex.δ n m (z₁.comp (CochainComplex.HomComplex.Cochain.ofHom f) ⋯) =
  (CochainComplex.HomComplex.δ n m z₁).comp (CochainComplex.HomComplex.Cochain.ofHom f) ⋯


theorem tendsto_natCast_atTop_atTop [OrderedSemiring R] [Archimedean R] :
    Tendsto ((↑) : ℕ → R) atTop atTop

{R : Type u_2}
[OrderedSemiring R]
[Archimedean R]

Filter.Tendsto Nat.cast Filter.atTop Filter.atTop


/-- For any `S' : Solution'`, the multiplicity of `λ` in `S'.c` is finite. -/
lemma Solution'.multiplicity_lambda_c_finite :
    multiplicity.Finite (hζ.toInteger - 1) S'.c

(S' : FermatLastTheoremForThreeGen.Solution' hζ)


@[elementwise (attr := simp)]
theorem productIso_inv_comp_π {J : Type v} (F : J → TypeMax.{v, u}) (j : J) :
    (productIso.{v, u} F).inv ≫ Pi.π F j = fun f => f j

(CategoryTheory.Limits.Types.productIso F).inv ≫ CategoryTheory.Limits.Pi.π F j = fun f => f j


theorem map_aeval_eq_aeval_map {S T U : Type*} [Semiring S] [CommSemiring T] [Semiring U]
    [Algebra R S] [Algebra T U] {φ : R →+* T} {ψ : S →+* U}
    (h : (algebraMap T U).comp φ = ψ.comp (algebraMap R S)) (p : R[X]) (a : S) :
    ψ (aeval a p) = aeval (ψ a) (p.map φ)

ψ ((Polynomial.aeval a) p) = (Polynomial.aeval (ψ a)) (Polynomial.map φ p)


@[to_additive (attr := simp)]
theorem prod_cons : (a :: l).prod = a * l.prod

{M : Type u_4}
[Monoid M]
{l : List M}
{a : M}


theorem eventually_nhds' {x : X} (p : X → Prop) (hx : x ∈ e.source) :
    (∀ᶠ y in 𝓝 (e x), p (e.symm y)) ↔ ∀ᶠ x in 𝓝 x, p x

{X : Type u_1}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
(e : PartialHomeomorph X Y)
{x : X}
(p : X → Prop)
(hx : x ∈ e.source)

(∀ᶠ (y : Y) in 𝓝 (↑e x), p (↑e.symm y)) ↔ ∀ᶠ (x : X) in 𝓝 x, p x


theorem isOpen_set_pi {i : Set ι} {s : ∀ a, Set (π a)} (hi : i.Finite)
    (hs : ∀ a ∈ i, IsOpen (s a)) : IsOpen (pi i s)

{ι : Type u_5}
{π : ι → Type u_6}
[T : (i : ι) → TopologicalSpace (π i)]
{i : Set ι}
{s : (a : ι) → Set (π a)}
(hi : i.Finite)
(hs : ∀ a ∈ i, IsOpen (s a))


/-- A typeclass for `SMul` structures which can be moved across a tensor product.

This typeclass is generated automatically from an `IsScalarTower` instance, but exists so that
we can also add an instance for `AddCommGroup.intModule`, allowing `z •` to be moved even if
`R` does not support negation.

Note that `Module R' (M ⊗[R] N)` is available even without this typeclass on `R'`; it's only
needed if `TensorProduct.smul_tmul`, `TensorProduct.smul_tmul'`, or `TensorProduct.tmul_smul` is
used.
-/
class CompatibleSMul [DistribMulAction R' N] : Prop where
  smul_tmul : ∀ (r : R') (m : M) (n : N), (r • m) ⊗ₜ n = m ⊗ₜ[R] (r • n)

[self : TensorProduct.CompatibleSMul R R' M N]


@[simp] theorem coe_one : ⇑(1 : α ≃ᵢ α) = id


/--
Given any adjunction `L ⊣ R`, there is a comparison functor `CategoryTheory.Comonad.comparison L`
sending objects `X : C` to Eilenberg-Moore coalgebras for `L ⋙ R` with underlying object
`L.obj X`.
-/
@[simps]
def Comonad.comparison (h : L ⊣ R) : C ⥤ h.toComonad.Coalgebra

{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 : C)

((CategoryTheory.Comonad.comparison h).obj X).A = L.obj X


private theorem someExistsOneDivLT_subset : someExistsOneDivLT s i ⊆ i

{α : Type u_1}
[MeasurableSpace α]
{s : MeasureTheory.SignedMeasure α}
{i : Set α}

MeasureTheory.SignedMeasure.someExistsOneDivLT s i ⊆ i


/-- For a tower `R → A → B` and an `R`-derivation `B → M`, we may compose with `A → B` to obtain an
`R`-derivation `A → M`. -/
@[simps!]
def compAlgebraMap [Algebra A B] [IsScalarTower R A B] [IsScalarTower A B M]
    (d : Derivation R B M) : Derivation R A M

{R : Type u_1}
(A : Type u_2)
{B : Type u_3}
{M : Type u_4}
[CommSemiring R]
[CommSemiring A]
[CommSemiring B]
[AddCommMonoid M]
[Algebra R A]
[Algebra R B]
[Module A M]
[Module B M]
[Module R M]
[Algebra A B]
[IsScalarTower R A B]
[IsScalarTower A B M]
(d : Derivation R B M)

∀ (a : A), (Derivation.compAlgebraMap A d) a = d ((algebraMap A B) a)


theorem X_sub_C_ne_zero (r : R) : X - C r ≠ 0

{R : Type u}
[Ring R]
[Nontrivial R]
(r : R)


@[simp]
theorem zero_im : (0 : ℤ√d).im = 0


/-- Given a diagram of `PresheafedSpace C`s, its colimit is computed by pushing the sheaves onto
the colimit of the underlying spaces, and taking componentwise limit.
This is the componentwise diagram for an open set `U` of the colimit of the underlying spaces.
-/
@[simps]
def componentwiseDiagram (F : J ⥤ PresheafedSpace.{_, _, v} C) [HasColimit F]
    (U : Opens (Limits.colimit F).carrier) : Jᵒᵖ ⥤ C

(F : J ⥤ AlgebraicGeometry.PresheafedSpace C)

(U : TopologicalSpace.Opens ↑↑(CategoryTheory.Limits.colimit F))

(AlgebraicGeometry.PresheafedSpace.componentwiseDiagram F U).map f =
  (F.map f.unop).c.app
      (Opposite.op ((TopologicalSpace.Opens.map (CategoryTheory.Limits.colimit.ι F (Opposite.unop j)).base).obj U)) ≫
    (F.obj (Opposite.unop k)).presheaf.map (CategoryTheory.eqToHom ⋯)


@[reassoc]
theorem shiftComm_hom_comp (i j : A) :
    (shiftComm X i j).hom ≫ f⟦j⟧'⟦i⟧' = f⟦i⟧'⟦j⟧' ≫ (shiftComm Y i j).hom

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

CategoryTheory.CategoryStruct.comp (CategoryTheory.shiftComm X i j).hom
    ((CategoryTheory.shiftFunctor C i).map ((CategoryTheory.shiftFunctor C j).map f)) =
  CategoryTheory.CategoryStruct.comp ((CategoryTheory.shiftFunctor C j).map ((CategoryTheory.shiftFunctor C i).map f))
    (CategoryTheory.shiftComm Y i j).hom


theorem Periodic.map_vadd_zmultiples [AddCommGroup α] (hf : Periodic f c)
    (a : AddSubgroup.zmultiples c) (x : α) : f (a +ᵥ x) = f x

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{c : α}
[AddCommGroup α]
(hf : Function.Periodic f c)
(a : ↥(AddSubgroup.zmultiples c))
(x : α)


@[simp]
theorem ascPochhammer_ne_zero_eval_zero {n : ℕ} (h : n ≠ 0) : (ascPochhammer S n).eval 0 = 0

(S : Type u)
[Semiring S]
{n : ℕ}
(h : n ≠ 0)

Polynomial.eval 0 (ascPochhammer S n) = 0


@[to_additive]
theorem mem_pi (I : Set η) {H : ∀ i, Subgroup (f i)} {p : ∀ i, f i} :
    p ∈ pi I H ↔ ∀ i : η, i ∈ I → p i ∈ H i

{η : Type u_7}
{f : η → Type u_8}
[(i : η) → AddGroup (f i)]
(I : Set η)
{H : (i : η) → AddSubgroup (f i)}
{p : (i : η) → f i}

p ∈ AddSubgroup.pi I H ↔ ∀ i ∈ I, p i ∈ H i


@[to_additive (attr := elab_as_elim, induction_eliminator)]
protected theorem induction_on {C : FreeGroup α → Prop} (z : FreeGroup α) (C1 : C 1)
    (Cp : ∀ x, C <| pure x) (Ci : ∀ x, C (pure x) → C (pure x)⁻¹)
    (Cm : ∀ x y, C x → C y → C (x * y)) : C z

(Ci : ∀ (x : α), C (pure x) → C (pure x)⁻¹)

(Cm : ∀ (x y : FreeGroup α), C x → C y → C (x * y))


theorem length_mul_simple (w : W) (i : B) :
    ℓ (w * s i) = ℓ w + 1 ∨ ℓ (w * s i) + 1 = ℓ w

{B : Type u_1}
{W : Type u_2}
[Group W]
{M : CoxeterMatrix B}
(cs : CoxeterSystem M W)
(w : W)
(i : B)

cs.length (w * cs.simple i) = cs.length w + 1 ∨ cs.length (w * cs.simple i) + 1 = cs.length w


/-- If `S` is an extension of `R` with power basis `pb` and `g` is a monic polynomial over `R`
such that `pb.gen` has a minimal polynomial `g`, then `S` is isomorphic to `AdjoinRoot g`.

Compare `PowerBasis.equivOfRoot`, which would require
`h₂ : aeval pb.gen (minpoly R (root g)) = 0`; that minimal polynomial is not
guaranteed to be identical to `g`. -/
@[simps (config := .asFn)]
def equiv' (h₁ : aeval (root g) (minpoly R pb.gen) = 0) (h₂ : aeval pb.gen g = 0) :
    AdjoinRoot g ≃ₐ[R] S

(h₁ : (Polynomial.aeval (AdjoinRoot.root g)) (minpoly R pb.gen) = 0)

⇑(AdjoinRoot.equiv' g pb h₁ h₂).symm = ⇑(pb.lift (AdjoinRoot.root g) h₁)


/-- A linear map maps a generalized eigenrange into itself. -/
theorem map_genEigenrange_le {f : End K V} {μ : K} {n : ℕ} :
    Submodule.map f (f.genEigenrange μ n) ≤ f.genEigenrange μ n

{K : Type v}
{V : Type w}
[Field K]
[AddCommGroup V]
[Module K V]
{f : Module.End K V}
{μ : K}
{n : ℕ}


@[to_additive]
theorem tprod_mul_tprod_compl {s : Set β} (hs : Multipliable (f ∘ (↑) : s → α))
    (hsc : Multipliable (f ∘ (↑) : ↑sᶜ → α)) : (∏' x : s, f x) * ∏' x : ↑sᶜ, f x = ∏' x, f x

{α : Type u_1}
{β : Type u_2}
[CommMonoid α]
[TopologicalSpace α]
{f : β → α}
[T2Space α]
[ContinuousMul α]
{s : Set β}
(hs : Multipliable (f ∘ Subtype.val))
(hsc : Multipliable (f ∘ Subtype.val))

(∏' (x : ↑s), f ↑x) * ∏' (x : ↑sᶜ), f ↑x = ∏' (x : β), f x


@[simp]
theorem sort_eq (s : Multiset α) : ↑(sort r s) = s

{α : Type u_1}
(r : α → α → Prop)
[DecidableRel r]
[IsTrans α r]
[IsAntisymm α r]
[IsTotal α r]
(s : Multiset α)


@[simp]
theorem sumCongr_refl_swap {α β : Sort _} [DecidableEq α] [DecidableEq β] (i j : β) :
    Equiv.Perm.sumCongr (Equiv.refl α) (Equiv.swap i j) = Equiv.swap (Sum.inr i) (Sum.inr j)

{α : Type u_1}
{β : Type u_2}
[DecidableEq α]
[DecidableEq β]
(i j : β)


@[to_additive AddLocalization.r_iff_oreEqv_r]
theorem r_iff_oreEqv_r {x y : M × S} : r S x y ↔ (OreLocalization.oreEqv S M).r x y

{M : Type u_1}
[AddCommMonoid M]
{S : AddSubmonoid M}
{x y : M × ↥S}

(AddLocalization.r S) x y ↔ Setoid.r x y


theorem mem_wf : @WellFounded PSet (· ∈ ·)


@[simp] theorem decide_eq_true  {b : Bool} [Decidable (b = true)]  : decide (b = true)  =  b


@[simp]
theorem deriv_zero (f) : deriv f 0 = nfp f 0


@[to_additive]
theorem isOpenMap_inv : IsOpenMap (Inv.inv : G → G)

(G : Type w)
[TopologicalSpace G]
[InvolutiveInv G]
[ContinuousInv G]


lemma IndepFun.meas_inter [mβ : MeasurableSpace β] [mγ : MeasurableSpace γ] {f : Ω → β} {g : Ω → γ}
    (hfg : IndepFun f g μ) {s t : Set Ω} (hs : MeasurableSet[mβ.comap f] s)
    (ht : MeasurableSet[mγ.comap g] t) :
    μ (s ∩ t) = μ s * μ t

{Ω : Type u_1}
{β : Type u_3}
{γ : Type u_4}

∀ {x : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} [mβ : MeasurableSpace β] [mγ : MeasurableSpace γ] {f : Ω → β}
  {g : Ω → γ},
  ProbabilityTheory.IndepFun f g μ → ∀ {s t : Set Ω}, MeasurableSet s → MeasurableSet t → μ (s ∩ t) = μ s * μ t


/-- If `p` is prime,
and `a` doesn't divide `p^k`, but `a` does divide `p^(k+1)`
then `a = p^(k+1)`.
-/
theorem eq_prime_pow_of_dvd_least_prime_pow {a p k : ℕ} (pp : Prime p) (h₁ : ¬a ∣ p ^ k)
    (h₂ : a ∣ p ^ (k + 1)) : a = p ^ (k + 1)

{a p k : ℕ}
(pp : Nat.Prime p)
(h₁ : ¬a ∣ p ^ k)
(h₂ : a ∣ p ^ (k + 1))


theorem trans_ofSet {s : Set Y} (hs : IsOpen s) : e.trans (ofSet s hs) = e.restr (e ⁻¹' s)

{X : Type u_1}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
(e : PartialHomeomorph X Y)
{s : Set Y}
(hs : IsOpen s)

e.trans (PartialHomeomorph.ofSet s hs) = e.restr (↑e ⁻¹' s)


theorem one_div_spanSingleton (x : K) : 1 / spanSingleton R₁⁰ x = spanSingleton R₁⁰ x⁻¹

{R₁ : Type u_3}
[CommRing R₁]
{K : Type u_4}
[Field K]
[Algebra R₁ K]
[IsFractionRing R₁ K]
[IsDomain R₁]
(x : K)

1 / FractionalIdeal.spanSingleton R₁⁰ x = FractionalIdeal.spanSingleton R₁⁰ x⁻¹


theorem gradient_eq_deriv' : ∇ g u = deriv g u


theorem prop_of_mem_aeSeqSet (hf : ∀ i, AEMeasurable (f i) μ) {x : α} (hx : x ∈ aeSeqSet hf p) :
    p x fun n => aeSeq hf p n x

{ι : Sort u_1}
{α : Type u_2}
{β : Type u_3}
[MeasurableSpace α]
[MeasurableSpace β]
{f : ι → α → β}
{μ : MeasureTheory.Measure α}
{p : α → (ι → β) → Prop}
(hf : ∀ (i : ι), AEMeasurable (f i) μ)
{x : α}
(hx : x ∈ aeSeqSet hf p)


/-- A finite indexed union is totally bounded
if and only if each set of the family is totally bounded. -/
@[simp]
lemma totallyBounded_iUnion {ι : Sort*} [Finite ι] {s : ι → Set α} :
    TotallyBounded (⋃ i, s i) ↔ ∀ i, TotallyBounded (s i)

{α : Type u}
[uniformSpace : UniformSpace α]
{ι : Sort u_1}
[Finite ι]
{s : ι → Set α}

TotallyBounded (⋃ i, s i) ↔ ∀ (i : ι), TotallyBounded (s i)


protected theorem Set.EquicontinuousAt.mono {H H' : Set <| X → α} {x₀ : X}
    (h : H.EquicontinuousAt x₀) (hH : H' ⊆ H) : H'.EquicontinuousAt x₀

{X : Type u_3}
{α : Type u_7}
[tX : TopologicalSpace X]
[uα : UniformSpace α]
{H H' : Set (X → α)}
{x₀ : X}
(h : H.EquicontinuousAt x₀)
(hH : H' ⊆ H)


theorem image_preimage (h : α ≃ᵤ β) (s : Set β) : h '' (h ⁻¹' s) = s

{α : Type u}
{β : Type u_1}
[UniformSpace α]
[UniformSpace β]
(h : α ≃ᵤ β)
(s : Set β)


/-- A perfect pairing of two (left) modules over a commutative ring. -/
structure PerfectPairing :=
  toLin : M →ₗ[R] N →ₗ[R] R
  bijectiveLeft : Bijective toLin
  bijectiveRight : Bijective toLin.flip

{R : Type u_1}
{M : Type u_2}
{N : Type u_3}
[CommRing R]
[AddCommGroup M]
[Module R M]
[AddCommGroup N]
[Module R N]
(self : PerfectPairing R M N)


theorem unfolds_head_eq : ∀ s : Stream' α, unfolds head tail s = s

Stream'.unfolds Stream'.head Stream'.tail s = s


theorem preimage_eq_core (f : α → β) (s : Set β) : f ⁻¹' s = (Function.graph f).core s

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


/-- The continuous homomorphism given by inversion. -/
@[to_additive (attr := simps!) "The continuous homomorphism given by negation."]
def inv : ContinuousMonoidHom E E

(E : Type u_6)
[AddCommGroup E]
[TopologicalSpace E]
[TopologicalAddGroup E]

∀ (a : E), (ContinuousAddMonoidHom.neg E) a = -a


@[simp]
theorem adjoin_insert_adjoin (x : A) : adjoin R (insert x ↑(adjoin R s)) = adjoin R (insert x s)

(R : Type uR)
{A : Type uA}
[CommSemiring R]
[Semiring A]
[Algebra R A]
(s : Set A)
(x : A)

Algebra.adjoin R (insert x ↑(Algebra.adjoin R s)) = Algebra.adjoin R (insert x s)


theorem wellFounded_of_trans_of_irrefl (r : α → α → Prop) [IsTrans α r] [IsIrrefl α r] :
    WellFounded r

{α : Type u_1}
[Finite α]
(r : α → α → Prop)
[IsTrans α r]
[IsIrrefl α r]


@[ext]
theorem ext {f g : HeytingHom α β} (h : ∀ a, f a = g a) : f = g

{α : Type u_2}
{β : Type u_3}
[HeytingAlgebra α]
[HeytingAlgebra β]
{f g : HeytingHom α β}
(h : ∀ (a : α), f a = g a)


lemma isometry_mul_flip : Isometry (mul 𝕜 E).flip

(𝕜 : Type u_1)
(E : Type u_2)
[NontriviallyNormedField 𝕜]
[NonUnitalNormedRing E]
[StarRing E]
[NormedStarGroup E]
[NormedSpace 𝕜 E]
[IsScalarTower 𝕜 E E]
[SMulCommClass 𝕜 E E]
[RegularNormedAlgebra 𝕜 E]

Isometry ⇑(ContinuousLinearMap.mul 𝕜 E).flip


nonrec theorem isCompact_closedBall {x : E} {r : ℝ} : IsCompact (closedBall x r)

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


protected theorem mul_nonneg {a b : Int} (ha : 0 ≤ a) (hb : 0 ≤ b) : 0 ≤ a * b


theorem Ioc_subset_Ioc (ha : a₂ ≤ a₁) (hb : b₁ ≤ b₂) : Ioc a₁ b₁ ⊆ Ioc a₂ b₂

{α : Type u_2}
[Preorder α]
[LocallyFiniteOrder α]
{a₁ a₂ b₁ b₂ : α}
(ha : a₂ ≤ a₁)
(hb : b₁ ≤ b₂)


@[mono, gcongr]
lemma egauge_anti (h : s ⊆ t) (x : E) : egauge 𝕜 t x ≤ egauge 𝕜 s x

(𝕜 : Type u_1)
[NNNorm 𝕜]
{E : Type u_2}
[SMul 𝕜 E]
{s t : Set E}
(h : s ⊆ t)
(x : E)


theorem differentiableWithinAt_Ioi_iff_Ici [PartialOrder 𝕜] :
    DifferentiableWithinAt 𝕜 f (Ioi x) x ↔ DifferentiableWithinAt 𝕜 f (Ici x) x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : 𝕜 → F}
{x : 𝕜}
[PartialOrder 𝕜]

DifferentiableWithinAt 𝕜 f (Set.Ioi x) x ↔ DifferentiableWithinAt 𝕜 f (Set.Ici x) x


theorem contMDiffAt_finsum {x₀ : M} {g : ι → M → F}
    (hφ : ∀ i, x₀ ∈ tsupport (f i) → ContMDiffAt I 𝓘(ℝ, F) n (g i) x₀) :
    ContMDiffAt I 𝓘(ℝ, F) n (fun x ↦ ∑ᶠ i, f i x • g i x) x₀

(hφ : ∀ (i : ι), x₀ ∈ tsupport ⇑(f i) → ContMDiffAt I 𝓘(ℝ, F) n (g i) x₀)

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


@[to_additive sum_le_univ_sum_of_nonneg]
theorem prod_le_univ_prod_of_one_le' [Fintype ι] {s : Finset ι} (w : ∀ x, 1 ≤ f x) :
    ∏ x ∈ s, f x ≤ ∏ x, f x

{ι : Type u_1}
{N : Type u_5}
[OrderedCommMonoid N]
{f : ι → N}
[Fintype ι]
{s : Finset ι}
(w : ∀ (x : ι), 1 ≤ f x)


@[simp] lemma himp_eq_left : x ⇨ y = x ↔ x = ⊤ ∧ y = ⊤

{α : Type u}
{x y : α}
[BooleanAlgebra α]


/-- We say that a type has `MeasurableMul` if `(c * ·)` and `(· * c)` are measurable functions.
For a typeclass assuming measurability of `uncurry (*)` see `MeasurableMul₂`. -/
@[to_additive]
class MeasurableMul (M : Type*) [MeasurableSpace M] [Mul M] : Prop where
  measurable_const_mul : ∀ c : M, Measurable (c * ·)
  measurable_mul_const : ∀ c : M, Measurable (· * c)

{M : Type u_2}
[MeasurableSpace M]
[Mul M]
[self : MeasurableMul M]
(c : M)


theorem Function.Injective.wbtw_map_iff {x y z : P} {f : P →ᵃ[R] P'} (hf : Function.Injective f) :
    Wbtw R (f x) (f y) (f z) ↔ Wbtw R x y z

{R : Type u_1}
{V : Type u_2}
{V' : Type u_3}
{P : Type u_4}
{P' : Type u_5}
[OrderedRing R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
[AddCommGroup V']
[Module R V']
[AddTorsor V' P']
{x y z : P}
{f : P →ᵃ[R] P'}
(hf : Function.Injective ⇑f)


/-- Auxiliary lemma for `measurable_compProdFun`. -/
theorem measurable_compProdFun_of_finite (κ : Kernel α β) [IsFiniteKernel κ] (η : Kernel (α × β) γ)
    [IsFiniteKernel η] (hs : MeasurableSet s) : Measurable fun a => compProdFun κ η a s

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


@[reassoc]
theorem pentagon_inv_hom (W X Y Z : C) :
    (α_ (W ⊗ X) Y Z).inv ≫ ((α_ W X Y).hom ⊗ 𝟙 Z) =
      (α_ W X (Y ⊗ Z)).hom ≫ (𝟙 W ⊗ (α_ X Y Z).inv) ≫ (α_ W (X ⊗ Y) Z).inv

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.MonoidalCategory C]
(W X Y Z : C)

(CategoryTheory.MonoidalCategory.associator (CategoryTheory.MonoidalCategory.tensorObj W X) Y Z).inv ≫
    CategoryTheory.MonoidalCategory.tensorHom (CategoryTheory.MonoidalCategory.associator W X Y).hom (𝟙 Z) =
  (CategoryTheory.MonoidalCategory.associator W X (CategoryTheory.MonoidalCategory.tensorObj Y Z)).hom ≫
    CategoryTheory.MonoidalCategory.tensorHom (𝟙 W) (CategoryTheory.MonoidalCategory.associator X Y Z).inv ≫
      (CategoryTheory.MonoidalCategory.associator W (CategoryTheory.MonoidalCategory.tensorObj X Y) Z).inv


/-- A module over a semiring is `Finite` if it is finitely generated as a module. -/
class Module.Finite [Semiring R] [AddCommMonoid M] [Module R M] : Prop where
  out : (⊤ : Submodule R M).FG

{R : Type u_1}
{M : Type u_4}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[self : Module.Finite R M]


/-- **Equational criterion for flatness**
[Stacks 00HK](https://stacks.math.columbia.edu/tag/00HK), backward direction, alternate form.

Let $M$ be a module over a commutative ring $R$. Suppose that for all finite free modules $R^\iota$,
all $f \in R^{\iota}$, and all homomorphisms $x \colon R^{\iota} \to M$ such that $x(f) = 0$, there
exist a finite free module $R^\kappa$ and homomorphisms $a \colon R^{\iota} \to R^{\kappa}$ and
$y \colon R^{\kappa} \to M$ such that $x = y \circ a$ and $a(f) = 0$. Then $M$ is flat. -/
theorem of_forall_exists_factorization (h : ∀ {ι : Type u} [Fintype ι] {f : ι →₀ R}
    {x : (ι →₀ R) →ₗ[R] M}, x f = 0 →
      ∃ (κ : Type u) (_ : Fintype κ) (a : (ι →₀ R) →ₗ[R] (κ →₀ R)) (y : (κ →₀ R) →ₗ[R] M),
      x = y ∘ₗ a ∧ a f = 0) : Flat R M

(h : ∀ {ι : Type u} [inst : Fintype ι] {f : ι →₀ R} {x : (ι →₀ R) →ₗ[R] M}, x f = 0 → ∃ κ x_1 a y, x = y ∘ₗ a ∧ a f = 0)


@[to_additive (attr := simp)]
theorem inv_sup (S T : Submonoid G) : (S ⊔ T)⁻¹ = S⁻¹ ⊔ T⁻¹

{G : Type u_2}
[Group G]
(S T : Submonoid G)

(S ⊔ T)⁻¹ = S⁻¹ ⊔ T⁻¹


/-- `ofFn` on an empty domain is the empty list. -/
@[simp]
theorem ofFn_zero (f : Fin 0 → α) : ofFn f = []


theorem Cofix.dest_corec {α : Type u} (g : α → F α) (x : α) :
    Cofix.dest (Cofix.corec g x) = Cofix.corec g <$> g x

{F : Type u → Type u}
[q : QPF F]
{α : Type u}
(g : α → F α)
(x : α)

(QPF.Cofix.corec g x).dest = QPF.Cofix.corec g <$> g x


@[simp] lemma rev_rev {n} (i : Fin2 n) : i.rev.rev = i


/-- If `{ m_i }` is an `R`-basis of `M`, if `{ n_i }` is an `R`-basis of `N`,
such that the family `{ m_i * n_j }` in `S` is `R`-linearly independent
(in this result it is stated as the relevant `Finsupp.total` is injective),
then `M` and `N` are linearly disjoint. -/
theorem of_basis_mul' {κ ι : Type*} (m : Basis κ R M) (n : Basis ι R N)
    (H : Function.Injective (Finsupp.total (κ × ι) S R fun i ↦ m i.1 * n i.2)) :
    M.LinearDisjoint N

(H : Function.Injective ⇑(Finsupp.total (κ × ι) S R fun i => ↑(m i.1) * ↑(n i.2)))


@[simp]
theorem rangeIcc_apply (f g : Π₀ i, α i) (i : ι) : f.rangeIcc g i = Icc (f i) (g i)

{ι : Type u_1}
{α : ι → Type u_2}
[(i : ι) → Zero (α i)]
[(i : ι) → PartialOrder (α i)]
[(i : ι) → LocallyFiniteOrder (α i)]
(f g : Π₀ (i : ι), α i)
(i : ι)

(f.rangeIcc g) i = Finset.Icc (f i) (g i)


@[simp]
theorem isAdjMatrix_compl [Zero α] [One α] (h : A.IsSymm) : IsAdjMatrix A.compl

{V : Type u_1}
{α : Type u_2}
[DecidableEq α]
[DecidableEq V]
(A : Matrix V V α)
[Zero α]
[One α]
(h : A.IsSymm)


theorem lineMap_strict_mono_left (ha : a < a') (hr : r < 1) : lineMap a b r < lineMap a' b r

{k : Type u_1}
{E : Type u_2}
[OrderedRing k]
[OrderedAddCommGroup E]
[Module k E]
[OrderedSMul k E]
{a a' b : E}
{r : k}
(ha : a < a')
(hr : r < 1)

(AffineMap.lineMap a b) r < (AffineMap.lineMap a' b) r


theorem TensorProduct.mk_surjective (S) [Semiring S] [Algebra R S]
    (h : Surjective (algebraMap R S)) :
    Surjective (TensorProduct.mk R S M 1)

(h : Function.Surjective ⇑(algebraMap R S))

Function.Surjective ⇑((TensorProduct.mk R S M) 1)


theorem I_mul_re (z : ℂ) : (I * z).re = -z.im


/-- Easy inclusion: a differentiability point with derivative in `K` belongs to `D f K`. -/
theorem differentiable_set_subset_D :
    { x | DifferentiableWithinAt ℝ f (Ici x) x ∧ derivWithin f (Ici x) x ∈ K } ⊆ D f K

{F : Type u_1}
[NormedAddCommGroup F]
[NormedSpace ℝ F]
{f : ℝ → F}
(K : Set F)

{x | DifferentiableWithinAt ℝ f (Set.Ici x) x ∧ derivWithin f (Set.Ici x) x ∈ K} ⊆ RightDerivMeasurableAux.D f K


theorem equivalence_of_manyOneEquiv {α} [Primcodable α] : Equivalence (@ManyOneEquiv α α _ _)


@[to_additive]
lemma prod_map_filter_mul_prod_map_filter_not (p : α → Prop) [DecidablePred p] (f : α → M)
    (l : List α) :
    ((l.filter p).map f).prod * ((l.filter fun x => ¬p x).map f).prod = (l.map f).prod

{α : Type u_2}
{M : Type u_4}
[AddCommMonoid M]
(p : α → Prop)
[DecidablePred p]
(f : α → M)
(l : List α)

(List.map f (List.filter (fun b => decide (p b)) l)).sum + (List.map f (List.filter (fun x => decide ¬p x) l)).sum =
  (List.map f l).sum


/-- See also `Submodule.smul_bot`. -/
@[simp]
theorem smul_bot' (a : α) : a • (⊥ : Submodule R M) = ⊥

{α : Type u_1}
{R : Type u_2}
{M : Type u_3}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[Monoid α]
[DistribMulAction α M]
[SMulCommClass α R M]
(a : α)


theorem gc_map_comap (f : F) :
    @GaloisConnection (NonUnitalSubsemiring R) (NonUnitalSubsemiring S) _ _ (map f) (comap f)

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

GaloisConnection (NonUnitalSubsemiring.map f) (NonUnitalSubsemiring.comap f)


/-- If `f : M → N` is a submultiplicative function, `f (x * y) ≤ f x * f y`, `f 1 = 1`, and `g i`,
`i ∈ s`, is a finite family of elements of `M`, then `f (∏ i ∈ s, g i) ≤ ∏ i ∈ s, f (g i)`. -/
@[to_additive le_sum_of_subadditive]
theorem le_prod_of_submultiplicative (f : M → N) (h_one : f 1 = 1)
    (h_mul : ∀ x y, f (x * y) ≤ f x * f y) (s : Finset ι) (g : ι → M) :
    f (∏ i ∈ s, g i) ≤ ∏ i ∈ s, f (g i)

(h_mul : ∀ (x y : M), f (x + y) ≤ f x + f y)


nonrec theorem IsLocalMaxOn.bicomp_mono [Preorder δ] {op : β → γ → δ}
    (hop : ((· ≤ ·) ⇒ (· ≤ ·) ⇒ (· ≤ ·)) op op) (hf : IsLocalMaxOn f s a) {g : α → γ}
    (hg : IsLocalMaxOn g s a) : IsLocalMaxOn (fun x => op (f x) (g x)) s a

{op : β → γ → δ}

(hop : ((fun x x_1 => x ≤ x_1) ⇒ (fun x x_1 => x ≤ x_1) ⇒ fun x x_1 => x ≤ x_1) op op)


theorem IsFilteredOrEmpty.isPreconnected [IsFilteredOrEmpty C] : IsPreconnected C

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


theorem fold_max_le : s.fold max b f ≤ c ↔ b ≤ c ∧ ∀ x ∈ s, f x ≤ c

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

Finset.fold max b f s ≤ c ↔ b ≤ c ∧ ∀ x ∈ s, f x ≤ c


/-- One step in the proof of the Tietze extension theorem. If `e : C(X, Y)` is a closed embedding
of a topological space into a normal topological space and `f : X →ᵇ ℝ` is a bounded continuous
function, then there exists a bounded continuous function `g : Y →ᵇ ℝ` of the norm `‖g‖ ≤ ‖f‖ / 3`
such that the distance between `g ∘ e` and `f` is at most `(2 / 3) * ‖f‖`. -/
theorem tietze_extension_step (f : X →ᵇ ℝ) (e : C(X, Y)) (he : ClosedEmbedding e) :
    ∃ g : Y →ᵇ ℝ, ‖g‖ ≤ ‖f‖ / 3 ∧ dist (g.compContinuous e) f ≤ 2 / 3 * ‖f‖

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
[NormalSpace Y]
(f : X →ᵇ ℝ)
(e : C(X, Y))
(he : ClosedEmbedding ⇑e)

∃ g, ‖g‖ ≤ ‖f‖ / 3 ∧ dist (g.compContinuous e) f ≤ 2 / 3 * ‖f‖


theorem isMaximal_inf_right_of_isMaximal_sup {x y : X} (hxz : IsMaximal x (x ⊔ y))
    (hyz : IsMaximal y (x ⊔ y)) : IsMaximal (x ⊓ y) y

(hxz : JordanHolderLattice.IsMaximal x (x ⊔ y))

(hyz : JordanHolderLattice.IsMaximal y (x ⊔ y))


/-- The equivalence between β-graded objects and γ-graded objects,
given an equivalence between β and γ.
-/
@[simps]
def comapEquiv {β γ : Type w} (e : β ≃ γ) : GradedObject β C ≌ GradedObject γ C

(C : Type u)
[CategoryTheory.Category.{v, u} C]
{β γ : Type w}
(e : β ≃ γ)

(CategoryTheory.GradedObject.comapEquiv C e).unitIso =
  CategoryTheory.GradedObject.comapEq C ⋯ ≪≫ (CategoryTheory.Pi.comapComp (fun x => C) ⇑e ⇑e.symm).symm


theorem map₂_iSup_left (f : M →ₗ[R] N →ₗ[R] P) (s : ι → Submodule R M) (t : Submodule R N) :
    map₂ f (⨆ i, s i) t = ⨆ i, map₂ f (s i) t

{ι : Sort uι}
{R : Type u_1}
{M : Type u_2}
{N : Type u_3}
{P : Type u_4}
[CommSemiring R]
[AddCommMonoid M]
[AddCommMonoid N]
[AddCommMonoid P]
[Module R M]
[Module R N]
[Module R P]
(f : M →ₗ[R] N →ₗ[R] P)
(s : ι → Submodule R M)
(t : Submodule R N)

Submodule.map₂ f (⨆ i, s i) t = ⨆ i, Submodule.map₂ f (s i) t


theorem map_comap_eq_of_surjective (p : Submodule R₂ M₂) : (p.comap f).map f = p

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

Submodule.map f (Submodule.comap f p) = p


theorem not_haveLebesgueDecomposition_iff (s : SignedMeasure α) (μ : Measure α) :
    ¬s.HaveLebesgueDecomposition μ ↔
      ¬s.toJordanDecomposition.posPart.HaveLebesgueDecomposition μ ∨
        ¬s.toJordanDecomposition.negPart.HaveLebesgueDecomposition μ

{α : Type u_1}
{m : MeasurableSpace α}
(s : MeasureTheory.SignedMeasure α)
(μ : MeasureTheory.Measure α)


theorem diam_Ico {a b : ℝ} (h : a ≤ b) : Metric.diam (Ico a b) = b - a


/-- A compact set is bounded -/
theorem _root_.IsCompact.isBounded {s : Set α} (h : IsCompact s) : IsBounded s

{α : Type u}
[PseudoMetricSpace α]
{s : Set α}
(h : IsCompact s)


/-- A triangle `(X,Y,Z,f,g,h)` in `C` is defined by the morphisms `f : X ⟶ Y`, `g : Y ⟶ Z`
and `h : Z ⟶ X⟦1⟧`.
-/
@[simps]
def Triangle.mk {X Y Z : C} (f : X ⟶ Y) (g : Y ⟶ Z) (h : Z ⟶ X⟦(1 : ℤ)⟧) : Triangle C

(h : Z ⟶ (CategoryTheory.shiftFunctor C 1).obj X)

(CategoryTheory.Pretriangulated.Triangle.mk f g h).mor₂ = g


/-- The following diagram is a pullback
```
X --id--> X
|         |
f         f
v         v
Z --id--> Z
```
-/
lemma id_horiz (f : X ⟶ Z) : IsPullback (𝟙 X) f f (𝟙 Z)

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

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


lemma inter_mem (hC : IsSetRing C) (hs : s ∈ C) (ht : t ∈ C) : s ∩ t ∈ C

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


theorem unique_separable_of_irreducible {f : F[X]} (hf : Irreducible f) (hp : 0 < p) (n₁ : ℕ)
    (g₁ : F[X]) (hg₁ : g₁.Separable) (hgf₁ : expand F (p ^ n₁) g₁ = f) (n₂ : ℕ) (g₂ : F[X])
    (hg₂ : g₂.Separable) (hgf₂ : expand F (p ^ n₂) g₂ = f) : n₁ = n₂ ∧ g₁ = g₂

(hgf₁ : (Polynomial.expand F (p ^ n₁)) g₁ = f)

(hgf₂ : (Polynomial.expand F (p ^ n₂)) g₂ = f)


@[simp]
theorem stereoInvFunAux_apply (w : E) :
    stereoInvFunAux v w = (‖w‖ ^ 2 + 4)⁻¹ • ((4 : ℝ) • w + (‖w‖ ^ 2 - 4) • v)

{E : Type u_1}
[NormedAddCommGroup E]
[InnerProductSpace ℝ E]
{v : E}
(w : E)

stereoInvFunAux v w = (‖w‖ ^ 2 + 4)⁻¹ • (4 • w + (‖w‖ ^ 2 - 4) • v)


/-- The space `Fin 2 → α` is measurably equivalent to `α × α`. -/
@[simps! (config := .asFn)]
def finTwoArrow : (Fin 2 → α) ≃ᵐ α × α

⇑MeasurableEquiv.finTwoArrow.symm = fun p => Fin.cons p.1 (Fin.cons p.2 finZeroElim)


/-- Additive submonoids of an additive monoid `A` are isomorphic to
multiplicative submonoids of `Multiplicative A`. -/
@[simps]
def AddSubmonoid.toSubmonoid : AddSubmonoid A ≃o Submonoid (Multiplicative A)

{A : Type u_4}
[AddZeroClass A]
(S : Submonoid (Multiplicative A))

↑((RelIso.symm AddSubmonoid.toSubmonoid) S) = ⇑Multiplicative.ofAdd ⁻¹' ↑S


@[to_additive]
theorem Finite.mul : s.Finite → t.Finite → (s * t).Finite


@[simp]
theorem mem_sSup {x : Set α} {s : Set (Filter α)} : x ∈ sSup s ↔ ∀ f ∈ s, x ∈ (f : Filter α)

{α : Type u}
{x : Set α}
{s : Set (Filter α)}


theorem isClosed_sInter {s : Set (Set X)} : (∀ t ∈ s, IsClosed t) → IsClosed (⋂₀ s)

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


@[gcongr]
theorem floor_le_floor : ∀ x y : α, x ≤ y → ⌊x⌋ ≤ ⌊y⌋

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

x ≤ y → ⌊x⌋ ≤ ⌊y⌋


theorem Commute.commutator_eq (h : Commute g₁ g₂) : ⁅g₁, g₂⁆ = 1

{G : Type u_1}
[Group G]
{g₁ g₂ : G}
(h : Commute g₁ g₂)


/-- A version of `Finsupp.comapDomain_smul` that's easier to use. -/
theorem comapDomain_smul_of_injective [AddMonoid M] [Monoid R] [DistribMulAction R M] {f : α → β}
    (hf : Function.Injective f) (r : R) (v : β →₀ M) :
    comapDomain f (r • v) hf.injOn = r • comapDomain f v hf.injOn

{α : Type u_1}
{β : Type u_2}
{M : Type u_5}
{R : Type u_11}
[AddMonoid M]
[Monoid R]
[DistribMulAction R M]
{f : α → β}
(hf : Function.Injective f)
(r : R)
(v : β →₀ M)

Finsupp.comapDomain f (r • v) ⋯ = r • Finsupp.comapDomain f v ⋯


/-- Given a measure space with an action of a finite group `G`, the measure of any `G`-invariant set
is determined by the measure of its intersection with a fundamental domain for the action of `G`. -/
@[to_additive measure_eq_card_smul_of_vadd_ae_eq_self "Given a measure space with an action of a
  finite additive group `G`, the measure of any `G`-invariant set is determined by the measure of
  its intersection with a fundamental domain for the action of `G`."]
theorem measure_eq_card_smul_of_smul_ae_eq_self [Finite G] (h : IsFundamentalDomain G s μ)
    (t : Set α) (ht : ∀ g : G, (g • t : Set α) =ᵐ[μ] t) : μ t = Nat.card G • μ (t ∩ s)

[MeasureTheory.SMulInvariantMeasure G α μ]

(h : MeasureTheory.IsFundamentalDomain G s μ)


theorem filterMap_cons (f : α → Option β) (a : α) (l : List α) :
    filterMap f (a :: l) =
      match f a with
      | none => filterMap f l
      | some b => b :: filterMap f l

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

List.filterMap f (a :: l) =
  match f a with
  | none => List.filterMap f l
  | some b => b :: List.filterMap f l


@[simp]
theorem translationNumber_zpow (f : CircleDeg1Liftˣ) : ∀ n : ℤ, τ (f ^ n : Units _) = n * τ f

(↑(f ^ n)).translationNumber = ↑n * (↑f).translationNumber


theorem measure_sUnion {S : Set (Set α)} (hs : S.Countable) (hd : S.Pairwise Disjoint)
    (h : ∀ s ∈ S, MeasurableSet s) : μ (⋃₀ S) = ∑' s : S, μ s

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{S : Set (Set α)}
(hs : S.Countable)
(hd : S.Pairwise Disjoint)
(h : ∀ s ∈ S, MeasurableSet s)


theorem infs_subset_right : s₁ ⊆ s₂ → s₁ ⊼ t ⊆ s₂ ⊼ t

{α : Type u_2}
[DecidableEq α]
[SemilatticeInf α]
{s₁ s₂ t : Finset α}

s₁ ⊆ s₂ → s₁ ⊼ t ⊆ s₂ ⊼ t


theorem ae_eq_of_ae_subset_of_measure_ge (h₁ : s ≤ᵐ[μ] t) (h₂ : μ t ≤ μ s) (hsm : MeasurableSet s)
    (ht : μ t ≠ ∞) : s =ᵐ[μ] t

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s t : Set α}
(h₁ : s ≤ᵐ[μ] t)
(h₂ : μ t ≤ μ s)
(hsm : MeasurableSet s)
(ht : μ t ≠ ⊤)


lemma succ_lt_succ_of_not_isMax (h : a < b) (hb : ¬ IsMax b) : succ a < succ b

{α : Type u_1}
[Preorder α]
[SuccOrder α]
{a b : α}
(h : a < b)
(hb : ¬IsMax b)


theorem norm_setToL1_le' (hT : DominatedFinMeasAdditive μ T C) : ‖setToL1 hT‖ ≤ max C 0

(hT : MeasureTheory.DominatedFinMeasAdditive μ T C)


theorem monotone_filter_right (l : List α) ⦃p q : α → Bool⦄
    (h : ∀ a, p a → q a) : l.filter p <+ l.filter q

(h : ∀ (a : α), p a = true → q a = true)

(List.filter p l).Sublist (List.filter q l)


theorem ofReal_average {f : α → ℝ} (hf : Integrable f μ) (hf₀ : 0 ≤ᵐ[μ] f) :
    ENNReal.ofReal (⨍ x, f x ∂μ) = (∫⁻ x, ENNReal.ofReal (f x) ∂μ) / μ univ

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f : α → ℝ}
(hf : MeasureTheory.Integrable f μ)
(hf₀ : 0 ≤ᵐ[μ] f)

ENNReal.ofReal (⨍ (x : α), f x ∂μ) = (∫⁻ (x : α), ENNReal.ofReal (f x) ∂μ) / μ Set.univ


protected theorem Associated.prime [CommMonoidWithZero α] {p q : α} (h : p ~ᵤ q) (hp : Prime p) :
    Prime q

{α : Type u_1}
[CommMonoidWithZero α]
{p q : α}
(h : p ~ᵤ q)
(hp : Prime p)


theorem SetLike.Homogeneous.graded_smul [VAdd ιA ιB] [SMul R M] {A : ιA → S} {B : ιB → N}
    [SetLike.GradedSMul A B] {a : R} {b : M} :
    SetLike.Homogeneous A a → SetLike.Homogeneous B b → SetLike.Homogeneous B (a • b)

{ιA : Type u_1}
{ιB : Type u_2}
{S : Type u_4}
{R : Type u_5}
{N : Type u_6}
{M : Type u_7}
[SetLike S R]
[SetLike N M]
[VAdd ιA ιB]
[SMul R M]
{A : ιA → S}
{B : ιB → N}
[SetLike.GradedSMul A B]
{a : R}
{b : M}


@[to_additive (attr := simp)]
theorem mul_bind (f : α → FreeMagma β) (x y : FreeMagma α) : x * y >>= f = (x >>= f) * (y >>= f)

{α β : Type u}
(f : α → FreeMagma β)
(x y : FreeMagma α)


/-- The equivalence `(ℤ →+ α) ≃ α` for any additive group `α`. -/
@[simps]
def fromIntEquiv (α : Type u) [AddGroup α] : (ℤ →+ α) ≃ α

(AddMonoidHom.fromIntEquiv α).symm x = (zmultiplesHom α) x


/-- A linear operator on a complex inner product space is symmetric precisely when
`⟪T v, v⟫_ℂ` is real for all v. -/
theorem isSymmetric_iff_inner_map_self_real (T : V →ₗ[ℂ] V) :
    IsSymmetric T ↔ ∀ v : V, conj ⟪T v, v⟫_ℂ = ⟪T v, v⟫_ℂ

{V : Type u_6}
[NormedAddCommGroup V]
[InnerProductSpace ℂ V]
(T : V →ₗ[ℂ] V)

T.IsSymmetric ↔ ∀ (v : V), (starRingEnd ℂ) ⟪T v, v⟫_ℂ = ⟪T v, v⟫_ℂ


@[to_additive]
protected theorem inv_eq_of_mul_eq_one_left {a : α} (h : a * u = 1) : ↑u⁻¹ = a

{α : Type u}
[AddMonoid α]
{u : AddUnits α}
{a : α}
(h : a + ↑u = 0)


/-- If `b` is odd, then `J(-1 | b)` is given by `χ₄ b`. -/
theorem at_neg_one {b : ℕ} (hb : Odd b) : J(-1 | b) = χ₄ b


theorem toL1_neg (f : α → β) (hf : Integrable f μ) : toL1 (-f) (Integrable.neg hf) = -toL1 f hf

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup β]
(f : α → β)
(hf : MeasureTheory.Integrable f μ)

MeasureTheory.Integrable.toL1 (-f) ⋯ = -MeasureTheory.Integrable.toL1 f hf


/-- If a multiplicative indicator function is not equal to `1` at a point, then that point is in the
set. -/
@[to_additive
      "If an additive indicator function is not equal to `0` at a point, then that point is
      in the set."]
theorem mem_of_mulIndicator_ne_one (h : mulIndicator s f a ≠ 1) : a ∈ s

{α : Type u_1}
{M : Type u_4}
[One M]
{s : Set α}
{f : α → M}
{a : α}
(h : s.mulIndicator f a ≠ 1)


theorem tendsto_exp_nhds_zero_iff {α : Type*} {l : Filter α} {f : α → ℂ} :
    Tendsto (fun x => exp (f x)) l (𝓝 0) ↔ Tendsto (fun x => re (f x)) l atBot

{α : Type u_1}
{l : Filter α}
{f : α → ℂ}

Filter.Tendsto (fun x => Complex.exp (f x)) l (𝓝 0) ↔ Filter.Tendsto (fun x => (f x).re) l Filter.atBot


@[simp] theorem run_monadLift [MonadLiftT n m] (x : n α) (ctx : ρ)
    : (monadLift x : ReaderT ρ m α).run ctx = (monadLift x : m α)

{n : Type u_1 → Type u_2}
{m : Type u_1 → Type u_3}
{α ρ : Type u_1}
[MonadLiftT n m]
(x : n α)
(ctx : ρ)


@[to_additive] lemma inv_lt_of_mabs_lt (h : |a|ₘ < b) : b⁻¹ < a

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

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


@[simp] theorem cond_eq_true_distrib : ∀(c t f : Bool),
    (cond c t f = true) = ite (c = true) (t = true) (f = true)

((bif c then t else f) = true) = if c = true then t = true else f = true


/-- A topological space is said to be a *sequential space* if any sequentially closed set in this
space is closed. This condition is weaker than being a Fréchet-Urysohn space. -/
class SequentialSpace : Prop where
  isClosed_of_seq : ∀ s : Set X, IsSeqClosed s → IsClosed s

{X : Type u_1}
[TopologicalSpace X]
[self : SequentialSpace X]
(s : Set X)


theorem deriv_finset_prod (hf : ∀ i ∈ u, DifferentiableAt 𝕜 (f i) x) :
    deriv (∏ i ∈ u, f i ·) x = ∑ i ∈ u, (∏ j ∈ u.erase i, f j x) • deriv (f i) x

{f : ι → 𝕜 → 𝔸'}

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


/-- An `n`-clique in a graph is a set of `n` vertices which are pairwise connected. -/
structure IsNClique (n : ℕ) (s : Finset α) : Prop where
  clique : G.IsClique s
  card_eq : s.card = n

{α : Type u_1}
{G : SimpleGraph α}
{n : ℕ}
{s : Finset α}
(self : G.IsNClique n s)


/-- Version of `tprod_eq_mul_tprod_ite` for `CommMonoid` rather than `CommGroup`.
Requires a different convergence assumption involving `Function.update`. -/
@[to_additive "Version of `tsum_eq_add_tsum_ite` for `AddCommMonoid` rather than `AddCommGroup`.
Requires a different convergence assumption involving `Function.update`."]
theorem tprod_eq_mul_tprod_ite' [DecidableEq β] {f : β → α} (b : β)
    (hf : Multipliable (update f b 1)) :
    ∏' x, f x = f b * ∏' x, ite (x = b) 1 (f x)

{α : Type u_1}
{β : Type u_2}
[AddCommMonoid α]
[TopologicalSpace α]
[T2Space α]
[ContinuousAdd α]
[DecidableEq β]
{f : β → α}
(b : β)
(hf : Summable (Function.update f b 0))

∑' (x : β), f x = f b + ∑' (x : β), if x = b then 0 else f x


theorem fold_disjUnion {s₁ s₂ : Finset α} {b₁ b₂ : β} (h) :
    (s₁.disjUnion s₂ h).fold op (b₁ * b₂) f = s₁.fold op b₁ f * s₂.fold op b₂ f

{α : Type u_1}
{β : Type u_2}
{op : β → β → β}
[hc : Std.Commutative op]
[ha : Std.Associative op]
{f : α → β}
{s₁ s₂ : Finset α}
{b₁ b₂ : β}
(h : Disjoint s₁ s₂)

Finset.fold op (op b₁ b₂) f (s₁.disjUnion s₂ h) = op (Finset.fold op b₁ f s₁) (Finset.fold op b₂ f s₂)


lemma closure_lowerClosure_comm_pi (hs : BddAbove s) :
    closure (lowerClosure s : Set (ι → ℝ)) = lowerClosure (closure s)

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

closure ↑(lowerClosure s) = ↑(lowerClosure (closure s))


theorem prod_norm_sq_eq_of_L2 (x : WithLp 2 (α × β)) : ‖x‖ ^ 2 = ‖x.fst‖ ^ 2 + ‖x.snd‖ ^ 2

{α : Type u_2}
{β : Type u_3}
[SeminormedAddCommGroup α]
[SeminormedAddCommGroup β]
(x : WithLp 2 (α × β))


@[to_additive]
theorem card_orderOf_eq_totient_aux₂ {d : ℕ} (hd : d ∣ Fintype.card α) :
    (univ.filter fun a : α => orderOf a = d).card = φ d

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

(Finset.filter (fun a => orderOf a = d) Finset.univ).card = d.totient


protected lemma Bornology.IsBounded.bddBelow (hs : IsBounded s) : BddBelow s

{α : Type u_1}
[Bornology α]
{s : Set α}
[Preorder α]
[IsOrderBornology α]
(hs : Bornology.IsBounded s)


theorem A_mono (L : E →L[𝕜] F) (r : ℝ) {ε δ : ℝ} (h : ε ≤ δ) : A f L r ε ⊆ A f L r δ

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
(L : E →L[𝕜] F)
(r : ℝ)
{ε δ : ℝ}
(h : ε ≤ δ)

FDerivMeasurableAux.A f L r ε ⊆ FDerivMeasurableAux.A f L r δ


theorem Function.funext_iff {β : α → Sort u} {f₁ f₂ : ∀ x : α, β x} : f₁ = f₂ ↔ ∀ a, f₁ a = f₂ a

{α : Sort u_1}
{β : α → Sort u}
{f₁ f₂ : (x : α) → β x}


/-- Given `c = lineMap a b r`, `a < c`, the point `(c, f c)` is strictly below the
segment `[(a, f a), (b, f b)]` if and only if `slope f a c < slope f a b`. -/
theorem map_lt_lineMap_iff_slope_lt_slope_left (h : 0 < r * (b - a)) :
    f c < lineMap (f a) (f b) r ↔ slope f a c < slope f a b

{k : Type u_1}
{E : Type u_2}
[LinearOrderedField k]
[OrderedAddCommGroup E]
[Module k E]
[OrderedSMul k E]
{f : k → E}
{a b r : k}
(h : 0 < r * (b - a))

f ((AffineMap.lineMap a b) r) < (AffineMap.lineMap (f a) (f b)) r ↔ slope f a ((AffineMap.lineMap a b) r) < slope f a b


/-- The orthogonal group of `F` is generated by reflections; specifically each element `φ` of the
orthogonal group is a product of at most as many reflections as the dimension of `F`.

Special case of the **Cartan–Dieudonné theorem**. -/
theorem LinearIsometryEquiv.reflections_generate_dim [FiniteDimensional ℝ F] (φ : F ≃ₗᵢ[ℝ] F) :
    ∃ l : List F, l.length ≤ finrank ℝ F ∧ φ = (l.map fun v => reflection (ℝ ∙ v)ᗮ).prod

{F : Type u_3}
[NormedAddCommGroup F]
[InnerProductSpace ℝ F]
[FiniteDimensional ℝ F]
(φ : F ≃ₗᵢ[ℝ] F)

∃ l, l.length ≤ FiniteDimensional.finrank ℝ F ∧ φ = (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l).prod


@[simp, norm_cast]
theorem coe_comp_addMonoidHom (g f : CentroidHom α) : (g.comp f : α →+ α) = (g : α →+ α).comp f

{α : Type u_5}
[NonUnitalNonAssocSemiring α]
(g f : CentroidHom α)


@[to_additive] lemma le_prod_of_mem (ha : a ∈ m) : a ≤ m.prod

{α : Type u_2}
[CanonicallyOrderedCommMonoid α]
{m : Multiset α}
{a : α}
(ha : a ∈ m)


@[simp]
theorem leadingCoeff_of_c_ne_zero' (hc : c ≠ 0) : (toPoly ⟨0, 0, c, d⟩).leadingCoeff = c

{R : Type u_1}
{c d : R}
[Semiring R]
(hc : c ≠ 0)

{ a := 0, b := 0, c := c, d := d }.toPoly.leadingCoeff = c


@[to_additive]
theorem Monoid.exponent_pi_eq_zero {ι : Type*} {M : ι → Type*} [∀ i, Monoid (M i)] {j : ι}
    (hj : exponent (M j) = 0) : exponent ((i : ι) → M i) = 0

{ι : Type u_1}
{M : ι → Type u_2}
[(i : ι) → Monoid (M i)]
{j : ι}
(hj : Monoid.exponent (M j) = 0)


protected theorem IsCycle.cycleOf [DecidableEq α] (hf : IsCycle f) :
    cycleOf f x = if f x = x then 1 else f

{α : Type u_2}
{f : Equiv.Perm α}
{x : α}
[DecidableRel f.SameCycle]
[DecidableEq α]
(hf : f.IsCycle)


/-- Möbius inversion for functions to a `Ring`. -/
theorem sum_eq_iff_sum_mul_moebius_eq [Ring R] {f g : ℕ → R} :
    (∀ n > 0, ∑ i ∈ n.divisors, f i = g n) ↔
      ∀ n > 0, ∑ x ∈ n.divisorsAntidiagonal, (μ x.fst : R) * g x.snd = f n

(∀ n > 0, ∑ i ∈ n.divisors, f i = g n) ↔
  ∀ n > 0, ∑ x ∈ n.divisorsAntidiagonal, ↑(ArithmeticFunction.moebius x.1) * g x.2 = f n


@[simp]
theorem card_functions_sum (i : ℕ) :
    #((L.sum L').Functions i)
      = (Cardinal.lift.{u'} #(L.Functions i) + Cardinal.lift.{u} #(L'.Functions i) : Cardinal)

{L : FirstOrder.Language}
{L' : FirstOrder.Language}
(i : ℕ)

#((L.sum L').Functions i) = Cardinal.lift.{u', u} #(L.Functions i) + Cardinal.lift.{u, u'} #(L'.Functions i)


theorem add_algebraMap {B : Type*} [CommRing B] [Algebra A B] {x : B} (hx : IsIntegral A x)
    (a : A) : minpoly A (x + algebraMap A B a) = (minpoly A x).comp (X - C a)

{A : Type u_1}
[Field A]
{B : Type u_3}
[CommRing B]
[Algebra A B]
{x : B}
(hx : IsIntegral A x)
(a : A)

minpoly A (x + (algebraMap A B) a) = (minpoly A x).comp (Polynomial.X - Polynomial.C a)


/-- `N` as a submodule of `M × N` is isomorphic to `N`. -/
@[simps]
def sndEquiv : Submodule.snd R M M₂ ≃ₗ[R] M₂

(R : Type u)
(M : Type v)
(M₂ : Type w)
[Semiring R]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R M₂]
(x : ↥(Submodule.snd R M M₂))


lemma tendsto_nhds_generateFrom_iff {β : Type*} {m : α → β} {f : Filter α} {g : Set (Set β)}
    {b : β} : Tendsto m f (@nhds β (generateFrom g) b) ↔ ∀ s ∈ g, b ∈ s → m ⁻¹' s ∈ f

{α : Type u}
{β : Type u_1}
{m : α → β}
{f : Filter α}
{g : Set (Set β)}
{b : β}

Filter.Tendsto m f (𝓝 b) ↔ ∀ s ∈ g, b ∈ s → m ⁻¹' s ∈ f


private lemma toAffine_slope_of_eq {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.toAffine.slope (P x / P z ^ 2) (Q x / Q z ^ 2) (P y / P z ^ 3) (Q y / Q z ^ 3) =
      -W.dblU P / W.dblZ P


theorem copy_eq (f : C₀(α, β)) (f' : α → β) (h : f' = f) : f.copy f' h = f

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[TopologicalSpace β]
[Zero β]
(f : α →C₀ β)
(f' : α → β)
(h : f' = ⇑f)


@[to_additive (attr := simp, nolint simpNF)]
theorem mulEquivOfMulEquiv_eq {k : LocalizationMap T Q} {j : M ≃* P} (H : S.map j.toMonoidHom = T)
    (x) :
    f.mulEquivOfMulEquiv k H (f.toMap x) = k.toMap (j x)

(H : AddSubmonoid.map j.toAddMonoidHom S = T)

(f.addEquivOfAddEquiv k H) (f.toMap x) = k.toMap (j x)


theorem convexJoin_segment_singleton (a b c : E) :
    convexJoin 𝕜 (segment 𝕜 a b) {c} = convexHull 𝕜 {a, b, c}

{𝕜 : Type u_2}
{E : Type u_3}
[LinearOrderedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
(a b c : E)

convexJoin 𝕜 (segment 𝕜 a b) {c} = (convexHull 𝕜) {a, b, c}


/-- An equivalence between categories gives an equivalence between the opposite categories.
-/
@[simps]
def op (e : C ≌ D) : Cᵒᵖ ≌ Dᵒᵖ

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


@[simp]
theorem coe_symm_mk [Module R M] [Module R M₂]
    {to_fun inv_fun map_add map_smul left_inv right_inv} :
    ⇑(⟨⟨⟨to_fun, map_add⟩, map_smul⟩, inv_fun, left_inv, right_inv⟩ : M ≃ₗ[R] M₂).symm = inv_fun

{map_add : ∀ (x y : M), to_fun (x + y) = to_fun x + to_fun y}

{map_smul :
  ∀ (m : R) (x : M),
    { toFun := to_fun, map_add' := map_add }.toFun (m • x) =
      (RingHom.id R) m • { toFun := to_fun, map_add' := map_add }.toFun x}

{left_inv : Function.LeftInverse inv_fun { toFun := to_fun, map_add' := map_add, map_smul' := map_smul }.toFun}

{right_inv : Function.RightInverse inv_fun { toFun := to_fun, map_add' := map_add, map_smul' := map_smul }.toFun}

⇑{ toFun := to_fun, map_add' := map_add, map_smul' := map_smul, invFun := inv_fun, left_inv := left_inv,
        right_inv := right_inv }.symm =
  inv_fun


theorem map_cons (a : α) (s : Stream' α) : map f (a::s) = f a::map f s

{α : Type u}
{β : Type v}
(f : α → β)
(a : α)
(s : Stream' α)

Stream'.map f (Stream'.cons a s) = Stream'.cons (f a) (Stream'.map f s)


theorem rev_le_iff {i j : Fin n} : rev i ≤ j ↔ rev j ≤ i


@[simp] theorem down_sup [Sup α] (a b : ULift α) : down (a ⊔ b) = down a ⊔ down b

{α : Type u}
[Sup α]
(a b : ULift.{u_1, u} α)


theorem mk_mem_convexHull_prod {t : Set F} {x : E} {y : F} (hx : x ∈ convexHull R s)
    (hy : y ∈ convexHull R t) : (x, y) ∈ convexHull R (s ×ˢ t)

{R : Type u_1}
{E : Type u_3}
{F : Type u_4}
[LinearOrderedField R]
[AddCommGroup E]
[AddCommGroup F]
[Module R E]
[Module R F]
{s : Set E}
{t : Set F}
{x : E}
{y : F}
(hx : x ∈ (convexHull R) s)
(hy : y ∈ (convexHull R) t)


theorem limit_topology (F : J ⥤ TopCat.{max v u}) :
    (limit F).str = ⨅ j, (F.obj j).str.induced (limit.π F j)

{J : Type v}
[CategoryTheory.SmallCategory J]
(F : J ⥤ TopCat)

(CategoryTheory.Limits.limit F).str = ⨅ j, TopologicalSpace.induced (⇑(CategoryTheory.Limits.limit.π F j)) (F.obj j).str


theorem re_le_abs (z : ℂ) : z.re ≤ Complex.abs z


theorem integrable_average [IsFiniteMeasure μ] {f : α → β} :
    Integrable f ((μ univ)⁻¹ • μ) ↔ Integrable f μ

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup β]
[MeasureTheory.IsFiniteMeasure μ]
{f : α → β}

MeasureTheory.Integrable f ((μ Set.univ)⁻¹ • μ) ↔ MeasureTheory.Integrable f μ


protected theorem zero_mul' [NeZero n] (k : Fin n) : (0 : Fin n) * k = 0


theorem dist_eq (z w : ℍ) : dist z w = 2 * arsinh (dist (z : ℂ) w / (2 * √(z.im * w.im)))

dist z w = 2 * Real.arsinh (dist ↑z ↑w / (2 * √(z.im * w.im)))


@[simp]
theorem factors_zero : factors (0 : α) = 0

{α : Type u_1}
[CancelCommMonoidWithZero α]
[UniqueFactorizationMonoid α]


theorem comp_def {M N K : Mat R} (f : M ⟶ N) (g : N ⟶ K) :
    f ≫ g = fun i k => ∑ j : N, f i j * g j k

(R : Type u)
[Semiring R]
{M N K : CategoryTheory.Mat R}
(f : M ⟶ N)
(g : N ⟶ K)

f ≫ g = fun i k => ∑ j : ↑N, f i j * g j k


@[simp]
theorem bot_adj (v w : V) : (⊥ : SimpleGraph V).Adj v w ↔ False


@[deprecated getElem_eq_iff (since := "2024-06-12")]
theorem get_eq_iff : List.get l n = x ↔ l.get? n.1 = some x

∀ {α : Type u_1} {l : List α} {n : Fin l.length} {x : α}, l.get n = x ↔ l.get? ↑n = some x


/-- Given three nonzero vectors, adding the angles between them in cyclic order results in 0. -/
@[simp]
theorem oangle_add_cyc3 {x y z : V} (hx : x ≠ 0) (hy : y ≠ 0) (hz : z ≠ 0) :
    o.oangle x y + o.oangle y z + o.oangle z x = 0

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


@[simp]
theorem trace_eq : trace (stdBasisMatrix i i c) = c

{n : Type u_3}
{α : Type u_5}
[DecidableEq n]
[Semiring α]
(i : n)
(c : α)
[Fintype n]


@[simp]
theorem toIcoMod_toIocMod (a₁ a₂ b : α) : toIcoMod hp a₁ (toIocMod hp a₂ b) = toIcoMod hp a₁ b

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


@[simp]
theorem of_symm_one : (of R 𝒜 ℬ).symm 1 = 1

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

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


protected theorem mdifferentiableWithinAt {s x} : MDifferentiableWithinAt I 𝓘(𝕜, E) I s x

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

MDifferentiableWithinAt I 𝓘(𝕜, E) (↑I) s x


theorem nadd_eq_add (a b : Ordinal) : a ♯ b = toOrdinal (toNatOrdinal a + toNatOrdinal b)

a ♯ b = NatOrdinal.toOrdinal (Ordinal.toNatOrdinal a + Ordinal.toNatOrdinal b)


theorem TopologicalSpace.IsTopologicalBasis.inseparable_iff {b : Set (Set X)}
    (hb : IsTopologicalBasis b) {x y : X} : Inseparable x y ↔ ∀ s ∈ b, (x ∈ s ↔ y ∈ s)

(hb : TopologicalSpace.IsTopologicalBasis b)

Inseparable x y ↔ ∀ s ∈ b, x ∈ s ↔ y ∈ s


lemma mk_lt_aleph0_iff : #α < ℵ₀ ↔ Finite α

Cardinal.mk α < Cardinal.aleph0 ↔ Finite α


theorem Antiperiodic.mul [Add α] [Mul β] [HasDistribNeg β] (hf : Antiperiodic f c)
    (hg : Antiperiodic g c) : Periodic (f * g) c

{α : Type u_1}
{β : Type u_2}
{f g : α → β}
{c : α}
[Add α]
[Mul β]
[HasDistribNeg β]
(hf : Function.Antiperiodic f c)
(hg : Function.Antiperiodic g c)


protected theorem sub_one (n) : n - 1 = pred n


@[norm_cast, simp]
theorem coe_smul (t : S) (f : P →ᴬ[R] W) : ⇑(t • f) = t • ⇑f

{R : Type u_1}
{V : Type u_2}
{W : Type u_3}
{P : Type u_4}
[Ring R]
[AddCommGroup V]
[Module R V]
[TopologicalSpace P]
[AddTorsor V P]
[AddCommGroup W]
[Module R W]
{S : Type u_8}
[TopologicalSpace W]
[Monoid S]
[DistribMulAction S W]
[SMulCommClass R S W]
[ContinuousConstSMul S W]
(t : S)
(f : P →ᴬ[R] W)


@[reassoc (attr := simp)]
lemma cyclesIso_hom_comp_i : h.cyclesIso.hom ≫ h.i = S.iCycles

CategoryTheory.CategoryStruct.comp h.cyclesIso.hom h.i = S.iCycles


/-- `m ^ (period m a)` fixes `a`. -/
@[to_additive (attr := simp) "`(period m a) • m` fixes `a`."]
theorem pow_period_smul (m : M) (a : α) : m ^ (period m a) • a = a

{α : Type v}
{M : Type u}
[Monoid M]
[MulAction M α]
(m : M)
(a : α)


theorem uniformity_eq_uniformity_interior : 𝓤 α = (𝓤 α).lift' interior


@[simp]
theorem coe_id : ⇑(FrameHom.id α) = id


/-- If `f a = 1`, then the product of `f i` over `i ∈ insert a s` equals the product of `f i` over
`i ∈ s`. -/
@[to_additive
      "If `f a = 0`, then the sum of `f i` over `i ∈ insert a s` equals the sum of `f i`
      over `i ∈ s`."]
theorem finprod_mem_insert_one (h : f a = 1) : ∏ᶠ i ∈ insert a s, f i = ∏ᶠ i ∈ s, f i

{α : Type u_1}
{M : Type u_5}
[AddCommMonoid M]
{f : α → M}
{a : α}
{s : Set α}
(h : f a = 0)

∑ᶠ (i : α) (_ : i ∈ insert a s), f i = ∑ᶠ (i : α) (_ : i ∈ s), f i


theorem dom_of_le_natCast {x : PartENat} {y : ℕ} (h : x ≤ y) : x.Dom


theorem subsingleton_of_subsingleton_span_eq_top {s : Set P} (h₁ : s.Subsingleton)
    (h₂ : affineSpan k s = ⊤) : Subsingleton P

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


lemma monovary_iff_forall_smul_nonneg : Monovary f g ↔ ∀ i j, 0 ≤ (f j - f i) • (g j - g i)

{ι : Type u_1}
{α : Type u_2}
{β : Type u_3}
[LinearOrderedRing α]
[LinearOrderedAddCommGroup β]
[Module α β]
[OrderedSMul α β]
{f : ι → α}
{g : ι → β}

Monovary f g ↔ ∀ (i j : ι), 0 ≤ (f j - f i) • (g j - g i)


@[simp]
theorem Basis.toMatrix_map (b : Basis ι R M) (f : M ≃ₗ[R] N) (v : ι → N) :
    (b.map f).toMatrix v = b.toMatrix (f.symm ∘ v)

{ι : Type u_1}
{R : Type u_5}
{M : Type u_6}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
{N : Type u_9}
[AddCommMonoid N]
[Module R N]
(b : Basis ι R M)
(f : M ≃ₗ[R] N)
(v : ι → N)

(b.map f).toMatrix v = b.toMatrix (⇑f.symm ∘ v)


@[simp]
theorem set_set (a b : α) : ∀ (l : List α) (n : Nat), (l.set n a).set n b = l.set n b

{α : Type u_1}
(a b : α)
(l : List α)
(n : Nat)


theorem IsBigOWith.const_smul_left (h : IsBigOWith c l f' g) (c' : R) :
    IsBigOWith (‖c'‖ * c) l (fun x => c' • f' x) g

{α : Type u_1}
{F : Type u_4}
{E' : Type u_6}
{R : Type u_13}
[Norm F]
[SeminormedAddCommGroup E']
[SeminormedRing R]
{c : ℝ}
{g : α → F}
{f' : α → E'}
{l : Filter α}
[Module R E']
[BoundedSMul R E']
(h : Asymptotics.IsBigOWith c l f' g)
(c' : R)

Asymptotics.IsBigOWith (‖c'‖ * c) l (fun x => c' • f' x) g


@[simp]
theorem eqToHom_unop {X Y : Cᵒᵖ} (h : X = Y) :
    (eqToHom h).unop = eqToHom (congr_arg unop h.symm)

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

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


theorem rpow_pos_of_pos {x : ℝ} (hx : 0 < x) (y : ℝ) : 0 < x ^ y


/-- The forgetful functor from `LocallyRingedSpace` to `SheafedSpace CommRing`. -/
@[simps]
def forgetToSheafedSpace : LocallyRingedSpace.{u} ⥤ SheafedSpace CommRingCat.{u}

{X Y : AlgebraicGeometry.LocallyRingedSpace}

AlgebraicGeometry.LocallyRingedSpace.forgetToSheafedSpace.map f = f.val


@[measurability]
protected theorem real_toNNReal {f : α → ℝ} (hf : AEStronglyMeasurable f μ) :
    AEStronglyMeasurable (fun x => (f x).toNNReal) μ

(hf : MeasureTheory.AEStronglyMeasurable f μ)

MeasureTheory.AEStronglyMeasurable (fun x => (f x).toNNReal) μ


@[to_additive]
theorem prod_apply_ite_of_true {p : α → Prop} {hp : DecidablePred p} (f g : α → γ) (k : γ → β)
    (h : ∀ x ∈ s, p x) : (∏ x ∈ s, k (if p x then f x else g x)) = ∏ x ∈ s, k (f x)

{α : Type u_3}
{β : Type u_4}
{γ : Type u_5}
{s : Finset α}
[CommMonoid β]
{p : α → Prop}
{hp : DecidablePred p}
(f g : α → γ)
(k : γ → β)
(h : ∀ x ∈ s, p x)

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


theorem Subsingleton.eq_empty_or_singleton (hs : s.Subsingleton) : s = ∅ ∨ ∃ x, s = {x}

{α : Type u}
{s : Set α}
(hs : s.Subsingleton)


lemma Basis.closure_eq_right (h : M.Basis I (M.closure X)) : M.closure I = M.closure X

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


@[nolint unusedHavesSuffices] -- false positive from unfolding String.foldlAux
theorem foldlAux_of_valid (f : α → Char → α) : ∀ l m r a,
    foldlAux f ⟨l ++ m ++ r⟩ ⟨utf8Len l + utf8Len m⟩ ⟨utf8Len l⟩ a = m.foldl f a

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

String.foldlAux f { data := l ++ m ++ r } { byteIdx := String.utf8Len l + String.utf8Len m }
    { byteIdx := String.utf8Len l } a =
  List.foldl f a m


theorem aeval_C (r : R) : aeval f (C r) = algebraMap R S₁ r

{R : Type u}
{S₁ : Type v}
{σ : Type u_1}
[CommSemiring R]
[CommSemiring S₁]
[Algebra R S₁]
(f : σ → S₁)
(r : R)

(MvPolynomial.aeval f) (MvPolynomial.C r) = (algebraMap R S₁) r


@[simp]
theorem functorPullback_id (R : Sieve X) : R.functorPullback (𝟭 _) = R

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

CategoryTheory.Sieve.functorPullback (CategoryTheory.Functor.id C) R = R


@[measurability]
theorem add_measure {f : α → β} (hμ : AEMeasurable f μ) (hν : AEMeasurable f ν) :
    AEMeasurable f (μ + ν)

{α : Type u_2}
{β : Type u_3}
{m0 : MeasurableSpace α}
[MeasurableSpace β]
{μ ν : MeasureTheory.Measure α}
{f : α → β}
(hμ : AEMeasurable f μ)
(hν : AEMeasurable f ν)


protected theorem sub_lt_right_of_lt_add {n k m : Nat} (H : n ≤ k) (h : k < m + n) : k - n < m


theorem IsLittleO.prod_left (hf : f' =o[l] k') (hg : g' =o[l] k') :
    (fun x => (f' x, g' x)) =o[l] k'

{α : Type u_1}
{E' : Type u_6}
{F' : Type u_7}
{G' : Type u_8}
[SeminormedAddCommGroup E']
[SeminormedAddCommGroup F']
[SeminormedAddCommGroup G']
{f' : α → E'}
{g' : α → F'}
{k' : α → G'}
{l : Filter α}
(hf : f' =o[l] k')
(hg : g' =o[l] k')


theorem Antiperiodic.sub_eq' [AddCommGroup α] [Neg β] (h : Antiperiodic f c) :
    f (c - x) = -f (-x)

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{c x : α}
[AddCommGroup α]
[Neg β]
(h : Function.Antiperiodic f c)


/-- See `IsEmpty.forall_iff` for the `False` version. -/
@[simp] theorem forall_true_left (p : True → Prop) : (∀ x, p x) ↔ p True.intro


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


theorem derivedLength_eq_derivedLengthOfIdeal (I : LieIdeal R L) :
    derivedLength R I = derivedLengthOfIdeal R L I

(R : Type u)
(L : Type v)
[CommRing R]
[LieRing L]
[LieAlgebra R L]
(I : LieIdeal R L)

LieAlgebra.derivedLength R ↥↑I = LieAlgebra.derivedLengthOfIdeal R L I


@[simp, norm_cast]
theorem cast_to_int {α} [AddGroupWithOne α] (n : Num) : ((n : ℤ) : α) = n

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


theorem lt_of_mul_lt_of_one_le_of_nonneg_left [PosMulMono α] (h : a * b < c) (hle : 1 ≤ b)
    (ha : 0 ≤ a) : a < c

{α : Type u_1}
{a b c : α}
[MulOneClass α]
[Zero α]
[Preorder α]
[PosMulMono α]
(h : a * b < c)
(hle : 1 ≤ b)
(ha : 0 ≤ a)


@[simp]
nonrec theorem map_mul (f g : ContinuousMonoidHom A E) : map (f * g) = map f * map g

{A : Type u_1}
{E : Type u_5}
[Monoid A]
[CommGroup E]
[TopologicalSpace A]
[TopologicalSpace E]
[TopologicalGroup E]
(f g : ContinuousMonoidHom A E)

PontryaginDual.map (f * g) = PontryaginDual.map f * PontryaginDual.map g


theorem tr_push (k f q) : tr (Λ'.push k f q) = branch (fun s => (f s).isSome)
    ((push k fun s => (f s).iget) <| goto fun _ => q) (goto fun _ => q)

(f : Option Turing.PartrecToTM2.Γ' → Option Turing.PartrecToTM2.Γ')

Turing.PartrecToTM2.tr (Turing.PartrecToTM2.Λ'.push k f q) =
  Turing.TM2.Stmt.branch (fun s => (f s).isSome)
    (Turing.TM2.Stmt.push k (fun s => (f s).iget) (Turing.TM2.Stmt.goto fun x => q)) (Turing.TM2.Stmt.goto fun x => q)


/-- The short complex `A --dZero--> Fun(G, A) --dOne--> Fun(G × G, A)` is isomorphic to the 1st
short complex associated to the complex of inhomogeneous cochains of `A`. -/
@[simps! hom inv]
def shortComplexH1Iso : (inhomogeneousCochains A).sc' 0 1 2 ≅ shortComplexH1 A

{k G : Type u}
[CommRing k]
[Group G]
(A : Rep k G)

(groupCohomology.shortComplexH1Iso A).inv =
  CategoryTheory.ShortComplex.homMk ↑(groupCohomology.zeroCochainsLequiv A).symm
    ↑(groupCohomology.oneCochainsLequiv A).symm ↑(groupCohomology.twoCochainsLequiv A).symm ⋯ ⋯


/-- Construct an object of the category `(Δ ↓ F)` from a cone on `F`. This is part of an
    equivalence, see `Cone.equivCostructuredArrow`. -/
@[simps]
def Cone.toCostructuredArrow (F : J ⥤ C) : Cone F ⥤ CostructuredArrow (const J) F

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
(F : CategoryTheory.Functor J C)
(c : CategoryTheory.Limits.Cone F)

(CategoryTheory.Limits.Cone.toCostructuredArrow F).obj c = CategoryTheory.CostructuredArrow.mk c.π


theorem not_subset : ¬s ⊆ t ↔ ∃ x ∈ s, x ∉ t


theorem lcm_eq_zero_iff [Nontrivial α] : s.lcm f = 0 ↔ 0 ∈ f '' s

{α : Type u_2}
{β : Type u_3}
[CancelCommMonoidWithZero α]
[NormalizedGCDMonoid α]
{s : Finset β}
{f : β → α}
[Nontrivial α]


/-- Composition by an injective function on the left is itself injective. -/
theorem Injective.comp_left {g : β → γ} (hg : Function.Injective g) :
    Function.Injective (g ∘ · : (α → β) → α → γ)

{α : Sort u_1}
{β : Sort u_2}
{γ : Sort u_3}
{g : β → γ}
(hg : Function.Injective g)


theorem norm_map_iff_adjoint_comp_self (u : H →L[𝕜] K) :
    (∀ x : H, ‖u x‖ = ‖x‖) ↔ adjoint u ∘L u = 1

{𝕜 : Type u_1}
[RCLike 𝕜]
{H : Type u_5}
[NormedAddCommGroup H]
[InnerProductSpace 𝕜 H]
[CompleteSpace H]
{K : Type u_6}
[NormedAddCommGroup K]
[InnerProductSpace 𝕜 K]
[CompleteSpace K]
(u : H →L[𝕜] K)

(∀ (x : H), ‖u x‖ = ‖x‖) ↔ (ContinuousLinearMap.adjoint u).comp u = 1


@[simp, nolint simpNF]
theorem ulift_apply (i : ULift.{u} I) (x : X) : H.uliftMap (i, x) = H (i.down, x)

{X Y : TopCat}
{f g : C(↑X, ↑Y)}
(H : f.Homotopy g)
(i : ULift.{u, 0} ↑I)
(x : ↑X)


@[to_additive]
theorem preimage_div_preimage_subset {s t : Set β} : m ⁻¹' s / m ⁻¹' t ⊆ m ⁻¹' (s / t)

{F : Type u_1}
{α : Type u_2}
{β : Type u_3}
[Group α]
[DivisionMonoid β]
[FunLike F α β]
[MonoidHomClass F α β]
(m : F)
{s t : Set β}


theorem Decidable.iff_iff_and_or_not_and_not {a b : Prop} [Decidable b] :
    (a ↔ b) ↔ (a ∧ b) ∨ (¬a ∧ ¬b)


@[simp]
theorem toDual_symm_apply (a : WithTop αᵒᵈ) : WithBot.toDual.symm a = WithTop.ofDual a


/-- Typeclass for separably closed fields.

To show `Polynomial.Splits p f` for an arbitrary ring homomorphism `f`,
see `IsSepClosed.splits_codomain` and `IsSepClosed.splits_domain`.
-/
class IsSepClosed : Prop where
  splits_of_separable : ∀ p : k[X], p.Separable → (p.Splits <| RingHom.id k)

{k : Type u}
[Field k]
[self : IsSepClosed k]
(p : k[X])

p.Separable → Polynomial.Splits (RingHom.id k) p


theorem toOrderMonoidHom_injective : Injective (toOrderMonoidHom : _ → α →*o β)

{α : Type u_2}
{β : Type u_3}
[Preorder α]
[Preorder β]
[MulZeroOneClass α]
[MulZeroOneClass β]


@[to_additive]
theorem Nonempty.mul : s.Nonempty → t.Nonempty → (s * t).Nonempty

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

s.Nonempty → t.Nonempty → (s + t).Nonempty


/-- A noetherian object is an object
which does not have infinite increasing sequences of subobjects.

See https://stacks.math.columbia.edu/tag/0FCG
-/
class NoetherianObject (X : C) : Prop where
  subobject_gt_wellFounded' : WellFounded ((· > ·) : Subobject X → Subobject X → Prop)

[self : CategoryTheory.NoetherianObject X]


theorem tensorObj_comul (K L : CoalgebraCat R) :
    Coalgebra.comul (R := R) (A := (K ⊗ L : CoalgebraCat R))
      = (TensorProduct.tensorTensorTensorComm R K K L L).toLinearMap
      ∘ₗ TensorProduct.map Coalgebra.comul Coalgebra.comul

{R : Type u}
[CommRing R]
(K L : CoalgebraCat R)

Coalgebra.comul =
  ↑(TensorProduct.tensorTensorTensorComm R ↑K.toModuleCat ↑K.toModuleCat ↑L.toModuleCat ↑L.toModuleCat) ∘ₗ
    TensorProduct.map Coalgebra.comul Coalgebra.comul


/-- Augment a cosimplicial object with an object. -/
@[simps]
def augment (X : CosimplicialObject C) (X₀ : C) (f : X₀ ⟶ X.obj [0])
    (w : ∀ (i : SimplexCategory) (g₁ g₂ : ([0] : SimplexCategory) ⟶ i),
      f ≫ X.map g₁ = f ≫ X.map g₂) : CosimplicialObject.Augmented C

(X : CategoryTheory.CosimplicialObject C)

(w : ∀ (i : SimplexCategory) (g₁ g₂ : SimplexCategory.mk 0 ⟶ i), f ≫ X.map g₁ = f ≫ X.map g₂)

(X.augment X₀ f w).hom.app i = f ≫ X.map ((SimplexCategory.mk 0).const i 0)


@[simp] lemma exterior_univ : exterior (univ : Set α) = univ


@[ext]
lemma ext (z₁ z₂ : Cochain F G n)
    (h : ∀ (p q hpq), z₁.v p q hpq = z₂.v p q hpq) : z₁ = z₂

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

(h : ∀ (p q : ℤ) (hpq : p + n = q), z₁.v p q hpq = z₂.v p q hpq)


/--
`SatisfiesM` distributes over `<*>`, weakest precondition version 1.
(Use this when `x` and the goal are known and `f` is a subgoal.)
-/
protected theorem seq_pre [Applicative m] [LawfulApplicative m] {x : m α}
    (hf : SatisfiesM (fun f => ∀ {a}, p₂ a → q (f a)) f) (hx : SatisfiesM p₂ x) :
    SatisfiesM q (f <*> x)

{m : Type u_1 → Type u_2}
{α : Type u_1}
{p₂ : α → Prop}

∀ {α_1 : Type u_1} {q : α_1 → Prop} {f : m (α → α_1)} [inst : Applicative m] [inst_1 : LawfulApplicative m] {x : m α},
  SatisfiesM (fun f => ∀ {a : α}, p₂ a → q (f a)) f → SatisfiesM p₂ x → SatisfiesM q (Seq.seq f fun x_1 => x)


/-- The canonical isomorphism `S.cycles ≅ S.homology` when `S.f = 0`. -/
@[simps! hom]
noncomputable def asIsoHomologyπ (hf : S.f = 0) [S.HasHomology] :
    S.cycles ≅ S.homology


@[aesop safe destruct] theorem not_prime_one : ¬Prime 1


/-- The definitional equality between `![]`-ary heterogeneous functions into `τ` and `τ`. -/
@[simps!]
def fromTypes_nil_equiv (τ : Type u) : FromTypes ![] τ ≃ τ

(τ : Type u)
(a : Function.FromTypes ![] τ)


/-- The inverse of a bijective `MulSemiringActionHom` is a `MulSemiringActionHom`. -/
@[simps]
def inverse' (f : R →ₑ+*[φ] S) (g : S → R) (k : Function.RightInverse φ' φ)
    (h₁ : Function.LeftInverse g f) (h₂ : Function.RightInverse g f) :
    S →ₑ+*[φ'] R

{M : Type u_1}
[Monoid M]
{N : Type u_2}
[Monoid N]
{φ : M →* N}
{φ' : N →* M}
{R : Type u_10}
[Semiring R]
[MulSemiringAction M R]
{S : Type u_12}
[Semiring S]
[MulSemiringAction N S]
(f : R →ₑ+*[φ] S)
(g : S → R)
(k : Function.RightInverse ⇑φ' ⇑φ)
(h₁ : Function.LeftInverse g ⇑f)
(h₂ : Function.RightInverse g ⇑f)

∀ (a : S), (f.inverse' g k h₁ h₂) a = g a


@[simp]
lemma zero_smulRight (x : M) : (0 : M₁ →ₗ[R] S).smulRight x = 0

{R : Type u_1}
{S : Type u_4}
{M : Type u_5}
{M₁ : Type u_6}
[Semiring R]
[AddCommMonoid M]
[AddCommMonoid M₁]
[Module R M]
[Module R M₁]
[Semiring S]
[Module R S]
[Module S M]
[IsScalarTower R S M]
(x : M)


lemma span_singleton_mul {x : A} {p : Submodule R A} :
    Submodule.span R {x} * p = x • p

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


@[to_additive]
theorem IsCompact.inv (hs : IsCompact s) : IsCompact s⁻¹

{G : Type w}
[TopologicalSpace G]
[InvolutiveNeg G]
[ContinuousNeg G]
{s : Set G}
(hs : IsCompact s)


theorem rank_fun_eq_lift_mul : Module.rank R (η → M) =
    (Fintype.card η : Cardinal.{max u₁' v}) * Cardinal.lift.{u₁'} (Module.rank R M)

{R : Type u}
{M : Type v}
{η : Type u₁'}
[Ring R]
[AddCommGroup M]
[Module R M]
[StrongRankCondition R]
[Module.Free R M]
[Fintype η]

Module.rank R (η → M) = ↑(Fintype.card η) * Cardinal.lift.{u₁', v} (Module.rank R M)


theorem isClosed_topologicalClosure (s : StarSubalgebra R A) :
    IsClosed (s.topologicalClosure : Set A)

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[StarRing R]
[TopologicalSpace A]
[Semiring A]
[Algebra R A]
[StarRing A]
[StarModule R A]
[TopologicalSemiring A]
[ContinuousStar A]
(s : StarSubalgebra R A)


@[reassoc]
theorem sum_comp {P Q R : C} {J : Type*} (s : Finset J) (f : J → (P ⟶ Q)) (g : Q ⟶ R) :
    (∑ j ∈ s, f j) ≫ g = ∑ j ∈ s, f j ≫ g

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


protected theorem comp {g : β → γ} {f : α → β} (hg : QuasiMeasurePreserving g μb μc)
    (hf : QuasiMeasurePreserving f μa μb) : QuasiMeasurePreserving (g ∘ f) μa μc

(hg : MeasureTheory.Measure.QuasiMeasurePreserving g μb μc)

(hf : MeasureTheory.Measure.QuasiMeasurePreserving f μa μb)

MeasureTheory.Measure.QuasiMeasurePreserving (g ∘ f) μa μc


theorem isSubordinate_toSubordinate (π : Prepartition I) (r : (ι → ℝ) → Ioi (0 : ℝ)) :
    (π.toSubordinate r).IsSubordinate r

{ι : Type u_1}
[Fintype ι]
{I : BoxIntegral.Box ι}
(π : BoxIntegral.Prepartition I)
(r : (ι → ℝ) → ↑(Set.Ioi 0))


theorem eq_iff_atom_le_iff {a b : α} : a = b ↔ ∀ c, IsAtom c → (c ≤ a ↔ c ≤ b)

{α : Type u_2}
[CompleteLattice α]
[IsAtomistic α]
{a b : α}

a = b ↔ ∀ (c : α), IsAtom c → (c ≤ a ↔ c ≤ b)


@[fun_prop]
nonrec theorem HasFDerivWithinAt.neg (h : HasFDerivWithinAt f f' s x) :
    HasFDerivWithinAt (fun x => -f x) (-f') 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}
{f' : E →L[𝕜] F}
{x : E}
{s : Set E}
(h : HasFDerivWithinAt f f' s x)


@[simp]
theorem roots_one : (1 : R[X]).roots = ∅


@[to_additive (attr := simp)]
theorem coe_inf (p p' : Subgroup G) : ((p ⊓ p' : Subgroup G) : Set G) = (p : Set G) ∩ p'

{G : Type u_1}
[Group G]
(p p' : Subgroup G)


@[to_additive (attr := simp)]
theorem toFinset_smul (s : Set α) (t : Set β) [Fintype s] [Fintype t] [Fintype ↑(s • t)] :
    (s • t).toFinset = s.toFinset • t.toFinset

{α : Type u_2}
{β : Type u_3}
[VAdd α β]
[DecidableEq β]
(s : Set α)
(t : Set β)
[Fintype ↑s]
[Fintype ↑t]
[Fintype ↑(s +ᵥ t)]

(s +ᵥ t).toFinset = s.toFinset +ᵥ t.toFinset


@[simp]
theorem mk_isRelPrime_iff {a b : α} :
    IsRelPrime (Associates.mk a) (Associates.mk b) ↔ IsRelPrime a b


theorem StableUnderCobaseChange.inr {P : MorphismProperty C} (hP : StableUnderCobaseChange P)
    {A B A' : C} (f : A ⟶ A') (g : A ⟶ B) [HasPushout f g] (H : P f) : P (pushout.inr f g)

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{P : CategoryTheory.MorphismProperty C}
(hP : P.StableUnderCobaseChange)
{A B A' : C}
(f : A ⟶ A')
(g : A ⟶ B)
[CategoryTheory.Limits.HasPushout f g]
(H : P f)

P (CategoryTheory.Limits.pushout.inr f g)


lemma term_congr {f g : ℕ → ℂ} (h : ∀ {n}, n ≠ 0 → f n = g n) (s : ℂ) (n : ℕ) :
    term f s n = term g s n

{f g : ℕ → ℂ}
(h : ∀ {n : ℕ}, n ≠ 0 → f n = g n)
(s : ℂ)
(n : ℕ)


lemma image_val_preimage_val_subset_self : ↑(A ↓∩ B) ⊆ B


/--
The discrete condensed object associated to an object of `C` is the constant sheaf at that object.
-/
@[simps!]
noncomputable def Condensed.discrete : C ⥤ Condensed.{u} C

[CategoryTheory.HasWeakSheafify (CategoryTheory.coherentTopology CompHaus) C]

∀ {X Y : C} (f : X ⟶ Y),
  (Condensed.discrete C).map f =
    (CategoryTheory.presheafToSheaf (CategoryTheory.coherentTopology CompHaus) C).map
      ((CategoryTheory.Functor.const CompHausᵒᵖ).map f)


@[to_additive (attr := simp)]
theorem toProd_comp_inr : (toProd : M ∗ N →* M × N).comp inr = .inr _ _

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

AddMonoid.Coprod.toSum.comp AddMonoid.Coprod.inr = AddMonoidHom.inr M N


@[simp, norm_cast]
theorem coe_insert (x y : ZFSet.{u}) : ↑(insert x y) = @insert ZFSet.{u} Class.{u} _ x y


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


@[to_additive]
lemma iIndepFun.indepFun_div_div (hf_indep : iIndepFun (fun _ ↦ m) f κ μ)
    (hf_meas : ∀ i, Measurable (f i))
    (i j k l : ι) (hik : i ≠ k) (hil : i ≠ l) (hjk : j ≠ k) (hjl : j ≠ l) :
    IndepFun (f i / f j) (f k / f l) κ μ

{f : ι → Ω → β}

(hf_indep : ProbabilityTheory.Kernel.iIndepFun (fun x => m) f κ μ)

ProbabilityTheory.Kernel.IndepFun (f i / f j) (f k / f l) κ μ


@[to_additive]
theorem le_pi_iff {I : Set η} {H : ∀ i, Subgroup (f i)} {J : Subgroup (∀ i, f i)} :
    J ≤ pi I H ↔ ∀ i : η, i ∈ I → map (Pi.evalMonoidHom f i) J ≤ H i

{η : Type u_7}
{f : η → Type u_8}
[(i : η) → AddGroup (f i)]
{I : Set η}
{H : (i : η) → AddSubgroup (f i)}
{J : AddSubgroup ((i : η) → f i)}

J ≤ AddSubgroup.pi I H ↔ ∀ i ∈ I, AddSubgroup.map (Pi.evalAddMonoidHom f i) J ≤ H i


/-- Middle component of the associator as a natural isomorphism. -/
@[simps!]
def associatorNatIsoMiddle (f : a ⟶ b) (h : c ⟶ d) :
    (precomposing ..).obj f ⋙ (postcomposing ..).obj h ≅
      (postcomposing ..).obj h ⋙ (precomposing ..).obj f

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

(CategoryTheory.Bicategory.associatorNatIsoMiddle f h).inv.app X = (CategoryTheory.Bicategory.associator f X h).inv


theorem pow_eq_top (n : ℕ) (h : a ^ n = ∞) : a = ∞


theorem descFactorial_eq_factorial_mul_choose (n k : ℕ) : n.descFactorial k = k ! * n.choose k


/-- An element a divides the sum a + b if and only if a divides b. -/
@[simp]
theorem dvd_add_self_left {a b : α} : a ∣ a + b ↔ a ∣ b


@[simp] lemma compl_ssubset_compl : sᶜ ⊂ tᶜ ↔ t ⊂ s

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

sᶜ ⊂ tᶜ ↔ t ⊂ s


@[simp]
theorem sum_apply {ι₁ : Type u₁} [DecidableEq ι₁] {β₁ : ι₁ → Type v₁} [∀ i₁, Zero (β₁ i₁)]
    [∀ (i) (x : β₁ i), Decidable (x ≠ 0)] [∀ i, AddCommMonoid (β i)] {f : Π₀ i₁, β₁ i₁}
    {g : ∀ i₁, β₁ i₁ → Π₀ i, β i} {i₂ : ι} : (f.sum g) i₂ = f.sum fun i₁ b => g i₁ b i₂

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

{g : (i₁ : ι₁) → β₁ i₁ → Π₀ (i : ι), β i}

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


theorem mk_eq_mk_of_basis' {ι' : Type w} (v : Basis ι R M) (v' : Basis ι' R M) : #ι = #ι'

{R : Type u}
{M : Type v}
[Ring R]
[AddCommGroup M]
[Module R M]
{ι : Type w}
[InvariantBasisNumber R]
{ι' : Type w}
(v : Basis ι R M)
(v' : Basis ι' R M)


@[simp]
theorem mem_subalgebraOfSubsemiring {x : R} {S : Subsemiring R} :
    x ∈ subalgebraOfSubsemiring S ↔ x ∈ S

{R : Type u_1}
[Semiring R]
{x : R}
{S : Subsemiring R}


theorem isOpenMap_iff_interior : IsOpenMap f ↔ ∀ s, f '' interior s ⊆ interior (f '' s)

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

IsOpenMap f ↔ ∀ (s : Set X), f '' interior s ⊆ interior (f '' s)


theorem fderivWithin_iteratedFDerivWithin {s : Set E} {n : ℕ} :
    fderivWithin 𝕜 (iteratedFDerivWithin 𝕜 n f s) s =
      (continuousMultilinearCurryLeftEquiv 𝕜 (fun _ : Fin (n + 1) => E) F).symm ∘
        iteratedFDerivWithin 𝕜 (n + 1) f s

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

fderivWithin 𝕜 (iteratedFDerivWithin 𝕜 n f s) s =
  ⇑(continuousMultilinearCurryLeftEquiv 𝕜 (fun x => E) F).symm ∘ iteratedFDerivWithin 𝕜 (n + 1) f s


@[simp]
theorem mem_mk {hx : x.1 ≤ x.2} : a ∈ mk x hx ↔ x.1 ≤ a ∧ a ≤ x.2

{α : Type u_1}
[Preorder α]
{x : α × α}
{a : α}
{hx : x.1 ≤ x.2}

a ∈ { toProd := x, fst_le_snd := hx } ↔ x.1 ≤ a ∧ a ≤ x.2


/-- A continuous surjective open map is a quotient map. -/
theorem to_quotientMap (open_map : IsOpenMap f) (cont : Continuous f) (surj : Surjective f) :
    QuotientMap f

{X : Type u_1}
{Y : Type u_2}
{f : X → Y}
[TopologicalSpace X]
[TopologicalSpace Y]
(open_map : IsOpenMap f)
(cont : Continuous f)
(surj : Function.Surjective f)


theorem Pi.continuous_precomp' {ι' : Type*} (φ : ι' → ι) :
    Continuous (fun (f : (∀ i, π i)) (j : ι') ↦ f (φ j))

{ι : Type u_5}
{π : ι → Type u_6}
[T : (i : ι) → TopologicalSpace (π i)]
{ι' : Type u_8}
(φ : ι' → ι)


protected theorem coe_eq_one {x : S} : (x : A) = 1 ↔ x = 1

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


/-- Images of ample sets under continuous affine equivalences are ample. -/
theorem image {s : Set E} (h : AmpleSet s) (L : E ≃ᵃL[ℝ] F) :
    AmpleSet (L '' s)

{F : Type u_1}
[AddCommGroup F]
[Module ℝ F]
[TopologicalSpace F]
{E : Type u_2}
[AddCommGroup E]
[Module ℝ E]
[TopologicalSpace E]
{s : Set E}
(h : AmpleSet s)
(L : E ≃ᵃL[ℝ] F)


theorem isInt_lt_true [OrderedRing α] [Nontrivial α] : {a b : α} → {a' b' : ℤ} →
    IsInt a a' → IsInt b b' → decide (a' < b') → a < b

{α : Type u_1}
[OrderedRing α]
[Nontrivial α]
{a b : α}
{a' b' : ℤ}

Mathlib.Meta.NormNum.IsInt a a' → Mathlib.Meta.NormNum.IsInt b b' → decide (a' < b') = true → a < b


theorem mul_le {M N P : AddSubmonoid R} : M * N ≤ P ↔ ∀ m ∈ M, ∀ n ∈ N, m * n ∈ P

{R : Type u_4}
[NonUnitalNonAssocSemiring R]
{M N P : AddSubmonoid R}


theorem four_pow_le_two_mul_add_one_mul_central_binom (n : ℕ) :
    4 ^ n ≤ (2 * n + 1) * choose (2 * n) n


@[simp]
theorem supportedEquivMvPolynomial_symm_X (s : Set σ) (i : s) :
    (↑((supportedEquivMvPolynomial s).symm (X i : MvPolynomial s R)) : MvPolynomial σ R) = X ↑i

{σ : Type u_1}
{R : Type u}
[CommSemiring R]
(s : Set σ)
(i : ↑s)

↑((MvPolynomial.supportedEquivMvPolynomial s).symm (MvPolynomial.X i)) = MvPolynomial.X ↑i


lemma _root_.Commute.sum_right [NonUnitalNonAssocSemiring α] (s : Finset ι) (f : ι → α) (b : α)
    (h : ∀ i ∈ s, Commute b (f i)) : Commute b (∑ i ∈ s, f i)

{ι : Type u_1}
{α : Type u_2}
[NonUnitalNonAssocSemiring α]
(s : Finset ι)
(f : ι → α)
(b : α)
(h : ∀ i ∈ s, Commute b (f i))


@[norm_cast]
theorem coe_multiset_prod (s : Multiset ℝ≥0) : ((s.prod : ℝ≥0) : ℝ) = (s.map (↑)).prod

↑s.prod = (Multiset.map NNReal.toReal s).prod


@[continuity, fun_prop]
theorem continuous_cosh : Continuous cosh


theorem eval₂_mul_eq_zero_of_right (p : R[X]) (hq : q.eval₂ f x = 0) : (p * q).eval₂ f x = 0

{R : Type u}
{S : Type v}
[Semiring R]
{q : R[X]}
[CommSemiring S]
(f : R →+* S)
(x : S)
(p : R[X])
(hq : Polynomial.eval₂ f x q = 0)


@[simp]
lemma toNNReal_le_natCast {r : ℝ} {n : ℕ} : r.toNNReal ≤ n ↔ r ≤ n


@[simp]
theorem _root_.aemeasurable_iUnion_iff [Countable ι] {s : ι → Set α} :
    AEMeasurable f (μ.restrict (⋃ i, s i)) ↔ ∀ i, AEMeasurable f (μ.restrict (s i))

{ι : Type u_1}
{α : Type u_2}
{β : Type u_3}
{m0 : MeasurableSpace α}
[MeasurableSpace β]
{f : α → β}
{μ : MeasureTheory.Measure α}
[Countable ι]
{s : ι → Set α}

AEMeasurable f (μ.restrict (⋃ i, s i)) ↔ ∀ (i : ι), AEMeasurable f (μ.restrict (s i))


/-- Converse to the mean value inequality: if `f` is `C`-lipschitz
on a neighborhood of `x₀` then its derivative at `x₀` has norm bounded by `C`.
Version using `deriv`. -/
theorem norm_deriv_le_of_lipschitzOn {f : 𝕜 → F} {x₀ : 𝕜} {s : Set 𝕜} (hs : s ∈ 𝓝 x₀)
    {C : ℝ≥0} (hlip : LipschitzOnWith C f s) : ‖deriv f x₀‖ ≤ C

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : 𝕜 → F}
{x₀ : 𝕜}
{s : Set 𝕜}
(hs : s ∈ 𝓝 x₀)
{C : ℝ≥0}
(hlip : LipschitzOnWith C f s)


@[to_additive (attr := simp)]
protected theorem map_one {β} (f : α → β) : (1 : WithTop α).map f = (f 1 : WithTop β)

{α : Type u}
[Zero α]
{β : Type u_1}
(f : α → β)


theorem kernel_not_iso_of_nonzero (w : f ≠ 0) : IsIso (kernel.ι f) → False

CategoryTheory.IsIso (CategoryTheory.Limits.kernel.ι f) → False


theorem coe_center : ↑(center R) = Set.center R


/-- If `S ∈ 𝔖`, then the restriction to `S` is a uniformly continuous map from `α →ᵤ[𝔖] β` to
`↥S →ᵤ β`. -/
protected theorem uniformContinuous_restrict (h : s ∈ 𝔖) :
    UniformContinuous (UniformFun.ofFun ∘ (s.restrict : (α → β) → s → β) ∘ toFun 𝔖)

(α : Type u_1)
(β : Type u_2)
{s : Set α}
[UniformSpace β]
(𝔖 : Set (Set α))
(h : s ∈ 𝔖)

UniformContinuous (⇑UniformFun.ofFun ∘ s.restrict ∘ ⇑(UniformOnFun.toFun 𝔖))


@[simp]
theorem denom_zero : denom (0 : RatFunc K) = 1


/-- Given a monoid homomorphism `f`, the induced homomorphism on the quotient by `f`'s kernel has
    the same image as `f`. -/
@[to_additive (attr := simp) "Given an `AddMonoid` homomorphism `f`, the induced homomorphism
on the quotient by `f`'s kernel has the same image as `f`."]
theorem kerLift_range_eq : MonoidHom.mrange (kerLift f) = MonoidHom.mrange f

{M : Type u_1}
{P : Type u_3}
[AddZeroClass M]
[AddZeroClass P]
{f : M →+ P}

AddMonoidHom.mrange (AddCon.kerLift f) = AddMonoidHom.mrange f


theorem liminf_min [ConditionallyCompleteLinearOrder β] {f : Filter α} {u v : α → β}
    (h₁ : f.IsCoboundedUnder (· ≥ ·) u := by isBoundedDefault)
    (h₂ : f.IsCoboundedUnder (· ≥ ·) v := by isBoundedDefault)
    (h₃ : f.IsBoundedUnder (· ≥ ·) u := by isBoundedDefault)
    (h₄ : f.IsBoundedUnder (· ≥ ·) v := by isBoundedDefault) :
    liminf (fun a ↦ min (u a) (v a)) f = min (liminf u f) (liminf v f)

(h₁ : Filter.IsCoboundedUnder (fun x x_1 => x ≥ x_1) f u := by isBoundedDefault)

(h₂ : Filter.IsCoboundedUnder (fun x x_1 => x ≥ x_1) f v := by isBoundedDefault)

(h₃ : Filter.IsBoundedUnder (fun x x_1 => x ≥ x_1) f u := by isBoundedDefault)

(h₄ : Filter.IsBoundedUnder (fun x x_1 => x ≥ x_1) f v := by isBoundedDefault)

Filter.liminf (fun a => min (u a) (v a)) f = min (Filter.liminf u f) (Filter.liminf v f)


/-- A pointed Galois object is a Galois object with a fixed point of its fiber. -/
structure PointedGaloisObject : Type (max u₁ u₂) where
  /-- The underlying object of `C`. -/
  obj : C
  /-- An element of the fiber of `obj`. -/
  pt : F.obj obj
  /-- `obj` is Galois. -/
  isGalois : IsGalois obj := by infer_instance

{F : CategoryTheory.Functor C FintypeCat}

(self : CategoryTheory.PreGaloisCategory.PointedGaloisObject F)


@[to_additive (attr := simp)]
theorem pure_seq {f : α → β} {x : FreeSemigroup α} : pure f <*> x = f <$> x

{α β : Type u}
{f : α → β}
{x : FreeAddSemigroup α}

(Seq.seq (pure f) fun x_1 => x) = f <$> x


theorem oadd_lt_oadd_1 {e₁ n₁ o₁ e₂ n₂ o₂} (h₁ : NF (oadd e₁ n₁ o₁)) (h : e₁ < e₂) :
    oadd e₁ n₁ o₁ < oadd e₂ n₂ o₂

{e₁ : ONote}
{n₁ : ℕ+}
{o₁ e₂ : ONote}
{n₂ : ℕ+}
{o₂ : ONote}
(h₁ : (e₁.oadd n₁ o₁).NF)
(h : e₁ < e₂)


theorem le_ciInf_iff [Nonempty ι] {f : ι → α} {a : α} (hf : BddBelow (range f)) :
    a ≤ iInf f ↔ ∀ i, a ≤ f i

{α : Type u_1}
{ι : Sort u_4}
[ConditionallyCompleteLattice α]
[Nonempty ι]
{f : ι → α}
{a : α}
(hf : BddBelow (Set.range f))


/-- Auxiliary definition for the `MonoidalCategory` instance on `Center C`. -/
@[simps]
def tensorObj (X Y : Center C) : Center C

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

(X.tensorObj Y).snd.β U =
  α_ X.fst Y.fst U ≪≫
    CategoryTheory.MonoidalCategory.whiskerLeftIso X.fst (Y.snd.β U) ≪≫
      (α_ X.fst U Y.fst).symm ≪≫ CategoryTheory.MonoidalCategory.whiskerRightIso (X.snd.β U) Y.fst ≪≫ α_ U X.fst Y.fst


@[simp]
theorem head_cons (a : α) (s : Stream' α) : head (a::s) = a


@[simp]
theorem coe_top : ⇑(⊤ : InfTopHom α β) = ⊤

{α : Type u_3}
{β : Type u_4}
[Inf α]
[Top α]
[SemilatticeInf β]
[OrderTop β]


@[simp, norm_cast] lemma ofENat_one : ofENat 1 = 1


/-- If `p` is an odd prime and `IsCyclotomicExtension {p} K L`, then
`discr K (hζ.powerBasis K).basis = (-1) ^ ((p - 1) / 2) * p ^ (p - 2)` if
`Irreducible (cyclotomic p K)`. -/
theorem discr_odd_prime [IsCyclotomicExtension {p} K L] [hp : Fact (p : ℕ).Prime]
    (hζ : IsPrimitiveRoot ζ p) (hirr : Irreducible (cyclotomic p K)) (hodd : p ≠ 2) :
    discr K (hζ.powerBasis K).basis = (-1) ^ (((p : ℕ) - 1) / 2) * p ^ ((p : ℕ) - 2)

(hirr : Irreducible (Polynomial.cyclotomic (↑p) K))

Algebra.discr K ⇑(IsPrimitiveRoot.powerBasis K hζ).basis = (-1) ^ ((↑p - 1) / 2) * ↑↑p ^ (↑p - 2)


theorem measure_union₀' (hs : NullMeasurableSet s μ) (hd : AEDisjoint μ s t) :
    μ (s ∪ t) = μ s + μ t

(hs : MeasureTheory.NullMeasurableSet s μ)


theorem groupSMul_apply {G : Type*} [Group G] [DistribMulAction G R] [DistribMulAction G M]
    [IsScalarTower G R M] [SMulCommClass G R M] {v : Basis ι R M} {w : ι → G} (i : ι) :
    v.groupSMul w i = (w • (v : ι → M)) i

{ι : Type u_1}
{R : Type u_3}
{M : Type u_6}
[Ring R]
[AddCommGroup M]
[Module R M]
{G : Type u_10}
[Group G]
[DistribMulAction G R]
[DistribMulAction G M]
[IsScalarTower G R M]
[SMulCommClass G R M]
{v : Basis ι R M}
{w : ι → G}
(i : ι)


protected theorem Subsingleton.strictMonoOn (h : s.Subsingleton) : StrictMonoOn f s

{α : Type u}
{β : Type v}
{s : Set α}
[Preorder α]
[Preorder β]
(f : α → β)
(h : s.Subsingleton)


lemma _root_.MeasurableEmbedding.map_withDensity_rnDeriv (hf : MeasurableEmbedding f)
    (μ ν : Measure α) [SigmaFinite μ] [SigmaFinite ν] :
    (ν.withDensity (μ.rnDeriv ν)).map f = (ν.map f).withDensity ((μ.map f).rnDeriv (ν.map f))

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{mβ : MeasurableSpace β}
{f : α → β}
(hf : MeasurableEmbedding f)
(μ ν : MeasureTheory.Measure α)
[MeasureTheory.SigmaFinite μ]
[MeasureTheory.SigmaFinite ν]

MeasureTheory.Measure.map f (ν.withDensity (μ.rnDeriv ν)) =
  (MeasureTheory.Measure.map f ν).withDensity ((MeasureTheory.Measure.map f μ).rnDeriv (MeasureTheory.Measure.map f ν))


@[simp]
theorem inclusion_mk {h : s ⊆ t} (a : α) (ha : a ∈ s) : inclusion h ⟨a, ha⟩ = ⟨a, h ha⟩

{α : Type u_1}
{s t : Set α}
{h : s ⊆ t}
(a : α)
(ha : a ∈ s)


@[simp]
theorem antidiagonalTuple_zero_zero : antidiagonalTuple 0 0 = {![]}

Finset.Nat.antidiagonalTuple 0 0 = {![]}


lemma toAffineLift_of_Z_ne_zero {P : Fin 3 → F} {hP : W.NonsingularLift ⟦P⟧} (hPz : P z ≠ 0) :
    toAffineLift ⟨hP⟩ = .some ((nonsingular_of_Z_ne_zero hPz).mp hP)

{F : Type v}
[Field F]
{W : WeierstrassCurve.Jacobian F}
{P : Fin 3 → F}
{hP : W.NonsingularLift ⟦P⟧}
(hPz : P z ≠ 0)

(WeierstrassCurve.Jacobian.Point.mk hP).toAffineLift = WeierstrassCurve.Affine.Point.some ⋯


@[to_additive]
protected lemma inv_mul_eq_one (h : IsUnit a) : a⁻¹ * b = 1 ↔ a = b

{α : Type u}
[SubtractionMonoid α]
{a b : α}
(h : IsAddUnit a)


@[simp] theorem isGreatest_univ_iff : IsGreatest univ a ↔ IsTop a


@[simp]
theorem norm_eq_norm (x : K) :
    mixedEmbedding.norm (mixedEmbedding K x) = |Algebra.norm ℚ x|

{K : Type u_1}
[Field K]
[NumberField K]
(x : K)

NumberField.mixedEmbedding.norm ((NumberField.mixedEmbedding K) x) = ↑|(Algebra.norm ℚ) x|


@[simp]
theorem coe_toAffineEquiv (e : P ≃ᵃⁱ[𝕜] P₂) : ⇑e.toAffineEquiv = e

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


@[simp] theorem coe_toEquiv (e : X ≃ᵈ Y) : ⇑e.toEquiv = e

{X : Type u_1}
{Y : Type u_2}
[PseudoEMetricSpace X]
[PseudoEMetricSpace Y]
(e : X ≃ᵈ Y)


theorem abs_sub_pos : 0 < |a - b| ↔ a ≠ b

{α : Type u_1}
[LinearOrderedAddCommGroup α]
{a b : α}