Documentation

TauCeti.Data.List.SignVariations

Leading signs and variations of lists #

The first nonzero sign determines the change in sign variations when a nonzero entry is prepended to a list.

def List.firstSign {R : Type u_1} [Zero R] [LinearOrder R] (l : List R) :

The sign of the first nonzero entry of a list, or 0 if every entry is zero.

Equations
Instances For
    @[simp]
    theorem List.firstSign_nil {R : Type u_1} [Zero R] [LinearOrder R] :
    @[simp]
    theorem List.firstSign_zero_cons {R : Type u_1} [Zero R] [LinearOrder R] (l : List R) :
    @[simp]
    theorem List.firstSign_cons_of_ne_zero {R : Type u_1} [Zero R] [LinearOrder R] {a : R} (l : List R) (ha : a ≠ 0) :
    theorem List.signVariations_cons {R : Type u_1} [Zero R] [LinearOrder R] {a : R} (l : List R) :

    Prepending an entry a adds one sign variation exactly when its sign is opposite the sign of the next surviving entry.