Skip to content
Rainbow docs menu

Reference · Lemmas behind operations-research checks

rainbow.math.lemmas.borda

Lemmas behind operations-research checkssrc/rainbow/math/lemmas/borda.clj0 definitions, 7 theorems

General lemmas: borda. The mathematical facts the corresponding checks rest on, each checked by the kernel.

signed/eq-indicator-one-of-equivalent

TheoremFor all inputsNo axiomsSource

signed/eq-indicator-one-of-equivalent :
  (p c : ℚ)
  (h : p = c)
  → data/Bool.rec (fun x₄ => ℚ) 0 1 (signed/decide-at-most p c) · data/Bool.rec (fun x₈ => ℚ) 0 1 (signed/decide-at-most c p) = 1

0 = signed/zero1 = signed/one= = signed/equivalent: equality of rational values· = signed/multiplyℚ = signed/SignedRational

signed/equivalent-of-eq-indicator-one

TheoremFor all inputsNo axiomsSource

signed/equivalent-of-eq-indicator-one :
  (p c : ℚ)
  (h : data/Bool.rec (fun x₄ => ℚ) 0 1 (signed/decide-at-most p c) · data/Bool.rec (fun x₈ => ℚ) 0 1 (signed/decide-at-most c p) = 1)
  → p = c

0 = signed/zero1 = signed/one= = signed/equivalent: equality of rational values· = signed/multiplyℚ = signed/SignedRational

signed/unit-sum-witness

TheoremFor all inputsNo axiomsSource

signed/unit-sum-witness :
  (F : ℕ → ℚ) (k : ℕ)
  (h01 : ∀ (idx : ℕ), ∀ (bound : nat/strict-below idx k), proposition/disjunction (F idx = 0) (F idx = 1))
  (hsum : signed/expr-sum-value F k = 1)
  → proposition/existence ℕ (fun wi => proposition/conjunction (nat/strict-below wi k) (F wi = 1))

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

signed/eq-indicator-zero-or-one

TheoremFor all inputsNo axiomsSource

signed/eq-indicator-zero-or-one :
  (p c : ℚ)
  → proposition/disjunction (data/Bool.rec (fun x₂₀ => ℚ) 0 1 (signed/decide-at-most p c) · data/Bool.rec (fun x₂₄ => ℚ) 0 1 (signed/decide-at-most c p) = 0) (data/Bool.rec (fun x₂₈ => ℚ) 0 1 (signed/decide-at-most p c) · data/Bool.rec (fun x₃₂ => ℚ) 0 1 (signed/decide-at-most c p) = 1)

0 = signed/zero1 = signed/one= = signed/equivalent: equality of rational values· = signed/multiplyℚ = signed/SignedRational

signed/less-than-add-one

TheoremFor all inputsNo axiomsSource

signed/less-than-add-one :
  (x : ℚ)
  → x < x + 1

+ = signed/add1 = signed/one< = signed/less-thanℚ = signed/SignedRational

signed/of-nat-strictly-increasing

TheoremFor all inputsNo axiomsSource

signed/of-nat-strictly-increasing :
  (K lk : ℕ) (lk-lt : nat/strict-below lk K)
  → signed/from-nnrat (nnrat/make lk 0) < signed/from-nnrat (nnrat/make K 0)

< = signed/less-thanℕ = data/Nat

signed/literal-indicators-at-most-one

TheoremFor all inputsNo axiomsSource

signed/literal-indicators-at-most-one :
  (x : ℚ) (K : ℕ)
  → signed/expr-sum-value (fun ik => data/Bool.rec (fun x₉ => ℚ) 0 1 (signed/decide-at-most x (signed/from-nnrat (nnrat/make ik 0))) · data/Bool.rec (fun x₁₂ => ℚ) 0 1 (signed/decide-at-most (signed/from-nnrat (nnrat/make ik 0)) x)) K ≤ 1

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