Skip to content
Rainbow docs menu

Reference · Signed rationals

rainbow.math.rational.signed.vector-sup-distance

Signed rationalssrc/rainbow/math/rational/signed/vector_sup_distance.clj3 definitions, 18 theorems

Finite maxima and sup distance for signed-rational list vectors. The older V1.54 metric is Nat-valued over functions on an explicit finite carrier. Affine Rainbow states are lists of signed rationals, so this module supplies the representation bridge they actually need: a universe-polymorphic signed map-max fold with zero base, and the maximum component distance of two signed lists. The fold has structural, nonnegativity, boundedness, and congruence laws. Vector sup distance has a component-bound predicate, structural equations, nonnegativity, a global pointwise upper bound, symmetry, and zero on the diagonal. Native, kernel-checked, and axiom-free on D63.

Depends onmath.rational.signed.distance

list/signed-map-max

DefinitionSource, line 108

list/signed-map-max.{u} :
  (A : Type u) (mapping : A → ℚ) (x₁ : List A)
  → ℚ

List = data/Listℚ = signed/SignedRational

vector/sup-distance

DefinitionSource, line 129

vector/sup-distance :
  (x₁ x₂ : List ℚ)
  → ℚ

List = data/Listℚ = signed/SignedRational

vector/within

DefinitionSource, line 163

vector/within :
  (x₁ : ℚ) (x₂ x₃ : List ℚ)
  → Prop

List = data/Listℚ = signed/SignedRational

list/signed-map-max-empty

TheoremFor all inputsNo axiomsSource, line 199

list/signed-map-max-empty.{u} :
  (A : Type u) (mapping : A → ℚ)
  → list/signed-map-max A mapping [] = 0

0 = signed/zero= = signed/equivalent: equality of rational valuesℚ = signed/SignedRational

signed/equivalent-of-equality

TheoremFor all inputsNo axiomsSource, line 210

signed/equivalent-of-equality :
  (left right : ℚ)
  (same : left = right)
  → left = right

= = signed/equivalent: equality of rational valuesℚ = signed/SignedRational

list/signed-map-max-cons

TheoremFor all inputsNo axiomsSource, line 223

list/signed-map-max-cons.{u} :
  (A : Type u) (mapping : A → ℚ) (head : A) (tail : List A)
  → list/signed-map-max A mapping (data/cons A head tail) = signed/max (mapping head) (list/signed-map-max A mapping tail)

= = signed/equivalent: equality of rational valuesList = data/Listℚ = signed/SignedRational

list/signed-map-max-nonnegative

TheoremFor all inputsNo axiomsSource, line 240

list/signed-map-max-nonnegative.{u} :
  (A : Type u) (mapping : A → ℚ) (source : List A)
  → 0 ≤ list/signed-map-max A mapping source

0 = signed/zeroList = data/Listℚ = signed/SignedRational≤ = signed/at-most

list/signed-map-max-bounded

TheoremFor all inputsNo axiomsSource, line 279

list/signed-map-max-bounded.{u} :
  (A : Type u) (mapping : A → ℚ) (upper : ℚ)
  (zero-upper : 0 ≤ upper)
  (source : List A)
  (pointwise : ∀ (value : A), ∀ (member : list/membership A source value), mapping value ≤ upper)
  → list/signed-map-max A mapping source ≤ upper

0 = signed/zeroList = data/Listℚ = signed/SignedRational≤ = signed/at-most

list/signed-map-max-congruent

TheoremFor all inputsNo axiomsSource, line 341

list/signed-map-max-congruent.{u} :
  (A : Type u) (left right : A → ℚ)
  (pointwise : ∀ (value : A), left value = right value)
  (source : List A)
  → list/signed-map-max A left source = list/signed-map-max A right source

= = signed/equivalent: equality of rational valuesList = data/Listℚ = signed/SignedRational

vector/sup-distance-empty-left

TheoremFor all inputsNo axiomsSource, line 385

vector/sup-distance-empty-left :
  (right : List ℚ)
  → vector/sup-distance [] right = 0

0 = signed/zero= = signed/equivalent: equality of rational valuesList = data/Listℚ = signed/SignedRational

vector/sup-distance-empty-right

TheoremFor all inputsNo axiomsSource, line 396

vector/sup-distance-empty-right :
  (left : List ℚ)
  → vector/sup-distance left [] = 0

0 = signed/zero= = signed/equivalent: equality of rational valuesList = data/Listℚ = signed/SignedRational

vector/sup-distance-cons

TheoremHolds by unfolding a definitionNo axiomsSource, line 419

