fact
stringlengths
6
3.84k
type
stringclasses
11 values
library
stringclasses
32 values
imports
listlengths
1
14
filename
stringlengths
20
95
symbolic_name
stringlengths
1
90
docstring
stringlengths
7
20k
compl_setOf_mem {φ : L[[α]].Sentence} : { p : T.CompleteType α | φ ∈ p }ᶜ = { p : T.CompleteType α | φ.not ∈ p } := ext fun _ => (not_mem_iff _ _).symm
theorem
ModelTheory
[ "Mathlib.ModelTheory.Satisfiability" ]
Mathlib/ModelTheory/Types.lean
compl_setOf_mem
null
setOf_subset_eq_empty_iff (S : L[[α]].Theory) : { p : T.CompleteType α | S ⊆ ↑p } = ∅ ↔ ¬((L.lhomWithConstants α).onTheory T ∪ S).IsSatisfiable := by rw [iff_not_comm, ← not_nonempty_iff_eq_empty, Classical.not_not, Set.Nonempty] refine ⟨fun h => ⟨⟨L[[α]].completeTheory h.some, (subset_union_lef...
theorem
ModelTheory
[ "Mathlib.ModelTheory.Satisfiability" ]
Mathlib/ModelTheory/Types.lean
setOf_subset_eq_empty_iff
null
setOf_mem_eq_univ_iff (φ : L[[α]].Sentence) : { p : T.CompleteType α | φ ∈ p } = Set.univ ↔ (L.lhomWithConstants α).onTheory T ⊨ᵇ φ := by rw [models_iff_not_satisfiable, ← compl_empty_iff, compl_setOf_mem, ← setOf_subset_eq_empty_iff] simp
theorem
ModelTheory
[ "Mathlib.ModelTheory.Satisfiability" ]
Mathlib/ModelTheory/Types.lean
setOf_mem_eq_univ_iff
null
setOf_subset_eq_univ_iff (S : L[[α]].Theory) : { p : T.CompleteType α | S ⊆ ↑p } = Set.univ ↔ ∀ φ, φ ∈ S → (L.lhomWithConstants α).onTheory T ⊨ᵇ φ := by have h : { p : T.CompleteType α | S ⊆ ↑p } = ⋂₀ ((fun φ => { p | φ ∈ p }) '' S) := by ext simp [subset_def] simp_rw [h, sInter_eq_univ, ← setOf_m...
theorem
ModelTheory
[ "Mathlib.ModelTheory.Satisfiability" ]
Mathlib/ModelTheory/Types.lean
setOf_subset_eq_univ_iff
null
nonempty_iff : Nonempty (T.CompleteType α) ↔ T.IsSatisfiable := by rw [← isSatisfiable_onTheory_iff (lhomWithConstants_injective L α)] rw [nonempty_iff_univ_nonempty, nonempty_iff_ne_empty, Ne, not_iff_comm, ← union_empty ((L.lhomWithConstants α).onTheory T), ← setOf_subset_eq_empty_iff] simp
theorem
ModelTheory
[ "Mathlib.ModelTheory.Satisfiability" ]
Mathlib/ModelTheory/Types.lean
nonempty_iff
null
instNonempty : Nonempty (CompleteType (∅ : L.Theory) α) := nonempty_iff.2 (isSatisfiable_empty L)
instance
ModelTheory
[ "Mathlib.ModelTheory.Satisfiability" ]
Mathlib/ModelTheory/Types.lean
instNonempty
null
iInter_setOf_subset {ι : Type*} (S : ι → L[[α]].Theory) : ⋂ i : ι, { p : T.CompleteType α | S i ⊆ p } = { p : T.CompleteType α | ⋃ i : ι, S i ⊆ p } := by ext simp only [mem_iInter, mem_setOf_eq, iUnion_subset_iff]
theorem
ModelTheory
[ "Mathlib.ModelTheory.Satisfiability" ]
Mathlib/ModelTheory/Types.lean
iInter_setOf_subset
null
toList_foldr_inf_mem {p : T.CompleteType α} {t : Finset (L[[α]]).Sentence} : t.toList.foldr (· ⊓ ·) ⊤ ∈ p ↔ (t : L[[α]].Theory) ⊆ ↑p := by simp_rw [subset_def, ← SetLike.mem_coe, p.isMaximal.mem_iff_models, models_sentence_iff, Sentence.Realize, Formula.Realize, BoundedFormula.realize_foldr_inf, Finset.mem_to...
theorem
ModelTheory
[ "Mathlib.ModelTheory.Satisfiability" ]
Mathlib/ModelTheory/Types.lean
toList_foldr_inf_mem
null
typeOf (v : α → M) : T.CompleteType α := haveI : (constantsOn α).Structure M := constantsOn.structure v { toTheory := L[[α]].completeTheory M subset' := model_iff_subset_completeTheory.1 ((LHom.onTheory_model _ T).2 inferInstance) isMaximal' := completeTheory.isMaximal _ _ }
def
ModelTheory
[ "Mathlib.ModelTheory.Satisfiability" ]
Mathlib/ModelTheory/Types.lean
typeOf
The set of all formulas true at a tuple in a structure forms a complete type.
@[simp] mem_typeOf {φ : L[[α]].Sentence} : φ ∈ T.typeOf v ↔ (Formula.equivSentence.symm φ).Realize v := letI : (constantsOn α).Structure M := constantsOn.structure v mem_completeTheory.trans (Formula.realize_equivSentence_symm _ _ _).symm
theorem
ModelTheory
[ "Mathlib.ModelTheory.Satisfiability" ]
Mathlib/ModelTheory/Types.lean
mem_typeOf
null
formula_mem_typeOf {φ : L.Formula α} : Formula.equivSentence φ ∈ T.typeOf v ↔ φ.Realize v := by simp
theorem
ModelTheory
[ "Mathlib.ModelTheory.Satisfiability" ]
Mathlib/ModelTheory/Types.lean
formula_mem_typeOf
null
@[simp] realizedTypes (α : Type w) : Set (T.CompleteType α) := Set.range (T.typeOf : (α → M) → T.CompleteType α)
def
ModelTheory
[ "Mathlib.ModelTheory.Satisfiability" ]
Mathlib/ModelTheory/Types.lean
realizedTypes
A complete type `p` is realized in a particular structure when there is some tuple `v` whose type is `p`.
exists_modelType_is_realized_in (p : T.CompleteType α) : ∃ M : Theory.ModelType.{u, v, max u v w} T, p ∈ T.realizedTypes M α := by obtain ⟨M⟩ := p.isMaximal.1 refine ⟨(M.subtheoryModel p.subset).reduct (L.lhomWithConstants α), fun a => (L.con a : M), ?_⟩ refine SetLike.ext fun φ => ?_ simp only [CompleteTyp...
theorem
ModelTheory
[ "Mathlib.ModelTheory.Satisfiability" ]
Mathlib/ModelTheory/Types.lean
exists_modelType_is_realized_in
null
setoidPrestructure : L.Prestructure ((u : Filter α).productSetoid M) := { (u : Filter α).productSetoid M with toStructure := { funMap := fun {_} f x a => funMap f fun i => x i a RelMap := fun {_} r x => ∀ᶠ a : α in u, RelMap r fun i => x i a } fun_equiv := fun {n} f x y xy => by refine mem...
instance
ModelTheory
[ "Mathlib.ModelTheory.Quotients", "Mathlib.Order.Filter.Finite", "Mathlib.Order.Filter.Germ.Basic", "Mathlib.Order.Filter.Ultrafilter.Defs" ]
Mathlib/ModelTheory/Ultraproducts.lean
setoidPrestructure
null
funMap_cast {n : ℕ} (f : L.Functions n) (x : Fin n → ∀ a, M a) : (funMap f fun i => (x i : (u : Filter α).Product M)) = (fun a => funMap f fun i => x i a : (u : Filter α).Product M) := by apply funMap_quotient_mk'
theorem
ModelTheory
[ "Mathlib.ModelTheory.Quotients", "Mathlib.Order.Filter.Finite", "Mathlib.Order.Filter.Germ.Basic", "Mathlib.Order.Filter.Ultrafilter.Defs" ]
Mathlib/ModelTheory/Ultraproducts.lean
funMap_cast
null
term_realize_cast {β : Type*} (x : β → ∀ a, M a) (t : L.Term β) : (t.realize fun i => (x i : (u : Filter α).Product M)) = (fun a => t.realize fun i => x i a : (u : Filter α).Product M) := by convert @Term.realize_quotient_mk' L _ ((u : Filter α).productSetoid M) (Ultraproduct.setoidPrestructure M u) _...
theorem
ModelTheory
[ "Mathlib.ModelTheory.Quotients", "Mathlib.Order.Filter.Finite", "Mathlib.Order.Filter.Germ.Basic", "Mathlib.Order.Filter.Ultrafilter.Defs" ]
Mathlib/ModelTheory/Ultraproducts.lean
term_realize_cast
null
boundedFormula_realize_cast {β : Type*} {n : ℕ} (φ : L.BoundedFormula β n) (x : β → ∀ a, M a) (v : Fin n → ∀ a, M a) : (φ.Realize (fun i : β => (x i : (u : Filter α).Product M)) (fun i => (v i : (u : Filter α).Product M))) ↔ ∀ᶠ a : α in u, φ.Realize (fun i : β => x i a) fun i => v i a := by letI...
theorem
ModelTheory
[ "Mathlib.ModelTheory.Quotients", "Mathlib.Order.Filter.Finite", "Mathlib.Order.Filter.Germ.Basic", "Mathlib.Order.Filter.Ultrafilter.Defs" ]
Mathlib/ModelTheory/Ultraproducts.lean
boundedFormula_realize_cast
null
realize_formula_cast {β : Type*} (φ : L.Formula β) (x : β → ∀ a, M a) : (φ.Realize fun i => (x i : (u : Filter α).Product M)) ↔ ∀ᶠ a : α in u, φ.Realize fun i => x i a := by simp_rw [Formula.Realize, ← boundedFormula_realize_cast φ x, iff_eq_eq] exact congr rfl (Subsingleton.elim _ _)
theorem
ModelTheory
[ "Mathlib.ModelTheory.Quotients", "Mathlib.Order.Filter.Finite", "Mathlib.Order.Filter.Germ.Basic", "Mathlib.Order.Filter.Ultrafilter.Defs" ]
Mathlib/ModelTheory/Ultraproducts.lean
realize_formula_cast
null
sentence_realize (φ : L.Sentence) : (u : Filter α).Product M ⊨ φ ↔ ∀ᶠ a : α in u, M a ⊨ φ := by simp_rw [Sentence.Realize] rw [← realize_formula_cast φ, iff_eq_eq] exact congr rfl (Subsingleton.elim _ _) nonrec instance Product.instNonempty : Nonempty ((u : Filter α).Product M) := letI : ∀ a, Inhabited (M a...
theorem
ModelTheory
[ "Mathlib.ModelTheory.Quotients", "Mathlib.Order.Filter.Finite", "Mathlib.Order.Filter.Germ.Basic", "Mathlib.Order.Filter.Ultrafilter.Defs" ]
Mathlib/ModelTheory/Ultraproducts.lean
sentence_realize
**Łoś's Theorem**: A sentence is true in an ultraproduct if and only if the set of structures it is true in is in the ultrafilter.
private sumlocc {m : ℕ} (n : ℕ) : ∀ᵐ t, t ∈ Set.Icc (n : ℝ) (n + 1) → ∑ k ∈ Icc m ⌊t⌋₊, c k = ∑ k ∈ Icc m n, c k := by filter_upwards [Ico_ae_eq_Icc] with t h ht rw [Nat.floor_eq_on_Ico _ _ (h.mpr ht)] open scoped Interval in
theorem
NumberTheory
[ "Mathlib.MeasureTheory.Function.Floor", "Mathlib.MeasureTheory.Integral.Asymptotics", "Mathlib.MeasureTheory.Integral.IntegralEqImproper", "Mathlib.Topology.Order.IsLocallyClosed" ]
Mathlib/NumberTheory/AbelSummation.lean
sumlocc
null
private integralmulsum (hf_diff : ∀ t ∈ Set.Icc a b, DifferentiableAt ℝ f t) (hf_int : IntegrableOn (deriv f) (Set.Icc a b)) (t₁ t₂ : ℝ) (n : ℕ) (h : t₁ ≤ t₂) (h₁ : n ≤ t₁) (h₂ : t₂ ≤ n + 1) (h₃ : a ≤ t₁) (h₄ : t₂ ≤ b) : ∫ t in t₁..t₂, deriv f t * ∑ k ∈ Icc 0 ⌊t⌋₊, c k = (f t₂ - f t₁) * ∑ k ∈ Icc 0 n,...
theorem
NumberTheory
[ "Mathlib.MeasureTheory.Function.Floor", "Mathlib.MeasureTheory.Integral.Asymptotics", "Mathlib.MeasureTheory.Integral.IntegralEqImproper", "Mathlib.Topology.Order.IsLocallyClosed" ]
Mathlib/NumberTheory/AbelSummation.lean
integralmulsum
null
private ineqofmemIco {k : ℕ} (hk : k ∈ Set.Ico (⌊a⌋₊ + 1) ⌊b⌋₊) : a ≤ k ∧ k + 1 ≤ b := by constructor · have := (Set.mem_Ico.mp hk).1 exact le_of_lt <| (Nat.floor_lt' (by cutsat)).mp this · rw [← Nat.cast_add_one, ← Nat.le_floor_iff' (Nat.succ_ne_zero k)] exact (Set.mem_Ico.mp hk).2
theorem
NumberTheory
[ "Mathlib.MeasureTheory.Function.Floor", "Mathlib.MeasureTheory.Integral.Asymptotics", "Mathlib.MeasureTheory.Integral.IntegralEqImproper", "Mathlib.Topology.Order.IsLocallyClosed" ]
Mathlib/NumberTheory/AbelSummation.lean
ineqofmemIco
null
private ineqofmemIco' {k : ℕ} (hk : k ∈ Ico (⌊a⌋₊ + 1) ⌊b⌋₊) : a ≤ k ∧ k + 1 ≤ b := ineqofmemIco (by rwa [← Finset.coe_Ico])
theorem
NumberTheory
[ "Mathlib.MeasureTheory.Function.Floor", "Mathlib.MeasureTheory.Integral.Asymptotics", "Mathlib.MeasureTheory.Integral.IntegralEqImproper", "Mathlib.Topology.Order.IsLocallyClosed" ]
Mathlib/NumberTheory/AbelSummation.lean
ineqofmemIco'
null
_root_.integrableOn_mul_sum_Icc {m : ℕ} (ha : 0 ≤ a) {g : ℝ → 𝕜} (hg_int : IntegrableOn g (Set.Icc a b)) : IntegrableOn (fun t ↦ g t * ∑ k ∈ Icc m ⌊t⌋₊, c k) (Set.Icc a b) := by obtain hab | hab := le_or_gt a b · obtain hb | hb := eq_or_lt_of_le (Nat.floor_le_floor hab) · have : ∀ᵐ t, t ∈ Set.Icc a b →...
theorem
NumberTheory
[ "Mathlib.MeasureTheory.Function.Floor", "Mathlib.MeasureTheory.Integral.Asymptotics", "Mathlib.MeasureTheory.Integral.IntegralEqImproper", "Mathlib.Topology.Order.IsLocallyClosed" ]
Mathlib/NumberTheory/AbelSummation.lean
_root_.integrableOn_mul_sum_Icc
null
_root_.sum_mul_eq_sub_sub_integral_mul (ha : 0 ≤ a) (hab : a ≤ b) (hf_diff : ∀ t ∈ Set.Icc a b, DifferentiableAt ℝ f t) (hf_int : IntegrableOn (deriv f) (Set.Icc a b)) : ∑ k ∈ Ioc ⌊a⌋₊ ⌊b⌋₊, f k * c k = f b * (∑ k ∈ Icc 0 ⌊b⌋₊, c k) - f a * (∑ k ∈ Icc 0 ⌊a⌋₊, c k) - ∫ t in Set.Ioc a b, deriv f...
theorem
NumberTheory
[ "Mathlib.MeasureTheory.Function.Floor", "Mathlib.MeasureTheory.Integral.Asymptotics", "Mathlib.MeasureTheory.Integral.IntegralEqImproper", "Mathlib.Topology.Order.IsLocallyClosed" ]
Mathlib/NumberTheory/AbelSummation.lean
_root_.sum_mul_eq_sub_sub_integral_mul
Abel's summation formula.
_root_.sum_mul_eq_sub_sub_integral_mul' {n m : ℕ} (h : n ≤ m) (hf_diff : ∀ t ∈ Set.Icc (n : ℝ) m, DifferentiableAt ℝ f t) (hf_int : IntegrableOn (deriv f) (Set.Icc (n : ℝ) m)) : ∑ k ∈ Ioc n m, f k * c k = f m * (∑ k ∈ Icc 0 m, c k) - f n * (∑ k ∈ Icc 0 n, c k) - ∫ t in Set.Ioc (n : ℝ) m, deriv...
theorem
NumberTheory
[ "Mathlib.MeasureTheory.Function.Floor", "Mathlib.MeasureTheory.Integral.Asymptotics", "Mathlib.MeasureTheory.Integral.IntegralEqImproper", "Mathlib.Topology.Order.IsLocallyClosed" ]
Mathlib/NumberTheory/AbelSummation.lean
_root_.sum_mul_eq_sub_sub_integral_mul'
A version of `sum_mul_eq_sub_sub_integral_mul` where the endpoints are `Nat`.
sum_mul_eq_sub_integral_mul {b : ℝ} (hb : 0 ≤ b) (hf_diff : ∀ t ∈ Set.Icc 0 b, DifferentiableAt ℝ f t) (hf_int : IntegrableOn (deriv f) (Set.Icc 0 b)) : ∑ k ∈ Icc 0 ⌊b⌋₊, f k * c k = f b * (∑ k ∈ Icc 0 ⌊b⌋₊, c k) - ∫ t in Set.Ioc 0 b, deriv f t * ∑ k ∈ Icc 0 ⌊t⌋₊, c k := by nth_rewrite 1 [Icc_eq_con...
theorem
NumberTheory
[ "Mathlib.MeasureTheory.Function.Floor", "Mathlib.MeasureTheory.Integral.Asymptotics", "Mathlib.MeasureTheory.Integral.IntegralEqImproper", "Mathlib.Topology.Order.IsLocallyClosed" ]
Mathlib/NumberTheory/AbelSummation.lean
sum_mul_eq_sub_integral_mul
Specialized version of `sum_mul_eq_sub_sub_integral_mul` for the case `a = 0`
sum_mul_eq_sub_integral_mul' (m : ℕ) (hf_diff : ∀ t ∈ Set.Icc (0 : ℝ) m, DifferentiableAt ℝ f t) (hf_int : IntegrableOn (deriv f) (Set.Icc (0 : ℝ) m)) : ∑ k ∈ Icc 0 m, f k * c k = f m * (∑ k ∈ Icc 0 m, c k) - ∫ t in Set.Ioc (0 : ℝ) m, deriv f t * ∑ k ∈ Icc 0 ⌊t⌋₊, c k := by convert sum_mul_e...
theorem
NumberTheory
[ "Mathlib.MeasureTheory.Function.Floor", "Mathlib.MeasureTheory.Integral.Asymptotics", "Mathlib.MeasureTheory.Integral.IntegralEqImproper", "Mathlib.Topology.Order.IsLocallyClosed" ]
Mathlib/NumberTheory/AbelSummation.lean
sum_mul_eq_sub_integral_mul'
A version of `sum_mul_eq_sub_integral_mul` where the endpoint is a `Nat`.
sum_mul_eq_sub_integral_mul₀ (hc : c 0 = 0) (b : ℝ) (hf_diff : ∀ t ∈ Set.Icc 1 b, DifferentiableAt ℝ f t) (hf_int : IntegrableOn (deriv f) (Set.Icc 1 b)) : ∑ k ∈ Icc 0 ⌊b⌋₊, f k * c k = f b * (∑ k ∈ Icc 0 ⌊b⌋₊, c k) - ∫ t in Set.Ioc 1 b, deriv f t * ∑ k ∈ Icc 0 ⌊t⌋₊, c k := by obtain hb | hb := le_o...
theorem
NumberTheory
[ "Mathlib.MeasureTheory.Function.Floor", "Mathlib.MeasureTheory.Integral.Asymptotics", "Mathlib.MeasureTheory.Integral.IntegralEqImproper", "Mathlib.Topology.Order.IsLocallyClosed" ]
Mathlib/NumberTheory/AbelSummation.lean
sum_mul_eq_sub_integral_mul₀
Specialized version of `sum_mul_eq_sub_integral_mul` when the first coefficient of the sequence `c` is equal to `0`.
sum_mul_eq_sub_integral_mul₀' (hc : c 0 = 0) (m : ℕ) (hf_diff : ∀ t ∈ Set.Icc (1 : ℝ) m, DifferentiableAt ℝ f t) (hf_int : IntegrableOn (deriv f) (Set.Icc (1 : ℝ) m)) : ∑ k ∈ Icc 0 m, f k * c k = f m * (∑ k ∈ Icc 0 m, c k) - ∫ t in Set.Ioc (1 : ℝ) m, deriv f t * ∑ k ∈ Icc 0 ⌊t⌋₊, c k := by c...
theorem
NumberTheory
[ "Mathlib.MeasureTheory.Function.Floor", "Mathlib.MeasureTheory.Integral.Asymptotics", "Mathlib.MeasureTheory.Integral.IntegralEqImproper", "Mathlib.Topology.Order.IsLocallyClosed" ]
Mathlib/NumberTheory/AbelSummation.lean
sum_mul_eq_sub_integral_mul₀'
A version of `sum_mul_eq_sub_integral_mul₀` where the endpoint is a `Nat`.
locallyIntegrableOn_mul_sum_Icc {m : ℕ} (ha : 0 ≤ a) {g : ℝ → 𝕜} (hg : LocallyIntegrableOn g (Set.Ici a)) : LocallyIntegrableOn (fun t ↦ g t * ∑ k ∈ Icc m ⌊t⌋₊, c k) (Set.Ici a) := by refine (locallyIntegrableOn_iff isLocallyClosed_Ici).mpr fun K hK₁ hK₂ ↦ ?_ by_cases hK₃ : K.Nonempty · have h_inf : a ≤ ...
theorem
NumberTheory
[ "Mathlib.MeasureTheory.Function.Floor", "Mathlib.MeasureTheory.Integral.Asymptotics", "Mathlib.MeasureTheory.Integral.IntegralEqImproper", "Mathlib.Topology.Order.IsLocallyClosed" ]
Mathlib/NumberTheory/AbelSummation.lean
locallyIntegrableOn_mul_sum_Icc
null
tendsto_sum_mul_atTop_nhds_one_sub_integral (hf_diff : ∀ t ∈ Set.Ici 0, DifferentiableAt ℝ f t) (hf_int : LocallyIntegrableOn (deriv f) (Set.Ici 0)) {l : 𝕜} (h_lim : Tendsto (fun n : ℕ ↦ f n * ∑ k ∈ Icc 0 n, c k) atTop (𝓝 l)) {g : ℝ → 𝕜} (hg_dom : (fun t ↦ deriv f t * ∑ k ∈ Icc 0 ⌊t⌋₊, c k) =O[atTop]...
theorem
NumberTheory
[ "Mathlib.MeasureTheory.Function.Floor", "Mathlib.MeasureTheory.Integral.Asymptotics", "Mathlib.MeasureTheory.Integral.IntegralEqImproper", "Mathlib.Topology.Order.IsLocallyClosed" ]
Mathlib/NumberTheory/AbelSummation.lean
tendsto_sum_mul_atTop_nhds_one_sub_integral
null
tendsto_sum_mul_atTop_nhds_one_sub_integral₀ (hc : c 0 = 0) (hf_diff : ∀ t ∈ Set.Ici 1, DifferentiableAt ℝ f t) (hf_int : LocallyIntegrableOn (deriv f) (Set.Ici 1)) {l : 𝕜} (h_lim : Tendsto (fun n : ℕ ↦ f n * ∑ k ∈ Icc 0 n, c k) atTop (𝓝 l)) {g : ℝ → ℝ} (hg_dom : (fun t ↦ deriv f t * ∑ k ∈ Icc 0 ⌊t⌋₊,...
theorem
NumberTheory
[ "Mathlib.MeasureTheory.Function.Floor", "Mathlib.MeasureTheory.Integral.Asymptotics", "Mathlib.MeasureTheory.Integral.IntegralEqImproper", "Mathlib.Topology.Order.IsLocallyClosed" ]
Mathlib/NumberTheory/AbelSummation.lean
tendsto_sum_mul_atTop_nhds_one_sub_integral₀
null
private summable_mul_of_bigO_atTop_aux (m : ℕ) (h_bdd : (fun n : ℕ ↦ ‖f n‖ * ∑ k ∈ Icc 0 n, ‖c k‖) =O[atTop] fun _ ↦ (1 : ℝ)) (hf_int : LocallyIntegrableOn (deriv (fun t ↦ ‖f t‖)) (Set.Ici (m : ℝ))) (hf : ∀ n : ℕ, ∑ k ∈ Icc 0 n, ‖f k‖ * ‖c k‖ = ‖f n‖ * ∑ k ∈ Icc 0 n, ‖c k‖ - ∫ (t : ℝ) in Set.I...
theorem
NumberTheory
[ "Mathlib.MeasureTheory.Function.Floor", "Mathlib.MeasureTheory.Integral.Asymptotics", "Mathlib.MeasureTheory.Integral.IntegralEqImproper", "Mathlib.Topology.Order.IsLocallyClosed" ]
Mathlib/NumberTheory/AbelSummation.lean
summable_mul_of_bigO_atTop_aux
null
summable_mul_of_bigO_atTop (hf_diff : ∀ t ∈ Set.Ici 0, DifferentiableAt ℝ (fun x ↦ ‖f x‖) t) (hf_int : LocallyIntegrableOn (deriv (fun t ↦ ‖f t‖)) (Set.Ici 0)) (h_bdd : (fun n : ℕ ↦ ‖f n‖ * ∑ k ∈ Icc 0 n, ‖c k‖) =O[atTop] fun _ ↦ (1 : ℝ)) {g : ℝ → ℝ} (hg₁ : (fun t ↦ deriv (fun t ↦ ‖f t‖) t * ∑ k ∈ Icc 0...
theorem
NumberTheory
[ "Mathlib.MeasureTheory.Function.Floor", "Mathlib.MeasureTheory.Integral.Asymptotics", "Mathlib.MeasureTheory.Integral.IntegralEqImproper", "Mathlib.Topology.Order.IsLocallyClosed" ]
Mathlib/NumberTheory/AbelSummation.lean
summable_mul_of_bigO_atTop
null
summable_mul_of_bigO_atTop' (hf_diff : ∀ t ∈ Set.Ici 1, DifferentiableAt ℝ (fun x ↦ ‖f x‖) t) (hf_int : LocallyIntegrableOn (deriv (fun t ↦ ‖f t‖)) (Set.Ici 1)) (h_bdd : (fun n : ℕ ↦ ‖f n‖ * ∑ k ∈ Icc 1 n, ‖c k‖) =O[atTop] fun _ ↦ (1 : ℝ)) {g : ℝ → ℝ} (hg₁ : (fun t ↦ deriv (fun t ↦ ‖f t‖) t * ∑ k ∈ Icc ...
theorem
NumberTheory
[ "Mathlib.MeasureTheory.Function.Floor", "Mathlib.MeasureTheory.Integral.Asymptotics", "Mathlib.MeasureTheory.Integral.IntegralEqImproper", "Mathlib.Topology.Order.IsLocallyClosed" ]
Mathlib/NumberTheory/AbelSummation.lean
summable_mul_of_bigO_atTop'
A version of `summable_mul_of_bigO_atTop` that can be useful to avoid difficulties near zero.
A' (q r : ℕ+) : Multiset ℕ+ := {1, q, r}
def
NumberTheory
[ "Mathlib.Algebra.Order.Ring.Rat", "Mathlib.Data.Multiset.Sort", "Mathlib.Data.PNat.Basic", "Mathlib.Data.PNat.Interval", "Mathlib.Tactic.NormNum", "Mathlib.Tactic.IntervalCases" ]
Mathlib/NumberTheory/ADEInequality.lean
A'
`A' q r := {1,q,r}` is a `Multiset ℕ+` that is a solution to the inequality `(p⁻¹ + q⁻¹ + r⁻¹ : ℚ) > 1`.
A (r : ℕ+) : Multiset ℕ+ := A' 1 r
def
NumberTheory
[ "Mathlib.Algebra.Order.Ring.Rat", "Mathlib.Data.Multiset.Sort", "Mathlib.Data.PNat.Basic", "Mathlib.Data.PNat.Interval", "Mathlib.Tactic.NormNum", "Mathlib.Tactic.IntervalCases" ]
Mathlib/NumberTheory/ADEInequality.lean
A
`A r := {1,1,r}` is a `Multiset ℕ+` that is a solution to the inequality `(p⁻¹ + q⁻¹ + r⁻¹ : ℚ) > 1`. These solutions are related to the Dynkin diagrams $A_r$.
D' (r : ℕ+) : Multiset ℕ+ := {2, 2, r}
def
NumberTheory
[ "Mathlib.Algebra.Order.Ring.Rat", "Mathlib.Data.Multiset.Sort", "Mathlib.Data.PNat.Basic", "Mathlib.Data.PNat.Interval", "Mathlib.Tactic.NormNum", "Mathlib.Tactic.IntervalCases" ]
Mathlib/NumberTheory/ADEInequality.lean
D'
`D' r := {2,2,r}` is a `Multiset ℕ+` that is a solution to the inequality `(p⁻¹ + q⁻¹ + r⁻¹ : ℚ) > 1`. These solutions are related to the Dynkin diagrams $D_{r+2}$.
E' (r : ℕ+) : Multiset ℕ+ := {2, 3, r}
def
NumberTheory
[ "Mathlib.Algebra.Order.Ring.Rat", "Mathlib.Data.Multiset.Sort", "Mathlib.Data.PNat.Basic", "Mathlib.Data.PNat.Interval", "Mathlib.Tactic.NormNum", "Mathlib.Tactic.IntervalCases" ]
Mathlib/NumberTheory/ADEInequality.lean
E'
`E' r := {2,3,r}` is a `Multiset ℕ+`. For `r ∈ {3,4,5}` is a solution to the inequality `(p⁻¹ + q⁻¹ + r⁻¹ : ℚ) > 1`. These solutions are related to the Dynkin diagrams $E_{r+3}$.
E6 : Multiset ℕ+ := E' 3
def
NumberTheory
[ "Mathlib.Algebra.Order.Ring.Rat", "Mathlib.Data.Multiset.Sort", "Mathlib.Data.PNat.Basic", "Mathlib.Data.PNat.Interval", "Mathlib.Tactic.NormNum", "Mathlib.Tactic.IntervalCases" ]
Mathlib/NumberTheory/ADEInequality.lean
E6
`E6 := {2,3,3}` is a `Multiset ℕ+` that is a solution to the inequality `(p⁻¹ + q⁻¹ + r⁻¹ : ℚ) > 1`. This solution is related to the Dynkin diagrams $E_6$.
E7 : Multiset ℕ+ := E' 4
def
NumberTheory
[ "Mathlib.Algebra.Order.Ring.Rat", "Mathlib.Data.Multiset.Sort", "Mathlib.Data.PNat.Basic", "Mathlib.Data.PNat.Interval", "Mathlib.Tactic.NormNum", "Mathlib.Tactic.IntervalCases" ]
Mathlib/NumberTheory/ADEInequality.lean
E7
`E7 := {2,3,4}` is a `Multiset ℕ+` that is a solution to the inequality `(p⁻¹ + q⁻¹ + r⁻¹ : ℚ) > 1`. This solution is related to the Dynkin diagrams $E_7$.
E8 : Multiset ℕ+ := E' 5
def
NumberTheory
[ "Mathlib.Algebra.Order.Ring.Rat", "Mathlib.Data.Multiset.Sort", "Mathlib.Data.PNat.Basic", "Mathlib.Data.PNat.Interval", "Mathlib.Tactic.NormNum", "Mathlib.Tactic.IntervalCases" ]
Mathlib/NumberTheory/ADEInequality.lean
E8
`E8 := {2,3,5}` is a `Multiset ℕ+` that is a solution to the inequality `(p⁻¹ + q⁻¹ + r⁻¹ : ℚ) > 1`. This solution is related to the Dynkin diagrams $E_8$.
sumInv (pqr : Multiset ℕ+) : ℚ := Multiset.sum (pqr.map fun (x : ℕ+) => x⁻¹)
def
NumberTheory
[ "Mathlib.Algebra.Order.Ring.Rat", "Mathlib.Data.Multiset.Sort", "Mathlib.Data.PNat.Basic", "Mathlib.Data.PNat.Interval", "Mathlib.Tactic.NormNum", "Mathlib.Tactic.IntervalCases" ]
Mathlib/NumberTheory/ADEInequality.lean
sumInv
`sum_inv pqr` for a `pqr : Multiset ℕ+` is the sum of the inverses of the elements of `pqr`, as rational number. The intended argument is a multiset `{p,q,r}` of cardinality `3`.
sumInv_pqr (p q r : ℕ+) : sumInv {p, q, r} = (p : ℚ)⁻¹ + (q : ℚ)⁻¹ + (r : ℚ)⁻¹ := by simp only [sumInv, insert_eq_cons, add_assoc, map_cons, sum_cons, map_singleton, sum_singleton]
theorem
NumberTheory
[ "Mathlib.Algebra.Order.Ring.Rat", "Mathlib.Data.Multiset.Sort", "Mathlib.Data.PNat.Basic", "Mathlib.Data.PNat.Interval", "Mathlib.Tactic.NormNum", "Mathlib.Tactic.IntervalCases" ]
Mathlib/NumberTheory/ADEInequality.lean
sumInv_pqr
null
Admissible (pqr : Multiset ℕ+) : Prop := (∃ q r, A' q r = pqr) ∨ (∃ r, D' r = pqr) ∨ E' 3 = pqr ∨ E' 4 = pqr ∨ E' 5 = pqr
def
NumberTheory
[ "Mathlib.Algebra.Order.Ring.Rat", "Mathlib.Data.Multiset.Sort", "Mathlib.Data.PNat.Basic", "Mathlib.Data.PNat.Interval", "Mathlib.Tactic.NormNum", "Mathlib.Tactic.IntervalCases" ]
Mathlib/NumberTheory/ADEInequality.lean
Admissible
A multiset `pqr` of positive natural numbers is `admissible` if it is equal to `A' q r`, or `D' r`, or one of `E6`, `E7`, or `E8`.
admissible_A' (q r : ℕ+) : Admissible (A' q r) := Or.inl ⟨q, r, rfl⟩
theorem
NumberTheory
[ "Mathlib.Algebra.Order.Ring.Rat", "Mathlib.Data.Multiset.Sort", "Mathlib.Data.PNat.Basic", "Mathlib.Data.PNat.Interval", "Mathlib.Tactic.NormNum", "Mathlib.Tactic.IntervalCases" ]
Mathlib/NumberTheory/ADEInequality.lean
admissible_A'
null
admissible_D' (n : ℕ+) : Admissible (D' n) := Or.inr <| Or.inl ⟨n, rfl⟩
theorem
NumberTheory
[ "Mathlib.Algebra.Order.Ring.Rat", "Mathlib.Data.Multiset.Sort", "Mathlib.Data.PNat.Basic", "Mathlib.Data.PNat.Interval", "Mathlib.Tactic.NormNum", "Mathlib.Tactic.IntervalCases" ]
Mathlib/NumberTheory/ADEInequality.lean
admissible_D'
null
admissible_E'3 : Admissible (E' 3) := Or.inr <| Or.inr <| Or.inl rfl
theorem
NumberTheory
[ "Mathlib.Algebra.Order.Ring.Rat", "Mathlib.Data.Multiset.Sort", "Mathlib.Data.PNat.Basic", "Mathlib.Data.PNat.Interval", "Mathlib.Tactic.NormNum", "Mathlib.Tactic.IntervalCases" ]
Mathlib/NumberTheory/ADEInequality.lean
admissible_E'3
null
admissible_E'4 : Admissible (E' 4) := Or.inr <| Or.inr <| Or.inr <| Or.inl rfl
theorem
NumberTheory
[ "Mathlib.Algebra.Order.Ring.Rat", "Mathlib.Data.Multiset.Sort", "Mathlib.Data.PNat.Basic", "Mathlib.Data.PNat.Interval", "Mathlib.Tactic.NormNum", "Mathlib.Tactic.IntervalCases" ]
Mathlib/NumberTheory/ADEInequality.lean
admissible_E'4
null
admissible_E'5 : Admissible (E' 5) := Or.inr <| Or.inr <| Or.inr <| Or.inr rfl
theorem
NumberTheory
[ "Mathlib.Algebra.Order.Ring.Rat", "Mathlib.Data.Multiset.Sort", "Mathlib.Data.PNat.Basic", "Mathlib.Data.PNat.Interval", "Mathlib.Tactic.NormNum", "Mathlib.Tactic.IntervalCases" ]
Mathlib/NumberTheory/ADEInequality.lean
admissible_E'5
null
admissible_E6 : Admissible E6 := admissible_E'3
theorem
NumberTheory
[ "Mathlib.Algebra.Order.Ring.Rat", "Mathlib.Data.Multiset.Sort", "Mathlib.Data.PNat.Basic", "Mathlib.Data.PNat.Interval", "Mathlib.Tactic.NormNum", "Mathlib.Tactic.IntervalCases" ]
Mathlib/NumberTheory/ADEInequality.lean
admissible_E6
null
admissible_E7 : Admissible E7 := admissible_E'4
theorem
NumberTheory
[ "Mathlib.Algebra.Order.Ring.Rat", "Mathlib.Data.Multiset.Sort", "Mathlib.Data.PNat.Basic", "Mathlib.Data.PNat.Interval", "Mathlib.Tactic.NormNum", "Mathlib.Tactic.IntervalCases" ]
Mathlib/NumberTheory/ADEInequality.lean
admissible_E7
null
admissible_E8 : Admissible E8 := admissible_E'5
theorem
NumberTheory
[ "Mathlib.Algebra.Order.Ring.Rat", "Mathlib.Data.Multiset.Sort", "Mathlib.Data.PNat.Basic", "Mathlib.Data.PNat.Interval", "Mathlib.Tactic.NormNum", "Mathlib.Tactic.IntervalCases" ]
Mathlib/NumberTheory/ADEInequality.lean
admissible_E8
null
Admissible.one_lt_sumInv {pqr : Multiset ℕ+} : Admissible pqr → 1 < sumInv pqr := by rw [Admissible] rintro (⟨p', q', H⟩ | ⟨n, H⟩ | H | H | H) · rw [← H, A', sumInv_pqr, add_assoc] simp only [lt_add_iff_pos_right, PNat.one_coe, inv_one, Nat.cast_one] apply add_pos <;> simp only [PNat.pos, Nat.cast_pos, in...
theorem
NumberTheory
[ "Mathlib.Algebra.Order.Ring.Rat", "Mathlib.Data.Multiset.Sort", "Mathlib.Data.PNat.Basic", "Mathlib.Data.PNat.Interval", "Mathlib.Tactic.NormNum", "Mathlib.Tactic.IntervalCases" ]
Mathlib/NumberTheory/ADEInequality.lean
Admissible.one_lt_sumInv
null
lt_three {p q r : ℕ+} (hpq : p ≤ q) (hqr : q ≤ r) (H : 1 < sumInv {p, q, r}) : p < 3 := by have h3 : (0 : ℚ) < 3 := by simp contrapose! H rw [sumInv_pqr] have h3q := H.trans hpq have h3r := h3q.trans hqr have hp : (p : ℚ)⁻¹ ≤ 3⁻¹ := by rw [inv_le_inv₀ _ h3] · assumption_mod_cast · simp have hq...
theorem
NumberTheory
[ "Mathlib.Algebra.Order.Ring.Rat", "Mathlib.Data.Multiset.Sort", "Mathlib.Data.PNat.Basic", "Mathlib.Data.PNat.Interval", "Mathlib.Tactic.NormNum", "Mathlib.Tactic.IntervalCases" ]
Mathlib/NumberTheory/ADEInequality.lean
lt_three
null
lt_four {q r : ℕ+} (hqr : q ≤ r) (H : 1 < sumInv {2, q, r}) : q < 4 := by have h4 : (0 : ℚ) < 4 := by simp contrapose! H rw [sumInv_pqr] have h4r := H.trans hqr have hq : (q : ℚ)⁻¹ ≤ 4⁻¹ := by rw [inv_le_inv₀ _ h4] · assumption_mod_cast · simp have hr : (r : ℚ)⁻¹ ≤ 4⁻¹ := by rw [inv_le_inv₀ ...
theorem
NumberTheory
[ "Mathlib.Algebra.Order.Ring.Rat", "Mathlib.Data.Multiset.Sort", "Mathlib.Data.PNat.Basic", "Mathlib.Data.PNat.Interval", "Mathlib.Tactic.NormNum", "Mathlib.Tactic.IntervalCases" ]
Mathlib/NumberTheory/ADEInequality.lean
lt_four
null
lt_six {r : ℕ+} (H : 1 < sumInv {2, 3, r}) : r < 6 := by have h6 : (0 : ℚ) < 6 := by simp contrapose! H rw [sumInv_pqr] have hr : (r : ℚ)⁻¹ ≤ 6⁻¹ := by rw [inv_le_inv₀ _ h6] · assumption_mod_cast · simp calc (2⁻¹ + 3⁻¹ + (r : ℚ)⁻¹ : ℚ) ≤ 2⁻¹ + 3⁻¹ + 6⁻¹ := add_le_add (add_le_add le_rfl le_rfl)...
theorem
NumberTheory
[ "Mathlib.Algebra.Order.Ring.Rat", "Mathlib.Data.Multiset.Sort", "Mathlib.Data.PNat.Basic", "Mathlib.Data.PNat.Interval", "Mathlib.Tactic.NormNum", "Mathlib.Tactic.IntervalCases" ]
Mathlib/NumberTheory/ADEInequality.lean
lt_six
null
admissible_of_one_lt_sumInv_aux' {p q r : ℕ+} (hpq : p ≤ q) (hqr : q ≤ r) (H : 1 < sumInv {p, q, r}) : Admissible {p, q, r} := by have hp3 : p < 3 := lt_three hpq hqr H replace hp3 := Finset.mem_Iio.mpr hp3 conv at hp3 => change p ∈ ({1, 2} : Multiset ℕ+) fin_cases hp3 · exact admissible_A' q r have hq4...
theorem
NumberTheory
[ "Mathlib.Algebra.Order.Ring.Rat", "Mathlib.Data.Multiset.Sort", "Mathlib.Data.PNat.Basic", "Mathlib.Data.PNat.Interval", "Mathlib.Tactic.NormNum", "Mathlib.Tactic.IntervalCases" ]
Mathlib/NumberTheory/ADEInequality.lean
admissible_of_one_lt_sumInv_aux'
null
admissible_of_one_lt_sumInv_aux : ∀ {pqr : List ℕ+} (_ : pqr.Sorted (· ≤ ·)) (_ : pqr.length = 3) (_ : 1 < sumInv pqr), Admissible pqr | [p, q, r], hs, _, H => by obtain ⟨⟨hpq, -⟩, hqr⟩ : (p ≤ q ∧ p ≤ r) ∧ q ≤ r := by simpa using hs exact admissible_of_one_lt_sumInv_aux' hpq hqr H
theorem
NumberTheory
[ "Mathlib.Algebra.Order.Ring.Rat", "Mathlib.Data.Multiset.Sort", "Mathlib.Data.PNat.Basic", "Mathlib.Data.PNat.Interval", "Mathlib.Tactic.NormNum", "Mathlib.Tactic.IntervalCases" ]
Mathlib/NumberTheory/ADEInequality.lean
admissible_of_one_lt_sumInv_aux
null
admissible_of_one_lt_sumInv {p q r : ℕ+} (H : 1 < sumInv {p, q, r}) : Admissible {p, q, r} := by simp only [Admissible] let S := sort ((· ≤ ·) : ℕ+ → ℕ+ → Prop) {p, q, r} have hS : S.Sorted (· ≤ ·) := sort_sorted _ _ have hpqr : ({p, q, r} : Multiset ℕ+) = S := (sort_eq LE.le {p, q, r}).symm rw [hpqr] r...
theorem
NumberTheory
[ "Mathlib.Algebra.Order.Ring.Rat", "Mathlib.Data.Multiset.Sort", "Mathlib.Data.PNat.Basic", "Mathlib.Data.PNat.Interval", "Mathlib.Tactic.NormNum", "Mathlib.Tactic.IntervalCases" ]
Mathlib/NumberTheory/ADEInequality.lean
admissible_of_one_lt_sumInv
null
classification (p q r : ℕ+) : 1 < sumInv {p, q, r} ↔ Admissible {p, q, r} := ⟨admissible_of_one_lt_sumInv, Admissible.one_lt_sumInv⟩
theorem
NumberTheory
[ "Mathlib.Algebra.Order.Ring.Rat", "Mathlib.Data.Multiset.Sort", "Mathlib.Data.PNat.Basic", "Mathlib.Data.PNat.Interval", "Mathlib.Tactic.NormNum", "Mathlib.Tactic.IntervalCases" ]
Mathlib/NumberTheory/ADEInequality.lean
classification
A multiset `{p,q,r}` of positive natural numbers is a solution to `(p⁻¹ + q⁻¹ + r⁻¹ : ℚ) > 1` if and only if it is `admissible` which means it is one of: * `A' q r := {1,q,r}` * `D' r := {2,2,r}` * `E6 := {2,3,3}`, or `E7 := {2,3,4}`, or `E8 := {2,3,5}`
ArithmeticFunction [Zero R] := ZeroHom ℕ R
def
NumberTheory
[ "Mathlib.Algebra.BigOperators.Ring.Finset", "Mathlib.Algebra.Module.BigOperators", "Mathlib.NumberTheory.Divisors", "Mathlib.Data.Nat.Squarefree", "Mathlib.Data.Nat.GCD.BigOperators", "Mathlib.Data.Nat.Factorization.Induction", "Mathlib.Tactic.ArithMult" ]
Mathlib/NumberTheory/ArithmeticFunction.lean
ArithmeticFunction
An arithmetic function is a function from `ℕ` that maps 0 to 0. In the literature, they are often instead defined as functions from `ℕ+`. Multiplication on `ArithmeticFunctions` is by Dirichlet convolution.
ArithmeticFunction.zero [Zero R] : Zero (ArithmeticFunction R) := inferInstanceAs (Zero (ZeroHom ℕ R))
instance
NumberTheory
[ "Mathlib.Algebra.BigOperators.Ring.Finset", "Mathlib.Algebra.Module.BigOperators", "Mathlib.NumberTheory.Divisors", "Mathlib.Data.Nat.Squarefree", "Mathlib.Data.Nat.GCD.BigOperators", "Mathlib.Data.Nat.Factorization.Induction", "Mathlib.Tactic.ArithMult" ]
Mathlib/NumberTheory/ArithmeticFunction.lean
ArithmeticFunction.zero
null
@[simp] toFun_eq (f : ArithmeticFunction R) : f.toFun = f := rfl @[simp]
theorem
NumberTheory
[ "Mathlib.Algebra.BigOperators.Ring.Finset", "Mathlib.Algebra.Module.BigOperators", "Mathlib.NumberTheory.Divisors", "Mathlib.Data.Nat.Squarefree", "Mathlib.Data.Nat.GCD.BigOperators", "Mathlib.Data.Nat.Factorization.Induction", "Mathlib.Tactic.ArithMult" ]
Mathlib/NumberTheory/ArithmeticFunction.lean
toFun_eq
null
coe_mk (f : ℕ → R) (hf) : @DFunLike.coe (ArithmeticFunction R) _ _ _ (ZeroHom.mk f hf) = f := rfl @[simp]
theorem
NumberTheory
[ "Mathlib.Algebra.BigOperators.Ring.Finset", "Mathlib.Algebra.Module.BigOperators", "Mathlib.NumberTheory.Divisors", "Mathlib.Data.Nat.Squarefree", "Mathlib.Data.Nat.GCD.BigOperators", "Mathlib.Data.Nat.Factorization.Induction", "Mathlib.Tactic.ArithMult" ]
Mathlib/NumberTheory/ArithmeticFunction.lean
coe_mk
null
map_zero {f : ArithmeticFunction R} : f 0 = 0 := ZeroHom.map_zero' f
theorem
NumberTheory
[ "Mathlib.Algebra.BigOperators.Ring.Finset", "Mathlib.Algebra.Module.BigOperators", "Mathlib.NumberTheory.Divisors", "Mathlib.Data.Nat.Squarefree", "Mathlib.Data.Nat.GCD.BigOperators", "Mathlib.Data.Nat.Factorization.Induction", "Mathlib.Tactic.ArithMult" ]
Mathlib/NumberTheory/ArithmeticFunction.lean
map_zero
null
coe_inj {f g : ArithmeticFunction R} : (f : ℕ → R) = g ↔ f = g := DFunLike.coe_fn_eq @[simp]
theorem
NumberTheory
[ "Mathlib.Algebra.BigOperators.Ring.Finset", "Mathlib.Algebra.Module.BigOperators", "Mathlib.NumberTheory.Divisors", "Mathlib.Data.Nat.Squarefree", "Mathlib.Data.Nat.GCD.BigOperators", "Mathlib.Data.Nat.Factorization.Induction", "Mathlib.Tactic.ArithMult" ]
Mathlib/NumberTheory/ArithmeticFunction.lean
coe_inj
null
zero_apply {x : ℕ} : (0 : ArithmeticFunction R) x = 0 := rfl @[ext]
theorem
NumberTheory
[ "Mathlib.Algebra.BigOperators.Ring.Finset", "Mathlib.Algebra.Module.BigOperators", "Mathlib.NumberTheory.Divisors", "Mathlib.Data.Nat.Squarefree", "Mathlib.Data.Nat.GCD.BigOperators", "Mathlib.Data.Nat.Factorization.Induction", "Mathlib.Tactic.ArithMult" ]
Mathlib/NumberTheory/ArithmeticFunction.lean
zero_apply
null
ext ⦃f g : ArithmeticFunction R⦄ (h : ∀ x, f x = g x) : f = g := ZeroHom.ext h
theorem
NumberTheory
[ "Mathlib.Algebra.BigOperators.Ring.Finset", "Mathlib.Algebra.Module.BigOperators", "Mathlib.NumberTheory.Divisors", "Mathlib.Data.Nat.Squarefree", "Mathlib.Data.Nat.GCD.BigOperators", "Mathlib.Data.Nat.Factorization.Induction", "Mathlib.Tactic.ArithMult" ]
Mathlib/NumberTheory/ArithmeticFunction.lean
ext
null
one : One (ArithmeticFunction R) := ⟨⟨fun x => ite (x = 1) 1 0, rfl⟩⟩
instance
NumberTheory
[ "Mathlib.Algebra.BigOperators.Ring.Finset", "Mathlib.Algebra.Module.BigOperators", "Mathlib.NumberTheory.Divisors", "Mathlib.Data.Nat.Squarefree", "Mathlib.Data.Nat.GCD.BigOperators", "Mathlib.Data.Nat.Factorization.Induction", "Mathlib.Tactic.ArithMult" ]
Mathlib/NumberTheory/ArithmeticFunction.lean
one
null
one_apply {x : ℕ} : (1 : ArithmeticFunction R) x = ite (x = 1) 1 0 := rfl @[simp]
theorem
NumberTheory
[ "Mathlib.Algebra.BigOperators.Ring.Finset", "Mathlib.Algebra.Module.BigOperators", "Mathlib.NumberTheory.Divisors", "Mathlib.Data.Nat.Squarefree", "Mathlib.Data.Nat.GCD.BigOperators", "Mathlib.Data.Nat.Factorization.Induction", "Mathlib.Tactic.ArithMult" ]
Mathlib/NumberTheory/ArithmeticFunction.lean
one_apply
null
one_one : (1 : ArithmeticFunction R) 1 = 1 := rfl @[simp]
theorem
NumberTheory
[ "Mathlib.Algebra.BigOperators.Ring.Finset", "Mathlib.Algebra.Module.BigOperators", "Mathlib.NumberTheory.Divisors", "Mathlib.Data.Nat.Squarefree", "Mathlib.Data.Nat.GCD.BigOperators", "Mathlib.Data.Nat.Factorization.Induction", "Mathlib.Tactic.ArithMult" ]
Mathlib/NumberTheory/ArithmeticFunction.lean
one_one
null
one_apply_ne {x : ℕ} (h : x ≠ 1) : (1 : ArithmeticFunction R) x = 0 := if_neg h
theorem
NumberTheory
[ "Mathlib.Algebra.BigOperators.Ring.Finset", "Mathlib.Algebra.Module.BigOperators", "Mathlib.NumberTheory.Divisors", "Mathlib.Data.Nat.Squarefree", "Mathlib.Data.Nat.GCD.BigOperators", "Mathlib.Data.Nat.Factorization.Induction", "Mathlib.Tactic.ArithMult" ]
Mathlib/NumberTheory/ArithmeticFunction.lean
one_apply_ne
null
@[coe] natToArithmeticFunction [AddMonoidWithOne R] : (ArithmeticFunction ℕ) → (ArithmeticFunction R) := fun f => ⟨fun n => ↑(f n), by simp⟩
def
NumberTheory
[ "Mathlib.Algebra.BigOperators.Ring.Finset", "Mathlib.Algebra.Module.BigOperators", "Mathlib.NumberTheory.Divisors", "Mathlib.Data.Nat.Squarefree", "Mathlib.Data.Nat.GCD.BigOperators", "Mathlib.Data.Nat.Factorization.Induction", "Mathlib.Tactic.ArithMult" ]
Mathlib/NumberTheory/ArithmeticFunction.lean
natToArithmeticFunction
Coerce an arithmetic function with values in `ℕ` to one with values in `R`. We cannot inline this in `natCoe` because it gets unfolded too much.
natCoe [AddMonoidWithOne R] : Coe (ArithmeticFunction ℕ) (ArithmeticFunction R) := ⟨natToArithmeticFunction⟩ @[simp]
instance
NumberTheory
[ "Mathlib.Algebra.BigOperators.Ring.Finset", "Mathlib.Algebra.Module.BigOperators", "Mathlib.NumberTheory.Divisors", "Mathlib.Data.Nat.Squarefree", "Mathlib.Data.Nat.GCD.BigOperators", "Mathlib.Data.Nat.Factorization.Induction", "Mathlib.Tactic.ArithMult" ]
Mathlib/NumberTheory/ArithmeticFunction.lean
natCoe
null
natCoe_nat (f : ArithmeticFunction ℕ) : natToArithmeticFunction f = f := ext fun _ => cast_id _ @[simp]
theorem
NumberTheory
[ "Mathlib.Algebra.BigOperators.Ring.Finset", "Mathlib.Algebra.Module.BigOperators", "Mathlib.NumberTheory.Divisors", "Mathlib.Data.Nat.Squarefree", "Mathlib.Data.Nat.GCD.BigOperators", "Mathlib.Data.Nat.Factorization.Induction", "Mathlib.Tactic.ArithMult" ]
Mathlib/NumberTheory/ArithmeticFunction.lean
natCoe_nat
null
natCoe_apply [AddMonoidWithOne R] {f : ArithmeticFunction ℕ} {x : ℕ} : (f : ArithmeticFunction R) x = f x := rfl
theorem
NumberTheory
[ "Mathlib.Algebra.BigOperators.Ring.Finset", "Mathlib.Algebra.Module.BigOperators", "Mathlib.NumberTheory.Divisors", "Mathlib.Data.Nat.Squarefree", "Mathlib.Data.Nat.GCD.BigOperators", "Mathlib.Data.Nat.Factorization.Induction", "Mathlib.Tactic.ArithMult" ]
Mathlib/NumberTheory/ArithmeticFunction.lean
natCoe_apply
null
@[coe] ofInt [AddGroupWithOne R] : (ArithmeticFunction ℤ) → (ArithmeticFunction R) := fun f => ⟨fun n => ↑(f n), by simp⟩
def
NumberTheory
[ "Mathlib.Algebra.BigOperators.Ring.Finset", "Mathlib.Algebra.Module.BigOperators", "Mathlib.NumberTheory.Divisors", "Mathlib.Data.Nat.Squarefree", "Mathlib.Data.Nat.GCD.BigOperators", "Mathlib.Data.Nat.Factorization.Induction", "Mathlib.Tactic.ArithMult" ]
Mathlib/NumberTheory/ArithmeticFunction.lean
ofInt
Coerce an arithmetic function with values in `ℤ` to one with values in `R`. We cannot inline this in `intCoe` because it gets unfolded too much.
intCoe [AddGroupWithOne R] : Coe (ArithmeticFunction ℤ) (ArithmeticFunction R) := ⟨ofInt⟩ @[simp]
instance
NumberTheory
[ "Mathlib.Algebra.BigOperators.Ring.Finset", "Mathlib.Algebra.Module.BigOperators", "Mathlib.NumberTheory.Divisors", "Mathlib.Data.Nat.Squarefree", "Mathlib.Data.Nat.GCD.BigOperators", "Mathlib.Data.Nat.Factorization.Induction", "Mathlib.Tactic.ArithMult" ]
Mathlib/NumberTheory/ArithmeticFunction.lean
intCoe
null
intCoe_int (f : ArithmeticFunction ℤ) : ofInt f = f := ext fun _ => Int.cast_id @[simp]
theorem
NumberTheory
[ "Mathlib.Algebra.BigOperators.Ring.Finset", "Mathlib.Algebra.Module.BigOperators", "Mathlib.NumberTheory.Divisors", "Mathlib.Data.Nat.Squarefree", "Mathlib.Data.Nat.GCD.BigOperators", "Mathlib.Data.Nat.Factorization.Induction", "Mathlib.Tactic.ArithMult" ]
Mathlib/NumberTheory/ArithmeticFunction.lean
intCoe_int
null
intCoe_apply [AddGroupWithOne R] {f : ArithmeticFunction ℤ} {x : ℕ} : (f : ArithmeticFunction R) x = f x := rfl @[simp]
theorem
NumberTheory
[ "Mathlib.Algebra.BigOperators.Ring.Finset", "Mathlib.Algebra.Module.BigOperators", "Mathlib.NumberTheory.Divisors", "Mathlib.Data.Nat.Squarefree", "Mathlib.Data.Nat.GCD.BigOperators", "Mathlib.Data.Nat.Factorization.Induction", "Mathlib.Tactic.ArithMult" ]
Mathlib/NumberTheory/ArithmeticFunction.lean
intCoe_apply
null
coe_coe [AddGroupWithOne R] {f : ArithmeticFunction ℕ} : ((f : ArithmeticFunction ℤ) : ArithmeticFunction R) = (f : ArithmeticFunction R) := by ext simp @[simp]
theorem
NumberTheory
[ "Mathlib.Algebra.BigOperators.Ring.Finset", "Mathlib.Algebra.Module.BigOperators", "Mathlib.NumberTheory.Divisors", "Mathlib.Data.Nat.Squarefree", "Mathlib.Data.Nat.GCD.BigOperators", "Mathlib.Data.Nat.Factorization.Induction", "Mathlib.Tactic.ArithMult" ]
Mathlib/NumberTheory/ArithmeticFunction.lean
coe_coe
null
natCoe_one [AddMonoidWithOne R] : ((1 : ArithmeticFunction ℕ) : ArithmeticFunction R) = 1 := by ext n simp [one_apply] @[simp]
theorem
NumberTheory
[ "Mathlib.Algebra.BigOperators.Ring.Finset", "Mathlib.Algebra.Module.BigOperators", "Mathlib.NumberTheory.Divisors", "Mathlib.Data.Nat.Squarefree", "Mathlib.Data.Nat.GCD.BigOperators", "Mathlib.Data.Nat.Factorization.Induction", "Mathlib.Tactic.ArithMult" ]
Mathlib/NumberTheory/ArithmeticFunction.lean
natCoe_one
null
intCoe_one [AddGroupWithOne R] : ((1 : ArithmeticFunction ℤ) : ArithmeticFunction R) = 1 := by ext n simp [one_apply]
theorem
NumberTheory
[ "Mathlib.Algebra.BigOperators.Ring.Finset", "Mathlib.Algebra.Module.BigOperators", "Mathlib.NumberTheory.Divisors", "Mathlib.Data.Nat.Squarefree", "Mathlib.Data.Nat.GCD.BigOperators", "Mathlib.Data.Nat.Factorization.Induction", "Mathlib.Tactic.ArithMult" ]
Mathlib/NumberTheory/ArithmeticFunction.lean
intCoe_one
null
add : Add (ArithmeticFunction R) := ⟨fun f g => ⟨fun n => f n + g n, by simp⟩⟩ @[simp]
instance
NumberTheory
[ "Mathlib.Algebra.BigOperators.Ring.Finset", "Mathlib.Algebra.Module.BigOperators", "Mathlib.NumberTheory.Divisors", "Mathlib.Data.Nat.Squarefree", "Mathlib.Data.Nat.GCD.BigOperators", "Mathlib.Data.Nat.Factorization.Induction", "Mathlib.Tactic.ArithMult" ]
Mathlib/NumberTheory/ArithmeticFunction.lean
add
null
add_apply {f g : ArithmeticFunction R} {n : ℕ} : (f + g) n = f n + g n := rfl
theorem
NumberTheory
[ "Mathlib.Algebra.BigOperators.Ring.Finset", "Mathlib.Algebra.Module.BigOperators", "Mathlib.NumberTheory.Divisors", "Mathlib.Data.Nat.Squarefree", "Mathlib.Data.Nat.GCD.BigOperators", "Mathlib.Data.Nat.Factorization.Induction", "Mathlib.Tactic.ArithMult" ]
Mathlib/NumberTheory/ArithmeticFunction.lean
add_apply
null
instAddMonoid : AddMonoid (ArithmeticFunction R) := { ArithmeticFunction.zero R, ArithmeticFunction.add with add_assoc := fun _ _ _ => ext fun _ => add_assoc _ _ _ zero_add := fun _ => ext fun _ => zero_add _ add_zero := fun _ => ext fun _ => add_zero _ nsmul := nsmulRec }
instance
NumberTheory
[ "Mathlib.Algebra.BigOperators.Ring.Finset", "Mathlib.Algebra.Module.BigOperators", "Mathlib.NumberTheory.Divisors", "Mathlib.Data.Nat.Squarefree", "Mathlib.Data.Nat.GCD.BigOperators", "Mathlib.Data.Nat.Factorization.Induction", "Mathlib.Tactic.ArithMult" ]
Mathlib/NumberTheory/ArithmeticFunction.lean
instAddMonoid
null
instAddMonoidWithOne [AddMonoidWithOne R] : AddMonoidWithOne (ArithmeticFunction R) := { ArithmeticFunction.instAddMonoid, ArithmeticFunction.one with natCast := fun n => ⟨fun x => if x = 1 then (n : R) else 0, by simp⟩ natCast_zero := by ext; simp natCast_succ := fun n => by ext x; by_cases h : x = 1...
instance
NumberTheory
[ "Mathlib.Algebra.BigOperators.Ring.Finset", "Mathlib.Algebra.Module.BigOperators", "Mathlib.NumberTheory.Divisors", "Mathlib.Data.Nat.Squarefree", "Mathlib.Data.Nat.GCD.BigOperators", "Mathlib.Data.Nat.Factorization.Induction", "Mathlib.Tactic.ArithMult" ]
Mathlib/NumberTheory/ArithmeticFunction.lean
instAddMonoidWithOne
null
instAddCommMonoid [AddCommMonoid R] : AddCommMonoid (ArithmeticFunction R) := { ArithmeticFunction.instAddMonoid with add_comm := fun _ _ => ext fun _ => add_comm _ _ }
instance
NumberTheory
[ "Mathlib.Algebra.BigOperators.Ring.Finset", "Mathlib.Algebra.Module.BigOperators", "Mathlib.NumberTheory.Divisors", "Mathlib.Data.Nat.Squarefree", "Mathlib.Data.Nat.GCD.BigOperators", "Mathlib.Data.Nat.Factorization.Induction", "Mathlib.Tactic.ArithMult" ]
Mathlib/NumberTheory/ArithmeticFunction.lean
instAddCommMonoid
null
zeta : ArithmeticFunction ℕ := ⟨fun x => ite (x = 0) 0 1, rfl⟩ @[inherit_doc] scoped[ArithmeticFunction] notation "ζ" => ArithmeticFunction.zeta @[inherit_doc] scoped[ArithmeticFunction.zeta] notation "ζ" => ArithmeticFunction.zeta @[simp]
def
NumberTheory
[ "Mathlib.Algebra.BigOperators.Ring.Finset", "Mathlib.Algebra.Module.BigOperators", "Mathlib.NumberTheory.Divisors", "Mathlib.Data.Nat.Squarefree", "Mathlib.Data.Nat.GCD.BigOperators", "Mathlib.Data.Nat.Factorization.Induction", "Mathlib.Tactic.ArithMult" ]
Mathlib/NumberTheory/ArithmeticFunction.lean
zeta
The Dirichlet convolution of two arithmetic functions `f` and `g` is another arithmetic function such that `(f * g) n` is the sum of `f x * g y` over all `(x,y)` such that `x * y = n`. -/ instance : SMul (ArithmeticFunction R) (ArithmeticFunction M) := ⟨fun f g => ⟨fun n => ∑ x ∈ divisorsAntidiagonal n, f x.fst • g...
zeta_apply {x : ℕ} : ζ x = if x = 0 then 0 else 1 := rfl
theorem
NumberTheory
[ "Mathlib.Algebra.BigOperators.Ring.Finset", "Mathlib.Algebra.Module.BigOperators", "Mathlib.NumberTheory.Divisors", "Mathlib.Data.Nat.Squarefree", "Mathlib.Data.Nat.GCD.BigOperators", "Mathlib.Data.Nat.Factorization.Induction", "Mathlib.Tactic.ArithMult" ]
Mathlib/NumberTheory/ArithmeticFunction.lean
zeta_apply
null
zeta_apply_ne {x : ℕ} (h : x ≠ 0) : ζ x = 1 := if_neg h
theorem
NumberTheory
[ "Mathlib.Algebra.BigOperators.Ring.Finset", "Mathlib.Algebra.Module.BigOperators", "Mathlib.NumberTheory.Divisors", "Mathlib.Data.Nat.Squarefree", "Mathlib.Data.Nat.GCD.BigOperators", "Mathlib.Data.Nat.Factorization.Induction", "Mathlib.Tactic.ArithMult" ]
Mathlib/NumberTheory/ArithmeticFunction.lean
zeta_apply_ne
null
zeta_eq_zero {x : ℕ} : ζ x = 0 ↔ x = 0 := by simp [zeta]
theorem
NumberTheory
[ "Mathlib.Algebra.BigOperators.Ring.Finset", "Mathlib.Algebra.Module.BigOperators", "Mathlib.NumberTheory.Divisors", "Mathlib.Data.Nat.Squarefree", "Mathlib.Data.Nat.GCD.BigOperators", "Mathlib.Data.Nat.Factorization.Induction", "Mathlib.Tactic.ArithMult" ]
Mathlib/NumberTheory/ArithmeticFunction.lean
zeta_eq_zero
null
zeta_pos {x : ℕ} : 0 < ζ x ↔ 0 < x := by simp [Nat.pos_iff_ne_zero]
theorem
NumberTheory
[ "Mathlib.Algebra.BigOperators.Ring.Finset", "Mathlib.Algebra.Module.BigOperators", "Mathlib.NumberTheory.Divisors", "Mathlib.Data.Nat.Squarefree", "Mathlib.Data.Nat.GCD.BigOperators", "Mathlib.Data.Nat.Factorization.Induction", "Mathlib.Tactic.ArithMult" ]
Mathlib/NumberTheory/ArithmeticFunction.lean
zeta_pos
null
coe_zeta_smul_apply {M} [Semiring R] [AddCommMonoid M] [MulAction R M] {f : ArithmeticFunction M} {x : ℕ} : ((↑ζ : ArithmeticFunction R) • f) x = ∑ i ∈ divisors x, f i := by rw [smul_apply] trans ∑ i ∈ divisorsAntidiagonal x, f i.snd · refine sum_congr rfl fun i hi => ?_ rcases mem_divisorsAntidiagona...
theorem
NumberTheory
[ "Mathlib.Algebra.BigOperators.Ring.Finset", "Mathlib.Algebra.Module.BigOperators", "Mathlib.NumberTheory.Divisors", "Mathlib.Data.Nat.Squarefree", "Mathlib.Data.Nat.GCD.BigOperators", "Mathlib.Data.Nat.Factorization.Induction", "Mathlib.Tactic.ArithMult" ]
Mathlib/NumberTheory/ArithmeticFunction.lean
coe_zeta_smul_apply
null
@[simp] sum_divisorsAntidiagonal_eq_sum_divisors {M} [Semiring R] [AddCommMonoid M] [MulAction R M] {f : ArithmeticFunction M} {x : ℕ} : (∑ x ∈ x.divisorsAntidiagonal, if x.1 = 0 then (0 : R) • f x.2 else f x.2) = ∑ i ∈ divisors x, f i := by rw [← coe_zeta_smul_apply (R := R)] simp
theorem
NumberTheory
[ "Mathlib.Algebra.BigOperators.Ring.Finset", "Mathlib.Algebra.Module.BigOperators", "Mathlib.NumberTheory.Divisors", "Mathlib.Data.Nat.Squarefree", "Mathlib.Data.Nat.GCD.BigOperators", "Mathlib.Data.Nat.Factorization.Induction", "Mathlib.Tactic.ArithMult" ]
Mathlib/NumberTheory/ArithmeticFunction.lean
sum_divisorsAntidiagonal_eq_sum_divisors
`@[simp]`-normal form of `coe_zeta_smul_apply`.
coe_zeta_mul_apply [Semiring R] {f : ArithmeticFunction R} {x : ℕ} : (↑ζ * f) x = ∑ i ∈ divisors x, f i := coe_zeta_smul_apply
theorem
NumberTheory
[ "Mathlib.Algebra.BigOperators.Ring.Finset", "Mathlib.Algebra.Module.BigOperators", "Mathlib.NumberTheory.Divisors", "Mathlib.Data.Nat.Squarefree", "Mathlib.Data.Nat.GCD.BigOperators", "Mathlib.Data.Nat.Factorization.Induction", "Mathlib.Tactic.ArithMult" ]
Mathlib/NumberTheory/ArithmeticFunction.lean
coe_zeta_mul_apply
null
coe_mul_zeta_apply [Semiring R] {f : ArithmeticFunction R} {x : ℕ} : (f * ζ) x = ∑ i ∈ divisors x, f i := by rw [mul_apply] trans ∑ i ∈ divisorsAntidiagonal x, f i.1 · refine sum_congr rfl fun i hi => ?_ rcases mem_divisorsAntidiagonal.1 hi with ⟨rfl, h⟩ rw [natCoe_apply, zeta_apply_ne (right_ne_zero_...
theorem
NumberTheory
[ "Mathlib.Algebra.BigOperators.Ring.Finset", "Mathlib.Algebra.Module.BigOperators", "Mathlib.NumberTheory.Divisors", "Mathlib.Data.Nat.Squarefree", "Mathlib.Data.Nat.GCD.BigOperators", "Mathlib.Data.Nat.Factorization.Induction", "Mathlib.Tactic.ArithMult" ]
Mathlib/NumberTheory/ArithmeticFunction.lean
coe_mul_zeta_apply
null
zeta_mul_apply {f : ArithmeticFunction ℕ} {x : ℕ} : (ζ * f) x = ∑ i ∈ divisors x, f i := by rw [← natCoe_nat ζ, coe_zeta_mul_apply]
theorem
NumberTheory
[ "Mathlib.Algebra.BigOperators.Ring.Finset", "Mathlib.Algebra.Module.BigOperators", "Mathlib.NumberTheory.Divisors", "Mathlib.Data.Nat.Squarefree", "Mathlib.Data.Nat.GCD.BigOperators", "Mathlib.Data.Nat.Factorization.Induction", "Mathlib.Tactic.ArithMult" ]
Mathlib/NumberTheory/ArithmeticFunction.lean
zeta_mul_apply
null