theorem map_comp {F U : Type*} [Field F] [AddCommGroup U] [Module F U] {σ : K →+* L} {τ : L →+* F}
    {γ : K →+* F} [RingHomCompTriple σ τ γ] (f : V →ₛₗ[σ] W) (hf : Function.Injective f)
    (g : W →ₛₗ[τ] U) (hg : Function.Injective g) :
    map (g.comp f) (hg.comp hf) = map g hg ∘ map f hf

{K : Type u_1}
{V : Type u_2}
[DivisionRing K]
[AddCommGroup V]
[Module K V]
{L : Type u_3}
{W : Type u_4}
[DivisionRing L]
[AddCommGroup W]
[Module L W]
{F : Type u_5}
{U : Type u_6}
[Field F]
[AddCommGroup U]
[Module F U]
{σ : K →+* L}
{τ : L →+* F}
{γ : K →+* F}
[RingHomCompTriple σ τ γ]
(f : V →ₛₗ[σ] W)
(hf : Function.Injective ⇑f)
(g : W →ₛₗ[τ] U)
(hg : Function.Injective ⇑g)

Projectivization.map (g.comp f) ⋯ = Projectivization.map g hg ∘ Projectivization.map f hf


theorem range_codRestrict {τ₂₁ : R₂ →+* R} [RingHomSurjective τ₂₁] (p : Submodule R M)
    (f : M₂ →ₛₗ[τ₂₁] M) (hf) :
    range (codRestrict p f hf) = comap p.subtype (LinearMap.range f)

{R : Type u_1}
{R₂ : Type u_2}
{M : Type u_6}
{M₂ : Type u_7}
[Semiring R]
[Semiring R₂]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R₂ M₂]
{τ₂₁ : R₂ →+* R}
[RingHomSurjective τ₂₁]
(p : Submodule R M)
(f : M₂ →ₛₗ[τ₂₁] M)
(hf : ∀ (c : M₂), f c ∈ p)

LinearMap.range (LinearMap.codRestrict p f hf) = Submodule.comap p.subtype (LinearMap.range f)


theorem Ico_pred_left (h : pred a < b) : Ico (pred a) b = insert (pred a) (Ico a b)

{α : Type u_1}
[PartialOrder α]
[PredOrder α]
{a b : α}
(h : Order.pred a < b)

Set.Ico (Order.pred a) b = insert (Order.pred a) (Set.Ico a b)


theorem pi_subset_pi_iff : pi s t₁ ⊆ pi s t₂ ↔ (∀ i ∈ s, t₁ i ⊆ t₂ i) ∨ pi s t₁ = ∅

{ι : Type u_1}
{α : ι → Type u_2}
{s : Set ι}
{t₁ t₂ : (i : ι) → Set (α i)}

s.pi t₁ ⊆ s.pi t₂ ↔ (∀ i ∈ s, t₁ i ⊆ t₂ i) ∨ s.pi t₁ = ∅


/--
The `Applicative` typeclass only contains the operations of an applicative functor.
`LawfulApplicative` further asserts that these operations satisfy the laws of an applicative functor:
```
pure id <*> v = v
pure (·∘·) <*> u <*> v <*> w = u <*> (v <*> w)
pure f <*> pure x = pure (f x)
u <*> pure y = pure (· y) <*> u
```
-/
class LawfulApplicative (f : Type u → Type v) [Applicative f] extends LawfulFunctor f : Prop where
  seqLeft_eq  (x : f α) (y : f β)     : x <* y = const β <$> x <*> y
  seqRight_eq (x : f α) (y : f β)     : x *> y = const α id <$> x <*> y
  pure_seq    (g : α → β) (x : f α)   : pure g <*> x = g <$> x
  map_pure    (g : α → β) (x : α)     : g <$> (pure x : f α) = pure (g x)
  seq_pure    {α β : Type u} (g : f (α → β)) (x : α) : g <*> pure x = (fun h => h x) <$> g
  seq_assoc   {α β γ : Type u} (x : f α) (g : f (α → β)) (h : f (β → γ)) : h <*> (g <*> x) = ((@comp α β γ) <$> h) <*> g <*> x
  comp_map g h x := (by
    repeat rw [← pure_seq]
    simp [seq_assoc, map_pure, seq_pure])

{f : Type u → Type v}
[Applicative f]
[self : LawfulApplicative f]
{α β : Type u}
(x : f α)
(y : f β)

(SeqRight.seqRight x fun x => y) = Seq.seq (Function.const α id <$> x) fun x => y


(J : CategoryTheory.GrothendieckTopology C)

(K : CategoryTheory.GrothendieckTopology D)

[CategoryTheory.Functor.IsDenseSubsite J K G]


@[simp]
theorem cons_val_zero (x : α) (u : Fin m → α) : vecCons x u 0 = x

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


/-- An element `a` is `AddLECancellable` if `a + b ≤ a + c` implies `b ≤ c` for all `b` and `c`.
  This is true in `ℝ≥0∞` for all elements except `∞`. -/
theorem addLECancellable_iff_ne {a : ℝ≥0∞} : AddLECancellable a ↔ a ≠ ∞


protected theorem inv_zero : (0⁻¹ : ℂ) = 0


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

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

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


theorem coe_isMonoidHom : IsMonoidHom (↑· : Mˣ → M)


@[simp] theorem and_true (p : Prop) : (p ∧ True) = p


@[simp]
theorem iSup_le_iff : iSup f ≤ a ↔ ∀ i, f i ≤ a

{α : Type u_1}
{ι : Sort u_5}
[CompleteLattice α]
{f : ι → α}
{a : α}