vector/sup-distance-cons :
  (left-head : ℚ) (left-tail : List ℚ) (right-head : ℚ) (right-tail : List ℚ)
  → vector/sup-distance (data/cons ℚ left-head left-tail) (data/cons ℚ right-head right-tail) = signed/max (signed/distance left-head right-head) (distance)
  where distance := vector/sup-distance left-tail right-tail

= = equality/EqList = data/Listℚ = signed/SignedRational

vector/sup-distance-nonnegative

TheoremFor all inputsNo axiomsSource, line 441

vector/sup-distance-nonnegative :
  (left right : List ℚ)
  → 0 ≤ vector/sup-distance left right

0 = signed/zeroList = data/Listℚ = signed/SignedRational≤ = signed/at-most

vector/sup-distance-cons-bounded

TheoremFor all inputsNo axiomsSource, line 497

vector/sup-distance-cons-bounded :
  (left-head : ℚ) (left-tail : List ℚ) (right-head : ℚ) (right-tail : List ℚ)
  (upper : ℚ)
  (head-bound : signed/distance left-head right-head ≤ upper)
  (tail-bound : vector/sup-distance left-tail right-tail ≤ upper)
  → vector/sup-distance (data/cons ℚ left-head left-tail) (data/cons ℚ right-head right-tail) ≤ upper

List = data/Listℚ = signed/SignedRational≤ = signed/at-most

vector/sup-distance-bounded

TheoremFor all inputsNo axiomsSource, line 547

vector/sup-distance-bounded :
  (left right : List ℚ) (upper : ℚ)
  (zero-upper : 0 ≤ upper)
  (pointwise : vector/within upper left right)
  → vector/sup-distance left right ≤ upper

0 = signed/zeroList = data/Listℚ = signed/SignedRational≤ = signed/at-most

vector/sup-distance-cons-symmetric

TheoremFor all inputsNo axiomsSource, line 640

vector/sup-distance-cons-symmetric :
  (left-head : ℚ) (left-tail : List ℚ) (right-head : ℚ) (right-tail : List ℚ)
  (tail-same : vector/sup-distance left-tail right-tail = vector/sup-distance right-tail left-tail)
  → vector/sup-distance (data/cons ℚ left-head left-tail) (data/cons ℚ right-head right-tail) = vector/sup-distance (data/cons ℚ right-head right-tail) (data/cons ℚ left-head left-tail)

= = signed/equivalent: equality of rational valuesList = data/Listℚ = signed/SignedRational

vector/sup-distance-empty-symmetric

TheoremFor all inputsNo axiomsSource, line 706

vector/sup-distance-empty-symmetric :
  (values : List ℚ)
  → vector/sup-distance [] values = vector/sup-distance values []

= = signed/equivalent: equality of rational valuesList = data/Listℚ = signed/SignedRational

vector/sup-distance-cons-empty-symmetric

TheoremFor all inputsNo axiomsSource, line 729

vector/sup-distance-cons-empty-symmetric :
  (head : ℚ) (tail : List ℚ)
  → vector/sup-distance (data/cons ℚ head tail) [] = vector/sup-distance [] (data/cons ℚ head tail)

= = signed/equivalent: equality of rational valuesList = data/Listℚ = signed/SignedRational

vector/sup-distance-cons-symmetric-all

TheoremFor all inputsNo axiomsSource, line 748

vector/sup-distance-cons-symmetric-all :
  (left-head : ℚ) (left-tail : List ℚ)
  (tail-symmetry : ∀ (right-tail : List ℚ), vector/sup-distance left-tail right-tail = vector/sup-distance right-tail left-tail)
  (right : List ℚ)
  → vector/sup-distance (data/cons ℚ left-head left-tail) right = vector/sup-distance right (data/cons ℚ left-head left-tail)

= = signed/equivalent: equality of rational valuesList = data/Listℚ = signed/SignedRational

vector/sup-distance-symmetric

TheoremFor all inputsNo axiomsSource, line 795

vector/sup-distance-symmetric :
  (left right : List ℚ)
  → vector/sup-distance left right = vector/sup-distance right left

= = signed/equivalent: equality of rational valuesList = data/Listℚ = signed/SignedRational

vector/sup-distance-self-zero

TheoremFor all inputsNo axiomsSource, line 833

vector/sup-distance-self-zero :
  (values : List ℚ)
  → vector/sup-distance values values = 0

0 = signed/zero= = signed/equivalent: equality of rational valuesList = data/Listℚ = signed/SignedRational