Documentation
Marginis
.
Ross2025
Search
Google site search
return to top
source
Imports
Init
Mathlib.Topology.Sequences
Mathlib.Analysis.SpecificLimits.Basic
Mathlib.Data.Fin.Basic
Mathlib.Data.Fintype.Basic
Mathlib.Data.Fintype.Card
Mathlib.Data.Real.Basic
Imported by
count_le
density_seq
upper_density
A density version of a theorem of Banach
#
David A. Ross
Code by ChatGPT, mostly.
source
def
count_le
(I :
ℕ
→
Prop
)
[
DecidablePred
I
]
(n :
ℕ
)
:
ℕ
Equations
count_le
I
n
=
(
Finset.filter
(fun (
k
:
ℕ
) =>
I
k
)
(
Finset.range
(
n
+
1
)
)
)
.card
Instances For
source
noncomputable def
density_seq
(I :
ℕ
→
Prop
)
[
DecidablePred
I
]
(n :
ℕ
)
:
ℝ
Equations
density_seq
I
n
=
↑
(
count_le
I
n
)
/
(
↑
n
+
1
)
Instances For
source
noncomputable def
upper_density
(I :
ℕ
→
Prop
)
[
DecidablePred
I
]
:
ℝ
Equations
upper_density
I
=
Filter.limsup
(
density_seq
I
)
Filter.atTop
Instances For