theorem irreducible_aux3 {k m m' n : ℕ} (hkm : k < m) (hmn : m < n) (hkm' : k < m') (hmn' : m' < n)
    (u v w x z : Units ℤ) (hp : p = trinomial k m n (u : ℤ) v w)
    (hq : q = trinomial k m' n (x : ℤ) v z) (h : p * p.mirror = q * q.mirror) :
    q = p ∨ q = p.mirror

(hp : p = Polynomial.trinomial k m n ↑u ↑v ↑w)

(hq : q = Polynomial.trinomial k m' n ↑x ↑v ↑z)


protected theorem comp_left_iff {g : α → β} {e : β ≃ᵐ γ} (h : MeasurePreserving e μb μc) :
    MeasurePreserving (e ∘ g) μa μc ↔ MeasurePreserving g μa μb

{e : β ≃ᵐ γ}

(h : MeasureTheory.MeasurePreserving (⇑e) μb μc)

MeasureTheory.MeasurePreserving (⇑e ∘ g) μa μc ↔ MeasureTheory.MeasurePreserving g μa μb


@[to_additive (attr := simp)] lemma bot_ne_one : (⊥ : WithBot α) ≠ 1


@[to_additive]
theorem mul_inv_lt_inv_mul_iff : a * b⁻¹ < d⁻¹ * c ↔ d * a < c * b

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

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


theorem hasStrictDerivAt_const : HasStrictDerivAt (fun _ => c) 0 x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
(x : 𝕜)
(c : F)


@[simp] theorem takeWhile_replicate_eq_filter (p : α → Bool) :
    (replicate n a).takeWhile p = (replicate n a).filter p

{α : Type u_1}
{n : Nat}
{a : α}
(p : α → Bool)

List.takeWhile p (List.replicate n a) = List.filter p (List.replicate n a)


theorem cycleOf_apply_of_not_sameCycle : ¬SameCycle f x y → cycleOf f x y = y

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


/-- A monoid is isomorphic to the opposite of its opposite. -/
@[to_additive (attr := simps!)
      "A additive monoid is isomorphic to the opposite of its opposite."]
def MulEquiv.opOp (M : Type*) [Mul M] : M ≃* Mᵐᵒᵖᵐᵒᵖ

∀ (a : M), (AddEquiv.opOp M) a = AddOpposite.op (AddOpposite.op a)


/-- A prime `p` is a unit in a finite commutative ring `R`
iff it does not divide the characteristic. -/
theorem isUnit_iff_not_dvd_char (R : Type*) [CommRing R] (p : ℕ) [Fact p.Prime] [Finite R] :
    IsUnit (p : R) ↔ ¬p ∣ ringChar R

(R : Type u_1)
[CommRing R]
(p : ℕ)
[Fact (Nat.Prime p)]
[Finite R]


theorem Finite.of_prod_left (h : (s ×ˢ t : Set (α × β)).Finite) : t.Nonempty → s.Finite

{α : Type u}
{β : Type v}
{s : Set α}
{t : Set β}
(h : (s ×ˢ t).Finite)


@[simp] lemma nodup_bind :
    Nodup (bind s f) ↔ (∀ a ∈ s, Nodup (f a)) ∧ s.Pairwise fun a b => Disjoint (f a) (f b)

{α : Type u_1}
{β : Type v}
{s : Multiset α}
{f : α → Multiset β}

(s.bind f).Nodup ↔ (∀ a ∈ s, (f a).Nodup) ∧ Multiset.Pairwise (fun a b => (f a).Disjoint (f b)) s


theorem tendsto_measure_of_le_liminf_measure_of_limsup_measure_le {ι : Type*} {L : Filter ι}
    {μ : Measure Ω} {μs : ι → Measure Ω} {E₀ E E₁ : Set Ω} (E₀_subset : E₀ ⊆ E) (subset_E₁ : E ⊆ E₁)
    (nulldiff : μ (E₁ \ E₀) = 0) (h_E₀ : μ E₀ ≤ L.liminf fun i => μs i E₀)
    (h_E₁ : (L.limsup fun i => μs i E₁) ≤ μ E₁) : L.Tendsto (fun i => μs i E) (𝓝 (μ E))

(h_E₀ : μ E₀ ≤ Filter.liminf (fun i => (μs i) E₀) L)

(h_E₁ : Filter.limsup (fun i => (μs i) E₁) L ≤ μ E₁)

Filter.Tendsto (fun i => (μs i) E) L (𝓝 (μ E))


@[simp]
theorem top_apply [Top β] (a : α) : (⊤ : SupHom α β) a = ⊤

{α : Type u_3}
{β : Type u_4}
[Sup α]
[SemilatticeSup β]
[Top β]
(a : α)


theorem fderivWithin_eventually_congr_set (h : s =ᶠ[𝓝 x] t) :
    fderivWithin 𝕜 f s =ᶠ[𝓝 x] fderivWithin 𝕜 f t

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{x : E}
{s t : Set E}
(h : s =ᶠ[𝓝 x] t)


/-- The product of `f y` over `y ∈ Set.range g` equals the product of `f (g i)` over all `i`
provided that `g` is injective. -/
@[to_additive
      "The sum of `f y` over `y ∈ Set.range g` equals the sum of `f (g i)` over all `i`
      provided that `g` is injective."]
theorem finprod_mem_range {g : β → α} (hg : Injective g) : ∏ᶠ i ∈ range g, f i = ∏ᶠ j, f (g j)

{α : Type u_1}
{β : Type u_2}
{M : Type u_5}
[AddCommMonoid M]
{f : α → M}
{g : β → α}
(hg : Function.Injective g)

∑ᶠ (i : α) (_ : i ∈ Set.range g), f i = ∑ᶠ (j : β), f (g j)


@[simp]
lemma fromColumns_toColumns (A : Matrix m (n₁ ⊕ n₂) R) :
    fromColumns A.toColumns₁ A.toColumns₂ = A

{R : Type u_1}
{m : Type u_2}
{n₁ : Type u_6}
{n₂ : Type u_7}
(A : Matrix m (n₁ ⊕ n₂) R)

A.toColumns₁.fromColumns A.toColumns₂ = A


theorem continuous_iff [PseudoMetricSpace β] {f : α → β} :
    Continuous f ↔ ∀ b, ∀ ε > 0, ∃ δ > 0, ∀ a, dist a b < δ → dist (f a) (f b) < ε

{α : Type u}
{β : Type v}
[PseudoMetricSpace α]
[PseudoMetricSpace β]
{f : α → β}

Continuous f ↔ ∀ (b : α), ∀ ε > 0, ∃ δ > 0, ∀ (a : α), dist a b < δ → dist (f a) (f b) < ε


lemma smul_right_of_tower (r : S) (x y : M) : B x (r • y) = r • B x y

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
{S : Type u_3}
[CommSemiring S]
[Algebra S R]
[Module S M]
[IsScalarTower S R M]
{B : LinearMap.BilinForm R M}
(r : S)
(x y : M)


theorem smul_compLp {𝕜'} [NormedRing 𝕜'] [Module 𝕜' F] [BoundedSMul 𝕜' F] [SMulCommClass 𝕜 𝕜' F]
    (c : 𝕜') (L : E →L[𝕜] F) (f : Lp E p μ) : (c • L).compLp f = c • L.compLp f

{α : Type u_1}
{E : Type u_2}
{F : Type u_3}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup E]
[NormedAddCommGroup F]
{𝕜 : Type u_5}
[NontriviallyNormedField 𝕜]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜 F]
{𝕜' : Type u_6}
[NormedRing 𝕜']
[Module 𝕜' F]
[BoundedSMul 𝕜' F]
[SMulCommClass 𝕜 𝕜' F]
(c : 𝕜')
(L : E →L[𝕜] F)
(f : ↥(MeasureTheory.Lp E p μ))


/-- When `R` is a non-unital ring, to construct a `StarOrderedRing` instance it suffices to
show that the nonnegative elements are precisely those elements in the `AddSubmonoid` generated
by `star s * s` for `s : R`. -/
lemma of_nonneg_iff [NonUnitalRing R] [PartialOrder R] [StarRing R]
    (h_add : ∀ {x y : R}, x ≤ y → ∀ z, z + x ≤ z + y)
    (h_nonneg_iff : ∀ x : R, 0 ≤ x ↔ x ∈ AddSubmonoid.closure (Set.range fun s : R => star s * s)) :
    StarOrderedRing R

(h_add : ∀ {x y : R}, x ≤ y → ∀ (z : R), z + x ≤ z + y)

(h_nonneg_iff : ∀ (x : R), 0 ≤ x ↔ x ∈ AddSubmonoid.closure (Set.range fun s => star s * s))


theorem mem_span_mul_finite_of_mem_mul {I J : FractionalIdeal S P} {x : P} (hx : x ∈ I * J) :
    ∃ T T' : Finset P, (T : Set P) ⊆ I ∧ (T' : Set P) ⊆ J ∧ x ∈ span R (T * T' : Set P)

{R : Type u_1}
[CommRing R]
{S : Submonoid R}
{P : Type u_2}
[CommRing P]
[Algebra R P]
{I J : FractionalIdeal S P}
{x : P}
(hx : x ∈ I * J)

∃ T T', ↑T ⊆ ↑I ∧ ↑T' ⊆ ↑J ∧ x ∈ Submodule.span R (↑T * ↑T')


theorem sizeOf_dedupKeys [SizeOf (Sigma β)]
    (xs : List (Sigma β)) : SizeOf.sizeOf (dedupKeys xs) ≤ SizeOf.sizeOf xs

{α : Type u}
{β : α → Type v}
[DecidableEq α]
[SizeOf (Sigma β)]
(xs : List (Sigma β))


/-- If a function is the least upper bound of countably many measurable functions,
then it is measurable. -/
theorem Measurable.isLUB {ι} [Countable ι] {f : ι → δ → α} {g : δ → α} (hf : ∀ i, Measurable (f i))
    (hg : ∀ b, IsLUB { a | ∃ i, f i b = a } (g b)) : Measurable g

{f : ι → δ → α}

(hg : ∀ (b : δ), IsLUB {a | ∃ i, f i b = a} (g b))


@[to_additive (attr := simp)]
theorem coe_equivMapOfInjective_apply (f : M →ₙ* N) (hf : Function.Injective f) (x : S) :
    (equivMapOfInjective S f hf x : N) = f x

{M : Type u_1}
{N : Type u_2}
[Mul M]
[Mul N]
(S : Subsemigroup M)
(f : M →ₙ* N)
(hf : Function.Injective ⇑f)
(x : ↥S)

↑((S.equivMapOfInjective f hf) x) = f ↑x


/-- Baire theorem: a countable intersection of dense Gδ sets is dense. Formulated here with
an index set which is a countable type. -/
theorem dense_iInter_of_Gδ [Countable ι] {f : ι → Set X} (ho : ∀ s, IsGδ (f s))
    (hd : ∀ s, Dense (f s)) : Dense (⋂ s, f s)

{X : Type u_1}
{ι : Sort u_3}
[TopologicalSpace X]
[BaireSpace X]
[Countable ι]
{f : ι → Set X}
(ho : ∀ (s : ι), IsGδ (f s))
(hd : ∀ (s : ι), Dense (f s))


/-- A Lie group is a topological group. This is not an instance for technical reasons,
see note [Design choices about smooth algebraic structures]. -/
@[to_additive "An additive Lie group is an additive topological group. This is not an instance for
technical reasons, see note [Design choices about smooth algebraic structures]."]
theorem topologicalGroup_of_lieGroup : TopologicalGroup G

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


/-- The additive equivalence between `FreeAbelianGroup X` and `(X →₀ ℤ)`. -/
@[simps!]
def equivFinsupp : FreeAbelianGroup X ≃+ (X →₀ ℤ)

(FreeAbelianGroup.equivFinsupp X).symm a = Finsupp.toFreeAbelianGroup a


/-- Negating the first vector passed to `oangle` negates the sign of the angle. -/
@[simp]
theorem oangle_sign_neg_left (x y : V) : (o.oangle (-x) y).sign = -(o.oangle x y).sign

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


@[reassoc (attr := simp)]
lemma d_comp_d (i j k : ι) : d K e i j ≫ d K e j k = 0

HomologicalComplex.truncGE'.d K e i j ≫ HomologicalComplex.truncGE'.d K e j k = 0


@[simp]
theorem map_mk {f : α → β} {m : Multiset α} {hc : Multiset.card m = n} :
    map f (mk m hc) = mk (m.map f) (by simp [hc])

{α : Type u_1}
{β : Type u_2}
{n : ℕ}
{f : α → β}
{m : Multiset α}
{hc : Multiset.card m = n}

Sym.map f (Sym.mk m hc) = Sym.mk (Multiset.map f m) ⋯


theorem Icc_subset_Ici_iff (h₁ : a₁ ≤ b₁) : Icc a₁ b₁ ⊆ Ici a₂ ↔ a₂ ≤ a₁

{α : Type u_1}
[Preorder α]
{a₁ a₂ b₁ : α}
(h₁ : a₁ ≤ b₁)


/-- Continuity from below: the measure of the union of a directed sequence of (not necessarily
-measurable) sets is the supremum of the measures. -/
theorem measure_iUnion_eq_iSup [Countable ι] {s : ι → Set α} (hd : Directed (· ⊆ ·) s) :
    μ (⋃ i, s i) = ⨆ i, μ (s i)

(hd : Directed (fun x x_1 => x ⊆ x_1) s)


/-- A product of induced topologies is induced by the product map -/
theorem prod_induced_induced (f : X → Y) (g : Z → W) :
    @instTopologicalSpaceProd X Z (induced f ‹_›) (induced g ‹_›) =
      induced (fun p => (f p.1, g p.2)) instTopologicalSpaceProd

{X : Type u}
{Y : Type v}
{Z : Type u_1}
{W : Type u_2}
[TopologicalSpace Y]
[TopologicalSpace W]
(f : X → Y)
(g : Z → W)

instTopologicalSpaceProd = TopologicalSpace.induced (fun p => (f p.1, g p.2)) instTopologicalSpaceProd


@[fun_prop]
theorem HasStrictFDerivAt.smul_const (hc : HasStrictFDerivAt c c' x) (f : F) :
    HasStrictFDerivAt (fun y => c y • f) (c'.smulRight f) x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{x : E}
{𝕜' : Type u_6}
[NontriviallyNormedField 𝕜']
[NormedAlgebra 𝕜 𝕜']
[NormedSpace 𝕜' F]
[IsScalarTower 𝕜 𝕜' F]
{c : E → 𝕜'}
{c' : E →L[𝕜] 𝕜'}
(hc : HasStrictFDerivAt c c' x)
(f : F)


theorem nth_of_bisim [Inhabited (M F)] (bisim : IsBisimulation R) (s₁ s₂) (ps : Path F) :
    (R s₁ s₂) →
      IsPath ps s₁ ∨ IsPath ps s₂ →
        iselect ps s₁ = iselect ps s₂ ∧
          ∃ (a : _) (f f' : F.B a → M F),
            isubtree ps s₁ = M.mk ⟨a, f⟩ ∧
              isubtree ps s₂ = M.mk ⟨a, f'⟩ ∧ ∀ i : F.B a, f i ~ f' i

{F : PFunctor.{u}}
(R : F.M → F.M → Prop)
[Inhabited F.M]
(bisim : PFunctor.M.IsBisimulation R)
(s₁ s₂ : F.M)
(ps : PFunctor.Approx.Path F)

R s₁ s₂ →
  PFunctor.M.IsPath ps s₁ ∨ PFunctor.M.IsPath ps s₂ →
    PFunctor.M.iselect ps s₁ = PFunctor.M.iselect ps s₂ ∧
      ∃ a f f',
        PFunctor.M.isubtree ps s₁ = PFunctor.M.mk ⟨a, f⟩ ∧
          PFunctor.M.isubtree ps s₂ = PFunctor.M.mk ⟨a, f'⟩ ∧ ∀ (i : F.B a), R (f i) (f' i)


theorem IsDetector.def {G : C} :
    IsDetector G → ∀ ⦃X Y : C⦄ (f : X ⟶ Y), (∀ h : G ⟶ Y, ∃! h', h' ≫ f = h) → IsIso f

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{G : C}

CategoryTheory.IsDetector G →
  ∀ ⦃X Y : C⦄ (f : X ⟶ Y), (∀ (h : G ⟶ Y), ∃! h', CategoryTheory.CategoryStruct.comp h' f = h) → CategoryTheory.IsIso f


theorem arg_cos_add_sin_mul_I_eq_toIocMod (θ : ℝ) :
    arg (cos θ + sin θ * I) = toIocMod Real.two_pi_pos (-π) θ

(Complex.cos ↑θ + Complex.sin ↑θ * Complex.I).arg = toIocMod Real.two_pi_pos (-π) θ


@[symm]
theorem Parallel.symm {s₁ s₂ : AffineSubspace k P} (h : s₁ ∥ s₂) : s₂ ∥ s₁

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


@[symm]
nonrec theorem symm (h : M ≅[L] N) : N ≅[L] M

{L : FirstOrder.Language}
{M : Type w}
{N : Type u_1}
[L.Structure M]
[L.Structure N]
(h : L.ElementarilyEquivalent M N)


@[simp]
theorem map_surjective {f : α → γ} {g : β → δ} :
    Surjective (Sum.map f g) ↔ Surjective f ∧ Surjective g

{α : Type u}
{β : Type v}
{γ : Type u_1}
{δ : Type u_2}
{f : α → γ}
{g : β → δ}

Function.Surjective (Sum.map f g) ↔ Function.Surjective f ∧ Function.Surjective g


@[simp]
theorem toNNReal_lt_toNNReal_iff' {r p : ℝ} : Real.toNNReal r < Real.toNNReal p ↔ r < p ∧ 0 < p


lemma isWeaklyRegular_append_iff' (rs₁ rs₂ : List R) :
    IsWeaklyRegular M (rs₁ ++ rs₂) ↔
      IsWeaklyRegular M rs₁ ∧
        IsWeaklyRegular (M ⧸ (Ideal.ofList rs₁ • ⊤ : Submodule R M))
          (rs₂.map (Ideal.Quotient.mk (Ideal.ofList rs₁)))

{R : Type u_1}
(M : Type u_3)
[CommRing R]
[AddCommGroup M]
[Module R M]
(rs₁ rs₂ : List R)

RingTheory.Sequence.IsWeaklyRegular M (rs₁ ++ rs₂) ↔
  RingTheory.Sequence.IsWeaklyRegular M rs₁ ∧
    RingTheory.Sequence.IsWeaklyRegular (M ⧸ Ideal.ofList rs₁ • ⊤)
      (List.map (⇑(Ideal.Quotient.mk (Ideal.ofList rs₁))) rs₂)


/-- There does not exist a nontrivial preirreducible T₂ space. -/
theorem not_preirreducible_nontrivial_t2 (X) [TopologicalSpace X] [PreirreducibleSpace X]
    [Nontrivial X] [T2Space X] : False

(X : Type u_4)
[TopologicalSpace X]
[PreirreducibleSpace X]
[Nontrivial X]
[T2Space X]


protected lemma IsCircuit.isTrail {p : Walk G u u} (h : IsCircuit p) : IsTrail p

{V : Type u}
{G : SimpleGraph V}
{u : V}
{p : G.Walk u u}
(h : p.IsCircuit)


theorem Ioo_subset_Ioo_iff [DenselyOrdered α] (h₁ : a₁ < b₁) :
    Ioo a₁ b₁ ⊆ Ioo a₂ b₂ ↔ a₂ ≤ a₁ ∧ b₁ ≤ b₂

{α : Type u_1}
[LinearOrder α]
{a₁ a₂ b₁ b₂ : α}
[DenselyOrdered α]
(h₁ : a₁ < b₁)

Set.Ioo a₁ b₁ ⊆ Set.Ioo a₂ b₂ ↔ a₂ ≤ a₁ ∧ b₁ ≤ b₂


/-- We have that `S.Solution'_descent.multiplicity = S.multiplicity - 1`. -/
lemma Solution'_descent_multiplicity : S.Solution'_descent.multiplicity = S.multiplicity - 1

(S : FermatLastTheoremForThreeGen.Solution hζ)


theorem prod_eq_two_power {ι : Type u} [Infinite ι] {c : ι → Cardinal.{v}} (h₁ : ∀ i, 2 ≤ c i)
    (h₂ : ∀ i, lift.{u} (c i) ≤ lift.{v} #ι) : prod c = 2 ^ lift.{v} #ι

(h₂ : ∀ (i : ι), Cardinal.lift.{u, v} (c i) ≤ Cardinal.lift.{v, u} #ι)

Cardinal.prod c = 2 ^ Cardinal.lift.{v, u} #ι


/-- The homeomorphism obtained by restricting a `PartialHomeomorph` to a subset of the source. -/
@[simps]
def homeomorphOfImageSubsetSource {s : Set X} {t : Set Y} (hs : s ⊆ e.source) (ht : e '' s = t) :
    s ≃ₜ t

{X : Type u_1}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
(e : PartialHomeomorph X Y)
{s : Set X}
{t : Set Y}
(hs : s ⊆ e.source)
(ht : ↑e '' s = t)

∀ (a : ↑t), (e.homeomorphOfImageSubsetSource hs ht).symm a = Set.MapsTo.restrict (↑e.symm) t s ⋯ a


protected theorem refl (hf : AEMeasurable f μ) : IdentDistrib f f μ μ

{α : Type u_1}
{γ : Type u_3}
[MeasurableSpace α]
[MeasurableSpace γ]
{μ : MeasureTheory.Measure α}
{f : α → γ}
(hf : AEMeasurable f μ)


theorem Ico_succ_left : Ico a.succ b = Ioo a b


@[simp]
theorem top_N : (⊤ : I.Filtration M).N = ⊤

{R M : Type u}
[CommRing R]
[AddCommGroup M]
[Module R M]
{I : Ideal R}


theorem abs_exp_eq_iff_re_eq {x y : ℂ} : abs (exp x) = abs (exp y) ↔ x.re = y.re

Complex.abs (Complex.exp x) = Complex.abs (Complex.exp y) ↔ x.re = y.re


theorem ncard_image_of_injective (s : Set α) (H : f.Injective) : (f '' s).ncard = s.ncard

{α : Type u_1}
{β : Type u_2}
{f : α → β}
(s : Set α)
(H : Function.Injective f)


/-- Every positive `x` is between two successive integer powers of
another `y` greater than one. This is the same as `exists_mem_Ioc_zpow`,
but with ≤ and < the other way around. -/
theorem exists_mem_Ico_zpow (hx : 0 < x) (hy : 1 < y) : ∃ n : ℤ, x ∈ Ico (y ^ n) (y ^ (n + 1))

{α : Type u_1}
[LinearOrderedSemifield α]
[Archimedean α]
[ExistsAddOfLE α]
{x y : α}
(hx : 0 < x)
(hy : 1 < y)


lemma twoTorsionPolynomial_disc : W.twoTorsionPolynomial.disc = 16 * W.Δ

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


theorem linearIndependent_single {φ : ι → Type*} {f : ∀ ι, φ ι → M}
    (hf : ∀ i, LinearIndependent R (f i)) :
    LinearIndependent R fun ix : Σi, φ i => single ix.1 (f ix.1 ix.2)

(hf : ∀ (i : ι), LinearIndependent R (f i))

LinearIndependent R fun ix => Finsupp.single ix.fst (f ix.fst ix.snd)


theorem val_add_one_le_of_gt {n : Nat} {a b : Fin n} (h : a > b) : (b : Nat) + 1 ≤ (a : Nat)


theorem measure_union_add_inter' (hs : MeasurableSet s) (t : Set α) :
    μ (s ∪ t) + μ (s ∩ t) = μ s + μ t

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s : Set α}
(hs : MeasurableSet s)
(t : Set α)


theorem rat_rawCast_pos {R} [DivisionRing R] :
    (Rat.rawCast (.ofNat n) d : R) = Nat.rawCast n / Nat.rawCast d

{n d : ℕ}
{R : Type u_2}
[DivisionRing R]

Rat.rawCast (Int.ofNat n) d = n.rawCast / d.rawCast


@[simp]
theorem eventuallyLE_bind [LE γ] {f : Filter α} {m : α → Filter β} {g₁ g₂ : β → γ} :
    g₁ ≤ᶠ[bind f m] g₂ ↔ ∀ᶠ x in f, g₁ ≤ᶠ[m x] g₂

{α : Type u}
{β : Type v}
{γ : Type w}
[LE γ]
{f : Filter α}
{m : α → Filter β}
{g₁ g₂ : β → γ}

g₁ ≤ᶠ[f.bind m] g₂ ↔ ∀ᶠ (x : α) in f, g₁ ≤ᶠ[m x] g₂


@[to_additive (attr := simp, norm_cast)]
theorem coe_div (x y : H) : (↑(x / y) : G) = ↑x / ↑y

{G : Type u_1}
[AddGroup G]
(H : AddSubgroup G)
(x y : ↥H)


/--
Any linear map `L : A → B⋆` induces a character in `(A ⊗ B)⋆` by `a ⊗ b ↦ L a b`.
-/
@[simps] noncomputable def uncurry :
    (A →ₗ[R] CharacterModule B) →ₗ[R] CharacterModule (A ⊗[R] B)

{R : Type uR}
[CommRing R]
{A : Type uA}
[AddCommGroup A]
{B : Type uB}
[AddCommGroup B]
[Module R A]
[Module R B]
(c : A →ₗ[R] CharacterModule B)

CharacterModule.uncurry c = TensorProduct.liftAddHom c.toAddMonoidHom ⋯


theorem smooth_prod_assoc :
    Smooth ((I.prod I').prod J) (I.prod (I'.prod J)) fun x : (M × M') × N => (x.1.1, x.1.2, x.2)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
{F : Type u_11}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type u_12}
[TopologicalSpace G]
{J : ModelWithCorners 𝕜 F G}
{N : Type u_13}
[TopologicalSpace N]
[ChartedSpace G N]

Smooth ((I.prod I').prod J) (I.prod (I'.prod J)) fun x => (x.1.1, x.1.2, x.2)


theorem mem_sInf {x : E} {S : Set (ConvexCone 𝕜 E)} : x ∈ sInf S ↔ ∀ s ∈ S, x ∈ s

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[SMul 𝕜 E]
{x : E}
{S : Set (ConvexCone 𝕜 E)}


@[simp]
theorem toSubgroupEquiv_neg_one : toSubgroupEquiv φ (-1) = φ.symm

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

HNNExtension.toSubgroupEquiv φ (-1) = φ.symm


(if b % 8 = 3 ∨ b % 8 = 5 then -jacobiSym (a / 2) b else jacobiSym (a / 2) b) = jacobiSym a b


@[simp]
theorem lintegral_smul_measure (c : ℝ≥0∞) (f : α → ℝ≥0∞) : ∫⁻ a, f a ∂c • μ = c * ∫⁻ a, f a ∂μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
(c : ℝ≥0∞)
(f : α → ℝ≥0∞)

∫⁻ (a : α), f a ∂c • μ = c * ∫⁻ (a : α), f a ∂μ


@[simp]
theorem mk_mul_moveLeft_inr {xl xr yl yr} {xL xR yL yR} {i j} :
    (mk xl xr xL xR * mk yl yr yL yR).moveLeft (Sum.inr (i, j)) =
      xR i * mk yl yr yL yR + mk xl xr xL xR * yR j - xR i * yR j

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

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


/-- A homeomorphism induces an equivalence on compact sets, by taking the image. -/
@[simps]
protected def equiv (f : α ≃ₜ β) : Compacts α ≃ Compacts β

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
(f : α ≃ₜ β)
(K : TopologicalSpace.Compacts β)

(TopologicalSpace.Compacts.equiv f).symm K = TopologicalSpace.Compacts.map ⇑f.symm ⋯ K


theorem coprod_neBot_iff : (f.coprod g).NeBot ↔ f.NeBot ∧ Nonempty β ∨ Nonempty α ∧ g.NeBot

{α : Type u_1}
{β : Type u_2}
{f : Filter α}
{g : Filter β}


nonrec theorem HasFDerivWithinAt.isBigO_sub {f : E → F} {s : Set E} {x₀ : E} {f' : E →L[𝕜] F}
    (h : HasFDerivWithinAt f f' s x₀) : (f · - f x₀) =O[𝓝[s] x₀] (· - x₀)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{s : Set E}
{x₀ : E}
{f' : E →L[𝕜] F}
(h : HasFDerivWithinAt f f' s x₀)

(fun x => f x - f x₀) =O[𝓝[s] x₀] fun x => x - x₀


@[to_additive]
theorem mulDysonETransform.subset :
    (mulDysonETransform e x).1 * (mulDysonETransform e x).2 ⊆ x.1 * x.2

{α : Type u_1}
[DecidableEq α]
[CommGroup α]
(e : α)
(x : Finset α × Finset α)

(Finset.mulDysonETransform e x).1 * (Finset.mulDysonETransform e x).2 ⊆ x.1 * x.2


@[simp]
theorem op_map_comp_obj (f : X ⟶ Y) (g : Y ⟶ Z) (U) :
    (map (f ≫ g)).op.obj U = (map f).op.obj ((map g).op.obj U)

{X Y Z : TopCat}
(f : X ⟶ Y)
(g : Y ⟶ Z)
(U : (TopologicalSpace.Opens ↑Z)ᵒᵖ)

(TopologicalSpace.Opens.map (f ≫ g)).op.obj U =
  (TopologicalSpace.Opens.map f).op.obj ((TopologicalSpace.Opens.map g).op.obj U)


theorem Filter.HasBasis.nhds_closure {ι : Sort*} {x : X} {p : ι → Prop} {s : ι → Set X}
    (h : (𝓝 x).HasBasis p s) : (𝓝 x).HasBasis p fun i => closure (s i)

{X : Type u_1}
[TopologicalSpace X]
[RegularSpace X]
{ι : Sort u_3}
{x : X}
{p : ι → Prop}
{s : ι → Set X}
(h : (𝓝 x).HasBasis p s)


@[to_additive lt_max_of_two_nsmul_lt_add]
theorem lt_max_of_sq_lt_mul {a b c : M} (h : a ^ 2 < b * c) : a < max b c

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

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


@[simp]
theorem coe_opLinearEquiv_addEquiv : ((opLinearEquiv R : M ≃ₗ[R] Mᵐᵒᵖ) : M ≃+ Mᵐᵒᵖ) = opAddEquiv

(R : Type u)
{M : Type v}
[Semiring R]
[AddCommMonoid M]
[Module R M]

↑(MulOpposite.opLinearEquiv R) = MulOpposite.opAddEquiv


theorem isUnit_iff_eq_one (a : Associates α) : IsUnit a ↔ a = 1

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


theorem IsReflexivePair.mk' (s : B ⟶ A) (sf : s ≫ f = 𝟙 B) (sg : s ≫ g = 𝟙 B) :
    IsReflexivePair f g

(sf : CategoryTheory.CategoryStruct.comp s f = CategoryTheory.CategoryStruct.id B)

(sg : CategoryTheory.CategoryStruct.comp s g = CategoryTheory.CategoryStruct.id B)


theorem atEnd : ∀ {s}, Valid s → (s.atEnd ⟨p⟩ ↔ p = utf8ByteSize s.toString)

s.Valid → (s.atEnd { byteIdx := p } = true ↔ p = s.toString.utf8ByteSize)


@[to_additive]
theorem smul_def [Group G] [MulAction G β] (g : G) (f : α ↪ β) :
    g • f = f.trans (MulAction.toPerm g).toEmbedding

{G : Type u_1}
{α : Type u_3}
{β : Type u_4}
[AddGroup G]
[AddAction G β]
(g : G)
(f : α ↪ β)

g +ᵥ f = f.trans (Equiv.toEmbedding (AddAction.toPerm g))


@[simp]
theorem isCompactElement_iff (s : Opens α) :
    CompleteLattice.IsCompactElement s ↔ IsCompact (s : Set α)

{α : Type u_2}
[TopologicalSpace α]
(s : TopologicalSpace.Opens α)

CompleteLattice.IsCompactElement s ↔ IsCompact ↑s


@[simp]
theorem reverseOp_ι (m : M) : reverseOp (ι Q m) = op (ι Q m)

{R : Type u_1}
[CommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
{Q : QuadraticForm R M}
(m : M)

CliffordAlgebra.reverseOp ((CliffordAlgebra.ι Q) m) = MulOpposite.op ((CliffordAlgebra.ι Q) m)


@[simp]
theorem transpose_natCast [DecidableEq n] [AddMonoidWithOne α] (d : ℕ) :
    (d : Matrix n n α)ᵀ = d

{n : Type u_3}
{α : Type v}
[DecidableEq n]
[AddMonoidWithOne α]
(d : ℕ)


theorem map₂Right_eq_map₂Right' : map₂Right f as bs = (map₂Right' f as bs).fst

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

List.map₂Right f as bs = (List.map₂Right' f as bs).1


theorem coe_ringEquiv_lpBCF_symm (f : α →ᵇ R) : ((RingEquiv.lpBCF R).symm f : α → R) = f

{α : Type u_1}
{R : Type u_3}
[TopologicalSpace α]
[DiscreteTopology α]
[NonUnitalNormedRing R]
(f : BoundedContinuousFunction α R)


lemma IsClosed.tendsto_coe_cofinite_iff [T1Space X] [WeaklyLocallyCompactSpace X]
    {s : Set X} (hs : IsClosed s) :
    Tendsto ((↑) : s → X) cofinite (cocompact _) ↔ DiscreteTopology s

{X : Type u_1}
[TopologicalSpace X]
[T1Space X]
[WeaklyLocallyCompactSpace X]
{s : Set X}
(hs : IsClosed s)

Filter.Tendsto Subtype.val Filter.cofinite (Filter.cocompact X) ↔ DiscreteTopology ↑s


/-- The σ-algebras generated by conditionally independent pi-systems are conditionally independent.
-/
theorem iCondIndepSets.iCondIndep (m : ι → MeasurableSpace Ω)
    (h_le : ∀ i, m i ≤ mΩ) (π : ι → Set (Set Ω)) (h_pi : ∀ n, IsPiSystem (π n))
    (h_generate : ∀ i, m i = generateFrom (π i)) (h_ind : iCondIndepSets m' hm' π μ) :
    iCondIndep m' hm' m μ

(h_generate : ∀ (i : ι), m i = MeasurableSpace.generateFrom (π i))

(h_ind : ProbabilityTheory.iCondIndepSets m' hm' π μ)


theorem ContMDiffWithinAt.cle_arrowCongr {f : M → F₁ ≃L[𝕜] F₂} {g : M → F₃ ≃L[𝕜] F₄}
    {s : Set M} {x : M}
    (hf : ContMDiffWithinAt I 𝓘(𝕜, F₂ →L[𝕜] F₁) n (fun x ↦ ((f x).symm : F₂ →L[𝕜] F₁)) s x)
    (hg : ContMDiffWithinAt I 𝓘(𝕜, F₃ →L[𝕜] F₄) n (fun x ↦ (g x : F₃ →L[𝕜] F₄)) s x) :
    ContMDiffWithinAt I 𝓘(𝕜, (F₁ →L[𝕜] F₃) →L[𝕜] (F₂ →L[𝕜] F₄)) n
      (fun y ↦ (f y).arrowCongr (g y) : M → (F₁ →L[𝕜] F₃) →L[𝕜] (F₂ →L[𝕜] F₄)) s x

(hf : ContMDiffWithinAt I 𝓘(𝕜, F₂ →L[𝕜] F₁) n (fun x => ↑(f x).symm) s x)

(hg : ContMDiffWithinAt I 𝓘(𝕜, F₃ →L[𝕜] F₄) n (fun x => ↑(g x)) s x)

ContMDiffWithinAt I 𝓘(𝕜, (F₁ →L[𝕜] F₃) →L[𝕜] F₂ →L[𝕜] F₄) n (fun y => ↑((f y).arrowCongr (g y))) s x


theorem isPell_nat {x y : ℕ} : IsPell (⟨x, y⟩ : ℤ√(d a1)) ↔ x * x - d a1 * y * y = 1

Pell.IsPell { re := ↑x, im := ↑y } ↔ x * x - Pell.d a1 * y * y = 1


@[ext]
theorem hom_ext {X Y : Mat R} (f g : X ⟶ Y) (h : ∀ i j, f i j = g i j) : f = g

(h : ∀ (i : ↑X) (j : ↑Y), f i j = g i j)


@[norm_cast, simp]
theorem coe_nnabs (x : ℝ) : (nnabs x : ℝ) = |x|


theorem upperSemicontinuousOn_iInf {f : ι → α → δ} (h : ∀ i, UpperSemicontinuousOn (f i) s) :
    UpperSemicontinuousOn (fun x' => ⨅ i, f i x') s

{f : ι → α → δ}

(h : ∀ (i : ι), UpperSemicontinuousOn (f i) s)


theorem LocallyFinite.sum_elim {g : ι' → Set X} (hf : LocallyFinite f) (hg : LocallyFinite g) :
    LocallyFinite (Sum.elim f g)

{ι : Type u_1}
{ι' : Type u_2}
{X : Type u_4}
[TopologicalSpace X]
{f : ι → Set X}
{g : ι' → Set X}
(hf : LocallyFinite f)
(hg : LocallyFinite g)


@[simp]
theorem pairwise_singleton (a : α) (r : α → α → Prop) : Set.Pairwise {a} r

{α : Type u_1}
(a : α)
(r : α → α → Prop)


theorem nonempty_of_ne_empty {s : Finset α} (h : s ≠ ∅) : s.Nonempty

{α : Type u_1}
{s : Finset α}
(h : s ≠ ∅)


theorem sup_inf_distrib_left (s : Finset ι) (f : ι → α) (a : α) :
    a ⊓ s.sup f = s.sup fun i => a ⊓ f i

{α : Type u_2}
{ι : Type u_5}
[DistribLattice α]
[OrderBot α]
(s : Finset ι)
(f : ι → α)
(a : α)


nonrec theorem HasDerivAt.sub (hf : HasDerivAt f f' x) (hg : HasDerivAt g g' x) :
    HasDerivAt (fun x => f x - g x) (f' - g') x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f g : 𝕜 → F}
{f' g' : F}
{x : 𝕜}
(hf : HasDerivAt f f' x)
(hg : HasDerivAt g g' x)


lemma hasSum_expZeta_of_one_lt_re (a : ℝ) {s : ℂ} (hs : 1 < re s) :
    HasSum (fun n : ℕ ↦ cexp (2 * π * I * a * n) / n ^ s) (expZeta a s)

HasSum (fun n => cexp (2 * ↑π * Complex.I * ↑a * ↑n) / ↑n ^ s) (HurwitzZeta.expZeta (↑a) s)


@[simp] lemma isUniform_singleton : G.IsUniform ε {a} {b} ↔ 0 < ε

{α : Type u_1}
{𝕜 : Type u_2}
[LinearOrderedField 𝕜]
{G : SimpleGraph α}
[DecidableRel G.Adj]
{ε : 𝕜}
{a b : α}


theorem merge_loop_nil_left (s : α → α → Bool) (r t) :
    merge.loop s [] r t = reverseAux t r

{α : Type u_1}
(s : α → α → Bool)
(r t : List α)

List.merge.loop s [] r t = t.reverseAux r


/-- **Uniqueness of left-invariant measures**:
Given two left-invariant measures which are finite on compacts, they coincide in the following
sense: they give the same value to sets with compact closure, up to the multiplicative
constant `haarScalarFactor μ' μ`. -/
@[to_additive measure_isAddInvariant_eq_smul_of_isCompact_closure
"**Uniqueness of left-invariant measures**:
Given two left-invariant measures which are finite on compacts, they coincide in the following
sense: they give the same value to sets with compact closure, up to the multiplicative
constant `addHaarScalarFactor μ' μ`. "]
theorem measure_isMulInvariant_eq_smul_of_isCompact_closure [LocallyCompactSpace G]
    (μ' μ : Measure G) [IsHaarMeasure μ] [IsFiniteMeasureOnCompacts μ'] [IsMulLeftInvariant μ']
    {s : Set G} (h's : IsCompact (closure s)) :
    μ' s = haarScalarFactor μ' μ • μ s


/-- The RHS looks like the definition of `CompleteLattice.Independent`. -/
theorem supIndep_iff_disjoint_erase [DecidableEq ι] :
    s.SupIndep f ↔ ∀ i ∈ s, Disjoint (f i) ((s.erase i).sup f)

{α : Type u_1}
{ι : Type u_3}
[Lattice α]
[OrderBot α]
{s : Finset ι}
{f : ι → α}
[DecidableEq ι]


/-- For `r` strictly smaller than the radius of `p`, then `‖pₙ‖ rⁿ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries 𝕜 E F) {r : ℝ≥0}
    (h : (r : ℝ≥0∞) < p.radius) : ∃ C > 0, ∀ n, ‖p n‖₊ * r ^ n ≤ C

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
(p : FormalMultilinearSeries 𝕜 E F)
{r : ℝ≥0}
(h : ↑r < p.radius)


/-- If `K` is complete, `K` and `Kᗮ` span the whole space. -/
theorem Submodule.sup_orthogonal_of_completeSpace [HasOrthogonalProjection K] : K ⊔ Kᗮ = ⊤

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{K : Submodule 𝕜 E}
[HasOrthogonalProjection K]


theorem one_lt_card_iff_nontrivial (α : Type*) : 1 < card α ↔ Nontrivial α


@[to_additive]
theorem map_inf_comap_of_surjective (S T : Subsemigroup N) :
    (S.comap f ⊓ T.comap f).map f = S ⊓ T

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

AddSubsemigroup.map f (AddSubsemigroup.comap f S ⊓ AddSubsemigroup.comap f T) = S ⊓ T


/-- Given an open cover `{ Xᵢ }` of `X`, then `X ×[Z] Y` is covered by `Xᵢ ×[Z] Y`. -/
@[simps! J obj map]
def openCoverOfLeft (𝒰 : OpenCover X) (f : X ⟶ Z) (g : Y ⟶ Z) : OpenCover (pullback f g)

{X Y Z : AlgebraicGeometry.Scheme}
(𝒰 : X.OpenCover)
(f : X ⟶ Z)
(g : Y ⟶ Z)

(AlgebraicGeometry.Scheme.Pullback.openCoverOfLeft 𝒰 f g).J = 𝒰.J


theorem ssubset_of_subset_of_ssubset {s₁ s₂ s₃ : Finset α} (hs₁s₂ : s₁ ⊆ s₂) (hs₂s₃ : s₂ ⊂ s₃) :
    s₁ ⊂ s₃

{α : Type u_1}
{s₁ s₂ s₃ : Finset α}
(hs₁s₂ : s₁ ⊆ s₂)
(hs₂s₃ : s₂ ⊂ s₃)


lemma succAbove_rev_left (p : Fin (n + 1)) (i : Fin n) :
    p.rev.succAbove i = (p.succAbove i.rev).rev


@[simp] theorem comp_id (f : SupHom α β) : f.comp (SupHom.id α) = f

{α : Type u_3}
{β : Type u_4}
[Sup α]
[Sup β]
(f : SupHom α β)


theorem strictAnti_of_le_iff_le [Preorder α] [Preorder β] {f : α → β}
    (h : ∀ x y, x ≤ y ↔ f y ≤ f x) : StrictAnti f

{α : Type u}
{β : Type v}
[Preorder α]
[Preorder β]
{f : α → β}
(h : ∀ (x y : α), x ≤ y ↔ f y ≤ f x)


{α : Type u_1}
[CommMonoidWithZero α]
{p : α}
(hp : Prime p)


@[simp]
theorem Injective.isFixedPt_apply_iff (hf : Injective f) {x : α} :
    IsFixedPt f (f x) ↔ IsFixedPt f x

{α : Type u}
{f : α → α}
(hf : Function.Injective f)
{x : α}

Function.IsFixedPt f (f x) ↔ Function.IsFixedPt f x


theorem eval_val {n f x} :
    (@eval (n + 1) f : ZFSet → OfArity ZFSet ZFSet n) ⟦x⟧ = eval n (Resp.f f x)

{n : ℕ}
{f : PSet.Resp (n + 1)}
{x : PSet}

PSet.Resp.eval (n + 1) f ⟦x⟧ = PSet.Resp.eval n (f.f x)


theorem FarFromTriangleFree.cliqueFinset_nonempty' (hH : H ≤ G) (hG : G.FarFromTriangleFree ε)
    (hcard : G.edgeFinset.card - H.edgeFinset.card < ε * (card α ^ 2 : ℕ)) :
    (H.cliqueFinset 3).Nonempty

(hcard : ↑G.edgeFinset.card - ↑H.edgeFinset.card < ε * ↑(Fintype.card α ^ 2))


@[to_additive]
theorem toMap_injective : Function.Injective (@LocalizationMap.toMap _ _ S N _)

{M : Type u_1}
[CommMonoid M]
{S : Submonoid M}
{N : Type u_2}
[CommMonoid N]


@[simp]
theorem reverse_mem_evenOdd_iff {x : CliffordAlgebra Q} {n : ZMod 2} :
    reverse x ∈ evenOdd Q n ↔ x ∈ evenOdd Q n

{R : Type u_1}
[CommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
(Q : QuadraticForm R M)
{x : CliffordAlgebra Q}
{n : ZMod 2}

CliffordAlgebra.reverse x ∈ CliffordAlgebra.evenOdd Q n ↔ x ∈ CliffordAlgebra.evenOdd Q n


theorem Stable.bounded_difference (h : F.Stable) (h' : F'.Stable) (e : F.N 0 = F'.N 0) :
    ∃ n₀, ∀ n, F.N (n + n₀) ≤ F'.N n ∧ F'.N (n + n₀) ≤ F.N n

{R M : Type u}
[CommRing R]
[AddCommGroup M]
[Module R M]
{I : Ideal R}
{F F' : I.Filtration M}
(h : F.Stable)
(h' : F'.Stable)
(e : F.N 0 = F'.N 0)

∃ n₀, ∀ (n : ℕ), F.N (n + n₀) ≤ F'.N n ∧ F'.N (n + n₀) ≤ F.N n


theorem Iic_infinite [NoMinOrder α] (a : α) : (Iic a).Infinite

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


theorem uniformity_basis_edist_inv_nat :
    (𝓤 α).HasBasis (fun _ => True) fun n : ℕ => { p : α × α | edist p.1 p.2 < (↑n)⁻¹ }

(𝓤 α).HasBasis (fun x => True) fun n => {p | edist p.1 p.2 < (↑n)⁻¹}


theorem StrictMono.isMin_of_apply (hf : StrictMono f) (ha : IsMin (f a)) : IsMin a

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


theorem IsSymm.eq {A : Matrix n n α} (h : A.IsSymm) : Aᵀ = A

{α : Type u_1}
{n : Type u_3}
{A : Matrix n n α}
(h : A.IsSymm)


/-- A `V`-category is a category enriched in a monoidal category `V`.

Note that we do not assume that `V` is a concrete category,
so there may not be an "honest" underlying category at all!
-/
class EnrichedCategory (C : Type u₁) where
  Hom : C → C → V
  id (X : C) : 𝟙_ V ⟶ Hom X X
  comp (X Y Z : C) : Hom X Y ⊗ Hom Y Z ⟶ Hom X Z
  id_comp (X Y : C) : (λ_ (Hom X Y)).inv ≫ id X ▷ _ ≫ comp X X Y = 𝟙 _ := by aesop_cat
  comp_id (X Y : C) : (ρ_ (Hom X Y)).inv ≫ _ ◁ id Y ≫ comp X Y Y = 𝟙 _ := by aesop_cat
  assoc (W X Y Z : C) : (α_ _ _ _).inv ≫ comp W X Y ▷ _ ≫ comp W Y Z =
    _ ◁ comp X Y Z ≫ comp W X Z := by aesop_cat

[self : CategoryTheory.EnrichedCategory V C]

CategoryTheory.CategoryStruct.comp
    (CategoryTheory.MonoidalCategory.rightUnitor (CategoryTheory.EnrichedCategory.Hom X Y)).inv
    (CategoryTheory.CategoryStruct.comp
      (CategoryTheory.MonoidalCategory.whiskerLeft (CategoryTheory.EnrichedCategory.Hom X Y)
        (CategoryTheory.EnrichedCategory.id Y))
      (CategoryTheory.EnrichedCategory.comp X Y Y)) =
  CategoryTheory.CategoryStruct.id (CategoryTheory.EnrichedCategory.Hom X Y)


/-- Right unit cancellation `X ⊗ 1 ≅ X` in `Dial C`. -/
@[simps!] def rightUnitor (X : Dial C) : tensorObj X tensorUnit ≅ X

X.rightUnitor.inv.F = CategoryTheory.CategoryStruct.comp CategoryTheory.Limits.prod.snd CategoryTheory.Limits.prod.fst


/-- If `p ∉ s` is a prime and `n` is `s`-factored, then `p` and `n` are coprime. -/
lemma Prime.factoredNumbers_coprime {s : Finset ℕ} {p n : ℕ} (hp : p.Prime) (hs : p ∉ s)
    (hn : n ∈ factoredNumbers s) :
    Nat.Coprime p n

{s : Finset ℕ}
{p n : ℕ}
(hp : Nat.Prime p)
(hs : p ∉ s)
(hn : n ∈ Nat.factoredNumbers s)


/-- A gluing datum consists of
1. An index type `J`
2. An object `U i` for each `i : J`.
3. An object `V i j` for each `i j : J`.
4. A monomorphism `f i j : V i j ⟶ U i` for each `i j : J`.
5. A transition map `t i j : V i j ⟶ V j i` for each `i j : J`.
such that
6. `f i i` is an isomorphism.
7. `t i i` is the identity.
8. The pullback for `f i j` and `f i k` exists.
9. `V i j ×[U i] V i k ⟶ V i j ⟶ V j i` factors through `V j k ×[U j] V j i ⟶ V j i` via some
    `t' : V i j ×[U i] V i k ⟶ V j k ×[U j] V j i`.
10. `t' i j k ≫ t' j k i ≫ t' k i j = 𝟙 _`.
-/
-- Porting note(#5171): linter not ported yet
-- @[nolint has_nonempty_instance]
structure GlueData where
  J : Type v
  U : J → C
  V : J × J → C
  f : ∀ i j, V (i, j) ⟶ U i
  f_mono : ∀ i j, Mono (f i j) := by infer_instance
  f_hasPullback : ∀ i j k, HasPullback (f i j) (f i k) := by infer_instance
  f_id : ∀ i, IsIso (f i i) := by infer_instance
  t : ∀ i j, V (i, j) ⟶ V (j, i)
  t_id : ∀ i, t i i = 𝟙 _
  t' : ∀ i j k, pullback (f i j) (f i k) ⟶ pullback (f j k) (f j i)
  t_fac : ∀ i j k, t' i j k ≫ pullback.snd _ _ = pullback.fst _ _ ≫ t i j
  cocycle : ∀ i j k, t' i j k ≫ t' j k i ≫ t' k i j = 𝟙 _

{C : Type u₁}
[CategoryTheory.Category.{v, u₁} C]
(self : CategoryTheory.GlueData C)
(i : self.J)


@[to_additive (attr := simp)]
lemma UniformFun.ofFun_div [Div β] (f g : α → β) : ofFun (f / g) = ofFun f / ofFun g

{α : Type u_1}
{β : Type u_2}
[Sub β]
(f g : α → β)

UniformFun.ofFun (f - g) = UniformFun.ofFun f - UniformFun.ofFun g


theorem le_min {a b c : α} (h₁ : c ≤ a) (h₂ : c ≤ b) : c ≤ min a b

{α : Type u}
[LinearOrder α]
{a b c : α}
(h₁ : c ≤ a)
(h₂ : c ≤ b)


theorem mul [FaithfulSMul M X] {P Q : M} (h₁ : IsLprojection X P) (h₂ : IsLprojection X Q) :
    IsLprojection X (P * Q)

{X : Type u_1}
[NormedAddCommGroup X]
{M : Type u_2}
[Ring M]
[Module M X]
[FaithfulSMul M X]
{P Q : M}
(h₁ : IsLprojection X P)
(h₂ : IsLprojection X Q)


theorem num_dvd {x : RatFunc K} {p : K[X]} (hp : p ≠ 0) :
    num x ∣ p ↔ ∃ q : K[X], q ≠ 0 ∧ x = algebraMap _ _ p / algebraMap _ _ q

{K : Type u}
[Field K]
{x : RatFunc K}
{p : K[X]}
(hp : p ≠ 0)

x.num ∣ p ↔ ∃ q, q ≠ 0 ∧ x = (algebraMap K[X] (RatFunc K)) p / (algebraMap K[X] (RatFunc K)) q


/-- GCD monoid: a `CancelCommMonoidWithZero` with `gcd` (greatest common divisor) and
`lcm` (least common multiple) operations, determined up to a unit. The type class focuses on `gcd`
and we derive the corresponding `lcm` facts from `gcd`.
-/
class GCDMonoid (α : Type*) [CancelCommMonoidWithZero α] where
  /-- The greatest common divisor between two elements. -/
  gcd : α → α → α
  /-- The least common multiple between two elements. -/
  lcm : α → α → α
  /-- The GCD is a divisor of the first element. -/
  gcd_dvd_left : ∀ a b, gcd a b ∣ a
  /-- The GCD is a divisor of the second element. -/
  gcd_dvd_right : ∀ a b, gcd a b ∣ b
  /-- Any common divisor of both elements is a divisor of the GCD. -/
  dvd_gcd : ∀ {a b c}, a ∣ c → a ∣ b → a ∣ gcd c b
  /-- The product of two elements is `Associated` with the product of their GCD and LCM. -/
  gcd_mul_lcm : ∀ a b, Associated (gcd a b * lcm a b) (a * b)
  /-- `0` is left-absorbing. -/
  lcm_zero_left : ∀ a, lcm 0 a = 0
  /-- `0` is right-absorbing. -/
  lcm_zero_right : ∀ a, lcm a 0 = 0

{α : Type u_2}
[CancelCommMonoidWithZero α]
[self : GCDMonoid α]
(a : α)


lemma posFittingCompOf_le_posFittingComp (x : L) :
    posFittingCompOf R M x ≤ posFittingComp R L M

(R : Type u_2)
(L : Type u_3)
(M : Type u_4)
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[LieAlgebra.IsNilpotent R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
(x : L)

LieModule.posFittingCompOf R M x ≤ LieModule.posFittingComp R L M


theorem map_surjective (F : C ⥤ D) [Full F] :
    Function.Surjective (F.map : (X ⟶ Y) → (F.obj X ⟶ F.obj Y))

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{X Y : C}
(F : CategoryTheory.Functor C D)
[F.Full]


@[to_additive]
theorem disjoint_def' {H₁ H₂ : Subgroup G} :
    Disjoint H₁ H₂ ↔ ∀ {x y : G}, x ∈ H₁ → y ∈ H₂ → x = y → x = 1

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


@[simp]
theorem lift_self {c : Cone F} (t : IsLimit c) : t.lift c = 𝟙 c.pt

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


theorem isSeparable_range_derivWithin [SeparableSpace 𝕜] (f : 𝕜 → F) (s : Set 𝕜) :
    IsSeparable (range (derivWithin f s))

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[TopologicalSpace.SeparableSpace 𝕜]
(f : 𝕜 → F)
(s : Set 𝕜)

TopologicalSpace.IsSeparable (Set.range (derivWithin f s))


@[simp] lemma comap_basis'_iff {I X : Set α} :
    (N.comap f).Basis' I X ↔ N.Basis' (f '' I) (f '' X) ∧ I.InjOn f ∧ I ⊆ X

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{N : Matroid β}
{I X : Set α}

(N.comap f).Basis' I X ↔ N.Basis' (f '' I) (f '' X) ∧ Set.InjOn f I ∧ I ⊆ X


theorem mem_lowerBounds_image2 (ha : a ∈ lowerBounds s) (hb : b ∈ lowerBounds t) :
    f a b ∈ lowerBounds (image2 f s t)

{f : α → β → γ}

(h₀ : ∀ (b : β), Monotone (Function.swap f b))


theorem map_le_map_iff {f g : Filter α} {m : α → β} (hm : Injective m) :
    map m f ≤ map m g ↔ f ≤ g

{α : Type u}
{β : Type v}
{f g : Filter α}
{m : α → β}
(hm : Function.Injective m)


/-- An induction principle for closure membership. If `p` holds for `1` and all elements of `s`, and
is preserved under multiplication, then `p` holds for all elements of the closure of `s`. -/
@[to_additive (attr := elab_as_elim)
      "An induction principle for additive closure membership. If `p` holds for `0` and all
      elements of `s`, and is preserved under addition, then `p` holds for all elements of the
      additive closure of `s`."]
theorem closure_induction {p : M → Prop} {x} (h : x ∈ closure s) (mem : ∀ x ∈ s, p x) (one : p 1)
    (mul : ∀ x y, p x → p y → p (x * y)) : p x

(mul : ∀ (x y : M), p x → p y → p (x * y))


@[simp]
theorem restrictDom_apply (s : Set α) (l : α →₀ M) [DecidablePred (· ∈ s)] :
    (restrictDom M R s l : α →₀ M) = Finsupp.filter (· ∈ s) l

{α : Type u_1}
{M : Type u_2}
{R : Type u_5}
[Semiring R]
[AddCommMonoid M]
[Module R M]
(s : Set α)
(l : α →₀ M)
[DecidablePred fun x => x ∈ s]

↑((Finsupp.restrictDom M R s) l) = Finsupp.filter (fun x => x ∈ s) l


theorem xgcdAux_val (x y) : xgcdAux x 1 0 y 0 1 = (gcd x y, xgcd x y)

x.xgcdAux 1 0 y 0 1 = (x.gcd y, x.xgcd y)


@[simp]
theorem fract_neg_eq_zero {x : α} : fract (-x) = 0 ↔ fract x = 0

{α : Type u_2}
[LinearOrderedRing α]
[FloorRing α]
{x : α}


@[simp]
theorem partialSups_succ (f : ℕ → α) (n : ℕ) :
    partialSups f (n + 1) = partialSups f n ⊔ f (n + 1)

{α : Type u_1}
[SemilatticeSup α]
(f : ℕ → α)
(n : ℕ)

(partialSups f) (n + 1) = (partialSups f) n ⊔ f (n + 1)


theorem gcd_eq_one_iff_coprime {a b : ℤ} : Int.gcd a b = 1 ↔ IsCoprime a b


@[simp]
theorem associated_mul_unit_left_iff {β : Type*} [Monoid β] {a b : β} {u : Units β} :
    Associated (a * u) b ↔ Associated a b

{β : Type u_5}
[Monoid β]
{a b : β}
{u : βˣ}


protected theorem two_pow_pos (w : Nat) : 0 < 2^w


theorem piFinset_disjoint_of_disjoint (t₁ t₂ : ∀ a, Finset (δ a)) {a : α}
    (h : Disjoint (t₁ a) (t₂ a)) : Disjoint (piFinset t₁) (piFinset t₂)

{α : Type u_1}
[DecidableEq α]
[Fintype α]
{δ : α → Type u_3}
(t₁ t₂ : (a : α) → Finset (δ a))
{a : α}
(h : Disjoint (t₁ a) (t₂ a))

Disjoint (Fintype.piFinset t₁) (Fintype.piFinset t₂)


theorem Hereditarily.self (h : x.Hereditarily p) : p x

{p : ZFSet → Prop}
{x : ZFSet}
(h : ZFSet.Hereditarily p x)


@[to_additive]
theorem eq_one_of_mul_left (h : a * b = 1) : b = 1

{α : Type u}
[CommMonoid α]
[Subsingleton αˣ]
{a b : α}
(h : a * b = 1)


theorem abs_lt_norm_sub_of_not_sameRay (h : ¬SameRay ℝ x y) : |‖x‖ - ‖y‖| < ‖x - y‖

{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[StrictConvexSpace ℝ E]
{x y : E}
(h : ¬SameRay ℝ x y)


theorem pair_diff_right (hne : a ≠ b) : ({a, b} : Set α) \ {b} = {a}


theorem isHomogeneous_C (r : R) : IsHomogeneous (C r : MvPolynomial σ R) 0

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


theorem subset_ndunion_left (s t : Multiset α) : s ⊆ ndunion s t

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


@[simp] lemma _root_.Equiv.simpleGraph_refl : (Equiv.refl V).simpleGraph = Equiv.refl _

(Equiv.refl V).simpleGraph = Equiv.refl (SimpleGraph V)


theorem map_toDual (f : αᵒᵈ → βᵒᵈ) (a : WithTop α) :
    WithBot.map f (WithTop.toDual a) = a.map (toDual ∘ f)

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

WithBot.map f (WithTop.toDual a) = WithTop.map (⇑OrderDual.toDual ∘ f) a


lemma piecewise_cases {i} (p : π i → Prop) (hf : p (f i)) (hg : p (g i)) :
    p (s.piecewise f g i)

{ι : Type u_1}
{π : ι → Sort u_2}
(s : Finset ι)
(f g : (i : ι) → π i)
[(j : ι) → Decidable (j ∈ s)]
{i : ι}
(p : π i → Prop)
(hf : p (f i))
(hg : p (g i))


theorem lintegral_rw₁ {f f' : α → β} (h : f =ᵐ[μ] f') (g : β → ℝ≥0∞) :
    ∫⁻ a, g (f a) ∂μ = ∫⁻ a, g (f' a) ∂μ

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f f' : α → β}
(h : f =ᵐ[μ] f')
(g : β → ℝ≥0∞)

∫⁻ (a : α), g (f a) ∂μ = ∫⁻ (a : α), g (f' a) ∂μ


/-- Given a tagged partition `π` of `I` and a (not tagged) partition `πi J hJ` of each `J ∈ π`,
returns the tagged partition of `I` into all the boxes of all `πi J hJ`. The tag of a box `J`
is defined to be the `π.tag` of the box of the partition `π` that includes `J`.

Note that usually the result is not a Henstock partition. -/
@[simps (config := .asFn) tag]
def biUnionPrepartition (π : TaggedPrepartition I) (πi : ∀ J : Box ι, Prepartition J) :
    TaggedPrepartition I

(πi : (J : BoxIntegral.Box ι) → BoxIntegral.Prepartition J)

(π.biUnionPrepartition πi).tag = fun J => π.tag (π.biUnionIndex πi J)


/-- Taking the opposite of a functor is functorial.
-/
@[simps]
def opHom : (C ⥤ D)ᵒᵖ ⥤ Cᵒᵖ ⥤ Dᵒᵖ

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

∀ {X Y : (CategoryTheory.Functor C D)ᵒᵖ} (α : X ⟶ Y) (X_1 : Cᵒᵖ),
  ((CategoryTheory.Functor.opHom C D).map α).app X_1 = (α.unop.app (Opposite.unop X_1)).op


lemma forget₂_map_homMk :
    (forget₂ (ModuleCat R) AddCommGrp).map (homMk φ hφ) = φ

(φ : (CategoryTheory.forget₂ (ModuleCat R) AddCommGrp).obj M ⟶ (CategoryTheory.forget₂ (ModuleCat R) AddCommGrp).obj N)

(hφ : ∀ (r : R), φ ≫ N.smul r = M.smul r ≫ φ)

(CategoryTheory.forget₂ (ModuleCat R) AddCommGrp).map (ModuleCat.homMk φ hφ) = φ


/-- The truncation of an `ℕ`-indexed chain complex,
deleting the object at `0` and shifting everything else down.
-/
@[simps]
def truncate [HasZeroMorphisms V] : ChainComplex V ℕ ⥤ ChainComplex V ℕ

(ChainComplex.truncate.obj C).X i = C.X (i + 1)


/-- This right homology map data expresses compatibilities of the right homology data
constructed by `RightHomologyData.ofEpiOfIsIsoOfMono` -/
@[simps]
def ofEpiOfIsIsoOfMono (φ : S₁ ⟶ S₂) (h : RightHomologyData S₁)
    [Epi φ.τ₁] [IsIso φ.τ₂] [Mono φ.τ₃] :
    RightHomologyMapData φ h (RightHomologyData.ofEpiOfIsIsoOfMono φ h)

(CategoryTheory.ShortComplex.RightHomologyMapData.ofEpiOfIsIsoOfMono φ h).φH = CategoryTheory.CategoryStruct.id h.H


@[to_additive]
theorem map_iSup {ι : Sort*} (f : G →* N) (s : ι → Subgroup G) :
    (iSup s).map f = ⨆ i, (s i).map f

{G : Type u_1}
[AddGroup G]
{N : Type u_5}
[AddGroup N]
{ι : Sort u_7}
(f : G →+ N)
(s : ι → AddSubgroup G)

AddSubgroup.map f (iSup s) = ⨆ i, AddSubgroup.map f (s i)


/-- The cokernel of `biproduct.ι f i` is `⨁ Subtype.restrict {i}ᶜ f`. -/
@[simps!]
def cokernelBiproductιIso : cokernel (biproduct.ι f i) ≅ ⨁ Subtype.restrict (fun j => j ≠ i) f

[CategoryTheory.Limits.HasBiproduct (Subtype.restrict (fun j => j ≠ i) f)]

(CategoryTheory.Limits.cokernelBiproductιIso f i).inv =
  (CategoryTheory.Limits.biproduct.isColimitToSubtype f i).desc
    (CategoryTheory.Limits.colimit.cocone
      (CategoryTheory.Limits.parallelPair (CategoryTheory.Limits.biproduct.ι f i) 0))


@[simp]
theorem ack_le_iff_left {m₁ m₂ n : ℕ} : ack m₁ n ≤ ack m₂ n ↔ m₁ ≤ m₂


@[to_additive]
lemma BddAbove.range_inv {α : Type*} {f : α → G} (hf : BddAbove (range f)) :
    BddBelow (range (fun x => (f x)⁻¹))

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

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


theorem bddBelow_iff_exists_le [SemilatticeInf γ] {s : Set γ} (x₀ : γ) :
    BddBelow s ↔ ∃ x, x ≤ x₀ ∧ ∀ y ∈ s, x ≤ y

{γ : Type w}
[SemilatticeInf γ]
{s : Set γ}
(x₀ : γ)


@[simp]
theorem teichmuller_coeff_pos (r : R) : ∀ (n : ℕ) (_ : 0 < n), (teichmuller p r).coeff n = 0

(p : ℕ)
{R : Type u_1}
[hp : Fact (Nat.Prime p)]
[CommRing R]
(r : R)
(n : ℕ)

0 < n → ((WittVector.teichmuller p) r).coeff n = 0


/-- `M.restrictSubtype M.E` is isomorphic to `M`. -/
lemma map_val_restrictSubtype_ground_eq (M : Matroid α) :
    (M.restrictSubtype M.E).map (↑) Subtype.val_injective.injOn = M

(M.restrictSubtype M.E).map Subtype.val ⋯ = M


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

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


protected theorem measure_univ : volume (Set.univ : Set UnitAddCircle) = 1


theorem exists_covby_infinite_Iic_of_infinite_Iic [IsStronglyCoatomic α]
    (ha : (Set.Iic a).Infinite) (hfin : {x | x ⋖ a}.Finite) :
    ∃ b, b ⋖ a ∧ (Set.Iic b).Infinite

{α : Type u_1}
[PartialOrder α]
{a : α}
[IsStronglyCoatomic α]
(ha : (Set.Iic a).Infinite)
(hfin : {x | x ⋖ a}.Finite)


/-- The right-hand side of this equality can be parsed `star ∘ ⇑f` because of the
instance `Pi.instStarForAll`. Upon inspecting the goal, one sees `⊢ ↑(star f) = star ↑f`. -/
@[simp]
theorem coe_star (f : α →ᵇ β) : ⇑(star f) = star (⇑f)

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[SeminormedAddCommGroup β]
[StarAddMonoid β]
[NormedStarGroup β]
(f : BoundedContinuousFunction α β)


theorem gcd_mul_dvd_mul_gcd [GCDMonoid α] (k m n : α) : gcd k (m * n) ∣ gcd k m * gcd k n

{α : Type u_1}
[CancelCommMonoidWithZero α]
[GCDMonoid α]
(k m n : α)


/-- Differentiation under integral of `x ↦ ∫ F x a` at a given point `x₀`, assuming
`F x₀` is integrable, `x ↦ F x a` is locally Lipschitz on a ball around `x₀` for ae `a`
(with a ball radius independent of `a`) with integrable Lipschitz bound, and `F x` is ae-measurable
for `x` in a possibly smaller neighborhood of `x₀`. -/
theorem hasFDerivAt_integral_of_dominated_loc_of_lip {F' : α → H →L[𝕜] E}
    (ε_pos : 0 < ε) (hF_meas : ∀ᶠ x in 𝓝 x₀, AEStronglyMeasurable (F x) μ)
    (hF_int : Integrable (F x₀) μ) (hF'_meas : AEStronglyMeasurable F' μ)
    (h_lip : ∀ᵐ a ∂μ, LipschitzOnWith (Real.nnabs <| bound a) (F · a) (ball x₀ ε))
    (bound_integrable : Integrable (bound : α → ℝ) μ)
    (h_diff : ∀ᵐ a ∂μ, HasFDerivAt (F · a) (F' a) x₀) :
    Integrable F' μ ∧ HasFDerivAt (fun x ↦ ∫ a, F x a ∂μ) (∫ a, F' a ∂μ) x₀

(hF_meas : ∀ᶠ (x : H) in 𝓝 x₀, MeasureTheory.AEStronglyMeasurable (F x) μ)

(hF_int : MeasureTheory.Integrable (F x₀) μ)

(hF'_meas : MeasureTheory.AEStronglyMeasurable F' μ)

(h_lip : ∀ᵐ (a : α) ∂μ, LipschitzOnWith (Real.nnabs (bound a)) (fun x => F x a) (Metric.ball x₀ ε))

(bound_integrable : MeasureTheory.Integrable bound μ)

(h_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀)

MeasureTheory.Integrable F' μ ∧ HasFDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), F' a ∂μ) x₀


@[simp] theorem conj_symm (e : α ≃ β) : e.conj.symm = e.symm.conj


theorem comap_eq_sup_ker_of_disjoint {p : Submodule K V} [FiniteDimensional K p] {f : V →ₗ[K] V}
    (h : ∀ x ∈ p, f x ∈ p) (h' : Disjoint p (ker f)) :
    p.comap f = p ⊔ ker f

{K : Type u}
{V : Type v}
[DivisionRing K]
[AddCommGroup V]
[Module K V]
{p : Submodule K V}
[FiniteDimensional K ↥p]
{f : V →ₗ[K] V}
(h : ∀ x ∈ p, f x ∈ p)
(h' : Disjoint p (LinearMap.ker f))

Submodule.comap f p = p ⊔ LinearMap.ker f


/-- Two natural numbers are equal if and only if they have the same multiples. -/
lemma dvd_right_iff_eq : (∀ a : ℕ, m ∣ a ↔ n ∣ a) ↔ m = n


/-- If a set of functions is uniformly equicontinuous, the same is true for its closure in *any*
topology for which evaluation at any point is continuous. Since this will be applied to
`DFunLike` types, we state it for any topological space whith a map to `β → α` satisfying the right
continuity conditions. See also `Set.UniformEquicontinuous.closure` for a more familiar statement.
-/
theorem UniformEquicontinuous.closure' {A : Set Y} {u : Y → β → α}
    (hA : UniformEquicontinuous (u ∘ (↑) : A → β → α)) (hu : Continuous u) :
    UniformEquicontinuous (u ∘ (↑) : closure A → β → α)

(hA : UniformEquicontinuous (u ∘ Subtype.val))


@[simp]
theorem single_tsub : single i (a - b) = single i a - single i b

{ι : Type u_1}
{α : Type u_2}
[CanonicallyOrderedAddCommMonoid α]
[Sub α]
[OrderedSub α]
{i : ι}
{a b : α}

Finsupp.single i (a - b) = Finsupp.single i a - Finsupp.single i b


@[simp]
theorem mk_neg [∀ i, AddGroup (β i)] {s : Finset ι} {x : ∀ i : (↑s : Set ι), β i.1} :
    mk s (-x) = -mk s x

{ι : Type u}
{β : ι → Type v}
[DecidableEq ι]
[(i : ι) → AddGroup (β i)]
{s : Finset ι}
{x : (i : ↑↑s) → β ↑i}


lemma isRatCondKernelCDFAux_preCDF (ρ : Measure (α × ℝ)) [IsFiniteMeasure ρ] :
    IsRatCondKernelCDFAux (fun p r ↦ (preCDF ρ r p.2).toReal)
      (Kernel.const Unit ρ) (Kernel.const Unit ρ.fst)

{α : Type u_1}
{mα : MeasurableSpace α}
(ρ : MeasureTheory.Measure (α × ℝ))
[MeasureTheory.IsFiniteMeasure ρ]

ProbabilityTheory.IsRatCondKernelCDFAux (fun p r => (ProbabilityTheory.preCDF ρ r p.2).toReal)
  (ProbabilityTheory.Kernel.const Unit ρ) (ProbabilityTheory.Kernel.const Unit ρ.fst)


theorem matPolyEquiv_smul_one (p : R[X]) :
    matPolyEquiv (p • (1 : Matrix n n R[X])) = p.map (algebraMap R (Matrix n n R))

{R : Type u_1}
[CommSemiring R]
{n : Type w}
[DecidableEq n]
[Fintype n]
(p : R[X])

matPolyEquiv (p • 1) = Polynomial.map (algebraMap R (Matrix n n R)) p


@[ext]
lemma rightHomology_ext {A : C} (f₁ f₂ : A ⟶ S.rightHomology)
    (h : f₁ ≫ S.rightHomologyι = f₂ ≫ S.rightHomologyι) : f₁ = f₂

(h : CategoryTheory.CategoryStruct.comp f₁ S.rightHomologyι = CategoryTheory.CategoryStruct.comp f₂ S.rightHomologyι)


@[elab_as_elim]
theorem inductionOn₃ (f : Germ l β) (g : Germ l γ) (h : Germ l δ)
    {p : Germ l β → Germ l γ → Germ l δ → Prop}
    (H : ∀ (f : α → β) (g : α → γ) (h : α → δ), p f g h) : p f g h

{p : l.Germ β → l.Germ γ → l.Germ δ → Prop}

(H : ∀ (f : α → β) (g : α → γ) (h : α → δ), p ↑f ↑g ↑h)


theorem MellinConvergent.cpow_smul {f : ℝ → E} {s a : ℂ} :
    MellinConvergent (fun t => (t : ℂ) ^ a • f t) s ↔ MellinConvergent f (s + a)

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
{f : ℝ → E}
{s a : ℂ}

MellinConvergent (fun t => ↑t ^ a • f t) s ↔ MellinConvergent f (s + a)


theorem card_algHom_le_finrank : Nat.card (M →ₐ[K] L) ≤ finrank K M

(K : Type u_1)
(M : Type u_2)
(L : Type v)
[CommRing K]
[Ring M]
[Algebra K M]
[Module.Free K M]
[Module.Finite K M]
[CommRing L]
[IsDomain L]
[Algebra K L]

Nat.card (M →ₐ[K] L) ≤ FiniteDimensional.finrank K M


theorem Antiperiodic.add_nat_mul_eq [Semiring α] [Ring β] (h : Antiperiodic f c) (n : ℕ) :
    f (x + n * c) = (-1) ^ n * f x

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{c x : α}
[Semiring α]
[Ring β]
(h : Function.Antiperiodic f c)
(n : ℕ)


theorem eventually_eq_or_eventually_ne (hf : AnalyticAt 𝕜 f z₀) (hg : AnalyticAt 𝕜 g z₀) :
    (∀ᶠ z in 𝓝 z₀, f z = g z) ∨ ∀ᶠ z in 𝓝[≠] z₀, f z ≠ g z

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{f g : 𝕜 → E}
{z₀ : 𝕜}
(hf : AnalyticAt 𝕜 f z₀)
(hg : AnalyticAt 𝕜 g z₀)

(∀ᶠ (z : 𝕜) in 𝓝 z₀, f z = g z) ∨ ∀ᶠ (z : 𝕜) in 𝓝[≠] z₀, f z ≠ g z


/-- Taking a product over `s : Finset α` is the same as multiplying the value on a single element
`f a` by the product of `s.erase a`.

See `Multiset.prod_map_erase` for the `Multiset` version. -/
@[to_additive "Taking a sum over `s : Finset α` is the same as adding the value on a single element
`f a` to the sum over `s.erase a`.

See `Multiset.sum_map_erase` for the `Multiset` version."]
theorem mul_prod_erase [DecidableEq α] (s : Finset α) (f : α → β) {a : α} (h : a ∈ s) :
    (f a * ∏ x ∈ s.erase a, f x) = ∏ x ∈ s, f x

{α : Type u_3}
{β : Type u_4}
[AddCommMonoid β]
[DecidableEq α]
(s : Finset α)
(f : α → β)
{a : α}
(h : a ∈ s)

f a + ∑ x ∈ s.erase a, f x = ∑ x ∈ s, f x


@[gcongr] lemma smul_lt_smul_of_pos_right [SMulPosStrictMono α β] (ha : a₁ < a₂) (hb : 0 < b) :
    a₁ • b < a₂ • b

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


theorem X_pow_sub_one_mul_prod_cyclotomic_eq_X_pow_sub_one_of_dvd (R) [CommRing R] {d n : ℕ}
    (h : d ∈ n.properDivisors) :
    ((X ^ d - 1) * ∏ x ∈ n.divisors \ d.divisors, cyclotomic x R) = X ^ n - 1

(R : Type u_1)
[CommRing R]
{d n : ℕ}
(h : d ∈ n.properDivisors)

(Polynomial.X ^ d - 1) * ∏ x ∈ n.divisors \ d.divisors, Polynomial.cyclotomic x R = Polynomial.X ^ n - 1


@[simp]
lemma Scheme.iso_inv_val_base_hom_val_base_apply {X Y : Scheme.{u}} (e : X ≅ Y) (y : Y) :
    (e.hom.val.base (e.inv.val.base y)) = y

{X Y : AlgebraicGeometry.Scheme}
(e : X ≅ Y)
(y : ↑↑Y.toPresheafedSpace)


/-- The functor `(F ⋙ L, R) ⥤ (L, R)` -/
@[simps]
def preRight (L : A ⥤ T) (F : C ⥤ B) (R : B ⥤ T) : Comma L (F ⋙ R) ⥤ Comma L R

{A : Type u₁}
[CategoryTheory.Category.{v₁, u₁} A]
{B : Type u₂}
[CategoryTheory.Category.{v₂, u₂} B]
{T : Type u₃}
[CategoryTheory.Category.{v₃, u₃} T]
{C : Type u₄}
[CategoryTheory.Category.{v₄, u₄} C]
(L : CategoryTheory.Functor A T)
(F : CategoryTheory.Functor C B)
(R : CategoryTheory.Functor B T)
(X : CategoryTheory.Comma L (F.comp R))

((CategoryTheory.Comma.preRight L F R).obj X).right = F.obj X.right


@[simp]
theorem round_zero : round (0 : α) = 0

{α : Type u_2}
[LinearOrderedRing α]
[FloorRing α]


@[to_additive]
theorem one_nonempty : (1 : Set α).Nonempty


theorem _root_.Measurable.lintegral_kernel_prod_right' {f : α × β → ℝ≥0∞} (hf : Measurable f) :
    Measurable fun a => ∫⁻ b, f (a, b) ∂κ a

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
{κ : ProbabilityTheory.Kernel α β}
[ProbabilityTheory.IsSFiniteKernel κ]
{f : α × β → ℝ≥0∞}
(hf : Measurable f)

Measurable fun a => ∫⁻ (b : β), f (a, b) ∂κ a


theorem sum_Ioc_inv_sq_le_sub {k n : ℕ} (hk : k ≠ 0) (h : k ≤ n) :
    (∑ i ∈ Ioc k n, ((i : α) ^ 2)⁻¹) ≤ (k : α)⁻¹ - (n : α)⁻¹

{α : Type u_1}
[LinearOrderedField α]
{k n : ℕ}
(hk : k ≠ 0)
(h : k ≤ n)

∑ i ∈ Finset.Ioc k n, (↑i ^ 2)⁻¹ ≤ (↑k)⁻¹ - (↑n)⁻¹


@[simp]
theorem coe_id : ⇑(CoalgHom.id R A) = id

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[AddCommMonoid A]
[Module R A]
[CoalgebraStruct R A]


/-- Vertical composition of strong natural transformations. -/
@[simps!]
def vcomp (η : StrongOplaxNatTrans F G) (θ : StrongOplaxNatTrans G H) : StrongOplaxNatTrans F H

{F G H : CategoryTheory.OplaxFunctor B C}

(η : CategoryTheory.StrongOplaxNatTrans F G)

(θ : CategoryTheory.StrongOplaxNatTrans G H)

(η.vcomp θ).app a = CategoryTheory.CategoryStruct.comp (η.app a) (θ.app a)


theorem sub_eq_add_neg (l₁ l₂ : LinearCombo) : l₁ - l₂ = l₁ + -l₂


theorem isCycleOn_of_subsingleton [Subsingleton α] (f : Perm α) (s : Set α) : f.IsCycleOn s

{α : Type u_2}
[Subsingleton α]
(f : Equiv.Perm α)
(s : Set α)


theorem generateFrom_singleton_empty : generateFrom {∅} = (⊥ : MeasurableSpace α)


lemma continuous_bool_rng [TopologicalSpace X] {f : X → Bool} (b : Bool) :
    Continuous f ↔ IsClopen (f ⁻¹' {b})

{X : Type u}
[TopologicalSpace X]
{f : X → Bool}
(b : Bool)


theorem tendsto_const_mul_pow_atTop (hn : n ≠ 0) (hc : 0 < c) :
    Tendsto (fun x => c * x ^ n) atTop atTop

{α : Type u_3}
[LinearOrderedSemifield α]
{c : α}
{n : ℕ}
(hn : n ≠ 0)
(hc : 0 < c)

Filter.Tendsto (fun x => c * x ^ n) Filter.atTop Filter.atTop


theorem HasFiniteFPowerSeriesOnBall.mk' {f : E → F} {p : FormalMultilinearSeries 𝕜 E F} {x : E}
    {n : ℕ} {r : ℝ≥0∞} (finite : ∀ (m : ℕ), n ≤ m → p m = 0) (pos : 0 < r)
    (sum_eq : ∀ y ∈ EMetric.ball 0 r, (∑ i ∈ Finset.range n, p i fun _ ↦ y) = f (x + y)) :
    HasFiniteFPowerSeriesOnBall f p x n r

(sum_eq : ∀ y ∈ EMetric.ball 0 r, (∑ i ∈ Finset.range n, (p i) fun x => y) = f (x + y))


@[ext]
theorem ext (h : ∀ x, e x = e' x) : e = e'

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


/-- See `add_tsub_cancel_left` for the equality if `ContravariantClass α α (+) (≤)`. -/
theorem add_tsub_le_left : a + b - a ≤ b

{α : Type u_1}
[Preorder α]
[AddCommSemigroup α]
[Sub α]
[OrderedSub α]
{a b : α}


@[simp]
lemma cfc_const_zero : cfc (fun _ : R ↦ 0) a = 0

(R : Type u_1)
{A : Type u_2}
{p : A → Prop}
[CommSemiring R]
[StarRing R]
[MetricSpace R]
[TopologicalSemiring R]
[ContinuousStar R]
[TopologicalSpace A]
[Ring A]
[StarRing A]
[Algebra R A]
[ContinuousFunctionalCalculus R p]
(a : A)


protected theorem Commute.inv_sub_inv (hab : Commute a b) (ha : a ≠ 0) (hb : b ≠ 0) :
    a⁻¹ - b⁻¹ = (b - a) / (a * b)

{K : Type u_3}
[DivisionRing K]
{a b : K}
(hab : Commute a b)
(ha : a ≠ 0)
(hb : b ≠ 0)


/-- ε-δ characterization of uniform continuity on pseudoemetric spaces -/
theorem uniformContinuous_iff [PseudoEMetricSpace β] {f : α → β} :
    UniformContinuous f ↔ ∀ ε > 0, ∃ δ > 0, ∀ {a b : α}, edist a b < δ → edist (f a) (f b) < ε

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


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

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


theorem comp_apply (η : Kernel β γ) (κ : Kernel α β) (a : α) : (η ∘ₖ κ) a = (κ a).bind η

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
{γ : Type u_4}
{mγ : MeasurableSpace γ}
(η : ProbabilityTheory.Kernel β γ)
(κ : ProbabilityTheory.Kernel α β)
(a : α)


/-- If `A` is subterminal, its diagonal morphism is an isomorphism.
The converse of `isSubterminal_of_isIso_diag`.
-/
theorem IsSubterminal.isIso_diag (hA : IsSubterminal A) [HasBinaryProduct A A] : IsIso (diag A)


@[to_additive]
theorem surj (f : LocalizationMap S N) (z : N) : ∃ x : M × S, z * f.toMap x.2 = f.toMap x.1

{M : Type u_1}
[CommMonoid M]
{S : Submonoid M}
{N : Type u_2}
[CommMonoid N]
(f : S.LocalizationMap N)
(z : N)


theorem rpow_add_rpow_le_add {p : ℝ} (a b : ℝ≥0) (hp1 : 1 ≤ p) :
    (a ^ p + b ^ p) ^ (1 / p) ≤ a + b


@[simp] lemma isNilpotent_reverse_iff :
    IsNilpotent P.reverse ↔ IsNilpotent P

{R : Type u_1}
[CommRing R]
{P : Polynomial R}


theorem lsubtypeDomain_apply (f : α →₀ M) :
    (lsubtypeDomain s : (α →₀ M) →ₗ[R] s →₀ M) f = subtypeDomain (fun x => x ∈ s) f

{α : Type u_1}
{M : Type u_2}
{R : Type u_5}
[Semiring R]
[AddCommMonoid M]
[Module R M]
(s : Set α)
(f : α →₀ M)

(Finsupp.lsubtypeDomain s) f = Finsupp.subtypeDomain (fun x => x ∈ s) f


theorem ae_null_of_compProd_null (h : (κ ⊗ₖ η) a s = 0) :
    (fun b => η (a, b) (Prod.mk b ⁻¹' s)) =ᵐ[κ a] 0

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

(fun b => (η (a, b)) (Prod.mk b ⁻¹' s)) =ᵐ[κ a] 0


theorem transitive (hS : S ∈ J X) (R : Sieve X) (h : ∀ ⦃Y⦄ ⦃f : Y ⟶ X⦄, S f → R.pullback f ∈ J Y) :
    R ∈ J X

(J : CategoryTheory.GrothendieckTopology C)

(h : ∀ ⦃Y : C⦄ ⦃f : Y ⟶ X⦄, S.arrows f → CategoryTheory.Sieve.pullback f R ∈ J.sieves Y)


theorem image_symmDiff (hf : Injective f) (s t : Set α) : f '' s ∆ t = (f '' s) ∆ (f '' t)

{α : Type u_1}
{β : Type u_2}
{f : α → β}
(hf : Function.Injective f)
(s t : Set α)

f '' symmDiff s t = symmDiff (f '' s) (f '' t)


@[simp]
theorem pred_apply {n : ℕ} (a : Fin (n + 1)) : PredOrder.pred a = if a = 0 then 0 else a - 1


theorem monotone_projIcc : Monotone (projIcc a b h)

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


@[to_additive sum_le_sum]
lemma Forall₂.prod_le_prod' [Preorder M] [CovariantClass M M (Function.swap (· * ·)) (· ≤ ·)]
    [CovariantClass M M (· * ·) (· ≤ ·)] {l₁ l₂ : List M} (h : Forall₂ (· ≤ ·) l₁ l₂) :
    l₁.prod ≤ l₂.prod

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

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

(h : List.Forall₂ (fun x x_1 => x ≤ x_1) l₁ l₂)


theorem mem_properDivisors_prime_pow {p : ℕ} (pp : p.Prime) (k : ℕ) {x : ℕ} :
    x ∈ properDivisors (p ^ k) ↔ ∃ (j : ℕ) (_ : j < k), x = p ^ j

{p : ℕ}
(pp : Nat.Prime p)
(k : ℕ)
{x : ℕ}

x ∈ (p ^ k).properDivisors ↔ ∃ j, ∃ (_ : j < k), x = p ^ j


/-- `X` commutes with everything, even when the coefficients are noncommutative. -/
theorem X_mul : X * p = p * X


@[to_additive (attr := simp)]
theorem mker_swap : MonoidHom.mker (swap M N) = ⊥

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

AddMonoidHom.mker (AddMonoid.Coprod.swap M N) = ⊥


@[to_additive (attr := simp, norm_cast)]
lemma coe_div_coe [SetLike S G] [DivisionMonoid G] [SubgroupClass S G] (H : S) :
    H / H = (H : Set G)

{G : Type u_2}
{S : Type u_4}
[SetLike S G]
[SubtractionMonoid G]
[AddSubgroupClass S G]
(H : S)


/-- `Equiv.piCongrLeft` as a homeomorphism: this is the natural homeomorphism
`Π i, Y (e i) ≃ₜ Π j, Y j` obtained from a bijection `ι ≃ ι'`. -/
@[simps! apply toEquiv]
def piCongrLeft {ι ι' : Type*} {Y : ι' → Type*} [∀ j, TopologicalSpace (Y j)]
    (e : ι ≃ ι') : (∀ i, Y (e i)) ≃ₜ ∀ j, Y j

{ι : Type u_6}
{ι' : Type u_7}
{Y : ι' → Type u_8}
[(j : ι') → TopologicalSpace (Y j)]
(e : ι ≃ ι')

∀ (a : (b : ι) → Y (e.symm.symm b)) (a_1 : ι'),
  (Homeomorph.piCongrLeft e) a a_1 = (Equiv.piCongrLeft' Y e.symm).symm a a_1


/-- A lax functor `F` between bicategories `B` and `C` consists of a function between objects
`F.obj`, a function between 1-morphisms `F.map`, and a function between 2-morphisms `F.map₂`.

Unlike functors between categories, `F.map` do not need to strictly commute with the composition,
and do not need to strictly preserve the identity. Instead, there are specified 2-morphisms
`𝟙 (F.obj a) ⟶ F.map (𝟙 a)` and `F.map f ≫ F.map g ⟶ F.map (f ≫ g)`.

`F.map₂` strictly commute with compositions and preserve the identity. They also preserve the
associator, the left unitor, and the right unitor modulo some adjustments of domains and codomains
of 2-morphisms.
-/
structure LaxFunctor (B: Type u₁) [Bicategory.{w₁, v₁} B] (C : Type u₂) [Bicategory.{w₂, v₂} C]
    extends PrelaxFunctor B C where
  /-- The 2-morphism underlying the lax unity constraint. -/
  mapId (a : B) : 𝟙 (obj a) ⟶ map (𝟙 a)
  /-- The 2-morphism underlying the lax functoriality constraint. -/
  mapComp {a b c : B} (f : a ⟶ b) (g : b ⟶ c) : map f ≫ map g ⟶ map (f ≫ g)
  /-- Naturality of the lax functoriality constraight, on the left. -/
  mapComp_naturality_left :
    ∀ {a b c : B} {f f' : a ⟶ b} (η : f ⟶ f') (g : b ⟶ c),
      mapComp f g ≫ map₂ (η ▷ g) = map₂ η ▷ map g ≫ mapComp f' g:= by aesop_cat
  /-- Naturality of the lax functoriality constraight, on the right. -/
  mapComp_naturality_right :
    ∀ {a b c : B} (f : a ⟶ b) {g g' : b ⟶ c} (η : g ⟶ g'),
     mapComp f g ≫ map₂ (f ◁ η) = map f ◁ map₂ η ≫ mapComp f g' := by aesop_cat
  /-- Lax associativity -/
  map₂_associator :
    ∀ {a b c d : B} (f : a ⟶ b) (g : b ⟶ c) (h : c ⟶ d),
      mapComp f g ▷ map h ≫ mapComp (f ≫ g) h ≫ map₂ (α_ f g h).hom =
      (α_ (map f) (map g) (map h)).hom ≫ map f ◁ mapComp g h ≫ mapComp f (g ≫ h) := by aesop_cat
  /-- Lax left unity -/
  map₂_leftUnitor :
    ∀ {a b : B} (f : a ⟶ b),
      map₂ (λ_ f).inv = (λ_ (map f)).inv ≫ mapId a ▷ map f ≫ mapComp (𝟙 a) f := by aesop_cat
  /-- Lax right unity -/
  map₂_rightUnitor :
    ∀ {a b : B} (f : a ⟶ b),
      map₂ (ρ_ f).inv = (ρ_ (map f)).inv ≫ map f ◁ mapId b ≫ mapComp f (𝟙 b) := by aesop_cat

{B : Type u₁}
[CategoryTheory.Bicategory B]
{C : Type u₂}
[CategoryTheory.Bicategory C]
(self : CategoryTheory.LaxFunctor B C)
{a b c : B}
{f f' : a ⟶ b}
(η : f ⟶ f')
(g : b ⟶ c)

CategoryTheory.CategoryStruct.comp (self.mapComp f g) (self.map₂ (CategoryTheory.Bicategory.whiskerRight η g)) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.whiskerRight (self.map₂ η) (self.map g))
    (self.mapComp f' g)


/-- The definition of `vectorSpan`, for rewriting. -/
theorem vectorSpan_def (s : Set P) : vectorSpan k s = Submodule.span k (s -ᵥ s)

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


theorem ne_zero_of_lt (h : b < a) : a ≠ 0

{α : Type u_1}
[LinearOrderedCommMonoidWithZero α]
{a b : α}
(h : b < a)


theorem liftEquiv_apply : liftEquiv M i p j = lift i j p

{K : Type u_1}
{L : Type u_2}
{M : Type u_3}
[CommRing K]
[CommRing L]
[CommRing M]
(i : K →+* L)
(j : K →+* M)
(p : ℕ)
[ExpChar K p]
[ExpChar L p]
[ExpChar M p]
[PerfectRing M p]
[IsPRadical i p]

(PerfectRing.liftEquiv M i p) j = PerfectRing.lift i j p


/-- For a function on a convex set in a linearly ordered space (where the order and the algebraic
structures aren't necessarily compatible), in order to prove that it is convex, it suffices to
verify the inequality `f (a • x + b • y) ≤ a • f x + b • f y` only for `x < y` and positive `a`,
`b`. The main use case is `E = 𝕜` however one can apply it, e.g., to `𝕜^n` with lexicographic order.
-/
theorem LinearOrder.convexOn_of_lt (hs : Convex 𝕜 s)
    (hf : ∀ ⦃x⦄, x ∈ s → ∀ ⦃y⦄, y ∈ s → x < y → ∀ ⦃a b : 𝕜⦄, 0 < a → 0 < b → a + b = 1 →
      f (a • x + b • y) ≤ a • f x + b • f y) :
    ConvexOn 𝕜 s f

(hf :
  ∀ ⦃x : E⦄,
    x ∈ s → ∀ ⦃y : E⦄, y ∈ s → x < y → ∀ ⦃a b : 𝕜⦄, 0 < a → 0 < b → a + b = 1 → f (a • x + b • y) ≤ a • f x + b • f y)


@[simp]
lemma leftHomologyMap'_smul :
    leftHomologyMap' (a • φ) h₁ h₂ = a • leftHomologyMap' φ h₁ h₂

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

CategoryTheory.ShortComplex.leftHomologyMap' (a • φ) h₁ h₂ = a • CategoryTheory.ShortComplex.leftHomologyMap' φ h₁ h₂


protected theorem mul_inv_cancel (x : R[R⁰⁻¹]) (h : x ≠ 0) : x * x⁻¹ = 1

(x : OreLocalization (nonZeroDivisors R) R)


theorem ContinuousAt.comp_upperSemicontinuousAt_antitone {g : γ → δ} {f : α → γ}
    (hg : ContinuousAt g (f x)) (hf : UpperSemicontinuousAt f x) (gmon : Antitone g) :
    LowerSemicontinuousAt (g ∘ f) x

{α : Type u_1}
[TopologicalSpace α]
{x : α}
{γ : Type u_3}
[LinearOrder γ]
[TopologicalSpace γ]
[OrderTopology γ]
{δ : Type u_4}
[LinearOrder δ]
[TopologicalSpace δ]
[OrderTopology δ]
{g : γ → δ}
{f : α → γ}
(hg : ContinuousAt g (f x))
(hf : UpperSemicontinuousAt f x)
(gmon : Antitone g)


@[to_additive]
theorem MeasurableSet.const_smul {G α : Type*} [Group G] [MulAction G α] [MeasurableSpace G]
    [MeasurableSpace α] [MeasurableSMul G α] {s : Set α} (hs : MeasurableSet s) (a : G) :
    MeasurableSet (a • s)

{G : Type u_1}
{α : Type u_2}
[Group G]
[MulAction G α]
[MeasurableSpace G]
[MeasurableSpace α]
[MeasurableSMul G α]
{s : Set α}
(hs : MeasurableSet s)
(a : G)


theorem coe_nsmul {n : ℕ} {x : 𝕜} : (↑(n • x) : AddCircle p) = n • (x : AddCircle p)

{𝕜 : Type u_1}
[LinearOrderedAddCommGroup 𝕜]
(p : 𝕜)
{n : ℕ}
{x : 𝕜}


@[simps]
instance invertible_mk'_one (s : M) : Invertible (IsLocalization.mk' S (1 : R) s)

{R : Type u_1}
[CommSemiring R]
{M : Submonoid R}
{S : Type u_2}
[CommSemiring S]
[Algebra R S]
[IsLocalization M S]
(s : ↥M)

⅟(IsLocalization.mk' S 1 s) = (algebraMap R S) ↑s


/-- A weaker version of `Matrix.adjugate_adjugate` that uses `Nontrivial`. -/
theorem adjugate_adjugate' (A : Matrix n n α) [Nontrivial n] :
    adjugate (adjugate A) = det A ^ (Fintype.card n - 2) • A

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

A.adjugate.adjugate = A.det ^ (Fintype.card n - 2) • A


lemma div_le_egauge_ball (r : ℝ≥0) (x : E) : ‖x‖₊ / r ≤ egauge 𝕜 (ball 0 r) x

(𝕜 : Type u_1)
[NormedField 𝕜]
{E : Type u_3}
[SeminormedAddCommGroup E]
[NormedSpace 𝕜 E]
(r : ℝ≥0)
(x : E)

↑‖x‖₊ / ↑r ≤ egauge 𝕜 (Metric.ball 0 ↑r) x


/-- The determinant of `rotation` (as a linear equiv) is equal to `1`. -/
@[simp]
theorem linearEquiv_det_rotation (θ : Real.Angle) :
    LinearEquiv.det (o.rotation θ).toLinearEquiv = 1

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


/-- Porting note: if we generate this with `@[simps]` the linter complains some types in the LHS
simplify. -/
theorem homEquiv_symm_apply_hom (f : B ⟶ (Rep.ihom A).obj C) :
    ((homEquiv A B C).symm f).hom = TensorProduct.uncurry k A B C f.hom.flip

{k G : Type u}
[CommRing k]
[Group G]
{A B C : Rep k G}
(f : B ⟶ A.ihom.obj C)

((A.homEquiv B C).symm f).hom =
  (TensorProduct.uncurry k (CoeSort.coe A) (CoeSort.coe B) (CoeSort.coe C)) (LinearMap.flip f.hom)


@[to_additive]
theorem CauchySeq.inv {ι : Type*} [Preorder ι] {u : ι → α} (h : CauchySeq u) :
    CauchySeq u⁻¹

{α : Type u_1}
[UniformSpace α]
[Group α]
[UniformGroup α]
{ι : Type u_3}
[Preorder ι]
{u : ι → α}
(h : CauchySeq u)


@[simp]
theorem domCoprod'_apply (a : Mᵢ [⋀^ιa]→ₗ[R'] N₁) (b : Mᵢ [⋀^ιb]→ₗ[R'] N₂) :
    domCoprod' (a ⊗ₜ[R'] b) = domCoprod a b

{ιa : Type u_1}
{ιb : Type u_2}
[Fintype ιa]
[Fintype ιb]
{R' : Type u_3}
{Mᵢ : Type u_4}
{N₁ : Type u_5}
{N₂ : Type u_6}
[CommSemiring R']
[AddCommGroup N₁]
[Module R' N₁]
[AddCommGroup N₂]
[Module R' N₂]
[AddCommMonoid Mᵢ]
[Module R' Mᵢ]
[DecidableEq ιa]
[DecidableEq ιb]
(a : Mᵢ [⋀^ιa]→ₗ[R'] N₁)
(b : Mᵢ [⋀^ιb]→ₗ[R'] N₂)

AlternatingMap.domCoprod' (a ⊗ₜ[R'] b) = a.domCoprod b


lemma weightSpace_le_weightSpaceOf (x : L) (χ : L → R) :
    weightSpace M χ ≤ weightSpaceOf M (χ x) x

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

LieModule.weightSpace M χ ≤ LieModule.weightSpaceOf M (χ x) x


/-- Constructor for bicomplexes taking as inputs a graded object, horizontal differentials
and vertical differentials satisfying suitable relations. -/
@[simps]
def ofGradedObject :
    HomologicalComplex₂ C c₁ c₂

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

(d₁ : (i₁ i₁' : I₁) → (i₂ : I₂) → X (i₁, i₂) ⟶ X (i₁', i₂))

(d₂ : (i₁ : I₁) → (i₂ i₂' : I₂) → X (i₁, i₂) ⟶ X (i₁, i₂'))

(shape₁ : ∀ (i₁ i₁' : I₁), ¬c₁.Rel i₁ i₁' → ∀ (i₂ : I₂), d₁ i₁ i₁' i₂ = 0)

(shape₂ : ∀ (i₁ : I₁) (i₂ i₂' : I₂), ¬c₂.Rel i₂ i₂' → d₂ i₁ i₂ i₂' = 0)

(d₁_comp_d₁ : ∀ (i₁ i₁' i₁'' : I₁) (i₂ : I₂), d₁ i₁ i₁' i₂ ≫ d₁ i₁' i₁'' i₂ = 0)

(d₂_comp_d₂ : ∀ (i₁ : I₁) (i₂ i₂' i₂'' : I₂), d₂ i₁ i₂ i₂' ≫ d₂ i₁ i₂' i₂'' = 0)

(comm : ∀ (i₁ i₁' : I₁) (i₂ i₂' : I₂), d₁ i₁ i₁' i₂ ≫ d₂ i₁' i₂ i₂' = d₂ i₁ i₂ i₂' ≫ d₁ i₁ i₁' i₂')

((HomologicalComplex₂.ofGradedObject c₁ c₂ X d₁ d₂ shape₁ shape₂ d₁_comp_d₁ d₂_comp_d₂ comm).X i₁).X i₂ = X (i₁, i₂)


@[simp]
theorem coe_range : (f.range : Set N) = Set.range f

{R : Type u}
{L : Type v}
{M : Type w}
{N : Type w₁}
[CommRing R]
[LieRing L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[AddCommGroup N]
[Module R N]
[LieRingModule L N]
(f : M →ₗ⁅R,L⁆ N)


@[to_additive]
theorem csSup_inv (hs₀ : s.Nonempty) (hs₁ : BddBelow s) : sSup s⁻¹ = (sInf s)⁻¹

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

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


@[simp]
theorem tropEquiv_symm_coe_fn : (tropEquiv.symm : Tropical R → R) = untrop


/-- Shiftright on successor with division moved inside. -/
theorem shiftRight_succ_inside : ∀m n, m >>> (n+1) = (m/2) >>> n


theorem tendsto_atBot_ciInf (h_mono : Monotone f) (hbdd : BddBelow <| range f) :
    Tendsto f atBot (𝓝 (⨅ i, f i))

{α : Type u_1}
{ι : Type u_3}
[Preorder ι]
[TopologicalSpace α]
[ConditionallyCompleteLattice α]
[InfConvergenceClass α]
{f : ι → α}
(h_mono : Monotone f)
(hbdd : BddBelow (Set.range f))

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


nonrec theorem Infinitesimal.mul {x y : ℝ*} (hx : Infinitesimal x) (hy : Infinitesimal y) :
    Infinitesimal (x * y)

{x y : ℝ*}
(hx : x.Infinitesimal)
(hy : y.Infinitesimal)


lemma cfc_mono {f g : R → R} {a : A} (h : ∀ x ∈ spectrum R a, f x ≤ g x)
    (hf : ContinuousOn f (spectrum R a) := by cfc_cont_tac)
    (hg : ContinuousOn g (spectrum R a) := by cfc_cont_tac) :
    cfc f a ≤ cfc g a

[∀ (α : Type u_1) [inst : TopologicalSpace α], StarOrderedRing C(α, R)]


theorem integrableOn_Ioi_rpow_iff {s t : ℝ} (ht : 0 < t) :
    IntegrableOn (fun x ↦ x ^ s) (Ioi t) ↔ s < -1

MeasureTheory.IntegrableOn (fun x => x ^ s) (Set.Ioi t) MeasureTheory.volume ↔ s < -1


/-- The conditional cdf tends to 0 at -∞ for all `a : α`. -/
theorem tendsto_condCDF_atBot (ρ : Measure (α × ℝ)) (a : α) :
    Tendsto (condCDF ρ a) atBot (𝓝 0)

{α : Type u_1}
{mα : MeasurableSpace α}
(ρ : MeasureTheory.Measure (α × ℝ))
(a : α)

Filter.Tendsto (↑(ProbabilityTheory.condCDF ρ a)) Filter.atBot (𝓝 0)


theorem eval_mem {p : MvPolynomial σ S} {s : subS} (hs : ∀ i ∈ p.support, p.coeff i ∈ s) {v : σ → S}
    (hv : ∀ i, v i ∈ s) : MvPolynomial.eval v p ∈ s

(hs : ∀ i ∈ p.support, MvPolynomial.coeff i p ∈ s)


@[to_additive (attr := simp)]
theorem mk'_self' (y : S) : f.mk' (y : M) y = 1

{M : Type u_1}
[CommMonoid M]
{S : Submonoid M}
{N : Type u_2}
[CommMonoid N]
(f : S.LocalizationMap N)
(y : ↥S)


theorem eraseMin.valid : ∀ {t}, @Valid α _ t → Valid (eraseMin t)

{α : Type u_1}
[Preorder α]
{t : Ordnode α}


@[to_additive]
private theorem one_mul (s : UpperSet α) : 1 * s = s

{α : Type u_1}
[OrderedAddCommGroup α]
(s : UpperSet α)


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

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


@[simp]
theorem restrictScalars_inj (f g : M ≃ₗ[S] M₂) :
    f.restrictScalars R = g.restrictScalars R ↔ f = g

(R : Type u_1)
{S : Type u_7}
{M : Type u_8}
{M₂ : Type u_10}
[Semiring R]
[Semiring S]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R M₂]
[Module S M]
[Module S M₂]
[LinearMap.CompatibleSMul M M₂ R S]
(f g : M ≃ₗ[S] M₂)

LinearEquiv.restrictScalars R f = LinearEquiv.restrictScalars R g ↔ f = g


/-- The structure presheaf, valued in `CommRingCat`, constructed by dressing up the `Type` valued
structure presheaf.
-/
@[simps]
def structurePresheafInCommRing : Presheaf CommRingCat (PrimeSpectrum.Top R)

{U V : (TopologicalSpace.Opens ↑(AlgebraicGeometry.PrimeSpectrum.Top R))ᵒᵖ}

∀ (a : (AlgebraicGeometry.structureSheafInType R).val.obj U),
  ((AlgebraicGeometry.structurePresheafInCommRing R).map i) a = (AlgebraicGeometry.structureSheafInType R).val.map i a


theorem of_map_of_injective [MonoidHomClass F M N] (h : IsPrimitiveRoot (f ζ) k)
    (hf : Injective f) : IsPrimitiveRoot ζ k

{M : Type u_1}
{N : Type u_2}
{F : Type u_6}
[CommMonoid M]
[CommMonoid N]
{k : ℕ}
{ζ : M}
{f : F}
[FunLike F M N]
[MonoidHomClass F M N]
(h : IsPrimitiveRoot (f ζ) k)
(hf : Function.Injective ⇑f)


theorem tendsto_atTop_of_add_const_left (C : β) (hf : Tendsto (fun x => C + f x) l atTop) :
    Tendsto f l atTop

(hf : Filter.Tendsto (fun x => C + f x) l Filter.atTop)


/-- To prove a property of a product, it suffices to prove that
the property is multiplicative and holds on factors. -/
@[to_additive "To prove a property of a sum, it suffices to prove that
the property is additive and holds on summands."]
theorem prod_induction_nonempty {M : Type*} [CommMonoid M] (f : α → M) (p : M → Prop)
    (hom : ∀ a b, p a → p b → p (a * b)) (nonempty : s.Nonempty) (base : ∀ x ∈ s, p <| f x) :
    p <| ∏ x ∈ s, f x

(hom : ∀ (a b : M), p a → p b → p (a * b))


@[simp]
lemma homMk₃_app_two : (homMk₃ app₀ app₁ app₂ app₃ w₀ w₁ w₂).app ⟨2, by valid⟩ = app₂

{f g : CategoryTheory.ComposableArrows C 3}

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

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

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

(CategoryTheory.ComposableArrows.homMk₃ app₀ app₁ app₂ app₃ w₀ w₁ w₂).app ⟨2, ⋯⟩ = app₂


theorem alternatingWord_succ (i i' : B) (m : ℕ) :
    alternatingWord i i' (m + 1) = (alternatingWord i' i m).concat i'

CoxeterSystem.alternatingWord i i' (m + 1) = (CoxeterSystem.alternatingWord i' i m).concat i'


@[to_additive (attr := simp 1100, nolint simpNF)]
theorem mem_map_iff_mem {f : F} (hf : Function.Injective f) {S : Submonoid M} {x : M} :
    f x ∈ S.map f ↔ x ∈ S

{M : Type u_1}
{N : Type u_2}
[AddZeroClass M]
[AddZeroClass N]
{F : Type u_4}
[FunLike F M N]
[mc : AddMonoidHomClass F M N]
{f : F}
(hf : Function.Injective ⇑f)
{S : AddSubmonoid M}
{x : M}


theorem iUnion₂_vsub (s : ∀ i, κ i → Set β) (t : Set β) :
    (⋃ (i) (j), s i j) -ᵥ t = ⋃ (i) (j), s i j -ᵥ t

{α : Type u_2}
{β : Type u_3}
{ι : Sort u_5}
{κ : ι → Sort u_6}
[VSub α β]
(s : (i : ι) → κ i → Set β)
(t : Set β)

(⋃ i, ⋃ j, s i j) -ᵥ t = ⋃ i, ⋃ j, s i j -ᵥ t


theorem Continuous.image_connectedComponent_subset [TopologicalSpace β] {f : α → β}
    (h : Continuous f) (a : α) : f '' connectedComponent a ⊆ connectedComponent (f a)

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[TopologicalSpace β]
{f : α → β}
(h : Continuous f)
(a : α)


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

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

∀ {X Y : G.Elements} (f : X ⟶ Y), ((CategoryTheory.Grothendieck.grothendieckTypeToCat G).inverse.map f).base = ↑f


lemma inv_mul_le_one_of_le (h : a ≤ b) (hb : 0 ≤ b) : b⁻¹ * a ≤ 1

{α : Type u_2}
[LinearOrderedSemifield α]
{a b : α}
(h : a ≤ b)
(hb : 0 ≤ b)


@[simp] theorem elim_inl_inr : @Sum.elim α β _ inl inr = id


@[simp, norm_cast] lemma coe_top : (↑(⊤ : Clopens α) : Set α) = univ


@[simp]
theorem sheafifyCompIso_inv_eq_sheafifyLift :
    (J.sheafifyCompIso F P).inv =
      J.sheafifyLift (whiskerRight (J.toSheafify P) F)
        (HasSheafCompose.isSheaf _ ((J.sheafify_isSheaf _)))

(J : CategoryTheory.GrothendieckTopology C)

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

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

[∀ (α β : Type (max v u)) (fst snd : β → α),
    CategoryTheory.Limits.HasLimitsOfShape (CategoryTheory.Limits.WalkingMulticospan fst snd) D]

[∀ (α β : Type (max v u)) (fst snd : β → α),
    CategoryTheory.Limits.HasLimitsOfShape (CategoryTheory.Limits.WalkingMulticospan fst snd) E]

[∀ (X : C), CategoryTheory.Limits.HasColimitsOfShape (J.Cover X)ᵒᵖ D]

[∀ (X : C), CategoryTheory.Limits.HasColimitsOfShape (J.Cover X)ᵒᵖ E]

[(X : C) → CategoryTheory.Limits.PreservesColimitsOfShape (J.Cover X)ᵒᵖ F]

[(X : C) →
    (W : J.Cover X) →
      (P : CategoryTheory.Functor Cᵒᵖ D) → CategoryTheory.Limits.PreservesLimit (W.index P).multicospan F]

[(X : C) → CategoryTheory.Limits.PreservesColimitsOfShape (J.Cover X)ᵒᵖ (CategoryTheory.forget D)]

(J.sheafifyCompIso F P).inv = J.sheafifyLift (CategoryTheory.whiskerRight (J.toSheafify P) F) ⋯


@[fun_prop]
theorem DifferentiableAt.restrictScalars (h : DifferentiableAt 𝕜' f x) : DifferentiableAt 𝕜 f x

(𝕜 : Type u_1)
[NontriviallyNormedField 𝕜]
{𝕜' : Type u_2}
[NontriviallyNormedField 𝕜']
[NormedAlgebra 𝕜 𝕜']
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜' E]
[IsScalarTower 𝕜 𝕜' E]
{F : Type u_4}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[NormedSpace 𝕜' F]
[IsScalarTower 𝕜 𝕜' F]
{f : E → F}
{x : E}
(h : DifferentiableAt 𝕜' f x)


@[simp]
theorem ofLeftInverse'_symm_apply {g : B → A} {f : F} (h : Function.LeftInverse g f)
    (x : NonUnitalStarAlgHom.range f) : (ofLeftInverse' h).symm x = g x

{F : Type v'}
{R : Type u}
{A : Type v}
{B : Type w}
[CommSemiring R]
[NonUnitalSemiring A]
[Module R A]
[Star A]
[NonUnitalSemiring B]
[Module R B]
[Star B]
[FunLike F A B]
[NonUnitalAlgHomClass F R A B]
[NonUnitalStarAlgHomClass F R A B]
{g : B → A}
{f : F}
(h : Function.LeftInverse g ⇑f)
(x : ↥(NonUnitalStarAlgHom.range f))

(StarAlgEquiv.ofLeftInverse' h).symm x = g ↑x


@[simp] lemma ofDual_ratCast [RatCast α] (n : ℚ) : (ofDual n : α) = n


@[to_additive (attr := simp)]
theorem nndist_smul [PseudoMetricSpace X] [SMul M X] [IsometricSMul M X] (c : M) (x y : X) :
    nndist (c • x) (c • y) = nndist x y

{M : Type u}
{X : Type w}
[PseudoMetricSpace X]
[VAdd M X]
[IsometricVAdd M X]
(c : M)
(x y : X)


theorem le_div_iff₀ (hc : c ≠ 0) : a ≤ b / c ↔ a * c ≤ b

{α : Type u_1}
[LinearOrderedCommGroupWithZero α]
{a b c : α}
(hc : c ≠ 0)


theorem _root_.isAntichain_insert_of_symmetric (hr : Symmetric r) :
    IsAntichain r (insert a s) ↔ IsAntichain r s ∧ ∀ ⦃b⦄, b ∈ s → a ≠ b → ¬r a b

{α : Type u_1}
{r : α → α → Prop}
{s : Set α}
{a : α}
(hr : Symmetric r)

IsAntichain r (insert a s) ↔ IsAntichain r s ∧ ∀ ⦃b : α⦄, b ∈ s → a ≠ b → ¬r a b


/-- The submonoid of pointwise inverse of `S` is `MulEquiv` to `S`. -/
@[to_additive (attr := simps apply) "The additive submonoid of pointwise additive inverse of `S` is
`AddEquiv` to `S`."]
noncomputable def leftInvEquiv : S.leftInv ≃* S

{M : Type u_1}
[CommMonoid M]
(S : Submonoid M)
(hS : S ≤ IsUnit.submonoid M)

∀ (a : ↥S.leftInv), (S.leftInvEquiv hS) a = (↑S.fromCommLeftInv).toFun a


theorem Icc_subset_Ioc_iff (h₁ : a₁ ≤ b₁) : Icc a₁ b₁ ⊆ Ioc a₂ b₂ ↔ a₂ < a₁ ∧ b₁ ≤ b₂

{α : Type u_1}
[Preorder α]
{a₁ a₂ b₁ b₂ : α}
(h₁ : a₁ ≤ b₁)

Set.Icc a₁ b₁ ⊆ Set.Ioc a₂ b₂ ↔ a₂ < a₁ ∧ b₁ ≤ b₂


@[simp]
theorem isSome_map (f : α → β) (o : Option α) : isSome (o.map f) = isSome o

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


/-- Given a costructured arrow `S(Y) ⟶ X`, and an arrow `Y' ⟶ Y'`, we can construct a morphism of
    costructured arrows given by `(S(Y) ⟶ X) ⟶ (S(Y') ⟶ S(Y) ⟶ X)`. -/
@[simps]
def homMk' (f : CostructuredArrow S T) (g : Y' ⟶ f.left) : mk (S.map g ≫ f.hom) ⟶ f

(f : CategoryTheory.CostructuredArrow S T)


/-- Assumes right covariance.
The lemma assuming left covariance is `Left.mul_lt_one_of_lt_of_le`. -/
@[to_additive Right.add_neg_of_neg_of_nonpos
      "Assumes right covariance.
      The lemma assuming left covariance is `Left.add_neg_of_neg_of_nonpos`."]
theorem Right.mul_lt_one_of_lt_of_le [CovariantClass α α (swap (· * ·)) (· < ·)] {a b : α}
    (ha : a < 1) (hb : b ≤ 1) :
    a * b < 1

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


nonrec lemma _root_.ContinuousWithinAt.compCM (hg : ContinuousWithinAt g s a)
    (hf : ContinuousWithinAt f s a) : ContinuousWithinAt (fun x ↦ (g x).comp (f x)) s a

{X : Type u_2}
{Y : Type u_3}
{Z : Type u_4}
[TopologicalSpace X]
[TopologicalSpace Y]
[TopologicalSpace Z]
[LocallyCompactPair Y Z]
{X' : Type u_6}
[TopologicalSpace X']
{a : X'}
{g : X' → C(Y, Z)}
{f : X' → C(X, Y)}
{s : Set X'}
(hg : ContinuousWithinAt g s a)
(hf : ContinuousWithinAt f s a)

ContinuousWithinAt (fun x => (g x).comp (f x)) s a


/-- Congruence relation of a ring preserves finite sum. -/
protected lemma finsetSum {ι S : Type*} [AddCommMonoid S] [Mul S] (t : RingCon S) (s : Finset ι)
    {f g : ι → S} (h : ∀ i ∈ s, t (f i) (g i)) :
    t (s.sum f) (s.sum g)

{ι : Type u_1}
{S : Type u_2}
[AddCommMonoid S]
[Mul S]
(t : RingCon S)
(s : Finset ι)
{f g : ι → S}
(h : ∀ i ∈ s, t (f i) (g i))


theorem IsAntichain.greatest_iff (hs : IsAntichain (· ≤ ·) s) : IsGreatest s a ↔ s = {a}

(hs : IsAntichain (fun x x_1 => x ≤ x_1) s)


theorem IsBigOWith.const_mul_right {g : α → 𝕜} {c : 𝕜} (hc : c ≠ 0) {c' : ℝ} (hc' : 0 ≤ c')
    (h : IsBigOWith c' l f g) : IsBigOWith (c' * ‖c‖⁻¹) l f fun x => c * g x

{α : Type u_1}
{E : Type u_3}
{𝕜 : Type u_15}
[Norm E]
[NormedDivisionRing 𝕜]
{f : α → E}
{l : Filter α}
{g : α → 𝕜}
{c : 𝕜}
(hc : c ≠ 0)
{c' : ℝ}
(hc' : 0 ≤ c')
(h : Asymptotics.IsBigOWith c' l f g)

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


theorem single_add (a : G) (b₁ b₂ : k) : single a (b₁ + b₂) = single a b₁ + single a b₂

{k : Type u₁}
{G : Type u₂}
[Semiring k]
(a : G)
(b₁ b₂ : k)

AddMonoidAlgebra.single a (b₁ + b₂) = AddMonoidAlgebra.single a b₁ + AddMonoidAlgebra.single a b₂


theorem uniformity_basis_dist_le_pow {r : ℝ} (h0 : 0 < r) (h1 : r < 1) :
    (𝓤 α).HasBasis (fun _ : ℕ => True) fun n : ℕ => { p : α × α | dist p.1 p.2 ≤ r ^ n }

{α : Type u}
[PseudoMetricSpace α]
{r : ℝ}
(h0 : 0 < r)
(h1 : r < 1)

(𝓤 α).HasBasis (fun x => True) fun n => {p | dist p.1 p.2 ≤ r ^ n}


/-- Local homeomorphism between a real (semi)normed space and the unit ball.
See also `Homeomorph.unitBall`. -/
@[simps (config := .lemmasOnly)]
def PartialHomeomorph.univUnitBall : PartialHomeomorph E E

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


theorem flip_surjective_iff₂ [FiniteDimensional K V₂] : Surjective B.flip ↔ Injective B

{K : Type uK}
[Field K]
{V₁ : Type uV₁}
{V₂ : Type uV₂}
[AddCommGroup V₁]
[Module K V₁]
[AddCommGroup V₂]
[Module K V₂]
{B : V₁ →ₗ[K] V₂ →ₗ[K] K}
[FiniteDimensional K V₂]

Function.Surjective ⇑B.flip ↔ Function.Injective ⇑B


theorem prod_eq : f ×ˢ g = (f.map Prod.mk).seq g

{α : Type u_1}
{β : Type u_2}
{f : Filter α}
{g : Filter β}


@[ext]
lemma leftKanExtension_hom_ext {G : D ⥤ H} (γ₁ γ₂ : leftKanExtension L F ⟶ G)
    (hγ : leftKanExtensionUnit L F ≫ whiskerLeft L γ₁ =
      leftKanExtensionUnit L F ≫ whiskerLeft L γ₂) : γ₁ = γ₂

(hγ :
  CategoryTheory.CategoryStruct.comp (L.leftKanExtensionUnit F) (CategoryTheory.whiskerLeft L γ₁) =
    CategoryTheory.CategoryStruct.comp (L.leftKanExtensionUnit F) (CategoryTheory.whiskerLeft L γ₂))


theorem of_mem_append {s₁ s₂ : Seq α} {a : α} (h : a ∈ append s₁ s₂) : a ∈ s₁ ∨ a ∈ s₂

{α : Type u}
{s₁ s₂ : Stream'.Seq α}
{a : α}
(h : a ∈ s₁.append s₂)

a ∈ s₁ ∨ a ∈ s₂


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

{α β : BddOrd}
(e : ↑α.toPartOrd ≃o ↑β.toPartOrd)


theorem UniformInducing.uniformContinuous {f : α → β} (hf : UniformInducing f) :
    UniformContinuous f

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


@[simp]
lemma tilted_neg_same' (hf : Integrable (fun x ↦ exp (f x)) μ) :
    (μ.tilted f).tilted (-f) = (μ Set.univ)⁻¹ • μ

(hf : MeasureTheory.Integrable (fun x => rexp (f x)) μ)


theorem IsBlock.of_subgroup_of_conjugate {B : Set X} {H : Subgroup G} (hB : IsBlock H B) (g : G) :
    IsBlock (Subgroup.map (MulEquiv.toMonoidHom (MulAut.conj g)) H) (g • B)

{G : Type u_1}
[Group G]
{X : Type u_2}
[MulAction G X]
{B : Set X}
{H : Subgroup G}
(hB : MulAction.IsBlock (↥H) B)
(g : G)

MulAction.IsBlock (↥(Subgroup.map (MulEquiv.toMonoidHom (MulAut.conj g)) H)) (g • B)


/-- Birkhoff sum is "almost invariant" under `f`:
the difference between `birkhoffSum f g n (f x)` and `birkhoffSum f g n x`
is equal to `g (f^[n] x) - g x`. -/
theorem birkhoffSum_apply_sub_birkhoffSum (f : α → α) (g : α → G) (n : ℕ) (x : α) :
    birkhoffSum f g n (f x) - birkhoffSum f g n x = g (f^[n] x) - g x

{α : Type u_1}
{G : Type u_2}
[AddCommGroup G]
(f : α → α)
(g : α → G)
(n : ℕ)
(x : α)


theorem submodule_map_reverse_eq_comap (p : Submodule R (CliffordAlgebra Q)) :
    p.map (reverse : CliffordAlgebra Q →ₗ[R] CliffordAlgebra Q) =
      p.comap (reverse : CliffordAlgebra Q →ₗ[R] CliffordAlgebra Q)

{R : Type u_1}
[CommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
(Q : QuadraticForm R M)
(p : Submodule R (CliffordAlgebra Q))

Submodule.map CliffordAlgebra.reverse p = Submodule.comap CliffordAlgebra.reverse p


@[to_additive]
theorem MonoidHom.map_finprod_plift (f : M →* N) (g : α → M)
    (h : (mulSupport <| g ∘ PLift.down).Finite) : f (∏ᶠ x, g x) = ∏ᶠ x, f (g x)

(h : (Function.support (g ∘ PLift.down)).Finite)

f (∑ᶠ (x : α), g x) = ∑ᶠ (x : α), f (g x)


@[simp, norm_cast]
theorem coe_lt_one_iff : (↑p : ℝ≥0∞) < 1 ↔ p < 1


theorem mul_one_div_le_one {I : Submodule R A} : I * (1 / I) ≤ 1

{R : Type u}
[CommSemiring R]
{A : Type v}
[CommSemiring A]
[Algebra R A]
{I : Submodule R A}


protected theorem naturality (f : α → F β) (x : t' α) :
    η (Equiv.traverse eqv f x) = Equiv.traverse eqv (@η _ ∘ f) x

{t t' : Type u → Type u}
(eqv : (α : Type u) → t α ≃ t' α)
[Traversable t]
[LawfulTraversable t]
{F G : Type u → Type u}
[Applicative F]
[Applicative G]
[LawfulApplicative F]
[LawfulApplicative G]
(η : ApplicativeTransformation F G)
{α β : Type u}
(f : α → F β)
(x : t' α)

(fun {α} => η.app α) (Equiv.traverse eqv f x) = Equiv.traverse eqv ((fun {α} => η.app α) ∘ f) x


/-- Constructs a `HasShift C A` instance from `ShiftMkCore`. -/
@[simps]
def hasShiftMk (h : ShiftMkCore C A) : HasShift C A

(C : Type u)
(A : Type u_1)
[CategoryTheory.Category.{v, u} C]
[AddMonoid A]
(h : CategoryTheory.ShiftMkCore C A)
(m n : CategoryTheory.Discrete A)

CategoryTheory.HasShift.shift.μ m n = (h.add m.as n.as).inv


protected theorem surjective : Surjective 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 pred_top : pred (⊤ : WithTop α) = ↑(⊤ : α)

{α : Type u_1}
[Preorder α]
[OrderTop α]
[PredOrder α]


theorem op_sup (S₁ S₂ : Subalgebra R A) : (S₁ ⊔ S₂).op = S₁.op ⊔ S₂.op

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


@[nolint unusedHavesSuffices] -- Porting note: false positive
theorem strongInductionOn_eq {p : Finset α → Sort*} (s : Finset α)
    (H : ∀ s, (∀ t ⊂ s, p t) → p s) :
    s.strongInductionOn H = H s fun t _ => t.strongInductionOn H

(H : (s : Finset α) → ((t : Finset α) → t ⊂ s → p t) → p s)

s.strongInductionOn H = H s fun t x => t.strongInductionOn H


theorem det_eval_matrixOfPolynomials_eq_det_vandermonde {n : ℕ} (v : Fin n → R) (p : Fin n → R[X])
    (h_deg : ∀ i, (p i).natDegree = i) (h_monic : ∀ i, Monic <| p i) :
    (Matrix.vandermonde v).det = (Matrix.of (fun i j => ((p j).eval (v i)))).det

(h_deg : ∀ (i : Fin n), (p i).natDegree = ↑i)

(Matrix.vandermonde v).det = (Matrix.of fun i j => Polynomial.eval (v i) (p j)).det


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

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

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


lemma _root_.CovBy.exists_set_sdiff_singleton (h : s ⋖ t) : ∃ a ∈ t, t \ {a} =  s

{α : Type u_1}
{s t : Set α}
(h : s ⋖ t)