Reference · Finite sums
rainbow.math.sums.one-hot-index
Every selected index reads every one-hot weighted sum; every distinct index is zero.
signed/one-hot-selected-index-reads
signed/one-hot-selected-index-reads : (W F : ℕ → ℚ) (n : ℕ) (binary : ∀ (idx : ℕ), ∀ (bound : nat/strict-below idx n), proposition/disjunction (W idx = 0) (W idx = 1)) (unit : signed/expr-sum-value W n = 1) (w : ℕ) (bound : nat/strict-below w n) (selected : W w = 1) → signed/expr-sum-value (fun z => W z · F z) n = F w
0 = signed/zero1 = signed/one= = signed/equivalent: equality of rational values· = signed/multiplyℕ = data/Natℚ = signed/SignedRational
signed/one-hot-distinct-index-zero
signed/one-hot-distinct-index-zero : (W : ℕ → ℚ) (n : ℕ) (binary : ∀ (idx : ℕ), ∀ (bound : nat/strict-below idx n), proposition/disjunction (W idx = 0) (W idx = 1)) (unit : signed/expr-sum-value W n = 1) (w : ℕ) (hw : nat/strict-below w n) (selected : W w = 1) (j : ℕ) (hj : nat/strict-below j n) (distinct : proposition/negation (w = j)) → W j = 0
0 = signed/zero1 = signed/one= = signed/equivalent: equality of rational valuesℕ = data/Natℚ = signed/SignedRational
signed/one-and-zero-indices-distinct
signed/one-and-zero-indices-distinct : (W : ℕ → ℚ) (w j : ℕ) (one : W w = 1) (zero : W j = 0) → proposition/negation (w = j)
0 = signed/zero1 = signed/one= = equality/Eqℕ = data/Natℚ = signed/SignedRational