The half adder
You will learn
Two trits in, a sum trit and a carry trit out, for all nine cases.
A half adder is the sum and carry tables wired side by side. The spec computes both from trit_at() of a + b: place 0 is the sum, place 1 the carry. Of the nine input pairs only +1 + +1 and -1 + -1 carry; every other pair fits in one trit. Binary's half adder carries on one case of four, ternary's on two of nine.