Finite list tail statistics
Lax342547.ListTails · concepts/Lax342547/ListTails.lean · lax-342547
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Lemma
Nonnegative decreasing finite lists extend by zero to decreasing sequences; their finite sums and dyadic tail sums agree with the actual list tails.
Concept map
Evidence
This concept declares 7 statements. Each proof establishes one of them relative to its assumptions.
1 sum_values proven
2 tail_sum_list proven
3 value_antitone proven
4 value_drop proven
5 value_in_range proven
6 value_nonneg proven
7 value_out_of_range proven
Lean source view on GitHub
| 1 | import Lax342547.GreedySpans |
| 2 | import Lax342547.DyadicTails |
| 3 | import Mathlib.Data.List.Sort |
| 4 | |
| 5 | /-! |
| 6 | --- |
| 7 | title: Finite list tail statistics |
| 8 | type: lemma |
| 9 | --- |
| 10 | Nonnegative decreasing finite lists extend by zero to decreasing sequences; their finite sums and dyadic tail sums agree with the actual list tails. |
| 11 | -/ |
| 12 | |
| 13 | namespace Lax342547.ListTails |
| 14 | |
| 15 | open scoped BigOperators |
| 16 | |
| 17 | noncomputable def value (l : List ℝ) (t : ℕ) : ℝ := l[t]?.getD 0 |
| 18 | |
| 19 | axiom value_in_range (l : List ℝ) (t : ℕ) (ht : t < l.length) : value l t = l[t] |
| 20 | |
| 21 | axiom value_out_of_range (l : List ℝ) (t : ℕ) (ht : l.length ≤ t) : value l t = 0 |
| 22 | |
| 23 | axiom value_nonneg (l : List ℝ) (h : ∀ x ∈ l, 0 ≤ x) (t : ℕ) : 0 ≤ value l t |
| 24 | |
| 25 | axiom value_antitone (l : List ℝ) (h : l.Pairwise (fun a b => b ≤ a)) |
| 26 | (h0 : ∀ x ∈ l, 0 ≤ x) : Antitone (value l) |
| 27 | |
| 28 | axiom value_drop (l : List ℝ) (n t : ℕ) : value (l.drop n) t = value l (n+t) |
| 29 | |
| 30 | axiom sum_values (l : List ℝ) : (∑ t ∈ Finset.range l.length, value l t) = l.sum |
| 31 | |
| 32 | axiom tail_sum_list (l : List ℝ) (b : ℕ) (hb : b ≤ l.length) : |
| 33 | Lax342547.DyadicTails.tailSum (value l) l.length b = (l.drop (l.length-b)).sum |
| 34 | |
| 35 | end Lax342547.ListTails |
| 36 |
Used by
From Mathlib
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments