Reference · Vectors
rainbow.math.linear.vector.shape-cancellation
Shape equality and sound cancellation for truncating vector arithmetic. Native vector/add truncates to the shorter list, so cancellation is false without a dimension hypothesis. vector/same-shape compares the corresponding zero-like vectors and therefore records equal dimension without inspecting components. Under that hypothesis both right-cancellation orientations hold: (left - right) + right ~ left (left + right) - right ~ left Native and axiom-free on D63.
vector/same-shape
vector/same-shape : (x₁ x₂ : List ℚ) → Prop
List = data/Listℚ = signed/SignedRational
vector/same-shape-reflexive
vector/same-shape-reflexive : (values : List ℚ) → vector/same-shape values values
List = data/Listℚ = signed/SignedRational
vector/same-shape-symmetric
vector/same-shape-symmetric : (left right : List ℚ) (same : vector/same-shape left right) → vector/same-shape right left
List = data/Listℚ = signed/SignedRational
vector/same-shape-transitive
vector/same-shape-transitive : (left middle right : List ℚ) (left-middle : vector/same-shape left middle) (middle-right : vector/same-shape middle right) → vector/same-shape left right
List = data/Listℚ = signed/SignedRational
vector/subtract-add-right-cancel
vector/subtract-add-right-cancel : (left right : List ℚ) (same : vector/same-shape left right) → vector/equivalent (add) left where add := vector/add (vector/subtract left right) right
List = data/Listℚ = signed/SignedRational
vector/add-subtract-right-cancel
vector/add-subtract-right-cancel : (left right : List ℚ) (same : vector/same-shape left right) → vector/equivalent (subtract) left where subtract := vector/subtract (vector/add left right) right
List = data/Listℚ = signed/SignedRational