Field statistics of a finite set. #
def
FieldStatistic.ofFinset
{𝓕 : Type}
{n : ℕ}
(q : 𝓕 → FieldStatistic)
(f : Fin n → 𝓕)
(a : Finset (Fin n))
:
The field statistic associated with a map f : Fin n → 𝓕
(usually .get
of a list)
and a finite set of elements of Fin n
.
Equations
- FieldStatistic.ofFinset q f a = FieldStatistic.ofList q (List.map f (Finset.sort (fun (x1 x2 : Fin n) => x1 ≤ x2) a))
Instances For
@[simp]
theorem
FieldStatistic.ofFinset_finset_map
{𝓕 : Type}
{n m : ℕ}
(q : 𝓕 → FieldStatistic)
(i : Fin m → Fin n)
(hi : Function.Injective i)
(f : Fin n → 𝓕)
(a : Finset (Fin m))
:
theorem
FieldStatistic.ofFinset_filter_mul_neg
{𝓕 : Type}
(q : 𝓕 → FieldStatistic)
(φs : List 𝓕)
(a : Finset (Fin φs.length))
(p : Fin φs.length → Prop)
[DecidablePred p]
:
theorem
FieldStatistic.ofFinset_filter
{𝓕 : Type}
(q : 𝓕 → FieldStatistic)
(φs : List 𝓕)
(a : Finset (Fin φs.length))
(p : Fin φs.length → Prop)
[DecidablePred p]
: