theorem IntegralClosure.eq_bot_of_comap_eq_bot [Nontrivial R] {I : Ideal (integralClosure R S)} :
    I.comap (algebraMap R (integralClosure R S)) = ⊥ → I = ⊥

{R : Type u_1}
[CommRing R]
{S : Type u_2}
[CommRing S]
[Algebra R S]
[IsDomain S]
[Nontrivial R]
{I : Ideal ↥(integralClosure R S)}

Ideal.comap (algebraMap R ↥(integralClosure R S)) I = ⊥ → I = ⊥


@[reassoc (attr := simp)]
lemma rightDerivedNatTrans_app (τ : F ⟶ F') (X : C) :
    α.app X ≫ (rightDerivedNatTrans RF RF' α α' W τ).app (L.obj X) =
    τ.app X ≫ α'.app X

{C : Type u_1}
{D : Type u_6}
{H : Type u_3}
[CategoryTheory.Category.{u_4, u_1} C]
[CategoryTheory.Category.{u_5, u_6} D]
[CategoryTheory.Category.{u_2, u_3} H]
(RF RF' : CategoryTheory.Functor D H)
{F F' : CategoryTheory.Functor C H}
{L : CategoryTheory.Functor C D}
(α : F ⟶ L.comp RF)
(α' : F' ⟶ L.comp RF')
(W : CategoryTheory.MorphismProperty C)
[L.IsLocalization W]
[RF.IsRightDerivedFunctor α W]
(τ : F ⟶ F')
(X : C)

CategoryTheory.CategoryStruct.comp (α.app X) ((RF.rightDerivedNatTrans RF' α α' W τ).app (L.obj X)) =
  CategoryTheory.CategoryStruct.comp (τ.app X) (α'.app X)


@[to_additive]
theorem Away.mk_eq_monoidOf_mk' : mk = (Away.monoidOf x).mk'

Localization.mk = Submonoid.LocalizationMap.mk' (Localization.Away.monoidOf x)


lemma reverse_mem_reverse : a.reverse ∈ l.reverse ↔ a ∈ l

{α : Type u_1}
{l : Language α}
{a : List α}


@[simp, norm_cast]
theorem coe_finset_sum {s : Finset α} {f : α → ℝ≥0} : ↑(∑ a ∈ s, f a) = ∑ a ∈ s, (f a : ℝ≥0∞)

{α : Type u_1}
{s : Finset α}
{f : α → ℝ≥0}


lemma preΨ_ne_zero [Nontrivial R] {n : ℤ} (h : (n : R) ≠ 0) : W.preΨ n ≠ 0

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


@[to_additive le_sum_of_subadditive]
lemma le_prod_of_submultiplicative (f : α → β) (h_one : f 1 = 1)
    (h_mul : ∀ a b, f (a * b) ≤ f a * f b) (s : Multiset α) : f s.prod ≤ (s.map f).prod

(h_mul : ∀ (a b : α), f (a + b) ≤ f a + f b)


/-- The change of variables mapped over a ring homomorphism `φ : R →+* A`. -/
@[simps]
def map : VariableChange A

{R : Type u}
[CommRing R]
{A : Type v}
[CommRing A]
(φ : R →+* A)
(C : WeierstrassCurve.VariableChange R)

(WeierstrassCurve.VariableChange.map φ C).t = φ C.t


@[simp] theorem forIn'_eq_forIn {α : Type u} {β : Type v} {m : Type v → Type w} [Monad m] (as : List α) (init : β) (f : α → β → m (ForInStep β)) : forIn' as init (fun a _ b => f a b) = forIn as init f

(forIn' as init fun a x b => f a b) = forIn as init f


/-- The product of a monotone function and a strictly monotone function is strictly monotone. -/
@[to_additive add_strictMono "The sum of a monotone function and a strictly monotone function is
strictly monotone."]
theorem Monotone.mul_strictMono' [CovariantClass α α (· * ·) (· < ·)]
    [CovariantClass α α (swap (· * ·)) (· ≤ ·)] {f g : β → α} (hf : Monotone f)
    (hg : StrictMono g) :
    StrictMono fun x => f x * g x

[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]


protected theorem closedEmbedding : ClosedEmbedding I

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


@[simp]
theorem map_C (a : R) : map σ f (C σ R a) = C σ S (f a)

{σ : Type u_1}
{R : Type u_2}
{S : Type u_3}
[Semiring R]
[Semiring S]
(f : R →+* S)
(a : R)

(MvPowerSeries.map σ f) ((MvPowerSeries.C σ R) a) = (MvPowerSeries.C σ S) (f a)


/-- The quotient map `𝕜 → AddCircle p` as a partial homeomorphism. -/
@[simps] def partialHomeomorphCoe [DiscreteTopology (zmultiples p)] :
    PartialHomeomorph 𝕜 (AddCircle p)

(AddCircle.partialHomeomorphCoe p a).target = {↑a}ᶜ


/-- A category has all finite limits if every functor `J ⥤ C` with a `FinCategory J`
instance and `J : Type` has a limit.

This is often called 'finitely complete'.
-/
class HasFiniteLimits : Prop where
  /-- `C` has all limits over any type `J` whose objects and morphisms lie in the same universe
  and which has `FinType` objects and morphisms-/
  out (J : Type) [𝒥 : SmallCategory J] [@FinCategory J 𝒥] : @HasLimitsOfShape J 𝒥 C _

[self : CategoryTheory.Limits.HasFiniteLimits C]


theorem le_of_le_of_eq' : b ≤ c → a = b → a ≤ c


theorem uniformContinuousOn_univ [UniformSpace β] {f : α → β} :
    UniformContinuousOn f univ ↔ UniformContinuous f

{α : Type ua}
{β : Type ub}
[UniformSpace α]
[UniformSpace β]
{f : α → β}

UniformContinuousOn f Set.univ ↔ UniformContinuous f


lemma apply_inl (h : l.idxFun i = Sum.inl a) : l x i = a

{η : Type u_5}
{α : Type u_6}
{ι : Type u_7}
{l : Combinatorics.Subspace η α ι}
{x : η → α}
{i : ι}
{a : α}
(h : l.idxFun i = Sum.inl a)


theorem lowerSemicontinuous_iff_le_liminf {f : α → γ} :
    LowerSemicontinuous f ↔ ∀ x, f x ≤ liminf f (𝓝 x)

{α : Type u_1}
[TopologicalSpace α]
{γ : Type u_3}
[CompleteLinearOrder γ]
[DenselyOrdered γ]
{f : α → γ}

LowerSemicontinuous f ↔ ∀ (x : α), f x ≤ Filter.liminf f (𝓝 x)


/-- The counit for the equivalence `CommMon_ (C ⥤ D) ≌ C ⥤ CommMon_ D`.
-/
@[simps!]
def counitIso : inverse ⋙ functor ≅ 𝟭 (C ⥤ CommMon_ D)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
[CategoryTheory.MonoidalCategory D]
[CategoryTheory.BraidedCategory D]
(X : C ⥤ CommMon_ D)

∀ (X_1 : C),
  ((CategoryTheory.Monoidal.CommMonFunctorCategoryEquivalence.counitIso.inv.app X).app X_1).hom = 𝟙 (X.obj X_1).X


theorem ContinuousWithinAt.compMeasurePreservingLp (hf : ContinuousWithinAt f s z)
    (hg : ContinuousWithinAt g s z) (hgm : ∀ z, MeasurePreserving (g z) μ ν) (hp : p ≠ ∞) :
    ContinuousWithinAt (fun z ↦ Lp.compMeasurePreserving (g z) (hgm z) (f z)) s z

(hgm : ∀ (z : Z), MeasureTheory.MeasurePreserving (⇑(g z)) μ ν)

ContinuousWithinAt (fun z => (MeasureTheory.Lp.compMeasurePreserving ⇑(g z) ⋯) (f z)) s z


@[to_additive]
theorem card_quotient_rightRel [Fintype (α ⧸ s)] :
    Fintype.card (Quotient (QuotientGroup.rightRel s)) = Fintype.card (α ⧸ s)

{α : Type u_1}
[Group α]
(s : Subgroup α)
[Fintype (α ⧸ s)]


@[to_additive (attr := simp)]
lemma tprod_extend_one {γ : Type*} {g : γ → β} (hg : Injective g) (f : γ → α) :
    ∏' y, extend g f 1 y = ∏' x, f x

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

∑' (y : β), Function.extend g f 0 y = ∑' (x : γ), f x


/-- The isomorphism `S.X₂ ≅ S.X₁ ⊞ S.X₃` induced by a splitting of the short complex `S`. -/
@[simps]
noncomputable def isoBinaryBiproduct (h : Splitting S) [HasBinaryBiproduct S.X₁ S.X₃] :
    S.X₂ ≅ S.X₁ ⊞ S.X₃

h.isoBinaryBiproduct.inv = CategoryTheory.Limits.biprod.desc S.f h.s


/--
  If an accumulation function `f`, given an initial state `s`, produces `s` as its output state
  for all possible input bits, then the state is redundant and can be optimized out
-/
@[simp]
theorem mapAccumr_eq_map_of_constant_state (f : α → σ → σ × β) (s : σ) (h : ∀ a, (f a s).fst = s) :
    mapAccumr f xs s = (s, (map (fun x => (f x s).snd) xs))

{α : Type u_2}
{n : ℕ}
{β : Type u_1}
{xs : Mathlib.Vector α n}
{σ : Type}
(f : α → σ → σ × β)
(s : σ)
(h : ∀ (a : α), (f a s).1 = s)

Mathlib.Vector.mapAccumr f xs s = (s, Mathlib.Vector.map (fun x => (f x s).2) xs)


theorem _root_.Finset.nullMeasurableSet_biUnion {f : ι → Set α} (s : Finset ι)
    (h : ∀ b ∈ s, NullMeasurableSet (f b) μ) : NullMeasurableSet (⋃ b ∈ s, f b) μ

(h : ∀ b ∈ s, MeasureTheory.NullMeasurableSet (f b) μ)

MeasureTheory.NullMeasurableSet (⋃ b ∈ s, f b) μ


theorem map_mul_right_nhds₀ (ha : a ≠ 0) (b : G₀) : map (· * a) (𝓝 b) = 𝓝 (b * a)

{G₀ : Type u_3}
[TopologicalSpace G₀]
[GroupWithZero G₀]
[ContinuousMul G₀]
{a : G₀}
(ha : a ≠ 0)
(b : G₀)

Filter.map (fun x => x * a) (𝓝 b) = 𝓝 (b * a)


@[to_additive]
theorem comp_assoc (g : F →* E) (f : G →* F) : p.comp (g.comp f) = (p.comp g).comp f

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


@[to_additive]
theorem tprod_eq_one_iff (hf : Multipliable f) : ∏' i, f i = 1 ↔ ∀ x, f x = 1

{ι : Type u_1}
{α : Type u_3}
[CanonicallyOrderedAddCommMonoid α]
[TopologicalSpace α]
[OrderClosedTopology α]
{f : ι → α}
(hf : Summable f)


@[simp]
theorem nonempty_iInter {f : ι → Set α} : (⋂ i, f i).Nonempty ↔ ∃ x, ∀ i, x ∈ f i

{α : Type u_1}
{ι : Sort u_4}
{f : ι → Set α}

(⋂ i, f i).Nonempty ↔ ∃ x, ∀ (i : ι), x ∈ f i


@[to_additive (attr := simp)]
theorem lift.of {x} : lift f (of x) = f x

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

(FreeGroup.lift f) (FreeGroup.of x) = f x


@[to_additive (attr := simp)]
theorem singleton_mul : {a} * t = (a * ·) '' t

{α : Type u_2}
[Add α]
{t : Set α}
{a : α}


theorem strictMono_iff {f : WithTop α → β} :
    StrictMono f ↔ StrictMono (fun (a : α) => f a) ∧ ∀ x : α, f x < f ⊤

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
{f : WithTop α → β}

StrictMono f ↔ (StrictMono fun a => f ↑a) ∧ ∀ (x : α), f ↑x < f ⊤


@[simp]
theorem invOf_lt_zero [Invertible a] : ⅟ a < 0 ↔ a < 0

{α : Type u_1}
[LinearOrderedSemiring α]
{a : α}
[Invertible a]


@[to_additive]
theorem Inducing.continuousInv {G H : Type*} [Inv G] [Inv H] [TopologicalSpace G]
    [TopologicalSpace H] [ContinuousInv H] {f : G → H} (hf : Inducing f)
    (hf_inv : ∀ x, f x⁻¹ = (f x)⁻¹) : ContinuousInv G

{G : Type u_1}
{H : Type u_2}
[Inv G]
[Inv H]
[TopologicalSpace G]
[TopologicalSpace H]
[ContinuousInv H]
{f : G → H}
(hf : Inducing f)
(hf_inv : ∀ (x : G), f x⁻¹ = (f x)⁻¹)


theorem tsum_eq_add_tsum_ite {f : β → ℝ≥0∞} (b : β) :
    ∑' x, f x = f b + ∑' x, ite (x = b) 0 (f x)

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


lemma floorDiv_le_ceilDiv : b ⌊/⌋ a ≤ b ⌈/⌉ a

{α : Type u_2}
{β : Type u_3}
[LinearOrderedAddCommMonoid α]
[OrderedAddCommMonoid β]
[SMulZeroClass α β]
[PosSMulReflectLE α β]
[FloorDiv α β]
[CeilDiv α β]
{a : α}
{b : β}


@[simp, norm_cast]
theorem coe_sup (s t : Opens α) : (↑(s ⊔ t) : Set α) = ↑s ∪ ↑t

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


theorem aefinStronglyMeasurable [Zero β] [TopologicalSpace β] (hf : FinStronglyMeasurable f μ) :
    AEFinStronglyMeasurable f μ

(hf : MeasureTheory.FinStronglyMeasurable f μ)


@[simp]
theorem irrational_nat_mul_iff : Irrational (n * x) ↔ n ≠ 0 ∧ Irrational x

Irrational (↑n * x) ↔ n ≠ 0 ∧ Irrational x


theorem MDifferentiableOn.comp (hg : MDifferentiableOn I' I'' g u) (hf : MDifferentiableOn I I' f s)
    (st : s ⊆ f ⁻¹' u) : MDifferentiableOn I I'' (g ∘ f) s

[I''s : SmoothManifoldWithCorners I'' M'']


theorem norm_mul_mem_unitary (A : E) {U : E} (hU : U ∈ unitary E) : ‖A * U‖ = ‖A‖

{E : Type u_2}
[NormedRing E]
[StarRing E]
[CstarRing E]
(A : E)
{U : E}
(hU : U ∈ unitary E)


@[to_additive] -- @[to_additive (attr := simp)] -- Porting note (#10618): simp can prove this
theorem aemeasurable_one [One β] : AEMeasurable (fun _ : α => (1 : β)) μ

{α : Type u_2}
{β : Type u_3}
{m0 : MeasurableSpace α}
[MeasurableSpace β]
{μ : MeasureTheory.Measure α}
[One β]


@[simp]
lemma leadingCoeff_preΨ' {n : ℕ} (h : (n : R) ≠ 0) :
    (W.preΨ' n).leadingCoeff = if Even n then n / 2 else n

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

(W.preΨ' n).leadingCoeff = ↑(if Even n then n / 2 else n)


@[simp]
theorem infEdist_empty : infEdist x ∅ = ∞

{α : Type u}
[PseudoEMetricSpace α]
{x : α}


lemma cfcₙ_add : cfcₙ (fun x ↦ f x + g x) a = cfcₙ f a + cfcₙ g a

(hf : ContinuousOn f (σₙ R a) := by cfc_cont_tac)

(hg : ContinuousOn g (σₙ R a) := by cfc_cont_tac)

cfcₙ (fun x => f x + g x) a = cfcₙ f a + cfcₙ g a


theorem mk_sum {ι : Type*} (f : ι → R) (s : Finset ι) (b : M) :
    mk (∑ i ∈ s, f i) b = ∑ i ∈ s, mk (f i) b

{R : Type u_1}
[CommSemiring R]
{M : Submonoid R}
{ι : Type u_4}
(f : ι → R)
(s : Finset ι)
(b : ↥M)

Localization.mk (∑ i ∈ s, f i) b = ∑ i ∈ s, Localization.mk (f i) b


@[simp] theorem beq_self_left  : ∀(a b : Bool), (a == (a == b)) = b


@[simp]
theorem range_familyOfBFamily {o} (f : ∀ a < o, α) : range (familyOfBFamily o f) = brange o f

{α : Type u_1}
{o : Ordinal.{u_4}}
(f : (a : Ordinal.{u_4}) → a < o → α)

Set.range (o.familyOfBFamily f) = o.brange f


/-- Left translation preserves convexity. -/
theorem ConvexOn.translate_left (hf : ConvexOn 𝕜 s f) (c : E) :
    ConvexOn 𝕜 ((fun z => c + z) ⁻¹' s) (f ∘ fun z => z + c)

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_5}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[OrderedAddCommMonoid β]
[Module 𝕜 E]
[SMul 𝕜 β]
{s : Set E}
{f : E → β}
(hf : ConvexOn 𝕜 s f)
(c : E)


@[to_additive Right.pow_neg]
theorem Right.pow_lt_one_of_lt [CovariantClass M M (swap (· * ·)) (· < ·)] {n : ℕ} {x : M}
    (hn : 0 < n) (h : x < 1) : x ^ n < 1

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


@[to_additive]
theorem inter_smul_union_subset_union [DecidableEq α] : (s₁ ∩ s₂) • (t₁ ∪ t₂) ⊆ s₁ • t₁ ∪ s₂ • t₂

{α : Type u_2}
{β : Type u_3}
[DecidableEq β]
[VAdd α β]
{s₁ s₂ : Finset α}
{t₁ t₂ : Finset β}
[DecidableEq α]

s₁ ∩ s₂ +ᵥ (t₁ ∪ t₂) ⊆ s₁ +ᵥ t₁ ∪ (s₂ +ᵥ t₂)


theorem iUnion_image_preimage_sigma_mk_eq_self {ι : Type*} {σ : ι → Type*} (s : Set (Sigma σ)) :
    ⋃ i, Sigma.mk i '' (Sigma.mk i ⁻¹' s) = s

{ι : Type u_11}
{σ : ι → Type u_12}
(s : Set (Sigma σ))


@[simp]
theorem pi_le_pi [∀ i, NeBot (f₁ i)] : pi f₁ ≤ pi f₂ ↔ ∀ i, f₁ i ≤ f₂ i

{ι : Type u_1}
{α : ι → Type u_2}
{f₁ f₂ : (i : ι) → Filter (α i)}
[∀ (i : ι), (f₁ i).NeBot]

Filter.pi f₁ ≤ Filter.pi f₂ ↔ ∀ (i : ι), f₁ i ≤ f₂ i


theorem exp_approx_start (x a b : ℝ) (h : |exp x - expNear 0 x a| ≤ |x| ^ 0 / Nat.factorial 0 * b) :
    |exp x - a| ≤ b

(h : |Real.exp x - Real.expNear 0 x a| ≤ |x| ^ 0 / ↑(Nat.factorial 0) * b)


theorem continuousOn_iff_continuous_restrict {f : α → β} {s : Set α} :
    ContinuousOn f s ↔ Continuous (s.restrict f)

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
{f : α → β}
{s : Set α}


protected theorem Finite.partiallyWellOrderedOn (hs : s.Finite) : s.PartiallyWellOrderedOn r

{α : Type u_2}
{r : α → α → Prop}
{s : Set α}
[IsRefl α r]
(hs : s.Finite)


@[simp]
theorem himp_bihimp_left : a ⇨ a ⇔ b = a ⇨ b

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


protected theorem le_of_sub_nonpos {a b : Int} (h : a - b ≤ 0) : a ≤ b


theorem sInf_sUnion (s : Set (Set β)) : sInf (⋃₀ s) = ⨅ t ∈ s, sInf t

{β : Type u_2}
[CompleteLattice β]
(s : Set (Set β))


/-- The completed Riemann zeta function `Λ(s)` is differentiable away from `s = 0` and `s = 1`. -/
theorem differentiableAt_completedZeta {s : ℂ} (hs : s ≠ 0) (hs' : s ≠ 1) :
    DifferentiableAt ℂ completedRiemannZeta s


/-- If `Irreducible (cyclotomic (2 ^ k) K)` (in particular for `K = ℚ`) and `k` is at least `2`,
then the norm of `zeta (2 ^ k) K L - 1` is `2`. -/
theorem norm_zeta_pow_sub_one_two {k : ℕ} (hk : 2 ≤ k)
    [IsCyclotomicExtension {(2 : ℕ+) ^ k} K L] (hirr : Irreducible (cyclotomic (2 ^ k) K)) :
    norm K (zeta ((2 : ℕ+) ^ k) K L - 1) = 2

(hirr : Irreducible (Polynomial.cyclotomic (2 ^ k) K))

(Algebra.norm K) (IsCyclotomicExtension.zeta (2 ^ k) K L - 1) = 2


theorem sometimes_eq {p : Prop} {α} [Nonempty α] (f : p → α) (a : p) : sometimes f = f a

{p : Prop}
{α : Sort u_1}
[Nonempty α]
(f : p → α)
(a : p)


theorem w : forkMap P R ≫ firstMap P R = forkMap P R ≫ secondMap P R

(P : CategoryTheory.Functor Cᵒᵖ (Type (max v u)))

CategoryTheory.CategoryStruct.comp (CategoryTheory.Equalizer.forkMap P R)
    (CategoryTheory.Equalizer.Presieve.firstMap P R) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.Equalizer.forkMap P R)
    (CategoryTheory.Equalizer.Presieve.secondMap P R)


@[aesop safe 20 (rule_sets := [Measurable])]
protected theorem sup [SemilatticeSup β] [ContinuousSup β] (hf : AEFinStronglyMeasurable f μ)
    (hg : AEFinStronglyMeasurable g μ) : AEFinStronglyMeasurable (f ⊔ g) μ

(hf : MeasureTheory.AEFinStronglyMeasurable f μ)

(hg : MeasureTheory.AEFinStronglyMeasurable g μ)

MeasureTheory.AEFinStronglyMeasurable (f ⊔ g) μ


theorem IsPRadical.ker_le [IsPRadical i p] :
    RingHom.ker i ≤ pNilradical K p

{K : Type u_1}
{L : Type u_2}
[CommSemiring K]
[CommSemiring L]
(i : K →+* L)
(p : ℕ)
[IsPRadical i p]


@[simp] lemma unmop_whiskerRight {X Y : Cᴹᵒᵖ} (f : X ⟶ Y) (Z : Cᴹᵒᵖ) :
    (f ▷ Z).unmop = unmop Z ◁ f.unmop

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

(CategoryTheory.MonoidalCategory.whiskerRight f Z).unmop = CategoryTheory.MonoidalCategory.whiskerLeft Z.unmop f.unmop


theorem lintegral_add_aux {f g : α → ℝ≥0∞} (hf : Measurable f) (hg : Measurable g) :
    ∫⁻ a, f a + g a ∂μ = ∫⁻ a, f a ∂μ + ∫⁻ a, g a ∂μ

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

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


/-- The symmetric case of `iInf_and`, useful for rewriting into an infimum over a conjunction -/
theorem iInf_and' {p q : Prop} {s : p → q → α} :
    ⨅ (h₁ : p) (h₂ : q), s h₁ h₂ = ⨅ h : p ∧ q, s h.1 h.2

{α : Type u_1}
[CompleteLattice α]
{p q : Prop}
{s : p → q → α}

⨅ (h₁ : p), ⨅ (h₂ : q), s h₁ h₂ = ⨅ (h : p ∧ q), s ⋯ ⋯


@[to_additive rightAddCoset_eq_iff]
theorem rightCoset_eq_iff {x y : α} : op x • (s : Set α) = op y • s ↔ y * x⁻¹ ∈ s

{α : Type u_1}
[Group α]
(s : Subgroup α)
{x y : α}

MulOpposite.op x • ↑s = MulOpposite.op y • ↑s ↔ y * x⁻¹ ∈ s


theorem mul_lt_mul_of_neg_right [ExistsAddOfLE α] [MulPosStrictMono α]
    [CovariantClass α α (swap (· + ·)) (· < ·)] [ContravariantClass α α (swap (· + ·)) (· < ·)]
    (h : b < a) (hc : c < 0) : a * c < b * c

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

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


@[simp]
theorem map_id : map (QuadraticMap.Isometry.id Q₁) = AlgHom.id R (CliffordAlgebra Q₁)

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

CliffordAlgebra.map (QuadraticMap.Isometry.id Q₁) = AlgHom.id R (CliffordAlgebra Q₁)


theorem Nat.cauchy_induction_two_mul (seed : ℕ) (hs : P seed.succ)
    (hm : ∀ x, seed < x → P x → P (2 * x)) (n : ℕ) : P n

(hm : ∀ (x : ℕ), seed < x → P x → P (2 * x))


theorem of_reverse [HasInvolutiveReverse V] (X Y : V) (f : X ⟶ Y) :
    (reverse <| (Push.of σ).map f) = (Push.of σ).map (reverse f)

{V : Type u_2}
[Quiver V]
{V' : Type u_4}
(σ : V → V')
[Quiver.HasInvolutiveReverse V]
(X Y : V)
(f : X ⟶ Y)

Quiver.reverse ((Quiver.Push.of σ).map f) = (Quiver.Push.of σ).map (Quiver.reverse f)


@[to_additive]
protected theorem one_smul (x : X[S⁻¹]) : (1 : R[S⁻¹]) • x = x

{R : Type u_1}
[AddMonoid R]
{S : AddSubmonoid R}
[AddOreLocalization.AddOreSet S]
{X : Type u_2}
[AddAction R X]
(x : AddOreLocalization S X)


@[to_additive]
theorem center_eq_iInf (S : Set G) (hS : closure S = ⊤) :
    center G = ⨅ g ∈ S, centralizer (zpowers g)

{G : Type u_1}
[Group G]
(S : Set G)
(hS : Subgroup.closure S = ⊤)

Subgroup.center G = ⨅ g ∈ S, Subgroup.centralizer ↑(Subgroup.zpowers g)


/-- A common special case of `image₂_congr` -/
theorem image₂_congr' (h : ∀ a b, f a b = f' a b) : image₂ f s t = image₂ f' s t

{α : Type u_1}
{β : Type u_3}
{γ : Type u_5}
[DecidableEq γ]
{f f' : α → β → γ}
{s : Finset α}
{t : Finset β}
(h : ∀ (a : α) (b : β), f a b = f' a b)

Finset.image₂ f s t = Finset.image₂ f' s t


theorem isBigOWith_of_le' (hfg : ∀ x, ‖f x‖ ≤ c * ‖g x‖) : IsBigOWith c l f g

{α : Type u_1}
{E : Type u_3}
{F : Type u_4}
[Norm E]
[Norm F]
{c : ℝ}
{f : α → E}
{g : α → F}
(l : Filter α)
(hfg : ∀ (x : α), ‖f x‖ ≤ c * ‖g x‖)


@[simp]
theorem toWithTop_one' {h : Decidable (1 : PartENat).Dom} : toWithTop 1 = 1


/-- The opposite embedding in `Embedding c.symm c'.symm` of `e : Embedding c c'`. -/
@[simps]
def op : Embedding c.symm c'.symm

{ι : Type u_1}
{ι' : Type u_2}
{c : ComplexShape ι}
{c' : ComplexShape ι'}
(e : c.Embedding c')


lemma isIso_homologyπ (hf : S.f = 0) [S.HasHomology] :
    IsIso S.homologyπ


@[simp] lemma uIoc_of_ge (h : b ≤ a) : Ι a b = Ioc b a

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


theorem HasFPowerSeriesOnBall.analyticOn (hf : HasFPowerSeriesOnBall f p x r) :
    AnalyticOn 𝕜 f (EMetric.ball x r)

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


theorem blsub_succ_of_mono {o : Ordinal.{u}} {f : ∀ a < succ o, Ordinal.{max u v}}
    (hf : ∀ {i j} (hi hj), i ≤ j → f i hi ≤ f j hj) : blsub.{_, v} _ f = succ (f o (lt_succ o))

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

(hf : ∀ {i j : Ordinal.{u}} (hi : i < Order.succ o) (hj : j < Order.succ o), i ≤ j → f i hi ≤ f j hj)

(Order.succ o).blsub f = Order.succ (f o ⋯)


/-- An element `a` is left-regular if and only if a positive power of `a` is left-regular. -/
theorem IsLeftRegular.pow_iff {n : ℕ} (n0 : 0 < n) : IsLeftRegular (a ^ n) ↔ IsLeftRegular a

{R : Type u_1}
{a : R}
[Monoid R]
{n : ℕ}
(n0 : 0 < n)


@[simp]
theorem zipLeft_nil_left : zipLeft ([] : List α) bs = []


@[simp]
theorem star_moveRight (x) : star.moveRight x = 0


/-- The pseudofunctor from `Cat` to `Cat` defined with `WithInitial`. -/
@[simps]
def pseudofunctor : Pseudofunctor Cat Cat

∀ {a b c : CategoryTheory.Cat} (F : CategoryTheory.Functor ↑a ↑b) (G : CategoryTheory.Functor ↑b ↑c),
  CategoryTheory.WithInitial.pseudofunctor.mapComp F G = CategoryTheory.WithInitial.mapComp F G


@[to_additive]
theorem map_ne_one_iff {R S F : Type*} [One R] [One S] [FunLike F R S] [OneHomClass F R S] (f : F)
    (hf : Function.Injective f) {x : R} : f x ≠ 1 ↔ x ≠ 1

{R : Type u_10}
{S : Type u_11}
{F : Type u_12}
[One R]
[One S]
[FunLike F R S]
[OneHomClass F R S]
(f : F)
(hf : Function.Injective ⇑f)
{x : R}


theorem lim_neg (f : CauSeq β abv) : lim (-f) = -lim f

{α : Type u_1}
[LinearOrderedField α]
{β : Type u_2}
[Ring β]
{abv : β → α}
[IsAbsoluteValue abv]
[CauSeq.IsComplete β abv]
(f : CauSeq β abv)


@[simp]
theorem C_smul_derivation_apply (D : Derivation R R[X] A) (a : R) (f : R[X]) :
    C a • D f = a • D f

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[AddCommMonoid A]
[Module R A]
[Module (Polynomial R) A]
(D : Derivation R (Polynomial R) A)
(a : R)
(f : Polynomial R)


@[measurability, fun_prop]
theorem Measurable.infDist {f : β → α} (hf : Measurable f) {s : Set α} :
    Measurable fun x => infDist (f x) s

{α : Type u_1}
{β : Type u_2}
[PseudoMetricSpace α]
[MeasurableSpace α]
[OpensMeasurableSpace α]
[MeasurableSpace β]
{f : β → α}
(hf : Measurable f)
{s : Set α}

Measurable fun x => Metric.infDist (f x) s


theorem ext_iff {x y : 𝕎 R} : x = y ↔ ∀ n, x.coeff n = y.coeff n

x = y ↔ ∀ (n : ℕ), x.coeff n = y.coeff n


theorem not_isAssociatedPrime_of_subsingleton [Subsingleton M] : ¬IsAssociatedPrime I M

{R : Type u_1}
[CommRing R]
{I : Ideal R}
{M : Type u_2}
[AddCommGroup M]
[Module R M]
[Subsingleton M]


/-- Induction principle for invertible matrices based on transvections: if a property is true for
all invertible diagonal matrices, all transvections, and is stable under product of invertible
matrices, then it is true for all invertible matrices. This is the useful way to say that
invertible matrices are generated by invertible diagonal matrices and transvections. -/
theorem diagonal_transvection_induction_of_det_ne_zero (P : Matrix n n 𝕜 → Prop) (M : Matrix n n 𝕜)
    (hMdet : det M ≠ 0) (hdiag : ∀ D : n → 𝕜, det (diagonal D) ≠ 0 → P (diagonal D))
    (htransvec : ∀ t : TransvectionStruct n 𝕜, P t.toMatrix)
    (hmul : ∀ A B, det A ≠ 0 → det B ≠ 0 → P A → P B → P (A * B)) : P M

(hdiag : ∀ (D : n → 𝕜), (Matrix.diagonal D).det ≠ 0 → P (Matrix.diagonal D))

(htransvec : ∀ (t : Matrix.TransvectionStruct n 𝕜), P t.toMatrix)

(hmul : ∀ (A B : Matrix n n 𝕜), A.det ≠ 0 → B.det ≠ 0 → P A → P B → P (A * B))


lemma W_eq_inverseImage_isomorphisms :
    W (· ∈ Set.range F.obj) = (MorphismProperty.isomorphisms _).inverseImage G

{C : Type u_1}
{D : Type u_2}
[CategoryTheory.Category.{u_4, u_1} C]
[CategoryTheory.Category.{u_3, u_2} D]
{F : CategoryTheory.Functor C D}
{G : CategoryTheory.Functor D C}
(adj : G ⊣ F)
[F.Full]
[F.Faithful]

(CategoryTheory.Localization.LeftBousfield.W fun x => x ∈ Set.range F.obj) =
  (CategoryTheory.MorphismProperty.isomorphisms C).inverseImage G


lemma inv_mul_eq_one₀ (ha : a ≠ 0) : a⁻¹ * b = 1 ↔ a = b

{G₀ : Type u_3}
[GroupWithZero G₀]
{a b : G₀}
(ha : a ≠ 0)


@[to_additive]
theorem IsCompact.mul_closedBall (hs : IsCompact s) (hδ : 0 ≤ δ) (x : E) :
    s * closedBall x δ = x • cthickening δ s

{E : Type u_1}
[SeminormedCommGroup E]
{δ : ℝ}
{s : Set E}
(hs : IsCompact s)
(hδ : 0 ≤ δ)
(x : E)

s * Metric.closedBall x δ = x • Metric.cthickening δ s


theorem abs_one_div (a : α) : |1 / a| = 1 / |a|

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


theorem mem_sup_right {S T : StarSubalgebra R A} : ∀ {x : A}, x ∈ T → x ∈ S ⊔ T

{R : Type u_2}
{A : Type u_3}
[CommSemiring R]
[StarRing R]
[Semiring A]
[Algebra R A]
[StarRing A]
[StarModule R A]
{S T : StarSubalgebra R A}
{x : A}


@[to_additive]
lemma orbitRel.Quotient.subgroup_quotient_eq_iff {H : Subgroup G} {x : orbitRel.Quotient G α}
    {a b : x.orbit} : (⟦a⟧ : orbitRel.Quotient H x.orbit) = ⟦b⟧ ↔
      (⟦↑a⟧ : orbitRel.Quotient H α) = ⟦↑b⟧

{G : Type u_1}
{α : Type u_2}
[Group G]
[MulAction G α]
{H : Subgroup G}
{x : MulAction.orbitRel.Quotient G α}
{a b : ↑x.orbit}

⟦a⟧ = ⟦b⟧ ↔ ⟦↑a⟧ = ⟦↑b⟧


theorem bddAbove {f : ∀ i, E i} (hf : Memℓp f ∞) : BddAbove (Set.range fun i => ‖f i‖)

{α : Type u_1}
{E : α → Type u_2}
[(i : α) → NormedAddCommGroup (E i)]
{f : (i : α) → E i}
(hf : Memℓp f ⊤)


@[fun_prop]
theorem ContinuousOn.sqrt (h : ContinuousOn f s) : ContinuousOn (fun x => √(f x)) s

{α : Type u_1}
[TopologicalSpace α]
{f : α → ℝ}
{s : Set α}
(h : ContinuousOn f s)


@[simp]
theorem add_comp [ContinuousAdd M₃] (g₁ g₂ : M₂ →SL[σ₂₃] M₃) (f : M₁ →SL[σ₁₂] M₂) :
    (g₁ + g₂).comp f = g₁.comp f + g₂.comp f

{R₁ : Type u_1}
{R₂ : Type u_2}
{R₃ : Type u_3}
[Semiring R₁]
[Semiring R₂]
[Semiring R₃]
{σ₁₂ : R₁ →+* R₂}
{σ₂₃ : R₂ →+* R₃}
{σ₁₃ : R₁ →+* R₃}
{M₁ : Type u_4}
[TopologicalSpace M₁]
[AddCommMonoid M₁]
{M₂ : Type u_6}
[TopologicalSpace M₂]
[AddCommMonoid M₂]
{M₃ : Type u_7}
[TopologicalSpace M₃]
[AddCommMonoid M₃]
[Module R₁ M₁]
[Module R₂ M₂]
[Module R₃ M₃]
[RingHomCompTriple σ₁₂ σ₂₃ σ₁₃]
[ContinuousAdd M₃]
(g₁ g₂ : M₂ →SL[σ₂₃] M₃)
(f : M₁ →SL[σ₁₂] M₂)


@[to_additive]
theorem append_append (h₁ : Red L₁ L₃) (h₂ : Red L₂ L₄) : Red (L₁ ++ L₂) (L₃ ++ L₄)

{α : Type u}
{L₁ L₂ L₃ L₄ : List (α × Bool)}
(h₁ : FreeGroup.Red L₁ L₃)
(h₂ : FreeGroup.Red L₂ L₄)


theorem lt_wf : @WellFounded Ordinal (· < ·)


/-- If a subgroup is generated by transpositions, then a permutation `f` lies in the subgroup if
  and only if `f` has finite support and `f x` always lies in the same orbit as `x`. -/
theorem mem_closure_isSwap {S : Set (Perm α)} (hS : ∀ f ∈ S, f.IsSwap) {f : Perm α} :
    f ∈ closure S ↔ (fixedBy α f)ᶜ.Finite ∧ ∀ x, f x ∈ orbit (closure S) x

{α : Type u_2}
[DecidableEq α]
{S : Set (Equiv.Perm α)}
(hS : ∀ f ∈ S, f.IsSwap)
{f : Equiv.Perm α}

f ∈ Subgroup.closure S ↔ (MulAction.fixedBy α f)ᶜ.Finite ∧ ∀ (x : α), f x ∈ MulAction.orbit (↥(Subgroup.closure S)) x


theorem monotone_closure (X : Type*) [TopologicalSpace X] : Monotone (@closure X _)


@[simp] theorem coe_mk (f h) : ⇑(mk f h) = f

(h : ∀ (x : ℝ), f.toFun (x + 1) = f.toFun x + 1)

⇑{ toOrderHom := f, map_add_one' := h } = ⇑f


structure Context (α : Sort u) where
  op : α → α → α
  assoc : Associative op
  comm : Option $ PLift $ Commutative op
  idem : Option $ PLift $ IdempotentOp op
  vars : List (Variable op)
  arbitrary : α

{α : Sort u}
(self : Lean.Data.AC.Context α)


@[simp]
theorem pushoutCoconeOfRightIso_x : (pushoutCoconeOfRightIso f g).pt = Y

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

(CategoryTheory.Limits.pushoutCoconeOfRightIso f g).pt = Y


theorem range_top_iff_surjective (f : F) :
    NonUnitalStarAlgHom.range f = (⊤ : NonUnitalStarSubalgebra R B) ↔ Function.Surjective f

{F : Type v'}
{R : Type u}
{A : Type v}
{B : Type w}
[CommSemiring R]
[StarRing R]
[NonUnitalSemiring A]
[StarRing A]
[Module R A]
[NonUnitalSemiring B]
[StarRing B]
[Module R B]
[IsScalarTower R B B]
[SMulCommClass R B B]
[StarModule R B]
[FunLike F A B]
[NonUnitalAlgHomClass F R A B]
[NonUnitalStarAlgHomClass F R A B]
(f : F)

NonUnitalStarAlgHom.range f = ⊤ ↔ Function.Surjective ⇑f


/-- (internal implementation) the fact that the proposed limit cone is the limit -/
@[simps]
noncomputable def limitConeIsLimit : IsLimit (limitCone.{v, u} F)

{J : Type v}
[CategoryTheory.Category.{w, v} J]
(F : J ⥤ Type u)
[Small.{u, max u v} ↑F.sections]
(s : CategoryTheory.Limits.Cone F)
(v : s.pt)

(CategoryTheory.Limits.Types.Small.limitConeIsLimit F).lift s v = (equivShrink ↑F.sections) ⟨fun j => s.π.app j v, ⋯⟩


theorem _root_.Acc.TransGen (h : Acc r a) : Acc (TransGen r) a

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


/-- **Gelfand's formula**: Given an element `a : A` of a complex Banach algebra, the
`spectralRadius` of `a` is the limit of the sequence `‖a ^ n‖₊ ^ (1 / n)`. -/
theorem pow_norm_pow_one_div_tendsto_nhds_spectralRadius (a : A) :
    Tendsto (fun n : ℕ => ENNReal.ofReal (‖a ^ n‖ ^ (1 / n : ℝ))) atTop
      (𝓝 (spectralRadius ℂ a))

{A : Type u_2}
[NormedRing A]
[NormedAlgebra ℂ A]
[CompleteSpace A]
(a : A)

Filter.Tendsto (fun n => ENNReal.ofReal (‖a ^ n‖ ^ (1 / ↑n))) Filter.atTop (nhds (spectralRadius ℂ a))


@[simp]
theorem finsuppProdLEquiv_symm_apply {α β R M : Type*} [Semiring R] [AddCommMonoid M] [Module R M]
    (f : α →₀ β →₀ M) (xy) : (finsuppProdLEquiv R).symm f xy = f xy.1 xy.2

{α : Type u_7}
{β : Type u_8}
{R : Type u_9}
{M : Type u_10}
[Semiring R]
[AddCommMonoid M]
[Module R M]
(f : α →₀ β →₀ M)
(xy : α × β)

((Finsupp.finsuppProdLEquiv R).symm f) xy = (f xy.1) xy.2


@[reassoc (attr := simp)]
theorem colimit.isoColimitCocone_ι_inv {F : J ⥤ C} [HasColimit F] (t : ColimitCocone F) (j : J) :
    t.cocone.ι.app j ≫ (colimit.isoColimitCocone t).inv = colimit.ι F j

(t : CategoryTheory.Limits.ColimitCocone F)

t.cocone.ι.app j ≫ (CategoryTheory.Limits.colimit.isoColimitCocone t).inv = CategoryTheory.Limits.colimit.ι F j


@[to_additive]
lemma aestabilizer_congr (h : s =ᵐ[μ] t) : aestabilizer G μ s = aestabilizer G μ t

{G : Type u_1}
{α : Type u_2}
[AddGroup G]
[AddAction G α]

∀ {x : MeasurableSpace α} {μ : MeasureTheory.Measure α} [inst : MeasureTheory.VAddInvariantMeasure G α μ] {s t : Set α},
  s =ᵐ[μ] t → AddAction.aestabilizer G μ s = AddAction.aestabilizer G μ t


theorem gcd_mul_left (m n k : Nat) : gcd (m * n) (m * k) = m * gcd n k


/-- `ord ∘ aleph'` enumerates the ordinals that are cardinals. -/
theorem ord_aleph'_eq_enum_card : ord ∘ aleph' = enumOrd { b : Ordinal | b.card.ord = b }

Cardinal.ord ∘ Cardinal.aleph' = Ordinal.enumOrd {b | b.card.ord = b}


@[to_additive (attr := ext)]
theorem MulHom.ext [Mul M] [Mul N] ⦃f g : M →ₙ* N⦄ (h : ∀ x, f x = g x) : f = g

{M : Type u_4}
{N : Type u_5}
[Add M]
[Add N]
⦃f g : AddHom M N⦄
(h : ∀ (x : M), f x = g x)


/-- Higman's Lemma, which states that for any reflexive, transitive relation `r` which is
  partially well-ordered on a set `s`, the relation `List.SublistForall₂ r` is partially
  well-ordered on the set of lists of elements of `s`. That relation is defined so that
  `List.SublistForall₂ r l₁ l₂` whenever `l₁` related pointwise by `r` to a sublist of `l₂`.  -/
theorem partiallyWellOrderedOn_sublistForall₂ (r : α → α → Prop) [IsRefl α r] [IsTrans α r]
    {s : Set α} (h : s.PartiallyWellOrderedOn r) :
    { l : List α | ∀ x, x ∈ l → x ∈ s }.PartiallyWellOrderedOn (List.SublistForall₂ r)

{α : Type u_2}
(r : α → α → Prop)
[IsRefl α r]
[IsTrans α r]
{s : Set α}
(h : s.PartiallyWellOrderedOn r)

{l | ∀ x ∈ l, x ∈ s}.PartiallyWellOrderedOn (List.SublistForall₂ r)


theorem not_dvd_of_degree_lt (hp : Monic p) (h0 : q ≠ 0) (hl : degree q < degree p) : ¬p ∣ q

{R : Type u}
[Semiring R]
{p q : R[X]}
(hp : p.Monic)
(h0 : q ≠ 0)
(hl : q.degree < p.degree)


theorem le_sup_of_le_right (h : c ≤ b) : c ≤ a ⊔ b

{α : Type u}
[SemilatticeSup α]
{a b c : α}
(h : c ≤ b)


theorem sum_inr : Primrec (@Sum.inr α β)

{α : Type u_1}
{β : Type u_2}
[Primcodable α]
[Primcodable β]


theorem IsNormal.cof_le {f} (hf : IsNormal f) (a) : cof a ≤ cof (f a)

{f : Ordinal.{u_2} → Ordinal.{u_2}}
(hf : Ordinal.IsNormal f)
(a : Ordinal.{u_2})


/-- The unit of the adjunction `lightCondSetToTopCat ⊣ topCatToLightCondSet` -/
@[simps val_app val_app_apply]
def topCatAdjunctionUnit (X : LightCondSet.{u}) : X ⟶ X.toTopCat.toLightCondSet

(X : LightCondSet)
(S : LightProfiniteᵒᵖ)
(x : X.val.obj S)

X.topCatAdjunctionUnit.val.app S x =
  { toFun := fun s => X.val.map (LightProfinite.const (Opposite.unop S) s).op x, continuous_toFun := ⋯ }


@[simp] theorem isRight_inl : (inl x : α ⊕ β).isRight = false


/-- A semiring is local if it has a unique maximal ideal. -/
theorem of_unique_max_ideal (h : ∃! I : Ideal R, I.IsMaximal) : LocalRing R

{R : Type u_1}
[CommSemiring R]
(h : ∃! I, I.IsMaximal)


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

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


theorem Disjoint.map (h : Disjoint a b) : Disjoint (f a) (f b)

{F : Type u_1}
{α : Type u_3}
{β : Type u_4}
[Lattice α]
[BoundedOrder α]
[Lattice β]
[BoundedOrder β]
[FunLike F α β]
[BoundedLatticeHomClass F α β]
(f : F)
{a b : α}
(h : Disjoint a b)


/-- Special case of the grid-lines lemma `lintegral_mul_prod_lintegral_pow_le`, taking the extremal
exponent `p = (#ι - 1)⁻¹`. -/
theorem lintegral_prod_lintegral_pow_le
    {p : ℝ} (hp : Real.IsConjExponent #ι p)
    {f} (hf : Measurable f) :
    ∫⁻ x, ∏ i, (∫⁻ xᵢ, f (update x i xᵢ) ∂μ i) ^ ((1 : ℝ) / (#ι - 1 : ℝ)) ∂.pi μ
    ≤ (∫⁻ x, f x ∂.pi μ) ^ p

(μ : (i : ι) → MeasureTheory.Measure (A i))

[∀ (i : ι), MeasureTheory.SigmaFinite (μ i)]

∫⁻ (x : (i : ι) → A i),
    ∏ i : ι, (∫⁻ (xᵢ : A i), f (Function.update x i xᵢ) ∂μ i) ^ (1 / (↑#ι - 1)) ∂MeasureTheory.Measure.pi μ ≤
  (∫⁻ (x : (i : ι) → A i), f x ∂MeasureTheory.Measure.pi μ) ^ p


@[simp]
theorem mapAccumr₂_nil : mapAccumr₂ f Vector.nil Vector.nil s = (s, Vector.nil)

∀ {α β α_1 β_1 : Type} {f : α → β → α_1 → α_1 × β_1} {s : α_1},
  Mathlib.Vector.mapAccumr₂ f Mathlib.Vector.nil Mathlib.Vector.nil s = (s, Mathlib.Vector.nil)


theorem le_solvable_ideal_solvable {I J : LieIdeal R L} (h₁ : I ≤ J) (_ : IsSolvable R J) :
    IsSolvable R I

{R : Type u}
{L : Type v}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
{I J : LieIdeal R L}
(h₁ : I ≤ J)

LieAlgebra.IsSolvable R ↥↑J → LieAlgebra.IsSolvable R ↥↑I


/-- If `f` and `g` are two equal morphisms of monads, then the functors of algebras induced by them
are isomorphic.
We define it like this as opposed to using `eqToIso` so that the components are nicer to prove
lemmas about.
-/
@[simps (config := { rhsMd := .default })]
def algebraFunctorOfMonadHomEq {T₁ T₂ : Monad C} {f g : T₁ ⟶ T₂} (h : f = g) :
    algebraFunctorOfMonadHom f ≅ algebraFunctorOfMonadHom g

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{T₁ T₂ : CategoryTheory.Monad C}
{f g : T₁ ⟶ T₂}
(h : f = g)
(X : T₂.Algebra)

((CategoryTheory.Monad.algebraFunctorOfMonadHomEq h).inv.app X).f =
  (CategoryTheory.Iso.refl ((CategoryTheory.Monad.algebraFunctorOfMonadHom f).obj X).A).inv


/--
For an addivite functor `F : C ⥤ D` between abelian categories, the following are equivalent:
- `F` preserves short exact sequences on the left hand side, i.e. if `0 ⟶ A ⟶ B ⟶ C ⟶ 0` is exact
  then `0 ⟶ F(A) ⟶ F(B) ⟶ F(C)` is exact.
- `F` preserves exact sequences on the left hand side, i.e. if `A ⟶ B ⟶ C` is exact where `A ⟶ B`
  is mono, then `F(A) ⟶ F(B) ⟶ F(C)` is exact and `F(A) ⟶ F(B)` is mono as well.
- `F` preserves kernels.
- `F` preserves finite limits.
-/
lemma preservesFiniteLimits_tfae : List.TFAE
    [
      ∀ (S : ShortComplex C), S.ShortExact → (S.map F).Exact ∧ Mono (F.map S.f),
      ∀ (S : ShortComplex C), S.Exact ∧ Mono S.f → (S.map F).Exact ∧ Mono (F.map S.f),
      ∀ ⦃X Y : C⦄ (f : X ⟶ Y), Nonempty $ PreservesLimit (parallelPair f 0) F,
      Nonempty $ PreservesFiniteLimits F
    ]

{C : Type u_1}
{D : Type u_2}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Category.{u_4, u_2} D]
[CategoryTheory.Abelian C]
[CategoryTheory.Abelian D]
(F : CategoryTheory.Functor C D)
[F.Additive]

[∀ (S : CategoryTheory.ShortComplex C), S.ShortExact → (S.map F).Exact ∧ CategoryTheory.Mono (F.map S.f),
    ∀ (S : CategoryTheory.ShortComplex C),
      S.Exact ∧ CategoryTheory.Mono S.f → (S.map F).Exact ∧ CategoryTheory.Mono (F.map S.f),
    ∀ ⦃X Y : C⦄ (f : X ⟶ Y), Nonempty (CategoryTheory.Limits.PreservesLimit (CategoryTheory.Limits.parallelPair f 0) F),
    Nonempty (CategoryTheory.Limits.PreservesFiniteLimits F)].TFAE


/--
Given a spanning set of `Γ(X, U)`, the corresponding basic open sets cover `U`.
See `IsAffineOpen.basicOpen_union_eq_self_iff` for the inverse direction for affine open sets.
-/
lemma iSup_basicOpen_of_span_eq_top {X : Scheme} (U) (s : Set Γ(X, U))
    (hs : Ideal.span s = ⊤) : (⨆ i ∈ s, X.basicOpen i) = U

(s : Set ↑(X.presheaf.obj (Opposite.op U)))


theorem Wbtw.rotate_iff [NoZeroSMulDivisors R V] {x y z : P} (h : Wbtw R x y z) :
    Wbtw R z x y ↔ x = y

{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[OrderedRing R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
[NoZeroSMulDivisors R V]
{x y z : P}
(h : Wbtw R x y z)


@[simp] lemma ofUpperSet_le_ofUpperSet {a b : WithUpperSet α} :
    ofUpperSet a ≤ ofUpperSet b ↔ b ⤳ a

{α : Type u_1}
[Preorder α]
{a b : Topology.WithUpperSet α}

Topology.WithUpperSet.ofUpperSet a ≤ Topology.WithUpperSet.ofUpperSet b ↔ b ⤳ a


/-- Composition of enriched functors. -/
@[simps]
def EnrichedFunctor.comp {C : Type u₁} {D : Type u₂} {E : Type u₃} [EnrichedCategory V C]
    [EnrichedCategory V D] [EnrichedCategory V E] (F : EnrichedFunctor V C D)
    (G : EnrichedFunctor V D E) : EnrichedFunctor V C E

(F : CategoryTheory.EnrichedFunctor V C D)

(G : CategoryTheory.EnrichedFunctor V D E)

(CategoryTheory.EnrichedFunctor.comp V F G).map X Y =
  CategoryTheory.CategoryStruct.comp (F.map X Y) (G.map (F.obj X) (F.obj Y))


theorem degree_basisDivisor_of_ne (hxy : x ≠ y) : (basisDivisor x y).degree = 1

{F : Type u_1}
[Field F]
{x y : F}
(hxy : x ≠ y)


theorem nontrivial_max_triv_of_isNilpotent [Nontrivial M] [IsNilpotent R L M] :
    Nontrivial (maxTrivSubmodule R L M)

(R : Type u)
(L : Type v)
(M : Type w)
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
[Nontrivial M]
[LieModule.IsNilpotent R L M]

Nontrivial ↥↑(LieModule.maxTrivSubmodule R L M)


theorem derivWithin.comp (hh₂ : DifferentiableWithinAt 𝕜' h₂ s' (h x))
    (hh : DifferentiableWithinAt 𝕜 h s x) (hs : MapsTo h s s') (hxs : UniqueDiffWithinAt 𝕜 s x) :
    derivWithin (h₂ ∘ h) s x = derivWithin h₂ s' (h x) * derivWithin h s x


@[simp]
theorem BilinForm.toMatrix_toBilin (M : Matrix n n R₂) :
    BilinForm.toMatrix b (Matrix.toBilin b M) = M

{R₂ : Type u_5}
{M₂ : Type u_6}
[CommSemiring R₂]
[AddCommMonoid M₂]
[Module R₂ M₂]
{n : Type u_11}
[Fintype n]
[DecidableEq n]
(b : Basis n R₂ M₂)
(M : Matrix n n R₂)

(BilinForm.toMatrix b) ((Matrix.toBilin b) M) = M


@[simp]
lemma Ioc_inr_inl : Ioc (inrₗ b) (inlₗ a) = ∅

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
[OrderTop α]
[OrderBot β]
[LocallyFiniteOrder α]
[LocallyFiniteOrder β]
(a : α)
(b : β)

Finset.Ioc (Sum.inrₗ b) (Sum.inlₗ a) = ∅


@[simp]
lemma image_val_iInter [Nonempty ι] : (↑(⋂ i, t i) : Set α) = ⋂ i, (↑(t i) : Set α)

{ι : Sort u_1}
{α : Type u_2}
{A : Set α}
{t : ι → Set ↑A}
[Nonempty ι]

Subtype.val '' ⋂ i, t i = ⋂ i, Subtype.val '' t i


@[reassoc (attr := simp)]
theorem LaxMonoidalFunctor.μ_natural (F : LaxMonoidalFunctor C D) {X Y X' Y' : C}
    (f : X ⟶ Y) (g : X' ⟶ Y') :
      (F.map f ⊗ F.map g) ≫ F.μ Y Y' = F.μ X X' ≫ F.map (f ⊗ g)

(F : CategoryTheory.LaxMonoidalFunctor C D)

CategoryTheory.MonoidalCategory.tensorHom (F.map f) (F.map g) ≫ F.μ Y Y' =
  F.μ X X' ≫ F.map (CategoryTheory.MonoidalCategory.tensorHom f g)


/-- This can be use to prove
```lean
example {f : α → β} (a₁ a₂ : α) : f ∘ ![a₁, a₂] = ![f a₁, f a₂] :=
  (map_eq _ _).symm
```
-/
@[simp]
theorem map_eq (f : α → β) {m} (v : Fin m → α) : map f v = f ∘ v

{α : Type u_1}
{β : Type u_2}
(f : α → β)
{m : ℕ}
(v : Fin m → α)


theorem smoothOn_univ : SmoothOn I I' f univ ↔ Smooth I I' f

{𝕜 : 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 : M → M'}

SmoothOn I I' f Set.univ ↔ Smooth I I' f


/--
The lower topology is the topology generated by the complements of the left-closed right-infinite
intervals.
-/
class IsLower (α : Type*) [t : TopologicalSpace α] [Preorder α] : Prop where
  topology_eq_lowerTopology : t = lower α

{α : Type u_1}
[t : TopologicalSpace α]
[Preorder α]
[self : Topology.IsLower α]


theorem IsPrime.multiset_prod_map_le {s : Multiset ι} (f : ι → Ideal R) {P : Ideal R}
    (hp : IsPrime P) : (s.map f).prod ≤ P ↔ ∃ i ∈ s, f i ≤ P

{R : Type u}
{ι : Type u_1}
[CommSemiring R]
{s : Multiset ι}
(f : ι → Ideal R)
{P : Ideal R}
(hp : P.IsPrime)

(Multiset.map f s).prod ≤ P ↔ ∃ i ∈ s, f i ≤ P


@[simp]
theorem Matrix.mulVecLin_apply [Fintype n] (M : Matrix m n R) (v : n → R) :
    M.mulVecLin v = M *ᵥ v

{R : Type u_1}
[CommSemiring R]
{m : Type u_4}
{n : Type u_5}
[Fintype n]
(M : Matrix m n R)
(v : n → R)


@[to_additive (attr := simp)] lemma mabs_one : |(1 : α)|ₘ = 1

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


lemma set_prod_ae_eq {s s' : Set α} {t t' : Set β} (hs : s =ᵐ[μ] s') (ht : t =ᵐ[ν] t') :
    (s ×ˢ t : Set (α × β)) =ᵐ[μ.prod ν] (s' ×ˢ t' : Set (α × β))

{α : Type u_1}
{β : Type u_3}
[MeasurableSpace α]
[MeasurableSpace β]
{μ : MeasureTheory.Measure α}
{ν : MeasureTheory.Measure β}
[MeasureTheory.SFinite ν]
{s s' : Set α}
{t t' : Set β}
(hs : s =ᵐ[μ] s')
(ht : t =ᵐ[ν] t')


@[simp]
protected lemma «exists» {p : Additive α → Prop} : (∃ a, p a) ↔ ∃ a, p (ofMul a)


theorem toBoolRing_inj {a b : α} : toBoolRing a = toBoolRing b ↔ a = b


@[to_additive]
theorem leftInverse_mul_right_inv_mul (c : G) :
    Function.LeftInverse (fun x ↦ c * x) fun x ↦ c⁻¹ * x

Function.LeftInverse (fun x => c * x) fun x => c⁻¹ * x


theorem wf_isOption : WellFounded IsOption


@[simp]
theorem NoMinOrder.lowerBounds_univ [NoMinOrder α] : lowerBounds (univ : Set α) = ∅

{α : Type u}
[Preorder α]
[NoMinOrder α]


theorem Iio_subset_Iic_self : Iio a ⊆ Iic a

{α : Type u_2}
[Preorder α]
[LocallyFiniteOrderBot α]
{a : α}


theorem not_exists_mem : (¬∃ x h, P x h) ↔ ∀ x h, ¬P x h

{α : Sort u_1}
{p : α → Prop}
{P : (x : α) → p x → Prop}

(¬∃ x h, P x h) ↔ ∀ (x : α) (h : p x), ¬P x h


/-- `biprodComparison F X Y` is a split epi. -/
@[simps]
def splitEpiBiprodComparison : SplitEpi (biprodComparison F X Y)

[CategoryTheory.Limits.HasBinaryBiproduct (F.obj X) (F.obj Y)]

(F.splitEpiBiprodComparison X Y).section_ = F.biprodComparison' X Y


@[to_additive]
theorem orbitZPowersEquiv_symm_apply (k : ZMod (minimalPeriod (a • ·) b)) :
    (orbitZPowersEquiv a b).symm k =
      (⟨a, mem_zpowers a⟩ : zpowers a) ^ (cast k : ℤ) • ⟨b, mem_orbit_self b⟩

(k : ZMod (Function.minimalPeriod (fun x => a • x) b))

(MulAction.orbitZPowersEquiv a b).symm k = ⟨a, ⋯⟩ ^ k.cast • ⟨b, ⋯⟩


private theorem newton_seq_succ_dist_weak (n : ℕ) :
    ‖newton_seq (n + 2) - newton_seq (n + 1)‖ < ‖F.eval a‖ / ‖F.derivative.eval a‖

(hnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (Polynomial.derivative F)‖ ^ 2)

‖newton_seq_gen hnorm (n + 2) - newton_seq_gen hnorm (n + 1)‖ <
  ‖Polynomial.eval a F‖ / ‖Polynomial.eval a (Polynomial.derivative F)‖


/-- The `PowerBasis` given by `η - 1`. -/
@[simps!]
noncomputable def subOnePowerBasis : PowerBasis K L

{n : ℕ+}
(K : Type u)
{L : Type v}
[Field K]
[CommRing L]
[IsDomain L]
[Algebra K L]
[IsCyclotomicExtension {n} K L]
{ζ : L}
(hζ : IsPrimitiveRoot ζ ↑n)

(IsPrimitiveRoot.subOnePowerBasis K hζ).gen = ζ - 1


@[simp,nolint simpNF]
theorem SetLike.coe_GSMul {S R N M : Type*} [SetLike S R] [SetLike N M] [SMul R M] [VAdd ιA ιB]
    (A : ιA → S) (B : ιB → N) [SetLike.GradedSMul A B] {i : ιA} {j : ιB} (x : A i) (y : B j) :
    (@GradedMonoid.GSMul.smul ιA ιB (fun i ↦ A i) (fun i ↦ B i) _ _ i j x y : M) = x.1 • y.1

{ιA : Type u_1}
{ιB : Type u_2}
{S : Type u_5}
{R : Type u_6}
{N : Type u_7}
{M : Type u_8}
[SetLike S R]
[SetLike N M]
[SMul R M]
[VAdd ιA ιB]
(A : ιA → S)
(B : ιB → N)
[SetLike.GradedSMul A B]
{i : ιA}
{j : ιB}
(x : ↥(A i))
(y : ↥(B j))

↑(GradedMonoid.GSMul.smul x y) = ↑x • ↑y


@[simp]
lemma nonempty_iff (X : Type*) :
    Nonempty (FundamentalGroupoid X) ↔ Nonempty X


theorem IsCoprime.prod_left : (∀ i ∈ t, IsCoprime (s i) x) → IsCoprime (∏ i ∈ t, s i) x

{R : Type u}
{I : Type v}
[CommSemiring R]
{x : R}
{s : I → R}
{t : Finset I}


theorem ext_iff {f g : M →ₗ⁅R,L⁆ N} : f = g ↔ ∀ m, f m = g m

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


theorem nnnorm_def (f : Lp E p μ) : ‖f‖₊ = ENNReal.toNNReal (eLpNorm f p μ)

{α : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup E]
(f : ↥(MeasureTheory.Lp E p μ))

‖f‖₊ = (MeasureTheory.eLpNorm (↑↑f) p μ).toNNReal


theorem not_surjective_of_ordinal {α : Type u} (f : α → Ordinal.{u}) : ¬Surjective f


@[to_additive]
theorem MonoidHom.toOneHom_injective [MulOneClass M] [MulOneClass N] :
    Function.Injective (MonoidHom.toOneHom : (M →* N) → OneHom M N)

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


protected theorem Commute.geom_sum₂_succ_eq {α : Type u} [Ring α] {x y : α} (h : Commute x y)
    {n : ℕ} :
    ∑ i ∈ range (n + 1), x ^ i * y ^ (n - i) =
      x ^ n + y * ∑ i ∈ range n, x ^ i * y ^ (n - 1 - i)

∑ i ∈ Finset.range (n + 1), x ^ i * y ^ (n - i) = x ^ n + y * ∑ i ∈ Finset.range n, x ^ i * y ^ (n - 1 - i)


lemma Even.neg_one_pow (h : Even n) : (-1 : α) ^ n = 1

{α : Type u_2}
[Monoid α]
[HasDistribNeg α]
{n : ℕ}
(h : Even n)


@[simp]
theorem coe_top [CompactSpace α] [Nonempty α] : (↑(⊤ : NonemptyCompacts α) : Set α) = univ

{α : Type u_1}
[TopologicalSpace α]
[CompactSpace α]
[Nonempty α]


lemma shiftFunctorZero_inv_app_f (K : CochainComplex C ℤ) (n : ℤ) :
    ((CategoryTheory.shiftFunctorZero (CochainComplex C ℤ) ℤ).inv.app K).f n =
      (K.XIsoOfEq (by dsimp; rw [add_zero])).hom

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Preadditive C]
(K : CochainComplex C ℤ)
(n : ℤ)

((CategoryTheory.shiftFunctorZero (CochainComplex C ℤ) ℤ).inv.app K).f n = (HomologicalComplex.XIsoOfEq K ⋯).hom


theorem arctan_tan {z : ℂ} (h₀ : z ≠ π / 2) (h₁ : -(π / 2) < z.re) (h₂ : z.re ≤ π / 2) :
    arctan (tan z) = z

{z : ℂ}
(h₀ : z ≠ ↑Real.pi / 2)
(h₁ : -(Real.pi / 2) < z.re)
(h₂ : z.re ≤ Real.pi / 2)


protected theorem mul_ne_zero_iff : n * m ≠ 0 ↔ n ≠ 0 ∧ m ≠ 0


@[to_additive (attr := norm_cast)] -- Porting note (#10618): simp can prove this (so removed simp)
lemma orderOf_coe (a : H) : orderOf (a : G) = orderOf a

{G : Type u_1}
[Group G]
{H : Subgroup G}
(a : ↥H)


theorem Preimage_def (s : Set β) : f.preimage s = { x | ∃ y ∈ s, y ∈ f x }

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


/-- The cosine of an angle in a right-angled triangle as a ratio of sides. -/
theorem cos_oangle_right_of_oangle_eq_pi_div_two {p₁ p₂ p₃ : P} (h : ∡ p₁ p₂ p₃ = ↑(π / 2)) :
    Real.Angle.cos (∡ p₂ p₃ p₁) = dist p₃ p₂ / dist p₁ p₃

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

(∡ p₂ p₃ p₁).cos = dist p₃ p₂ / dist p₁ p₃


/-- A custom induction principle for fintypes. The base case is a subsingleton type,
and the induction step is for non-trivial types, and one can assume the hypothesis for
smaller types (via `Fintype.card`).

The major premise is `Fintype α`, so to use this with the `induction` tactic you have to give a name
to that instance and use that name.
-/
@[elab_as_elim]
theorem Fintype.induction_subsingleton_or_nontrivial {P : ∀ (α) [Fintype α], Prop} (α : Type*)
    [Fintype α] (hbase : ∀ (α) [Fintype α] [Subsingleton α], P α)
    (hstep : ∀ (α) [Fintype α] [Nontrivial α],
      (∀ (β) [Fintype β], Fintype.card β < Fintype.card α → P β) → P α) :
    P α

{P : (α : Type u_4) → [inst : Fintype α] → Prop}

(hbase : ∀ (α : Type u_4) [inst : Fintype α] [inst_1 : Subsingleton α], P α)

(hstep :
  ∀ (α : Type u_4) [inst : Fintype α] [inst_1 : Nontrivial α],
    (∀ (β : Type u_4) [inst_2 : Fintype β], Fintype.card β < Fintype.card α → P β) → P α)


lemma kernImage_empty : kernImage f ∅ = (range f)ᶜ

{α : Type u_1}
{β : Type u_2}
{f : α → β}


lemma mulSupport_natCast (hn : n ≠ 1) : mulSupport (n : α → M) = univ

{α : Type u_1}
{M : Type u_2}
[AddMonoidWithOne M]
[CharZero M]
{n : ℕ}
(hn : n ≠ 1)


@[to_additive]
protected theorem pow_mem {M : Type*} [Monoid M] (S : Submonoid M) {x : M} (hx : x ∈ S) (n : ℕ) :
    x ^ n ∈ S

{M : Type u_5}
[AddMonoid M]
(S : AddSubmonoid M)
{x : M}
(hx : x ∈ S)
(n : ℕ)


@[simp]
theorem rdropWhile_eq_self_iff : rdropWhile p l = l ↔ ∀ hl : l ≠ [], ¬p (l.getLast hl)

{α : Type u_1}
{p : α → Bool}
{l : List α}

List.rdropWhile p l = l ↔ ∀ (hl : l ≠ []), ¬p (l.getLast hl) = true


/-- The canonical isomorphism `(𝟭 C).mapTriangle ≅ 𝟭 (Triangle C)`. -/
@[simps!]
def mapTriangleIdIso : (𝟭 C).mapTriangle ≅ 𝟭 _

(X : CategoryTheory.Pretriangulated.Triangle C)

((CategoryTheory.Functor.mapTriangleIdIso C).hom.app X).hom₁ = CategoryTheory.CategoryStruct.id X.obj₁


/-- A multiplicative morphism between monoids gives a monoidal functor between the corresponding
discrete monoidal categories.
-/
@[to_additive (attr := simps) Discrete.addMonoidalFunctor]
def Discrete.monoidalFunctor (F : M →* N) : MonoidalFunctor (Discrete M) (Discrete N)

{M : Type u}
[AddMonoid M]
{N : Type u'}
[AddMonoid N]
(F : M →+ N)
(X Y : CategoryTheory.Discrete M)

(CategoryTheory.Discrete.addMonoidalFunctor F).μ X Y = CategoryTheory.Discrete.eqToHom ⋯


@[simp, mfld_simps]
theorem mem_localTriv_target (p : B × F) :
    p ∈ (Z.localTriv i).target ↔ p.1 ∈ (Z.localTriv i).baseSet

{ι : Type u_1}
{B : Type u_2}
{F : Type u_3}
[TopologicalSpace B]
[TopologicalSpace F]
(Z : FiberBundleCore ι B F)
(i : ι)
(p : B × F)


@[csimp] theorem fillNones_eq_fillNonesTR : @fillNones = @fillNonesTR

(α : Type u_1)
(acc : Array α)
(as : List (Option α))
(as' : List α)

List.fillNonesTR.go as as' acc = acc.data ++ as.fillNones as'


lemma preNormEDS_odd (m : ℕ) : preNormEDS b c d (2 * (m + 2) + 1) =
    preNormEDS b c d (m + 4) * preNormEDS b c d (m + 2) ^ 3 * (if Even m then b else 1) -
      preNormEDS b c d (m + 1) * preNormEDS b c d (m + 3) ^ 3 * (if Even m then 1 else b)

{R : Type u}
[CommRing R]
(b c d : R)
(m : ℕ)

preNormEDS b c d (2 * (↑m + 2) + 1) =
  (preNormEDS b c d (↑m + 4) * preNormEDS b c d (↑m + 2) ^ 3 * if Even m then b else 1) -
    preNormEDS b c d (↑m + 1) * preNormEDS b c d (↑m + 3) ^ 3 * if Even m then 1 else b


theorem le_of_max_le_right {a b c : α} (h : max a b ≤ c) : b ≤ c

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


/-- If `f` and `g` agree on large `n : ℕ` and the `LSeries` of `f` converges at `s`,
then so does that of `g`. -/
lemma LSeriesSummable.congr' {f g : ℕ → ℂ} (s : ℂ) (h : f =ᶠ[atTop] g) (hf : LSeriesSummable f s) :
    LSeriesSummable g s

{f g : ℕ → ℂ}
(s : ℂ)
(h : f =ᶠ[Filter.atTop] g)
(hf : LSeriesSummable f s)


theorem continuous_inf_dom_left {t₁ t₂ : TopologicalSpace α} {t₃ : TopologicalSpace β} :
    Continuous[t₁, t₃] f → Continuous[t₁ ⊓ t₂, t₃] f

{α : Type u}
{β : Type v}
{f : α → β}
{t₁ t₂ : TopologicalSpace α}
{t₃ : TopologicalSpace β}


theorem continuousAt_length : ∀ l : List α, ContinuousAt List.length l

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


theorem plusLift_unique {P Q : Cᵒᵖ ⥤ D} (η : P ⟶ Q) (hQ : Presheaf.IsSheaf J Q)
    (γ : J.plusObj P ⟶ Q) (hγ : J.toPlus P ≫ γ = η) : γ = J.plusLift η hQ

(J : CategoryTheory.GrothendieckTopology C)

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

[∀ (P : CategoryTheory.Functor Cᵒᵖ D) (X : C) (S : J.Cover X), CategoryTheory.Limits.HasMultiequalizer (S.index P)]

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

(hQ : CategoryTheory.Presheaf.IsSheaf J Q)

(hγ : CategoryTheory.CategoryStruct.comp (J.toPlus P) γ = η)


/-- Characterization of a unit of a polynomial ring over an integral domain `R`.
See `Polynomial.isUnit_iff_coeff_isUnit_isNilpotent` when `R` is a commutative ring. -/
theorem isUnit_iff : IsUnit p ↔ ∃ r : R, IsUnit r ∧ C r = p

{R : Type u}
[Semiring R]
[NoZeroDivisors R]
{p : R[X]}

IsUnit p ↔ ∃ r, IsUnit r ∧ Polynomial.C r = p


lemma independent_weightSpaceOf [NoZeroSMulDivisors R M] (x : L) :
    CompleteLattice.Independent fun (χ : R) ↦ weightSpaceOf M χ 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]
[NoZeroSMulDivisors R M]
(x : L)

CompleteLattice.Independent fun χ => LieModule.weightSpaceOf M χ x


theorem normalClosure_eq_top_of {N : Subgroup G} [hn : N.Normal] {g g' : G} {hg : g ∈ N}
    {hg' : g' ∈ N} (hc : IsConj g g') (ht : normalClosure ({⟨g, hg⟩} : Set N) = ⊤) :
    normalClosure ({⟨g', hg'⟩} : Set N) = ⊤

(ht : Subgroup.normalClosure {⟨g, hg⟩} = ⊤)


theorem isRotated_prev_eq {l l' : List α} (h : l ~r l') (hn : Nodup l) {x : α} (hx : x ∈ l) :
    l.prev x hx = l'.prev x (h.mem_iff.mp hx)

{α : Type u_1}
[DecidableEq α]
{l l' : List α}
(h : l ~r l')
(hn : l.Nodup)
{x : α}
(hx : x ∈ l)


theorem ofNat_fin_three (n : ℕ) [n.AtLeastTwo] :
    (no_index (OfNat.ofNat n) : Matrix (Fin 3) (Fin 3) α) =
      !![OfNat.ofNat n, 0, 0; 0, OfNat.ofNat n, 0; 0, 0, OfNat.ofNat n]

{α : Type u}
[AddMonoidWithOne α]
(n : ℕ)
[n.AtLeastTwo]

OfNat.ofNat n = !![OfNat.ofNat n, 0, 0; 0, OfNat.ofNat n, 0; 0, 0, OfNat.ofNat n]


protected theorem hasMFDerivWithinAt {s x} :
    HasMFDerivWithinAt I 𝓘(𝕜, E) I s x (ContinuousLinearMap.id _ _)

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

HasMFDerivWithinAt I 𝓘(𝕜, E) (↑I) s x (ContinuousLinearMap.id 𝕜 (TangentSpace I x))


@[simp]
theorem inv_mul_cancel_right_of_invertible (B : Matrix m n α) [Invertible A] : B * A⁻¹ * A = B

{m : Type u}
{n : Type u'}
{α : Type v}
[Fintype n]
[DecidableEq n]
[CommRing α]
(A : Matrix n n α)
(B : Matrix m n α)
[Invertible A]


theorem mapDomain_comapDomain (hf : Function.Injective f) (l : β →₀ M)
    (hl : ↑l.support ⊆ Set.range f) :
    mapDomain f (comapDomain f l hf.injOn) = l

{α : Type u_1}
{β : Type u_2}
{M : Type u_5}
[AddCommMonoid M]
(f : α → β)
(hf : Function.Injective f)
(l : β →₀ M)
(hl : ↑l.support ⊆ Set.range f)

Finsupp.mapDomain f (Finsupp.comapDomain f l ⋯) = l


@[to_additive]
theorem mul_const [Mul γ] [MeasurableMul γ] (h : IdentDistrib f g μ ν) (c : γ) :
    IdentDistrib (fun x => f x * c) (fun x => g x * c) μ ν

(h : ProbabilityTheory.IdentDistrib f g μ ν)

ProbabilityTheory.IdentDistrib (fun x => f x + c) (fun x => g x + c) μ ν


@[to_additive]
theorem prod_concat : (l.concat a).prod = l.prod * a

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


@[to_additive]
theorem div_lt_iff_lt_mul : a / c < b ↔ a < b * c

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


theorem eLpNorm'_lim_le_liminf_eLpNorm' {E} [NormedAddCommGroup E] {f : ℕ → α → E} {p : ℝ}
    (hp_pos : 0 < p) (hf : ∀ n, AEStronglyMeasurable (f n) μ) {f_lim : α → E}
    (h_lim : ∀ᵐ x : α ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))) :
    eLpNorm' f_lim p μ ≤ atTop.liminf fun n => eLpNorm' (f n) p μ

(hf : ∀ (n : ℕ), MeasureTheory.AEStronglyMeasurable (f n) μ)

(h_lim : ∀ᵐ (x : α) ∂μ, Filter.Tendsto (fun n => f n x) Filter.atTop (𝓝 (f_lim x)))

MeasureTheory.eLpNorm' f_lim p μ ≤ Filter.liminf (fun n => MeasureTheory.eLpNorm' (f n) p μ) Filter.atTop


theorem Equiv.mul_congr_left (he : x₁ ≈ x₂) : x₁ * y ≈ x₂ * y

{x₁ x₂ y : SetTheory.PGame}
(hx₁ : x₁.Numeric)
(hx₂ : x₂.Numeric)
(hy : y.Numeric)
(he : x₁ ≈ x₂)


theorem mem_closedBall' : y ∈ closedBall x ε ↔ edist x y ≤ ε

{α : Type u}
[PseudoEMetricSpace α]
{x y : α}
{ε : ℝ≥0∞}

y ∈ EMetric.closedBall x ε ↔ edist x y ≤ ε


theorem gMul_eq_coe_linearMap {i j} (a : ⨂[R]^i M) (b : (⨂[R]^j) M) :
    a ₜ* b = ((TensorProduct.mk R _ _).compr₂ ↑(mulEquiv : _ ≃ₗ[R] (⨂[R]^(i + j)) M) :
      ⨂[R]^i M →ₗ[R] (⨂[R]^j) M →ₗ[R] (⨂[R]^(i + j)) M) a b

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
{i j : ℕ}
(a : ⨂[R]^i M)
(b : ⨂[R]^j M)

GradedMonoid.GMul.mul a b = (((TensorProduct.mk R (⨂[R]^i M) (⨂[R]^j M)).compr₂ ↑TensorPower.mulEquiv) a) b


@[simp]
theorem biproduct.bicone_ι (f : J → C) [HasBiproduct f] (b : J) :
    (biproduct.bicone f).ι b = biproduct.ι f b

(CategoryTheory.Limits.biproduct.bicone f).ι b = CategoryTheory.Limits.biproduct.ι f b


theorem integralSum_biUnion_partition (f : ℝⁿ → E) (vol : ι →ᵇᵃ E →L[ℝ] F)
    (π : TaggedPrepartition I) (πi : ∀ J, Prepartition J) (hπi : ∀ J ∈ π, (πi J).IsPartition) :
    integralSum f vol (π.biUnionPrepartition πi) = integralSum f vol π

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

BoxIntegral.integralSum f vol (π.biUnionPrepartition πi) = BoxIntegral.integralSum f vol π


theorem iSup_inf_iSup {ι ι' : Type*} {f : ι → α} {g : ι' → α} :
    ((⨆ i, f i) ⊓ ⨆ j, g j) = ⨆ i : ι × ι', f i.1 ⊓ g i.2

{α : Type u}
[Order.Frame α]
{ι : Type u_1}
{ι' : Type u_2}
{f : ι → α}
{g : ι' → α}

(⨆ i, f i) ⊓ ⨆ j, g j = ⨆ i, f i.1 ⊓ g i.2


theorem dvd_cancel_right_mem_nonZeroDivisors {x y r : R'} (hr : r ∈ R'⁰) : x * r ∣ y * r ↔ x ∣ y

{R' : Type u_6}
[CommRing R']
{x y r : R'}
(hr : r ∈ R'⁰)


@[simp]
theorem comp_ker_incl : f.comp f.ker.incl = 0

{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}


/-- Auxiliary lemma for `biproduct.uniqueUpToIso`. -/
theorem biproduct.conePointUniqueUpToIso_inv (f : J → C) [HasBiproduct f] {b : Bicone f}
    (hb : b.IsBilimit) :
    (hb.isLimit.conePointUniqueUpToIso (biproduct.isLimit _)).inv = biproduct.desc b.ι

(hb.isLimit.conePointUniqueUpToIso (CategoryTheory.Limits.biproduct.isLimit f)).inv =
  CategoryTheory.Limits.biproduct.desc b.ι


theorem copy_eq (f : CentroidHom α) (f' : α → α) (h : f' = f) : f.copy f' h = f

{α : Type u_5}
[NonUnitalNonAssocSemiring α]
(f : CentroidHom α)
(f' : α → α)
(h : f' = ⇑f)


theorem smul_mem_pointwise_smul (m : M) (r : R) (S : Subsemiring R) : r ∈ S → m • r ∈ m • S

{M : Type u_1}
{R : Type u_2}
[Monoid M]
[Semiring R]
[MulSemiringAction M R]
(m : M)
(r : R)
(S : Subsemiring R)


@[reassoc]
theorem wideEqualizer.condition (j₁ j₂ : J) : wideEqualizer.ι f ≫ f j₁ = wideEqualizer.ι f ≫ f j₂

CategoryTheory.CategoryStruct.comp (CategoryTheory.Limits.wideEqualizer.ι f) (f j₁) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.Limits.wideEqualizer.ι f) (f j₂)


@[simp]
theorem Fintype.card_plift (α : Type*) [Fintype α] : Fintype.card (PLift α) = Fintype.card α


@[to_additive (attr := simp)]
lemma insertNth_one_right [∀ j, One (α j)] (i : Fin (n + 1)) (x : α i) :
    i.insertNth x 1 = Pi.mulSingle i x


/-- Predicate on the triangle indices for the explicit triangles to be edge-disjoint. -/
class ExplicitDisjoint (t : Finset (α × β × γ)) : Prop where
  inj₀ : ∀ ⦃a b c a'⦄, (a, b, c) ∈ t → (a', b, c) ∈ t → a = a'
  inj₁ : ∀ ⦃a b c b'⦄, (a, b, c) ∈ t → (a, b', c) ∈ t → b = b'
  inj₂ : ∀ ⦃a b c c'⦄, (a, b, c) ∈ t → (a, b, c') ∈ t → c = c'

[self : SimpleGraph.TripartiteFromTriangles.ExplicitDisjoint t]


@[simp]
theorem mul_sumInl_toMatrix_prod [Fintype n] [Fintype p] (M : Matrix n n R)
    (L : List (TransvectionStruct n R)) (N : Matrix p p R) :
    fromBlocks M 0 0 N * (L.map (toMatrix ∘ sumInl p)).prod =
      fromBlocks (M * (L.map toMatrix).prod) 0 0 N

(L : List (Matrix.TransvectionStruct n R))

Matrix.fromBlocks M 0 0 N *
    (List.map (Matrix.TransvectionStruct.toMatrix ∘ Matrix.TransvectionStruct.sumInl p) L).prod =
  Matrix.fromBlocks (M * (List.map Matrix.TransvectionStruct.toMatrix L).prod) 0 0 N


theorem IsMinOn.min (hf : IsMinOn f s a) (hg : IsMinOn g s a) :
    IsMinOn (fun x => min (f x) (g x)) s a

{α : Type u}
{β : Type v}
[LinearOrder β]
{f g : α → β}
{a : α}
{s : Set α}
(hf : IsMinOn f s a)
(hg : IsMinOn g s a)


lemma measurableEmbedding_prod_mk_right [MeasurableSingletonClass α] (x : α) :
    MeasurableEmbedding (fun y ↦ (y, x) : β → β × α)

{α : Type u_1}
{β : Type u_3}
[MeasurableSpace α]
[MeasurableSpace β]
[MeasurableSingletonClass α]
(x : α)


theorem IntegrableOn.continuousOn_mul_of_subset (hg : ContinuousOn g K) (hg' : IntegrableOn g' A μ)
    (hK : IsCompact K) (hA : MeasurableSet A) (hAK : A ⊆ K) :
    IntegrableOn (fun x => g x * g' x) A μ

(hg' : MeasureTheory.IntegrableOn g' A μ)

MeasureTheory.IntegrableOn (fun x => g x * g' x) A μ


/-- `IsQuotient f`, for `f : M ⟶ N` means that `N` is isomorphic to the quotient of `M`
by the kernel of `f`. -/
structure IsQuotient (f : NormedAddGroupHom M N) : Prop where
  protected surjective : Function.Surjective f
  protected norm : ∀ x, ‖f x‖ = sInf ((fun m => ‖x + m‖) '' f.ker)

{M : Type u_1}
{N : Type u_2}
[SeminormedAddCommGroup M]
[SeminormedAddCommGroup N]
{f : NormedAddGroupHom M N}
(self : f.IsQuotient)


@[simp]
theorem prev (α : Type*) [AddGroup α] [One α] (i : α) : (ComplexShape.up α).prev i = i - 1

(α : Type u_2)
[AddGroup α]
[One α]
(i : α)


@[to_additive (attr := simp)]
theorem Group.fg_iff_subgroup_fg (H : Subgroup G) : Group.FG H ↔ H.FG

{G : Type u_3}
[Group G]
(H : Subgroup G)


lemma ltByCases_ne (h : x ≠ y) {h₁ : x < y → P} {h₂ : x = y → P} {h₃ : y < x → P}
    (p : ¬ x < y → y < x := fun h' => h.lt_or_lt.resolve_left h') :
    ltByCases x y h₁ h₂ h₃ = if h' : x < y then h₁ h' else h₃ (p h')

{α : Type u_2}
[LinearOrder α]
{P : Sort u_5}
{x y : α}
(h : x ≠ y)
{h₁ : x < y → P}
{h₂ : x = y → P}
{h₃ : y < x → P}
(p : ¬x < y → y < x := ⋯)

ltByCases x y h₁ h₂ h₃ = if h' : x < y then h₁ h' else h₃ ⋯


@[to_additive IsClosed.left_addCoset]
theorem IsClosed.leftCoset {U : Set G} (h : IsClosed U) (x : G) : IsClosed (x • U)

{G : Type w}
[TopologicalSpace G]
[Group G]
[ContinuousMul G]
{U : Set G}
(h : IsClosed U)
(x : G)


@[to_additive]
theorem iCondIndepFun.condIndepFun_finset_prod_of_not_mem
    (hf_Indep : iCondIndepFun m' hm' (fun _ => m) f μ) (hf_meas : ∀ i, Measurable (f i))
    {s : Finset ι} {i : ι} (hi : i ∉ s) :
    CondIndepFun m' hm' (∏ j ∈ s, f j) (f i) μ

{f : ι → Ω → β}

(hf_Indep : ProbabilityTheory.iCondIndepFun m' hm' (fun x => m) f μ)

ProbabilityTheory.CondIndepFun m' hm' (∑ j ∈ s, f j) (f i) μ


@[simp]
theorem mem_sup_iff : a ∈ s ⊔ t ↔ a ∈ s ∨ a ∈ t

{α : Type u_1}
[LE α]
{s t : LowerSet α}
{a : α}


@[to_additive] lemma prod_eq_one_iff : l.prod = 1 ↔ ∀ x ∈ l, x = (1 : M)

{M : Type u_3}
[CanonicallyOrderedCommMonoid M]
{l : List M}


theorem gcd_rel_left' : gcdZ a b * gcdA' a b = succPNat (gcdX a b * gcdB' a b)

a.gcdZ b * a.gcdA' b = (a.gcdX b * ↑(a.gcdB' b)).succPNat


theorem norm_cderiv_sub_lt (hr : 0 < r) (hfg : ∀ w ∈ sphere z r, ‖f w - g w‖ < M)
    (hf : ContinuousOn f (sphere z r)) (hg : ContinuousOn g (sphere z r)) :
    ‖cderiv r f z - cderiv r g z‖ < M / r

(hfg : ∀ w ∈ Metric.sphere z r, ‖f w - g w‖ < M)

(hf : ContinuousOn f (Metric.sphere z r))

(hg : ContinuousOn g (Metric.sphere z r))

‖Complex.cderiv r f z - Complex.cderiv r g z‖ < M / r


theorem ContDiffOn.ccosh {n} (hf : ContDiffOn ℂ n f s) :
    ContDiffOn ℂ n (fun x => Complex.cosh (f x)) s

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


@[simp, norm_cast]
theorem coe_inj : (a : WithBot α) = b ↔ a = b


theorem functorPushforward_comp (R : Presieve X) :
    R.functorPushforward (F ⋙ G) = (R.functorPushforward F).functorPushforward G

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
(F : CategoryTheory.Functor C D)
{X : C}
{E : Type u₃}
[CategoryTheory.Category.{v₃, u₃} E]
(G : CategoryTheory.Functor D E)
(R : CategoryTheory.Presieve X)

CategoryTheory.Presieve.functorPushforward (F.comp G) R =
  CategoryTheory.Presieve.functorPushforward G (CategoryTheory.Presieve.functorPushforward F R)


@[simp]
theorem deleteVerts_deleteVerts (s s' : Set V) :
    (G'.deleteVerts s).deleteVerts s' = G'.deleteVerts (s ∪ s')

{V : Type u}
{G : SimpleGraph V}
{G' : G.Subgraph}
(s s' : Set V)


theorem finrank_adjoin_eq_one_iff : finrank F (adjoin F S) = 1 ↔ S ⊆ (⊥ : IntermediateField F E)

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

FiniteDimensional.finrank F ↥(IntermediateField.adjoin F S) = 1 ↔ S ⊆ ↑⊥


@[simp]
lemma ofGradedObject_toGradedObject :
    (ofGradedObject c₁ c₂ X d₁ d₂ shape₁ shape₂ d₁_comp_d₁ d₂_comp_d₂ comm).toGradedObject = X

(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).toGradedObject = X


@[simp] theorem getMsb_zero_length (x : BitVec 0) : x.getMsb i = false


@[simp]
theorem disjoint_insert_left : Disjoint (insert a s) t ↔ a ∉ t ∧ Disjoint s t

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


@[to_additive]
lemma haarScalarFactor_eq_mul (μ' μ ν : Measure G)
    [IsHaarMeasure μ] [IsHaarMeasure ν] [IsFiniteMeasureOnCompacts μ'] [IsMulLeftInvariant μ'] :
    haarScalarFactor μ' ν = haarScalarFactor μ' μ * haarScalarFactor μ ν

μ'.addHaarScalarFactor ν = μ'.addHaarScalarFactor μ * μ.addHaarScalarFactor ν


theorem isClosed_irreducibleComponent {x : X} : IsClosed (irreducibleComponent x)

{X : Type u_1}
[TopologicalSpace X]
{x : X}


lemma continuous_posPart : Continuous (posPart : α → α)

{α : Type u_1}
[NormedLatticeAddCommGroup α]


@[to_additive]
lemma mul_sup (a b c : α) : c * (a ⊔ b) = c * a ⊔ c * b

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


@[simps]
instance [Preorder β] [OrderBot β] : Bot (α →o β)

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
[OrderBot β]


theorem ofScientific_true_def : Rat.ofScientific m true e = mkRat m (10 ^ e)

Rat.ofScientific m true e = mkRat (↑m) (10 ^ e)


@[simp]
theorem predictablePart_zero : predictablePart f ℱ μ 0 = 0

{Ω : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace Ω}
{μ : MeasureTheory.Measure Ω}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[CompleteSpace E]
{f : ℕ → Ω → E}
{ℱ : MeasureTheory.Filtration ℕ m0}

MeasureTheory.predictablePart f ℱ μ 0 = 0


theorem lowerCentralSeries_succ (n : ℕ) :
    lowerCentralSeries G (n + 1) =
      closure { x | ∃ p ∈ lowerCentralSeries G n, ∃ q ∈ (⊤ : Subgroup G), p * q * p⁻¹ * q⁻¹ = x }

lowerCentralSeries G (n + 1) = Subgroup.closure {x | ∃ p ∈ lowerCentralSeries G n, ∃ q ∈ ⊤, p * q * p⁻¹ * q⁻¹ = x}


lemma toFiniteMeasure_apply (μ : ProbabilityMeasure Ω) (s : Set Ω) :
    μ.toFiniteMeasure s = μ s

(μ : MeasureTheory.ProbabilityMeasure Ω)


/-- Riemann-Lebesgue lemma for functions on a real inner-product space: the integral
`∫ v, exp (-2 * π * ⟪w, v⟫ * I) • f v` tends to 0 as `w → ∞`. -/
theorem tendsto_integral_exp_inner_smul_cocompact :
    Tendsto (fun w : V => ∫ v, 𝐞 (-⟪v, w⟫) • f v) (cocompact V) (𝓝 0)

{E : Type u_1}
{V : Type u_2}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
(f : V → E)
[NormedAddCommGroup V]
[MeasurableSpace V]
[BorelSpace V]
[InnerProductSpace ℝ V]
[FiniteDimensional ℝ V]

Filter.Tendsto (fun w => ∫ (v : V), 𝐞 (-⟪v, w⟫_ℝ) • f v) (Filter.cocompact V) (𝓝 0)


@[simp] theorem castSucc_eq_zero_iff (a : Fin (n + 1)) : castSucc a = 0 ↔ a = 0


@[simp]
theorem castLE_rfl {n} (h : n ≤ n) (φ : L.BoundedFormula α n) : φ.castLE h = φ

{L : FirstOrder.Language}
{α : Type u'}
{n : ℕ}
(h : n ≤ n)
(φ : L.BoundedFormula α n)

FirstOrder.Language.BoundedFormula.castLE h φ = φ


theorem tendsto_eraseIdx :
    ∀ {n : ℕ} {l : List α}, Tendsto (eraseIdx · n) (𝓝 l) (𝓝 (eraseIdx l n))

{α : Type u_1}
[TopologicalSpace α]
{n : ℕ}
{l : List α}

Filter.Tendsto (fun x => x.eraseIdx n) (𝓝 l) (𝓝 (l.eraseIdx n))


theorem isTotallyDisconnected_of_image [TopologicalSpace β] {f : α → β} (hf : ContinuousOn f s)
    (hf' : Injective f) (h : IsTotallyDisconnected (f '' s)) : IsTotallyDisconnected s

{α : Type u}
{β : Type v}
[TopologicalSpace α]
{s : Set α}
[TopologicalSpace β]
{f : α → β}
(hf : ContinuousOn f s)
(hf' : Function.Injective f)
(h : IsTotallyDisconnected (f '' s))


theorem coeff_pow_p' (f : Ring.Perfection R p) (n : ℕ) : coeff R p (n + 1) f ^ p = coeff R p n f

{R : Type u₁}
[CommSemiring R]
{p : ℕ}
[hp : Fact (Nat.Prime p)]
[CharP R p]
(f : Ring.Perfection R p)
(n : ℕ)

(Perfection.coeff R p (n + 1)) f ^ p = (Perfection.coeff R p n) f


@[to_additive]
theorem period_eq_one_iff {m : M} {a : α} : period m a = 1 ↔ m • a = a

{α : Type v}
{M : Type u}
[AddMonoid M]
[AddAction M α]
{m : M}
{a : α}


/-- A function that is complex differentiable on the open ball of radius `r` around `c`
is given by evaluating its Taylor series at `c` on this open ball. -/
lemma taylorSeries_eq_on_ball :
    ∑' n : ℕ, (n ! : ℂ)⁻¹ • (z - c) ^ n • iteratedDeriv n f c = f z

(hf : DifferentiableOn ℂ f (Metric.ball c r))

∑' (n : ℕ), (↑n.factorial)⁻¹ • (z - c) ^ n • iteratedDeriv n f c = f z


{p : ℕ}
{R : Type u_1}
{S : Type u_2}
[hp : Fact (Nat.Prime p)]
[CommRing R]
[CommRing S]
(f : R →+* S)


/-- Dependent version of `Submodule.smul_induction_on`. -/
@[elab_as_elim]
theorem smul_induction_on' {x : M} (hx : x ∈ I • N) {p : ∀ x, x ∈ I • N → Prop}
    (smul : ∀ (r : R) (hr : r ∈ I) (n : M) (hn : n ∈ N), p (r • n) (smul_mem_smul hr hn))
    (add : ∀ x hx y hy, p x hx → p y hy → p (x + y) (Submodule.add_mem _ ‹_› ‹_›)) : p x hx

(smul : ∀ (r : R) (hr : r ∈ I) (n : M) (hn : n ∈ N), p (r • n) ⋯)

(add : ∀ (x : M) (hx : x ∈ I • N) (y : M) (hy : y ∈ I • N), p x hx → p y hy → p (x + y) ⋯)


/-- If the distance between any two points in a nonempty set is bounded by some constant,
this constant bounds the diameter. -/
theorem diam_le_of_forall_dist_le_of_nonempty (hs : s.Nonempty) {C : ℝ}
    (h : ∀ x ∈ s, ∀ y ∈ s, dist x y ≤ C) : diam s ≤ C

{α : Type u}
[PseudoMetricSpace α]
{s : Set α}
(hs : s.Nonempty)
{C : ℝ}
(h : ∀ x ∈ s, ∀ y ∈ s, dist x y ≤ C)


lemma yonedaEquiv_naturality {X Y : C} {F : Cᵒᵖ ⥤ Type v₁} (f : yoneda.obj X ⟶ F)
    (g : Y ⟶ X) : F.map g.op (yonedaEquiv f) = yonedaEquiv (yoneda.map g ≫ f)

{F : CategoryTheory.Functor Cᵒᵖ (Type v₁)}

F.map g.op (CategoryTheory.yonedaEquiv f) =
  CategoryTheory.yonedaEquiv (CategoryTheory.CategoryStruct.comp (CategoryTheory.yoneda.map g) f)


/-- Two simplices glue nicely if the union of their vertices is affine independent.

Note that `AffineIndependent.convexHull_inter` should be more versatile in most use cases. -/
lemma AffineIndependent.convexHull_inter' (hs : AffineIndependent R ((↑) : ↑(t₁ ∪ t₂) → E)) :
    convexHull R (t₁ ∩ t₂ : Set E) = convexHull R t₁ ∩ convexHull R t₂

{R : Type u_1}
{E : Type u_3}
[LinearOrderedField R]
[AddCommGroup E]
[Module R E]
{t₁ t₂ : Finset E}
(hs : AffineIndependent R Subtype.val)

(convexHull R) (↑t₁ ∩ ↑t₂) = (convexHull R) ↑t₁ ∩ (convexHull R) ↑t₂


@[simp] theorem lTensor_trans_congr (f : M ≃ₗ[R] P) (g : N ≃ₗ[R] Q) (g' : S ≃ₗ[R] N) :
    g'.lTensor _ ≪≫ₗ TensorProduct.congr f g = TensorProduct.congr f (g' ≪≫ₗ g)

{R : Type u_1}
[CommSemiring R]
(M : Type u_4)
{N : Type u_5}
{P : Type u_6}
{Q : Type u_7}
{S : Type u_8}
[AddCommMonoid M]
[AddCommMonoid N]
[AddCommMonoid P]
[AddCommMonoid Q]
[AddCommMonoid S]
[Module R M]
[Module R N]
[Module R P]
[Module R Q]
[Module R S]
(f : M ≃ₗ[R] P)
(g : N ≃ₗ[R] Q)
(g' : S ≃ₗ[R] N)

LinearEquiv.lTensor M g' ≪≫ₗ TensorProduct.congr f g = TensorProduct.congr f (g' ≪≫ₗ g)


theorem mul_self_le_mul_self_iff [PosMulStrictMono α] [MulPosMono α]
    {a b : α} (h1 : 0 ≤ a) (h2 : 0 ≤ b) : a ≤ b ↔ a * a ≤ b * b

{α : Type u}
[Semiring α]
[LinearOrder α]
[PosMulStrictMono α]
[MulPosMono α]
{a b : α}
(h1 : 0 ≤ a)
(h2 : 0 ≤ b)


theorem length_takeUntil_le {u v w : V} (p : G.Walk v w) (h : u ∈ p.support) :
    (p.takeUntil u h).length ≤ p.length

{V : Type u}
{G : SimpleGraph V}
[DecidableEq V]
{u v w : V}
(p : G.Walk v w)
(h : u ∈ p.support)


lemma prod_prod (s : Set α) (t : Set β) : μ.prod ν (s ×ˢ t) = μ s * ν t

{α : Type u_1}
[MeasurableSpace α]
{β : Type u_2}
[MeasurableSpace β]
(μ : MeasureTheory.FiniteMeasure α)
(ν : MeasureTheory.FiniteMeasure β)
(s : Set α)
(t : Set β)


/-- If `f : α → β` semiconjugates `ga : α → α` to `gb : β → β`,
then `Option.map f` semiconjugates `Option.map ga` to `Option.map gb`. -/
theorem option_map {f : α → β} {ga : α → α} {gb : β → β} (h : Semiconj f ga gb) :
    Semiconj (Option.map f) (Option.map ga) (Option.map gb)

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{ga : α → α}
{gb : β → β}
(h : Function.Semiconj f ga gb)

Function.Semiconj (Option.map f) (Option.map ga) (Option.map gb)


@[simp] lemma degree_add_degree_leadingCoeff_inv (p : K[X]) :
    degree p + degree (C (leadingCoeff p)⁻¹) = degree p

{K : Type u_1}
[DivisionRing K]
(p : K[X])

p.degree + (Polynomial.C p.leadingCoeff⁻¹).degree = p.degree


lemma eventually_atTop_sumTransform_ge :
    ∃ c > 0, ∀ᶠ (n : ℕ) in atTop, ∀ i, c * g n ≤ sumTransform (p a b) g (r i n) n

{α : Type u_1}
[Fintype α]
[Nonempty α]
{T : ℕ → ℝ}
{g : ℝ → ℝ}
{a b : α → ℝ}
{r : α → ℕ → ℕ}
(R : AkraBazziRecurrence T g a b r)

∃ c > 0,
  ∀ᶠ (n : ℕ) in Filter.atTop,
    ∀ (i : α), c * g ↑n ≤ AkraBazziRecurrence.sumTransform (AkraBazziRecurrence.p a b) g (r i n) n


/-- A Fraïssé class is a nonempty, isomorphism-invariant, essentially countable class of structures
satisfying the hereditary, joint embedding, and amalgamation properties. -/
class IsFraisse : Prop where
  is_nonempty : K.Nonempty
  FG : ∀ M : Bundled.{w} L.Structure, M ∈ K → Structure.FG L M
  is_equiv_invariant : ∀ M N : Bundled.{w} L.Structure, Nonempty (M ≃[L] N) → (M ∈ K ↔ N ∈ K)
  is_essentially_countable : (Quotient.mk' '' K).Countable
  hereditary : Hereditary K
  jointEmbedding : JointEmbedding K
  amalgamation : Amalgamation K

{K : Set (CategoryTheory.Bundled L.Structure)}

[self : FirstOrder.Language.IsFraisse K]


@[to_additive]
theorem exponent_min (m : ℕ) (hpos : 0 < m) (hm : m < exponent G) : ∃ g : G, g ^ m ≠ 1

{G : Type u}
[AddMonoid G]
(m : ℕ)
(hpos : 0 < m)
(hm : m < AddMonoid.exponent G)


/--
An auxiliary lemma to that allows us to use `QuotientMap.lift` in the proof of
`equalizerCondition_yonedaPresheaf`.
-/
theorem factorsThrough_of_pullbackCondition {Z B : C} {π : Z ⟶ B} [HasPullback π π]
    [PreservesLimit (cospan π π) G]
    {a : C(G.obj Z, X)}
    (ha : a ∘ (G.map (pullback.fst _ _)) = a ∘ (G.map (pullback.snd π π))) :
    Function.FactorsThrough a (G.map π)

[CategoryTheory.Limits.PreservesLimit (CategoryTheory.Limits.cospan π π) G]

(ha : ⇑a ∘ ⇑(G.map (CategoryTheory.Limits.pullback.fst π π)) = ⇑a ∘ ⇑(G.map (CategoryTheory.Limits.pullback.snd π π)))


@[simp]
theorem cross_anticomm (v w : Fin 3 → R) : -(v ×₃ w) = w ×₃ v

{R : Type u_1}
[CommRing R]
(v w : Fin 3 → R)

-(crossProduct v) w = (crossProduct w) v


/-- The constant sheaf functor commutes with `sheafCompose` up to isomorphism. -/
@[simps!]
noncomputable def constantCommuteCompose :
    constantSheaf J A ⋙ sheafCompose J U ≅ U ⋙ constantSheaf J B

(J : CategoryTheory.GrothendieckTopology C)

∀ (X_1 : Cᵒᵖ),
  ((CategoryTheory.Sheaf.constantCommuteCompose J U).inv.app X).val.app X_1 =
    ((CategoryTheory.presheafToSheaf J B).map ((CategoryTheory.Functor.compConstIso Cᵒᵖ U).hom.app X)).val.app X_1 ≫
      ((CategoryTheory.sheafComposeNatIso J U (CategoryTheory.sheafificationAdjunction J A)
                    (CategoryTheory.sheafificationAdjunction J B)).hom.app
              ((CategoryTheory.Functor.const Cᵒᵖ).obj X)).val.app
        X_1


theorem mem_map_of_mem {f : F} {p : Submodule R M} {r} (h : r ∈ p) : f r ∈ map f p

{R : Type u_1}
{R₂ : Type u_3}
{M : Type u_5}
{M₂ : Type u_7}
[Semiring R]
[Semiring R₂]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R₂ M₂]
{σ₁₂ : R →+* R₂}
[RingHomSurjective σ₁₂]
{F : Type u_9}
[FunLike F M M₂]
[SemilinearMapClass F σ₁₂ M M₂]
{f : F}
{p : Submodule R M}
{r : M}
(h : r ∈ p)


theorem eq_comp_symm {α : Type*} (f : M₂ → α) (g : M₁ → α) : f = g ∘ e₁₂.symm ↔ f ∘ e₁₂ = g

{R₁ : Type u_2}
{R₂ : Type u_3}
{M₁ : Type u_9}
{M₂ : Type u_10}
[Semiring R₁]
[Semiring R₂]
[AddCommMonoid M₁]
[AddCommMonoid M₂]
{module_M₁ : Module R₁ M₁}
{module_M₂ : Module R₂ M₂}
{σ₁₂ : R₁ →+* R₂}
{σ₂₁ : R₂ →+* R₁}
{re₁₂ : RingHomInvPair σ₁₂ σ₂₁}
{re₂₁ : RingHomInvPair σ₂₁ σ₁₂}
{e₁₂ : M₁ ≃ₛₗ[σ₁₂] M₂}
{α : Type u_18}
(f : M₂ → α)
(g : M₁ → α)


lemma ShortExact.map_of_exact (hS : S.ShortExact)
    (F : C ⥤ D) [F.PreservesZeroMorphisms] [PreservesFiniteLimits F]
    [PreservesFiniteColimits F] : (S.map F).ShortExact


@[simp]
theorem compl_apply_diag [Zero α] [One α] (i : V) : A.compl i i = 0

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


@[simp] lemma mul_bot (h : a ≠ 0) : a * ⊥ = ⊥

{α : Type u_1}
[DecidableEq α]
[MulZeroClass α]
{a : WithBot α}
(h : a ≠ 0)


/-- The Lebesgue integral is measurable. This shows that the integrand of (the right-hand-side of)
  Tonelli's theorem is measurable. -/
theorem Measurable.lintegral_prod_right' [SFinite ν] :
    ∀ {f : α × β → ℝ≥0∞}, Measurable f → Measurable fun x => ∫⁻ y, f (x, y) ∂ν

{α : Type u_1}
{β : Type u_3}
[MeasurableSpace α]
[MeasurableSpace β]
{ν : MeasureTheory.Measure β}
[MeasureTheory.SFinite ν]
{f : α × β → ℝ≥0∞}

Measurable f → Measurable fun x => ∫⁻ (y : β), f (x, y) ∂ν


theorem nodal_insert_eq_nodal [DecidableEq ι] {i : ι} (hi : i ∉ s) :
    nodal (insert i s) v = (X - C (v i)) * nodal s v

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

Lagrange.nodal (insert i s) v = (Polynomial.X - Polynomial.C (v i)) * Lagrange.nodal s v


@[to_additive]
theorem IsUpperSet.smul_subset (hs : IsUpperSet s) (hx : 1 ≤ x) : x • s ⊆ s

{α : Type u_1}
[OrderedCommMonoid α]
{s : Set α}
{x : α}
(hs : IsUpperSet s)
(hx : 1 ≤ x)


@[simp]
protected theorem single_neg (p) (i : α) (a : E i) : lp.single p i (-a) = -lp.single p i a

{α : Type u_1}
{E : α → Type u_2}
[(i : α) → NormedAddCommGroup (E i)]
[DecidableEq α]
(p : ℝ≥0∞)
(i : α)
(a : E i)


theorem mem_coeIdeal_of_mem {x : R} {I : Ideal R} (hx : x ∈ I) :
    algebraMap R P x ∈ (I : FractionalIdeal S P)

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


lemma val_strictMono : StrictMono (val : Finset α → Multiset α)


@[simp]
theorem coe_mul (f g : α →ₙ+* α) : ⇑(f * g) = f ∘ g

{α : Type u_2}
[NonUnitalNonAssocSemiring α]
(f g : α →ₙ+* α)


@[simp]
theorem mem_colon_singleton {N : Submodule R M} {x : M} {r : R} :
    r ∈ N.colon (Submodule.span R {x}) ↔ r • x ∈ N

{R : Type u_1}
{M : Type u_2}
[CommRing R]
[AddCommGroup M]
[Module R M]
{N : Submodule R M}
{x : M}
{r : R}


theorem padic_polynomial_dist {p : ℕ} [Fact p.Prime] (F : Polynomial ℤ_[p]) (x y : ℤ_[p]) :
    ‖F.eval x - F.eval y‖ ≤ ‖x - y‖

{p : ℕ}
[Fact (Nat.Prime p)]
(F : Polynomial ℤ_[p])
(x y : ℤ_[p])

‖Polynomial.eval x F - Polynomial.eval y F‖ ≤ ‖x - y‖


@[simp]
lemma liftCochain_snd :
    (liftCochain φ α β h).comp (snd φ) (add_zero n) = β

(α : CochainComplex.HomComplex.Cochain K F m)

(β : CochainComplex.HomComplex.Cochain K G n)

(CochainComplex.mappingCone.liftCochain φ α β h).comp (CochainComplex.mappingCone.snd φ) ⋯ = β


theorem Decidable.imp_iff_left_iff  [Decidable a] : (b ↔ a → b) ↔ a ∨ b


@[to_additive]
theorem isComplement_univ_left : IsComplement univ S ↔ ∃ g : G, S = {g}

Subgroup.IsComplement Set.univ S ↔ ∃ g, S = {g}


/-- The complex measures form an equivalence to the type of pairs of signed measures. -/
@[simps]
def equivSignedMeasure : ComplexMeasure α ≃ SignedMeasure α × SignedMeasure α

∀ (x : MeasureTheory.SignedMeasure α × MeasureTheory.SignedMeasure α),
  MeasureTheory.ComplexMeasure.equivSignedMeasure.symm x =
    match x with
    | (s, t) => s.toComplexMeasure t


theorem continuousAt_jacobiTheta {τ : ℂ} (hτ : 0 < im τ) : ContinuousAt jacobiTheta τ


@[fun_prop]
nonrec theorem HasFDerivWithinAt.sub (hf : HasFDerivWithinAt f f' s x)
    (hg : HasFDerivWithinAt g g' s x) : HasFDerivWithinAt (fun x => f x - g x) (f' - g') s x

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


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


theorem extend_target_mem_nhdsWithin {y : M} (hy : y ∈ f.source) :
    (f.extend I).target ∈ 𝓝[range I] f.extend I y

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

(f.extend I).target ∈ 𝓝[Set.range ↑I] ↑(f.extend I) y


@[simp]
theorem zero_contLinear : (0 : P →ᴬ[R] W).contLinear = 0

{R : Type u_2}
{V : Type u_3}
{W : Type u_4}
{P : Type u_6}
[NormedAddCommGroup V]
[MetricSpace P]
[NormedAddTorsor V P]
[NormedAddCommGroup W]
[NormedField R]
[NormedSpace R V]
[NormedSpace R W]


@[simp, norm_cast]
theorem prod_apply [Module R₁ M₂] [Module R₁ M₃] (f₁ : M₁ →L[R₁] M₂) (f₂ : M₁ →L[R₁] M₃) (x : M₁) :
    f₁.prod f₂ x = (f₁ x, f₂ x)

{R₁ : Type u_1}
[Semiring R₁]
{M₁ : Type u_4}
[TopologicalSpace M₁]
[AddCommMonoid M₁]
{M₂ : Type u_6}
[TopologicalSpace M₂]
[AddCommMonoid M₂]
{M₃ : Type u_7}
[TopologicalSpace M₃]
[AddCommMonoid M₃]
[Module R₁ M₁]
[Module R₁ M₂]
[Module R₁ M₃]
(f₁ : M₁ →L[R₁] M₂)
(f₂ : M₁ →L[R₁] M₃)
(x : M₁)


theorem Gamma_mul_Gamma_add_half (s : ℝ) :
    Gamma s * Gamma (s + 1 / 2) = Gamma (2 * s) * (2 : ℝ) ^ (1 - 2 * s) * √π

Real.Gamma s * Real.Gamma (s + 1 / 2) = Real.Gamma (2 * s) * 2 ^ (1 - 2 * s) * √π


lemma range_nontrivial {n : ℕ} (hn : 1 < n) : (Finset.range n).Nontrivial


@[ext]
lemma tensorObj_ext {A : C} {j : I} (f g : tensorObj X₁ X₂ j ⟶ A)
    (h : ∀ (i₁ i₂ : I) (hi : i₁ + i₂ = j),
      ιTensorObj X₁ X₂ i₁ i₂ j hi ≫ f = ιTensorObj X₁ X₂ i₁ i₂ j hi ≫ g) : f = g

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

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

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


@[simp, reassoc]
theorem pullbackRestrictIsoRestrict_hom_restrict {X Y : Scheme.{u}} (f : X ⟶ Y) (U : Y.Opens) :
    (pullbackRestrictIsoRestrict f U).hom ≫ (f ⁻¹ᵁ U).ι = pullback.fst f _

{X Y : AlgebraicGeometry.Scheme}
(f : X ⟶ Y)
(U : Y.Opens)

(AlgebraicGeometry.pullbackRestrictIsoRestrict f U).hom ≫ ((TopologicalSpace.Opens.map f.val.base).obj U).ι =
  CategoryTheory.Limits.pullback.fst f U.ι


theorem toNonUnitalNonAssocSemiring_injective :
    Function.Injective (@toNonUnitalNonAssocSemiring R)


@[simp] lemma keysLookupEquiv_symm_apply_keys :
    ∀ f : {f : Finset α × (∀ a, Option (β a)) // ∀ i, (f.2 i).isSome ↔ i ∈ f.1},
      (keysLookupEquiv.symm f).keys = f.1.1

(f : { f // ∀ (i : α), (f.2 i).isSome = true ↔ i ∈ f.1 })

(Finmap.keysLookupEquiv.symm f).keys = (↑f).1


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

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

IsPreconnected (⇑h '' s) ↔ IsPreconnected s


@[simp]
theorem preimage_cast_Iic (p : ℚ≥0) : (↑) ⁻¹' Iic (p : K) = Iic p

{K : Type u_5}
[LinearOrderedSemifield K]
(p : ℚ≥0)


@[simp] lemma repr_apply_coe (b : FreeGroupBasis ι G) (i : ι) : b.repr (b i) = FreeGroup.of i

{ι : Type u_1}
{G : Type u_3}
[Group G]
(b : FreeGroupBasis ι G)
(i : ι)


theorem foldr_self (l : List α) : l.foldr cons [] = l


/-- The orthogonal projection onto `(𝕜 ∙ v)ᗮ` of `v` is zero. -/
theorem orthogonalProjection_orthogonalComplement_singleton_eq_zero (v : E) :
    orthogonalProjection (𝕜 ∙ v)ᗮ v = 0

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

(orthogonalProjection (Submodule.span 𝕜 {v})ᗮ) v = 0


lemma stableUnderGeneralization_univ : StableUnderGeneralization (univ : Set X)


theorem update_eq_iff {a : α} {b : β a} {f g : ∀ a, β a} :
    update f a b = g ↔ b = g a ∧ ∀ x ≠ a, f x = g x

{α : Sort u}
{β : α → Sort v}
[DecidableEq α]
{a : α}
{b : β a}
{f g : (a : α) → β a}

Function.update f a b = g ↔ b = g a ∧ ∀ (x : α), x ≠ a → f x = g x


@[simp]
theorem coe_ofBijective {f : F} (hf : Function.Bijective f) :
    (StarAlgEquiv.ofBijective f hf : A → B) = f

{F : Type u_1}
{R : Type u_3}
{A : Type u_4}
{B : Type u_5}
[Monoid R]
[NonUnitalNonAssocSemiring A]
[DistribMulAction R A]
[Star A]
[NonUnitalNonAssocSemiring B]
[DistribMulAction R B]
[Star B]
[FunLike F A B]
[NonUnitalAlgHomClass F R A B]
[NonUnitalStarAlgHomClass F R A B]
{f : F}
(hf : Function.Bijective ⇑f)


@[simp] lemma erase_covBy (ha : a ∈ s) : s.erase a ⋖ s

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


/-- Flipping a complex of complexes over the diagonal, as an equivalence of categories. -/
@[simps]
def flipEquivalence :
    HomologicalComplex₂ C c₁ c₂ ≌ HomologicalComplex₂ C c₂ c₁

(HomologicalComplex₂.flipEquivalence C c₁ c₂).inverse = HomologicalComplex₂.flipFunctor C c₂ c₁


theorem selfZPow_of_nonpos {n : ℤ} (hn : n ≤ 0) :
    selfZPow x B n = mk' _ (1 : R) (Submonoid.pow x n.natAbs)

{R : Type u_1}
[CommRing R]
(x : R)
(B : Type u_2)
[CommRing B]
[Algebra R B]
[IsLocalization.Away x B]
{n : ℤ}
(hn : n ≤ 0)

selfZPow x B n = IsLocalization.mk' B 1 (Submonoid.pow x n.natAbs)


theorem ContDiffWithinAt.differentiableWithinAt_iteratedDerivWithin {n : ℕ∞} {m : ℕ}
    (h : ContDiffWithinAt 𝕜 n f s x) (hmn : (m : ℕ∞) < n) (hs : UniqueDiffOn 𝕜 (insert x s)) :
    DifferentiableWithinAt 𝕜 (iteratedDerivWithin m f s) s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type u_2}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : 𝕜 → F}
{s : Set 𝕜}
{x : 𝕜}
{n : ℕ∞}
{m : ℕ}
(h : ContDiffWithinAt 𝕜 n f s x)
(hmn : ↑m < n)
(hs : UniqueDiffOn 𝕜 (insert x s))


@[to_additive (attr := simp)]
theorem preimage_mul_left_singleton :
    preimage {b} (a * ·) (mul_right_injective _).injOn = {a⁻¹ * b}

{b}.preimage (fun x => a + x) ⋯ = {-a + b}


@[simp, norm_cast] theorem zero_eq_coe : 0 = (↑r : ℝ≥0∞) ↔ 0 = r


@[simp]
theorem map_symm_map (I : FractionalIdeal S P') (g : P ≃ₐ[R] P') :
    (I.map (g.symm : P' →ₐ[R] P)).map (g : P →ₐ[R] P') = I

{R : Type u_1}
[CommRing R]
{S : Submonoid R}
{P : Type u_2}
[CommRing P]
[Algebra R P]
{P' : Type u_3}
[CommRing P']
[Algebra R P']
(I : FractionalIdeal S P')
(g : P ≃ₐ[R] P')

FractionalIdeal.map (↑g) (FractionalIdeal.map (↑g.symm) I) = I


@[simp]
theorem rename_expand (f : σ → τ) (p : ℕ) (φ : MvPolynomial σ R) :
    rename f (expand p φ) = expand p (rename f φ)

{σ : Type u_1}
{τ : Type u_2}
{R : Type u_3}
[CommSemiring R]
(f : σ → τ)
(p : ℕ)
(φ : MvPolynomial σ R)

(MvPolynomial.rename f) ((MvPolynomial.expand p) φ) = (MvPolynomial.expand p) ((MvPolynomial.rename f) φ)


theorem Nat.Coprime.isPrimePow_dvd_mul {n a b : ℕ} (hab : Nat.Coprime a b) (hn : IsPrimePow n) :
    n ∣ a * b ↔ n ∣ a ∨ n ∣ b

{n a b : ℕ}
(hab : a.Coprime b)
(hn : IsPrimePow n)


theorem ContDiffWithinAt.of_le (h : ContDiffWithinAt 𝕜 n f s x) (hmn : m ≤ n) :
    ContDiffWithinAt 𝕜 m f s x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{s : Set E}
{f : E → F}
{x : E}
{m n : ℕ∞}
(h : ContDiffWithinAt 𝕜 n f s x)
(hmn : m ≤ n)


/--
If `F ⊣ G` and `F' ⊣ G'` are adjunctions, then giving a natural transformation `G ⟶ G'` is the
same as giving a natural transformation `F' ⟶ F`.
-/
@[simps]
def natTransEquiv {F F' : C ⥤ D} {G G' : D ⥤ C} (adj1 : F ⊣ G) (adj2 : F' ⊣ G') :
    (G ⟶ G') ≃ (F' ⟶ F)

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

((adj1.natTransEquiv adj2) f).app X =
  F'.map ((adj1.unit ≫ CategoryTheory.whiskerLeft F f).app X) ≫ adj2.counit.app (F.obj X)


/-- `Quiver.Path.toList` is a contravariant functor. The inversion comes from `Quiver.Path` and
`List` having different preferred directions for adding elements. -/
@[simp]
theorem toList_comp (p : Path a b) : ∀ {c} (q : Path b c), (p.comp q).toList = q.toList ++ p.toList

{V : Type u}
[Quiver V]
{a b : V}
(p : Quiver.Path a b)
{c : V}
(q : Quiver.Path b c)


lemma not_lt_of_subsingleton [Subsingleton α] : ¬a < b

{α : Type u_2}
[Preorder α]
{a b : α}
[Subsingleton α]


/-- Construct an isomorphism from a homeomorphism. -/
@[simps!]
def isoOfHomeo {X Y : CompHausLike.{u} P} (f : X ≃ₜ Y) : X ≅ Y

(a : ↑((CompHausLike.compHausLikeToTop P).obj Y))

(CompHausLike.isoOfHomeo f).inv a = f.symm a


lemma isClosed_iUnion₂ {f : ∀ i, κ i → Set α} (hf : ∀ i j, IsClosed (f i j)) :
    IsClosed (⋃ i, ⋃ j, f i j)

(hf : ∀ (i : ι) (j : κ i), IsClosed (f i j))


theorem eq_zero_of_degree_lt_of_eval_index_eq_zero (hvs : Set.InjOn v s)
    (degree_f_lt : f.degree < s.card) (eval_f : ∀ i ∈ s, f.eval (v i) = 0) : f = 0

(eval_f : ∀ i ∈ s, Polynomial.eval (v i) f = 0)


/-- We'd like to state this as `L.headI * L.tail.prod = L.prod`, but because `L.headI` relies on an
inhabited instance to return a garbage value on the empty list, this is not possible.
Instead, we write the statement in terms of `(L.get? 0).getD 1`.
-/
@[to_additive "We'd like to state this as `L.headI + L.tail.sum = L.sum`, but because `L.headI`
  relies on an inhabited instance to return a garbage value on the empty list, this is not possible.
  Instead, we write the statement in terms of `(L.get? 0).getD 0`."]
theorem get?_zero_mul_tail_prod (l : List M) : (l.get? 0).getD 1 * l.tail.prod = l.prod


@[simp] lemma map_dblY : dblY (W'.map f) (f ∘ P) = f (W'.dblY P)

{R : Type u}
[CommRing R]
{W' : WeierstrassCurve.Jacobian R}
{S : Type u_1}
[CommRing S]
(f : R →+* S)
(P : Fin 3 → R)

WeierstrassCurve.Jacobian.dblY (WeierstrassCurve.map W' f) (⇑f ∘ P) = f (W'.dblY P)


@[to_additive]
theorem smoothWithinAt_one [One M'] : SmoothWithinAt I I' (1 : M → M') s x

{𝕜 : 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']
{s : Set M}
{x : M}
[One M']


theorem Sublist.exists_perm_append {l₁ l₂ : List α} : l₁ <+ l₂ → ∃ l, l₂ ~ l₁ ++ l


theorem continuous_preStoneCechUnit : Continuous (preStoneCechUnit : α → PreStoneCech α)


@[simp]
theorem drop_tail (l : List α) (n : ℕ) : l.tail.drop n = l.drop (n + 1)

List.drop n l.tail = List.drop (n + 1) l


theorem vertices_subset_space : K.vertices ⊆ K.space

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedRing 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
{K : Geometry.SimplicialComplex 𝕜 E}


@[to_additive]
theorem inv {U : Set G} : U ∈ B → ∃ V ∈ B, V ⊆ (fun x ↦ x⁻¹) ⁻¹' U

{G : Type u}
[AddGroup G]
{B : AddGroupFilterBasis G}
{U : Set G}

U ∈ B → ∃ V ∈ B, V ⊆ (fun x => -x) ⁻¹' U


/-- A topology on a set which is both a topological space and a preorder is _order-closed_ if the
set of points `(x, y)` with `x ≤ y` is closed in the product space. We introduce this as a mixin.
This property is satisfied for the order topology on a linear order, but it can be satisfied more
generally, and suffices to derive many interesting properties relating order and topology. -/
class OrderClosedTopology (α : Type*) [TopologicalSpace α] [Preorder α] : Prop where
  /-- The set `{ (x, y) | x ≤ y }` is a closed set. -/
  isClosed_le' : IsClosed { p : α × α | p.1 ≤ p.2 }

{α : Type u_1}
[TopologicalSpace α]
[Preorder α]
[self : OrderClosedTopology α]


theorem nondegenerate_toBilin'_of_det_ne_zero' (M : Matrix ι ι A) (h : M.det ≠ 0) :
    M.toBilin'.Nondegenerate

{A : Type u_11}
[CommRing A]
[IsDomain A]
{ι : Type u_12}
[DecidableEq ι]
[Fintype ι]
(M : Matrix ι ι A)
(h : M.det ≠ 0)


/-- To give a morphism in the under category, it suffices to give a morphism fitting in a
    commutative triangle. -/
@[simps!]
def homMk {U V : Under X} (f : U.right ⟶ V.right) (w : U.hom ≫ f = V.hom := by aesop_cat) : U ⟶ V

(w : CategoryTheory.CategoryStruct.comp U.hom f = V.hom := by aesop_cat)


@[simp]
theorem mem_map {f : K →+* L} {s : Subfield K} {y : L} : y ∈ s.map f ↔ ∃ x ∈ s, f x = y

{K : Type u}
{L : Type v}
[DivisionRing K]
[DivisionRing L]
{f : K →+* L}
{s : Subfield K}
{y : L}


theorem injective_of_lt_imp_ne [LinearOrder α] {f : α → β} (h : ∀ x y, x < y → f x ≠ f y) :
    Injective f

{α : Type u}
{β : Type v}
[LinearOrder α]
{f : α → β}
(h : ∀ (x y : α), x < y → f x ≠ f y)


theorem HasBasis.mem_of_mem (hl : l.HasBasis p s) (hi : p i) : s i ∈ l

{α : Type u_1}
{ι : Sort u_4}
{l : Filter α}
{p : ι → Prop}
{s : ι → Set α}
{i : ι}
(hl : l.HasBasis p s)
(hi : p i)


/-- A prepartition of `I : BoxIntegral.Box ι` is a finite set of pairwise disjoint subboxes of
`I`. -/
structure Prepartition (I : Box ι) where
  /-- The underlying set of boxes -/
  boxes : Finset (Box ι)
  /-- Each box is a sub-box of `I` -/
  le_of_mem' : ∀ J ∈ boxes, J ≤ I
  /-- The boxes in a prepartition are pairwise disjoint. -/
  pairwiseDisjoint : Set.Pairwise (↑boxes) (Disjoint on ((↑) : Box ι → Set (ι → ℝ)))

{ι : Type u_1}
{I : BoxIntegral.Box ι}
(self : BoxIntegral.Prepartition I)
(J : BoxIntegral.Box ι)


theorem dual_rotateL (l : Ordnode α) (x : α) (r : Ordnode α) :
    dual (rotateL l x r) = rotateR (dual r) x (dual l)

{α : Type u_1}
(l : Ordnode α)
(x : α)
(r : Ordnode α)

(l.rotateL x r).dual = r.dual.rotateR x l.dual


lemma _root_.MeasurableEmbedding.mutuallySingular_map {β : Type*} {_ : MeasurableSpace β}
    {f : α → β} (hf : MeasurableEmbedding f) (hμν : μ ⟂ₘ ν) :
    μ.map f ⟂ₘ ν.map f

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ ν : MeasureTheory.Measure α}
{β : Type u_2}

∀ {x : MeasurableSpace β} {f : α → β},
  MeasurableEmbedding f → μ ⟂ₘ ν → MeasureTheory.Measure.map f μ ⟂ₘ MeasureTheory.Measure.map f ν


@[simp]
theorem coprod_apply (f : E →ₗ.[R] G) (g : F →ₗ.[R] G) (x) :
    f.coprod g x = f ⟨(x : E × F).1, x.2.1⟩ + g ⟨(x : E × F).2, x.2.2⟩

{R : Type u_1}
[Ring R]
{E : Type u_2}
[AddCommGroup E]
[Module R E]
{F : Type u_3}
[AddCommGroup F]
[Module R F]
{G : Type u_4}
[AddCommGroup G]
[Module R G]
(f : E →ₗ.[R] G)
(g : F →ₗ.[R] G)
(x : ↥(f.coprod g).domain)

↑(f.coprod g) x = ↑f ⟨(↑x).1, ⋯⟩ + ↑g ⟨(↑x).2, ⋯⟩


lemma continuousOn_term_tsum : ContinuousOn term_tsum (Ici 1)

ContinuousOn ZetaAsymptotics.term_tsum (Set.Ici 1)


lemma ConvexOn.mul_concaveOn (hf : ConvexOn 𝕜 s f) (hg : ConcaveOn 𝕜 s g)
    (hf₀ : ∀ ⦃x⦄, x ∈ s → 0 ≤ f x) (hg₀ : ∀ ⦃x⦄, x ∈ s → g x ≤ 0) (hfg : AntivaryOn f g s) :
    ConcaveOn 𝕜 s (f * g)

{𝕜 : Type u_1}
{E : Type u_2}
[LinearOrderedCommRing 𝕜]
[LinearOrderedCommRing E]
[Module 𝕜 E]
[OrderedSMul 𝕜 E]
{s : Set 𝕜}
[IsScalarTower 𝕜 E E]
[SMulCommClass 𝕜 E E]
{f g : 𝕜 → E}
(hf : ConvexOn 𝕜 s f)
(hg : ConcaveOn 𝕜 s g)
(hf₀ : ∀ ⦃x : 𝕜⦄, x ∈ s → 0 ≤ f x)
(hg₀ : ∀ ⦃x : 𝕜⦄, x ∈ s → g x ≤ 0)
(hfg : AntivaryOn f g s)


@[to_additive (attr := simp)]
theorem dist_div_right [DivInvMonoid M] [PseudoMetricSpace M] [IsometricSMul Mᵐᵒᵖ M]
    (a b c : M) : dist (a / c) (b / c) = dist a b

{M : Type u}
[DivInvMonoid M]
[PseudoMetricSpace M]
[IsometricSMul Mᵐᵒᵖ M]
(a b c : M)


@[to_additive (attr := simp)]
theorem mk_mul_mk (f g : α → γ) (hf : AEStronglyMeasurable f μ) (hg : AEStronglyMeasurable g μ) :
    (mk f hf : α →ₘ[μ] γ) * mk g hg = mk (f * g) (hf.mul hg)

(hf : MeasureTheory.AEStronglyMeasurable f μ)

(hg : MeasureTheory.AEStronglyMeasurable g μ)

MeasureTheory.AEEqFun.mk f hf * MeasureTheory.AEEqFun.mk g hg = MeasureTheory.AEEqFun.mk (f * g) ⋯


@[simp]
lemma one_toOneCochain : (1 : OneCocycle G U).toOneCochain = 1

{C : Type u}
[CategoryTheory.Category.{v, u} C]
(G : CategoryTheory.Functor Cᵒᵖ Grp)
{I : Type w'}
(U : I → C)

CategoryTheory.PresheafOfGroups.OneCocycle.toOneCochain 1 = 1


protected theorem lt_tsub_iff_left (hc : AddLECancellable c) : a < b - c ↔ c + a < b


@[simp]
theorem shiftLeft_coe_nat (m n : ℕ) : (m : ℤ) <<< (n : ℤ) = ↑(m <<< n)


lemma restrict_adj {G' G'' : G.Subgraph} (v w : G'.verts) :
    (G'.restrict G'').Adj v w ↔ G'.Adj v w ∧ G''.Adj v w

{V : Type u}
{G : SimpleGraph V}
{G' G'' : G.Subgraph}
(v w : ↑G'.verts)

(SimpleGraph.Subgraph.restrict G'').Adj v w ↔ G'.Adj ↑v ↑w ∧ G''.Adj ↑v ↑w


theorem dotProduct_eq (v w : n → R) (h : ∀ u, dotProduct v u = dotProduct w u) : v = w

(h : ∀ (u : n → R), Matrix.dotProduct v u = Matrix.dotProduct w u)


/--
To show the Schnirelmann density is upper bounded by `x`, it suffices to show
`|A ∩ {1, ..., n}| / n ≤ x`, for any chosen positive value of `n`.

We provide `n` explicitly here to make this lemma more easily usable in `apply` or `refine`.
This lemma is analogous to `ciInf_le_of_le`.
-/
lemma schnirelmannDensity_le_of_le {x : ℝ} (n : ℕ) (hn : n ≠ 0)
    (hx : ((Ioc 0 n).filter (· ∈ A)).card / n ≤ x) : schnirelmannDensity A ≤ x

(hx : ↑(Finset.filter (fun x => x ∈ A) (Finset.Ioc 0 n)).card / ↑n ≤ x)


theorem Char.val_eq_of_eq : ∀ {c d : Char}, Eq c d → Eq c.val d.val


theorem antitoneOn_dual_iff : AntitoneOn (toDual ∘ f ∘ ofDual : αᵒᵈ → βᵒᵈ) s ↔ AntitoneOn f s

{α : Type u}
{β : Type v}
[Preorder α]
[Preorder β]
{f : α → β}
{s : Set α}

AntitoneOn (⇑OrderDual.toDual ∘ f ∘ ⇑OrderDual.ofDual) s ↔ AntitoneOn f s


/-- `abs : ℤ → ℤ` is a Euclidean absolute value -/
protected theorem abs_isEuclidean : IsEuclidean (AbsoluteValue.abs : AbsoluteValue ℤ ℤ)


@[simp]
theorem subtypeVal_diagSub {α : TypeVec n} : subtypeVal (repeatEq α) ⊚ diagSub = prod.diag

TypeVec.comp (TypeVec.subtypeVal α.repeatEq) TypeVec.diagSub = TypeVec.prod.diag


theorem le_of_forall_pos_nnreal_lt {x y : ℝ≥0∞} (h : ∀ r : ℝ≥0, 0 < r → ↑r < x → ↑r ≤ y) : x ≤ y

(h : ∀ (r : ℝ≥0), 0 < r → ↑r < x → ↑r ≤ y)


@[simp]
theorem iInf_iInf_eq_right {b : β} {f : ∀ x : β, b = x → α} : ⨅ x, ⨅ h : b = x, f x h = f b rfl

{α : Type u_1}
{β : Type u_2}
[CompleteLattice α]
{b : β}
{f : (x : β) → b = x → α}