Skip to content
Rainbow docs menu

Reference · Finite sums

rainbow.math.sums.value-algebra

Finite sumssrc/rainbow/math/sums/value_algebra.clj0 definitions, 11 theorems

Finite-sum algebra for the existing signed/expr-sum-value. All regrouping uses signed/equivalent (Grothendieck equality), never equality of raw pairs. Bounds and congruences require hypotheses only below the finite bound.

Depends onmath.checksmath.rational.signed.map-sum-algebramath.rational.signed.distributivemath.rational.signed.equivalence-lawsmath.rational.signed.fubinimath.rational.signed.pointwise-order

signed/expr-sum-value-as-map-sum

TheoremFor all inputsNo axiomsSource

signed/expr-sum-value-as-map-sum :
  (F : ℕ → ℚ) (n : ℕ)
  → signed/expr-sum-value F n = Σ j∈list/nat-range n, F j

= = signed/equivalent: equality of rational valuesΣ = signed/map-sum: sum over the listed indicesℕ = data/Natℚ = signed/SignedRational

signed/expr-sum-bounds-as-list

TheoremFor all inputsNo axiomsSource, line 101

signed/expr-sum-bounds-as-list :
  (F G : ℕ → ℚ) (n : ℕ)
  (H : ∀ (idx : ℕ), ∀ (bound : nat/strict-below idx n), F idx ≤ G idx)
  → ∀ i ∈ list/nat-range n, F i ≤ G i

ℕ = data/Natℚ = signed/SignedRational∀ i ∈ xs, f i ≤ g i = signed/all-at-most: the bound at every listed index≤ = signed/at-most

signed/expr-sum-value-zero

TheoremFor all inputsNo axiomsSource

signed/expr-sum-value-zero :
  (n : ℕ)
  → signed/expr-sum-value (fun x₂ => 0) n = 0

0 = signed/zero= = signed/equivalent: equality of rational valuesℕ = data/Nat

signed/expr-sum-value-add

TheoremFor all inputsNo axiomsSource

signed/expr-sum-value-add :
  (F G : ℕ → ℚ) (n : ℕ)
  → signed/expr-sum-value (fun i => F i + G i) n = signed/expr-sum-value F n + signed/expr-sum-value G n

+ = signed/add= = signed/equivalent: equality of rational valuesℕ = data/Natℚ = signed/SignedRational

signed/expr-sum-value-scale-right

TheoremFor all inputsNo axiomsSource

signed/expr-sum-value-scale-right :
  (F : ℕ → ℚ) (c : ℚ) (n : ℕ)
  → signed/expr-sum-value F n · c = signed/expr-sum-value (fun i => F i · c) n

= = signed/equivalent: equality of rational values· = signed/multiplyℕ = data/Natℚ = signed/SignedRational

signed/expr-sum-value-monotone-below

TheoremFor all inputsNo axiomsSource

signed/expr-sum-value-monotone-below :
  (F G : ℕ → ℚ) (n : ℕ)
  (H : ∀ (idx : ℕ), ∀ (bound : nat/strict-below idx n), F idx ≤ G idx)
  → signed/expr-sum-value F n ≤ signed/expr-sum-value G n

ℕ = data/Natℚ = signed/SignedRational≤ = signed/at-most

signed/expr-sum-value-respects-equivalence-below

TheoremFor all inputsNo axiomsSource

signed/expr-sum-value-respects-equivalence-below :
  (F G : ℕ → ℚ) (n : ℕ)
  (H : ∀ (idx : ℕ), ∀ (bound : nat/strict-below idx n), F idx = G idx)
  → signed/expr-sum-value F n = signed/expr-sum-value G n

= = signed/equivalent: equality of rational valuesℕ = data/Natℚ = signed/SignedRational

signed/expr-sum-value-scale-left

TheoremFor all inputsNo axiomsSource

signed/expr-sum-value-scale-left :
  (F : ℕ → ℚ) (c : ℚ) (n : ℕ)
  → c · signed/expr-sum-value F n = signed/expr-sum-value (fun i => c · F i) n

= = signed/equivalent: equality of rational values· = signed/multiplyℕ = data/Natℚ = signed/SignedRational

signed/expr-sum-value-weighted-monotone-left

TheoremFor all inputsNo axiomsSource

signed/expr-sum-value-weighted-monotone-left :
  (W F G : ℕ → ℚ) (n : ℕ)
  (hw : ∀ (idx : ℕ), ∀ (bound : nat/strict-below idx n), 0 ≤ W idx)
  (hfg : ∀ (idx : ℕ), ∀ (bound : nat/strict-below idx n), F idx ≤ G idx)
  → signed/expr-sum-value (fun i => W i · F i) n ≤ signed/expr-sum-value (fun i => W i · G i) n

0 = signed/zero· = signed/multiplyℕ = data/Natℚ = signed/SignedRational≤ = signed/at-most

signed/expr-sum-value-weighted-monotone-right

TheoremFor all inputsNo axiomsSource

signed/expr-sum-value-weighted-monotone-right :
  (W F G : ℕ → ℚ) (n : ℕ)
  (hw : ∀ (idx : ℕ), ∀ (bound : nat/strict-below idx n), 0 ≤ W idx)
  (hfg : ∀ (idx : ℕ), ∀ (bound : nat/strict-below idx n), F idx ≤ G idx)
  → signed/expr-sum-value (fun i => F i · W i) n ≤ signed/expr-sum-value (fun i => G i · W i) n

0 = signed/zero· = signed/multiplyℕ = data/Natℚ = signed/SignedRational≤ = signed/at-most

signed/expr-sum-value-swap

TheoremFor all inputsNo axiomsSource

signed/expr-sum-value-swap :
  (F : ℕ → ℕ → ℚ) (n m : ℕ)
  → signed/expr-sum-value (fun i => signed/expr-sum-value (fun j => F i j) n) m = signed/expr-sum-value (fun j => signed/expr-sum-value (fun i => F i j) m) n

= = signed/equivalent: equality of rational valuesℕ = data/Natℚ = signed/SignedRational