back to list

Finding the compliment

🔗Gene Ward Smith <gwsmith@svpal.org>

11/19/2003 2:02:24 PM

This is what Browne calls the Euclidean compliment, and there is a
somewhat nice and standard formula for this. I'm going to apply it to
the 13-limit case for some examples. The basic idea is that we find
the signs, for which we can use the formula, apply them, reverse the
ordering, change the m-monzo to an (n-m)-val, and we have the
compliment of a monzo. The same applies the other way around for vals.

If we have a 13-limit 2-monzo, it will have dimension 6*5/2 = 15

Let

[[c1 c2 c3 c4 c5 c6 c7 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15>>

be that monzo. Now take the ordered combinations of six things, taken
two at a time, in alphabetical order:

[[1, 2], [1, 3], [1, 4], [1, 5], [1, 6], [2, 3], [2, 4], [2, 5],
[2, 6], [3, 4], [3, 5], [3, 6], [4, 5], [4, 6], [5, 6]]

Sum the numbers in each and put down a 1 if the sum is even, and a -1
if it is odd, giving

[-1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1, 1, -1]

Now note that m=2, so m(m+1)/2 is 2*3/2 = 3, an odd number. Hence we
must multiply the above by -1; at the same time we will reverse the
ordering, giving us now

[1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1]

We now use these signs, together with the coefficients in descending
order, to get the complimentary 4-val:

<<<<c15 -c14 c13 c12 -c11 c10 -c9 c8 -c7 c6 c5 -c4 c3 -c2 c1]]]]

This isn't what I got before, where I presumably goofed.

A 13-limit 3-monzo has dimension 6*5*4/6 = 20, and may be written

[[[c1 c2 c3 c4 c5 c6 c6 c8 c9 c10
c11 c12 c13 c14 c15 c16 c17 c18 c19 c20>>>

The ordered combinations of [1,2,3,4,5,6] taken three at a time are

[[1, 2, 3], [1, 2, 4], [1, 2, 5], [1, 2, 6], [1, 3, 4], [1, 3, 5],
[1,3, 6], [1, 4, 5], [1, 4, 6], [1, 5, 6], [2, 3, 4], [2, 3, 5],
[2, 3, 6], [2, 4, 5], [2, 4, 6], [2, 5, 6], [3, 4, 5], [3, 4, 6],
[3, 5, 6], [4, 5, 6]]

Taking the sums of the coefficients of these and putting 1 for even,
-1 for odd gives us

[1, -1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1]

We are taking the compliment of a 3-monzo, so m=3 and m(m+1)/2 = 6, an
even number; hence we don't change sign. However, we do as always
reverse the ordering and take the coefficients in reverse order:

[-1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1]

<<<-c20 c19 -c18 c17 -c16 c15 -c14 -c13 c12 -c11
c10 -c9 c8 c7 -c6 c5 -c4 c3 -c2 c1]]]

Now for the compliment of a 4-monzo, which is a 6*5*4*3/24 = 15
dimensional object again

[[[[c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15>>>>

The combinations of [1,2,3,4,5,6] taken four at a time in order are

[[1, 2, 3, 4], [1, 2, 3, 5], [1, 2, 3, 6], [1, 2, 4, 5], [1, 2, 4, 6],
[1, 2, 5, 6], [1, 3, 4, 5], [1, 3, 4, 6], [1, 3, 5, 6], [1, 4, 5, 6],
[2, 3, 4, 5], [2, 3, 4, 6], [2, 3, 5, 6], [2, 4, 5, 6], [3, 4, 5, 6]]

Even and odd for this gives

[1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1]

m=4, and 4*5/2 = 10, an even number, so we don't change sign but as
always do reverse the order

[1, -1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1]

Taking these signs with descending coefficients gives

<<c15 -c14 c13 -c12 c11 c10 -c9 c8 -c7 c6 -c5 c4 c3 -c2 c1]]

as the compliment.

🔗Dave Keenan <d.keenan@bigpond.net.au>

11/19/2003 5:11:28 PM

--- In tuning-math@yahoogroups.com, "Gene Ward Smith" <gwsmith@s...>
wrote:
> This is what Browne calls the Euclidean compliment, and there is a
> somewhat nice and standard formula for this. I'm going to apply it to
> the 13-limit case for some examples.

Thanks very much for these. Please don't be offended by my attempts to
translate some parts in a way that I imagine might be more easily
comprehended by Monz and others.

> The basic idea is that we find
> the signs, for which we can use the formula, apply them, reverse the
> ordering, change the m-monzo to an (n-m)-val, and we have the
> compliment of a monzo. The same applies the other way around for vals.
>
> If we have a 13-limit 2-monzo, it will have dimension 6*5/2 = 15

It think it will cause less confusion if we call them bi-monzos and
tri-monzos (with or without hyphens). There are enough numbers flying
around as it is. But by all means start using the numbers once we get
beyond grade 3. And why not use "g" for a variable grade instead of
"m"? And call them multi-monzos when the grade is unspecified and
doesn't need to be referred to in any formula. This is the sort of
stuff that doesn't matter to someone who already understands it, but
for someone trying to break into it, every little bit helps.

Now if the "dimension" of a multi-monzo is the number of coefficients
in it, then what do you call the thing that I've been calling the
dimension, which in our application is the index of the highest prime
that's represented? That seems more like "dimension" to me, since it
is the dimension of the underlying simple space. The other I have been
calling simply "number of coefficients".

To say that in 4D-space a plane has dimension 6 wouldn't make a lot of
sense to most people. To say that the bi-vector representing it has 6
coefficients, is more likely to be understood.

Translation:

A 13-limit monzo (prime-exponent-vector) has 6 coefficients so a
13-limit bi-monzo, will have 6*5/2 = 15 coefficients. In general, if
the monzo has n coefficients, the corresponding bi-monzo will have
n*(n-1)/2 coefficients. The same goes of course for maps and bi-maps
(vals and bi-vals).

> Let
>
> [[c1 c2 c3 c4 c5 c6 c7 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15>>
>
> be that monzo.

You mean "bi-monzo".

> Now take the ordered combinations of six things, taken
> two at a time, in alphabetical order:
>
> [[1, 2], [1, 3], [1, 4], [1, 5], [1, 6], [2, 3], [2, 4], [2, 5],
> [2, 6], [3, 4], [3, 5], [3, 6], [4, 5], [4, 6], [5, 6]]

It might be clearer to use compound indices in the bimonzo as follows
(this trick will work up to the 23-limit, beyond which we have more
than 9 coefficients in the monzo or map, but we hardly ever go there).

Graham raised the question, why talk about alphabetical order when
it's numerical order. Well, up to simple indices of 9, they are the
same thing, but beyond that if you want it to still be numerical you
have to use a number base greater than the maximum simple index.

The monzo [c1 c2 c3 c4 c5 c6> represents the 13-limit ratio
2^c1 * 3^c2 * 5^c3 * 7^c4 * 1^c5 * 13^c6.

The bimonzo [[c12 c13 c14 c15 c16 c23 c24 c25 c26 c34 c35 c36 c45 c46
c56>>

represents a two 13-limit ratios simultaneously, but in such a way
that the bimonzo for any other pair which are linear combinations of
this pair would give the same bimonzo. For example, if these are two
commas which vanish in some temperament, then any other pair of commas
whose vanishing would define the same temperament will have the same
bimonzo. There's no redundancy as there would be in a matrix
representation of this (which would have 6x6 = 36 coefficients).

Notice that _within_ each compound index for a single coefficient, the
digits are in numerical/alphabetical order, and the same digit does
not occur more than once.

Notice also that the coefficients themselves are listed in
numerical/alphabetical order of their compound index.

> Sum the numbers in each and put down a 1 if the sum is even, and a -1
> if it is odd, giving
>
> [-1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1, 1, -1]
>
> Now note that m=2,

The grade g is 2 since it's a _bi_monzo. This is what the number of
brackets shows us.

> so m(m+1)/2 is 2*3/2 = 3, an odd number.

so Ceiling(g/2) = 1, an odd number.

> Hence we
> must multiply the above by -1; at the same time we will reverse the
> ordering, giving us now
>
> [1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1]
>
> We now use these signs, together with the coefficients in descending
> order, to get the complimentary 4-val:
>
> <<<<c15 -c14 c13 c12 -c11 c10 -c9 c8 -c7 c6 c5 -c4 c3 -c2 c1]]]]

That's "compl_e_mentary", although it's true Gene didn't charge any
money for it. ;-)

Because the 13-prime-limit is a 6-dimensional space (2 3, 5 7 11, 13),
the complement of a bi-monzo is a 6-2 = 4-map (4-val) and where the
bi-monzo has 2 brackets pointing to the right, its complement has 4
brackets pointing to the left.

<<<<c56 -c46 c45 c36 -c35 c34 -c26 c25 -c24 c23 c16 -c15 c14 -c13 c12]]]]

So you don't actually have to write out the 1's and -1's. Just
calculate Ceiling(g/2) and add it to the sum of the digits making up
each compound index and put a minus sign if the result is odd. You
ask, how can I remember whether I put the minus sign when it's odd or
even? Easy. You're actually multiplying them by
-1^(sum_of_indices+Ceiling(g/2)) and minus-one to an even power is 1,
while to an odd power it is -1.

For example, consider c13 in our bimonzo. Ceiling(g/2) = 1 and 1 + 1 +
3 = 5, an odd number so it becomes -c13 in the complement.

> This isn't what I got before, where I presumably goofed.
>
> A 13-limit 3-monzo has dimension 6*5*4/6 = 20, and may be written
>
> [[[c1 c2 c3 c4 c5 c6 c6 c8 c9 c10
> c11 c12 c13 c14 c15 c16 c17 c18 c19 c20>>>
>
> The ordered combinations of [1,2,3,4,5,6] taken three at a time are
>
> [[1, 2, 3], [1, 2, 4], [1, 2, 5], [1, 2, 6], [1, 3, 4], [1, 3, 5],
> [1,3, 6], [1, 4, 5], [1, 4, 6], [1, 5, 6], [2, 3, 4], [2, 3, 5],
> [2, 3, 6], [2, 4, 5], [2, 4, 6], [2, 5, 6], [3, 4, 5], [3, 4, 6],
> [3, 5, 6], [4, 5, 6]]
>
> Taking the sums of the coefficients of these and putting 1 for even,
> -1 for odd gives us
>
> [1, -1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1]
>
> We are taking the compliment of a 3-monzo, so m=3 and m(m+1)/2 = 6, an
> even number; hence we don't change sign. However, we do as always
> reverse the ordering and take the coefficients in reverse order:
>
> [-1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1]
>
> <<<-c20 c19 -c18 c17 -c16 c15 -c14 -c13 c12 -c11
> c10 -c9 c8 c7 -c6 c5 -c4 c3 -c2 c1]]]

In other words the tri-monzo is:

[[[c123 c124 c125 c126 c134 c135 c136 c145 c146 c156 c234 c235 c236
c245 c246 c256 c345 c346 c356 c456>>>

and we find Ceiling(g/2) = Ceiling(3/2) = Ceiling(1.5) = 2. So we add
2 to the sum of the digits in each case, which of course is the same
as adding zero, since all we care about is whether the result is odd
or even. In fact we don't even have to add them up. We can just count
how many are odd, and if this count is itself odd, then we negate.

So we negate all those coefficients with an odd number of odd digits
(in their compound index), and we reverse their order, to get the tri-map:

[[[-c456 c356 -c346 c345 -c256 c246 -c245 -c236 c235 -c234 c156 -c146
c145 c136 -c135 c134 -c126 c125 -c124 c123>>>

>
> Now for the compliment of a 4-monzo, which is a 6*5*4*3/24 = 15
> dimensional object again
>
> [[[[c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15>>>>
>
> The combinations of [1,2,3,4,5,6] taken four at a time in order are
>
> [[1, 2, 3, 4], [1, 2, 3, 5], [1, 2, 3, 6], [1, 2, 4, 5], [1, 2, 4, 6],
> [1, 2, 5, 6], [1, 3, 4, 5], [1, 3, 4, 6], [1, 3, 5, 6], [1, 4, 5, 6],
> [2, 3, 4, 5], [2, 3, 4, 6], [2, 3, 5, 6], [2, 4, 5, 6], [3, 4, 5, 6]]
>
> Even and odd for this gives
>
> [1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1]
>
> m=4, and 4*5/2 = 10, an even number, so we don't change sign but as
> always do reverse the order
>
> [1, -1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1]
>
> Taking these signs with descending coefficients gives
>
> <<c15 -c14 c13 -c12 c11 c10 -c9 c8 -c7 c6 -c5 c4 c3 -c2 c1]]
>
> as the compliment.

Take the 4-monzo
[[[[c1234 c1235 c1236 c1245 c1246 c1256 c1345 c1346 c1356 c1456 c2345
c2346 c2356 c2456 c3456>>>>

Ceiling(g/2) = Ceiling(4/2) = 2 which is even, so we don't need to add
anything more to our count of the odd digits in each index, and the
complement of the above 4-monzo is the following bi-map:

<<c3456 -c2456 c2356 -c2346 c2345 c1456 -c1356 c1346 -c1345 c1256
-c1246 c1245 c1236 -c1235 c1234]]

It should be mentioned that taking the complement of the complement
doesn't always give you back what you started with, sometimes it's the
negative of what you started with. So in those cases it's analogous to
multiplying by i (the square root of -1). This depends on the
dimension and the grade. But taking the complement four-times always
gives you back exactly what you started with.

🔗Dave Keenan <d.keenan@bigpond.net.au>

11/19/2003 7:19:28 PM

So Gene, you've given us a nice description of how to compute the
complement for arbitrary dimension and grade. Now how about the wedge
product between pairs of multivectors of arbitrary dimension (and
possibly different) grades? Graham, feel free to chime in here too. :-)

🔗Gene Ward Smith <gwsmith@svpal.org>

11/20/2003 12:26:22 PM

--- In tuning-math@yahoogroups.com, "Dave Keenan" <d.keenan@b...>
wrote:

> So Gene, you've given us a nice description of how to compute the
> complement for arbitrary dimension and grade. Now how about the
wedge
> product between pairs of multivectors of arbitrary dimension (and
> possibly different) grades? Graham, feel free to chime in here
too. :-)

I suggest simply using the definition.

🔗Graham Breed <graham@microtonal.co.uk>

11/20/2003 1:05:10 PM

Dave Keenan wrote:
> So Gene, you've given us a nice description of how to compute the
> complement for arbitrary dimension and grade. Now how about the wedge
> product between pairs of multivectors of arbitrary dimension (and
> possibly different) grades? Graham, feel free to chime in here too. :-)

Certainly, to find the wedge product of two wedgies x an y:

Initialize the result to the empty wedgie.

Take every distinct basis element of x in turn (by distinct, I mean don't take both .

For each of them, take every distinct basis element of y in turn.

If both basis elements have a primitive basis in common (I still don't know the proper word for this) ignore the term.

Otherwise, form a new basis by concatenating the original two, and add the product of the coefficients of x and y for their respective basis elements to the current coefficient for the resultant basis in the result.

Here's some abbreviated Python code in case it helps:

def wedgeProduct(x, y):
result = Wedgie()
for base1, value1 in x.items():
for base2, value2 in y.items():
for element in base1:
if element in base2:
break
else:
base = base1+base2
result[base] = result[base] + value1*value2
return result

All this assumes you know how to reduce each basis element to a consistent form, which I think was covered in the complement discussion.

For an example, I'll try |1 2 3> ^ |4 5 6>

They can be written as (e1 + 2*e2 + 3*e3) ^ (4*e1 + 5*e2 + 6*e3)

So the first elements of each are e1 and 4*e1. We see that there's an e1 in both of these, so ignore the term.

The next element of y is the 5*e2. So the new basis element is e1e2 and the coefficient is 5. The result's value for e1e2 is 1+5=5.

Then from y we have 6*e3, so the result is now (5*e1e2 + 6*e1e3)

Now we take the next element of x, 2*e2.

(2*e2) ^ (4*e1) is 8*e2e1. The current value of e2e1 is -5 (because e1e2 is 5) so e2e1 is now 8-3=3 (or e1e2 is -3) and result is (-3*e1e2 + 6*e1e3).

Then we have two terms with an e2, so move on.

2*e2 ^ 6*e3 = 12*e2e3. The result doesn't already have a term in e2e3, so it's now (-3*e1e2 + 6*e1e3 + 12*e2e3).

Now we move on to the last element of x, 3*e3.

3*e3 ^ 4*e1 is 12*e3e1 or -12*e1e3. Result is now (-3*e1e2 - 6*e1e3 + 12*e2e3).

3*e3 ^ 5*e2 is 15*e3e2 or -15*e2e3 giving a result of (-3*e1e2 - 6*e1e3 - 3*e2e3).

And that's the final result, because we can throw away the term in e3^e3. Hence

(e1 + 2*e2 + 3*e3) ^ (4*e1 + 5*e2 + 6*e3) = (-3*e1e2 - 6*e1e3 - 3*e2e3)

or, the way I happen to do the flattening

[1 2 3> ^ [4 5 6> = [[-3 -6 -3>>

Graham

🔗Graham Breed <graham@microtonal.co.uk>

11/20/2003 1:06:47 PM

Dave Keenan wrote:

> It should be mentioned that taking the complement of the complement
> doesn't always give you back what you started with, sometimes it's the
> negative of what you started with. So in those cases it's analogous to
> multiplying by i (the square root of -1). This depends on the
> dimension and the grade. But taking the complement four-times always
> gives you back exactly what you started with.

Are you sure? Do you have an example?

Graham

🔗Dave Keenan <d.keenan@bigpond.net.au>

11/20/2003 2:36:49 PM

--- In tuning-math@yahoogroups.com, Graham Breed <graham@m...> wrote:
> Dave Keenan wrote:
>
> > It should be mentioned that taking the complement of the complement
> > doesn't always give you back what you started with, sometimes it's the
> > negative of what you started with. So in those cases it's analogous to
> > multiplying by i (the square root of -1). This depends on the
> > dimension and the grade. But taking the complement four-times always
> > gives you back exactly what you started with.
>
> Are you sure? Do you have an example?

Yes. Disturbing isn't it? It occurs only for all odd grades in all
even dimensions (where the dimension is the index of the limiting
prime). So the simplest case is for a 3-limit vector (2D grade 1). The
complement of <a b] is [-b a>, and so the complement of [-b a> must be
<-a -b] which is -<a b]

~~<a b]
= ~[-b a>
= <-a -b]
= -<a b]

The fact that it occurs for 2D makes it clear there is no trick of
reordering indices that is going to get rid of it. The next ocurrence
is for 7-limit vectors and trivectors (4D grades 1 and 3).

If you look at the 13-limit examples Gene gave in this thread, these
are 6D so you should find that the vector, trivector and 5-vector
complements have the same property.

🔗Paul Erlich <perlich@aya.yale.edu>

11/20/2003 2:42:58 PM

> This is what Browne calls the Euclidean compliment,

I tried to compliment you before but maybe i need to find the right
compliment . . . oh, you're talking about the compl*e*ment!

🔗Paul Erlich <perlich@aya.yale.edu>

11/20/2003 3:02:24 PM

--- In tuning-math@yahoogroups.com, Graham Breed <graham@m...> wrote:

> the coefficient is 5. The result's value for e1e2 is 1+5=5.

1*5=5, you musta meant.

🔗Paul Erlich <perlich@aya.yale.edu>

11/20/2003 3:05:17 PM

--- In tuning-math@yahoogroups.com, Graham Breed <graham@m...> wrote:
> Dave Keenan wrote:
>
> > It should be mentioned that taking the complement of the
complement
> > doesn't always give you back what you started with, sometimes
it's the
> > negative of what you started with. So in those cases it's
analogous to
> > multiplying by i (the square root of -1). This depends on the
> > dimension and the grade. But taking the complement four-times
always
> > gives you back exactly what you started with.
>
> Are you sure? Do you have an example?
>
>
> Graham

that's easy -- in 3-dimensional space, the dual of e1^e2^e3 is 1,
while the dual of 1 is -e1^e2^e3.

🔗Paul Erlich <perlich@aya.yale.edu>

11/20/2003 3:10:34 PM

--- In tuning-math@yahoogroups.com, "Dave Keenan" <d.keenan@b...>
wrote:

> > > dimension and the grade. But taking the complement four-times
always
> > > gives you back exactly what you started with.
> >
> > Are you sure? Do you have an example?
>
> Yes. Disturbing isn't it? It occurs only for all odd grades in all
> even dimensions

it occurs in odd dimensions too.

> (where the dimension is the index of the limiting
> prime). So the simplest case is for a 3-limit vector (2D grade 1).
The
> complement of <a b] is [-b a>, and so the complement of [-b a> must
be
> <-a -b] which is -<a b]
>
> ~~<a b]
> = ~[-b a>
> = <-a -b]
> = -<a b]
>
> The fact that it occurs for 2D makes it clear there is no trick of
> reordering indices that is going to get rid of it. The next
ocurrence
> is for 7-limit vectors and trivectors (4D grades 1 and 3).

you missed 5-limit scalars and pseudoscalars (3D grades 0 and 3).

🔗Dave Keenan <d.keenan@bigpond.net.au>

11/20/2003 3:15:04 PM

--- In tuning-math@yahoogroups.com, "Paul Erlich" <perlich@a...> wrote:
> > This is what Browne calls the Euclidean compliment,
>
> I tried to compliment you before but maybe i need to find the right
> compliment . . . oh, you're talking about the compl*e*ment!

Come to think of it, what would a Euclidean compliment be? Perhaps
something like, "My, your triangles are looking very congruent this
morning Mrs Aristotle". :-)

🔗Dave Keenan <d.keenan@bigpond.net.au>

11/20/2003 3:33:50 PM

--- In tuning-math@yahoogroups.com, "Paul Erlich" <perlich@a...> wrote:
> --- In tuning-math@yahoogroups.com, Graham Breed <graham@m...> wrote:
> > Dave Keenan wrote:
> >
> > > It should be mentioned that taking the complement of the
> complement
> > > doesn't always give you back what you started with, sometimes
> it's the
> > > negative of what you started with. So in those cases it's
> analogous to
> > > multiplying by i (the square root of -1). This depends on the
> > > dimension and the grade. But taking the complement four-times
> always
> > > gives you back exactly what you started with.
> >
> > Are you sure? Do you have an example?
>
> that's easy -- in 3-dimensional space, the dual of e1^e2^e3 is 1,
> while the dual of 1 is -e1^e2^e3.

No, that second one is not correct.

In other words you're saying that in 3D the complement of 1 is
<<<-1]]]. By the rules posted recently, the coefficient is negated if
and only if the sum of the indices plus Ceiling(g/2) is odd, where g
is the grade. The grade of a scalar is zero and the sum of the indices
is zero (since there aren't any). So you do not negate.

🔗Dave Keenan <d.keenan@bigpond.net.au>

11/20/2003 3:46:38 PM

--- In tuning-math@yahoogroups.com, "Paul Erlich" <perlich@a...> wrote:
> you missed 5-limit scalars and pseudoscalars (3D grades 0 and 3).

I don't think so.

See page 10 of
http://www.ses.swin.edu.au/homes/browne/grassmannalgebra/book/bookpdf/TheComplement.pdf

🔗monz <monz@attglobal.net>

11/20/2003 9:46:56 PM

hi Dave,

--- In tuning-math@yahoogroups.com, "Dave Keenan" <d.keenan@b...>
wrote:

> --- In tuning-math@yahoogroups.com, "Paul Erlich" <perlich@a...>
wrote:
> > > This is what Browne calls the Euclidean compliment,
> >
> > I tried to compliment you before but maybe i need to
> > find the right compliment . . . oh, you're talking about
> > the compl*e*ment!
>
> Come to think of it, what would a Euclidean compliment be? Perhaps
> something like, "My, your triangles are looking very congruent this
> morning Mrs Aristotle". :-)

that is just *too* Monty Python-esque.

well, at least it's *one* thing that i've understood in
the recent tuning-math discussions! otherwise, i have
not a clue what you guys are going on about. :(

-monz

🔗Paul Erlich <perlich@aya.yale.edu>

11/21/2003 2:55:04 PM

--- In tuning-math@yahoogroups.com, "Dave Keenan" <d.keenan@b...>
wrote:
> --- In tuning-math@yahoogroups.com, "Paul Erlich" <perlich@a...>
wrote:
> > --- In tuning-math@yahoogroups.com, Graham Breed <graham@m...>
wrote:
> > > Dave Keenan wrote:
> > >
> > > > It should be mentioned that taking the complement of the
> > complement
> > > > doesn't always give you back what you started with, sometimes
> > it's the
> > > > negative of what you started with. So in those cases it's
> > analogous to
> > > > multiplying by i (the square root of -1). This depends on the
> > > > dimension and the grade. But taking the complement four-times
> > always
> > > > gives you back exactly what you started with.
> > >
> > > Are you sure? Do you have an example?
> >
> > that's easy -- in 3-dimensional space, the dual of e1^e2^e3 is 1,
> > while the dual of 1 is -e1^e2^e3.
>
> No, that second one is not correct.

You're probably doing something wrong, then. This is correct
according to both the GABLE tutorial and the program itself.

🔗Paul Erlich <perlich@aya.yale.edu>

11/21/2003 2:58:51 PM

--- In tuning-math@yahoogroups.com, "Dave Keenan" <d.keenan@b...>
wrote:
> --- In tuning-math@yahoogroups.com, "Paul Erlich" <perlich@a...>
wrote:
> > you missed 5-limit scalars and pseudoscalars (3D grades 0 and 3).
>
> I don't think so.
>
> See page 10 of
>
http://www.ses.swin.edu.au/homes/browne/grassmannalgebra/book/bookpdf/
TheComplement.pdf

Then the dual must not be the same thing as the Euclidean complement.

🔗Gene Ward Smith <gwsmith@svpal.org>

11/21/2003 3:13:01 PM

--- In tuning-math@yahoogroups.com, "Paul Erlich" <perlich@a...>
wrote:

> Then the dual must not be the same thing as the Euclidean
complement.

What dual are we talking about?

🔗Paul Erlich <perlich@aya.yale.edu>

11/21/2003 3:41:43 PM

--- In tuning-math@yahoogroups.com, "Gene Ward Smith" <gwsmith@s...>
wrote:
> --- In tuning-math@yahoogroups.com, "Paul Erlich" <perlich@a...>
> wrote:
>
> > Then the dual must not be the same thing as the Euclidean
> complement.
>
> What dual are we talking about?

I was getting my information from the GABLE program and from this
tutorial:

http://carol.science.uva.nl/~leo/GABLE/tutorial.pdf

see page 18.

🔗Dave Keenan <d.keenan@bigpond.net.au>

11/21/2003 4:19:40 PM

--- In tuning-math@yahoogroups.com, "Paul Erlich" <perlich@a...> wrote:
> --- In tuning-math@yahoogroups.com, "Dave Keenan" <d.keenan@b...>
> wrote:
> > --- In tuning-math@yahoogroups.com, "Paul Erlich" <perlich@a...>
> wrote:
> > > --- In tuning-math@yahoogroups.com, Graham Breed <graham@m...>
> wrote:
> > > > Dave Keenan wrote:
> > > >
> > > > > It should be mentioned that taking the complement of the
> > > complement
> > > > > doesn't always give you back what you started with, sometimes
> > > it's the
> > > > > negative of what you started with. So in those cases it's
> > > analogous to
> > > > > multiplying by i (the square root of -1). This depends on the
> > > > > dimension and the grade. But taking the complement four-times
> > > always
> > > > > gives you back exactly what you started with.
> > > >
> > > > Are you sure? Do you have an example?
> > >
> > > that's easy -- in 3-dimensional space, the dual of e1^e2^e3 is 1,
> > > while the dual of 1 is -e1^e2^e3.
> >
> > No, that second one is not correct.
>
> You're probably doing something wrong, then. This is correct
> according to both the GABLE tutorial and the program itself.

Can you give a URL for this GABLE tutorial? Does it use alphabetical
ordering of indices?

🔗Dave Keenan <d.keenan@bigpond.net.au>

11/22/2003 4:03:47 AM

That's great Graham. I think I get it now. Let me try feeding it back
in a different way so you can tell me if I've got it right, and so
others may have another chance at following it.

Lets first take the simplest case worth considering. The wedge product
of two 3-limit (2D) vectors.

[a1 a2> ^ [b1 b2>

The procedure is to first list every product of a coefficient from A
with a coefficient from B, i.e. their ordinary scalar products. So
with 2 coefficients in each there will be 2x2 = 4 products to
consider, a1*b1, a1*b2, a2*b1, a2*b2.

As you calculate each product, combine the indices of the two
coefficients to make a compound index for it. It is important to keep
the indices in their original order at this stage. So we have
(a1*b1)11, (a1*b2)12, (a2*b1)21, (a2*b2)22. The numbers after the
parentheses are the compound indexes. This is not proper mathematical
notation, but just a way to keep track of our intermediate results.

There are certain rules about what to to with each product now,
depending on its compound index. There are 3 possibilities:

1. If the indexes have a digit in common then ignore it. Just throw
the product away. So we throw away (a1*b1)11 and (a2*b2)22.
2. Otherwise if the digits in the compound index are already in
alphabetical order, do nothing. So (a1*b2)12 is just fine as it is.
3. Otherwise if they are not in alphabetical order then put them in
alphabetical order, but you must do this in simple stages. At each
stage you are only allowed to make two digits swap places, and every
time you do this you must negate the product. So if, by the time the
digits are in alphabetical order you have swapped digits an odd number
of times, then it will be negated. If an even number of swaps were
required then it will remain as it was. So (a2*b1)21 becomes (-a2*b1)12.

Now find any products that have the same index and add them together.
So we have only (a1*b2 - a2*b1)12.

Now list all these sums in alphabetical order of their indices, inside
as many brackets as the sum of the number of brackets in the two
arguments, and pointing in the same direction. I assume the wedge
product is only defined for values having their brackets pointing the
same way.

So our answer is

[[(a1*b2 - a2*b1)>>

Now lets try something more messy. A 7-limit (4D) vector wedged with a
7-limit bivector. This might represent combining a third comma with
two that have already been combined, as an intermediate result on the
way to finding the ET mapping where these all vanish.

[a1 a2 a3 a4> ^ [[b12 b13 b14 b23 b24 b34>>

We first make the list of products of all pairs, with their compound
indices.

product index
a1*b12 112
a1*b13 113
a1*b14 114
a1*b23 123
a1*b24 124
a1*b34 134
a2*b12 212
a2*b13 213
a2*b14 214
a2*b23 223
a2*b24 224
a2*b34 234
a3*b12 312
a3*b13 313
a3*b14 314
a3*b23 323
a3*b24 324
a3*b34 334
a4*b12 412
a4*b13 413
a4*b14 414
a4*b23 423
a4*b24 424
a4*b34 434

Now we get rid of all those with two digits the same. Of course once
you've got the idea, you wouldn't even bother writing them down in the
first place. This leaves.

product index
a1*b23 123
a1*b24 124
a1*b34 134
a2*b13 213
a2*b14 214
a2*b34 234
a3*b12 312
a3*b14 314
a3*b24 324
a4*b12 412
a4*b13 413
a4*b23 423

Now we do the old switcheroo on the ones that aren't already in
alphabetical order, and negate them if we have to do an odd number of
switches. And we end up with:

product index
a1*b23 123
a1*b24 124
a1*b34 134
-a2*b13 123
-a2*b14 124
a2*b34 234
a3*b12 123
-a3*b14 134
-a3*b24 234
a4*b12 124
a4*b13 134
a4*b23 234

Now we sum the products with the same index.

product index
a1*b23 + a3*b12 - a2*b13 123
a1*b24 - a2*b14 + a4*b12 124
a1*b34 - a3*b14 + a4*b13 134
234

Now we list them in alphabetical order of index inside the right
number of brackets.

[[[a1*b23+a3*b12-a2*b13 a1*b24-a2*b14+a4*b12 a1*b34-a3*b14+a4*b13
a2*b34-a3*b24+a4*b23>>>

Voila!

🔗Carl Lumma <ekin@lumma.org>

11/22/2003 9:00:37 AM

>That's great Graham. I think I get it now. Let me try feeding it back
>in a different way so you can tell me if I've got it right, and so
>others may have another chance at following it.

Thanks Dave. Can someone confirm this? I'm about to take it as
Gospel.

-C.

🔗Paul Erlich <perlich@aya.yale.edu>

11/22/2003 11:05:40 AM

--- In tuning-math@yahoogroups.com, "Dave Keenan" <d.keenan@b...>
wrote:

> > You're probably doing something wrong, then. This is correct
> > according to both the GABLE tutorial and the program itself.
>
> Can you give a URL for this GABLE tutorial?

Again, it's http://carol.science.uva.nl/~leo/GABLE/tutorial.pdf . . .
and again, I'm looking at page 18

> Does it use alphabetical
> ordering of indices?

In the case of the trivector, yes -- and I would have thought that's
all that matters here. Surely the question of whether 1 is the dual
of its dual is independent of this ordering question? All the
directly tuning-interpretable results of Grassmann algebra should be
independent of this ordering question, and the cross-product is,
thank goodness. Maybe the question of whether 1 is the dual of its
dual is not intepretable in tuning terms.

🔗Gene Ward Smith <gwsmith@svpal.org>

11/22/2003 2:25:36 PM

--- In tuning-math@yahoogroups.com, Carl Lumma <ekin@l...> wrote:
> >That's great Graham. I think I get it now. Let me try feeding it
back
> >in a different way so you can tell me if I've got it right, and so
> >others may have another chance at following it.
>
> Thanks Dave. Can someone confirm this? I'm about to take it as
> Gospel.

It looked good to me.

🔗Dave Keenan <d.keenan@bigpond.net.au>

11/22/2003 2:50:35 PM

Oops. Something went missing near the end there. It should have been:

Now we sum the products with the same index.

product index
a1*b23 + a3*b12 - a2*b13 123
a1*b24 - a2*b14 + a4*b12 124
a1*b34 - a3*b14 + a4*b13 134
a2*b34 - a3*b24 + a4*b23 234

[but it was all there in the final result]

Now we list them in alphabetical order of index inside the right
number of brackets.

[[[a1*b23+a3*b12-a2*b13 a1*b24-a2*b14+a4*b12 a1*b34-a3*b14+a4*b13
a2*b34-a3*b24+a4*b23>>>

🔗Gene Ward Smith <gwsmith@svpal.org>

11/22/2003 2:54:16 PM

--- In tuning-math@yahoogroups.com, "Paul Erlich" <perlich@a...>
wrote:

Maybe the question of whether 1 is the dual of its
> dual is not intepretable in tuning terms.

It's a part of the standard convention allowing us to define how the
complement is going to work--e1^e2^...^en is taken to define volume 1.

🔗Dave Keenan <d.keenan@bigpond.net.au>

11/22/2003 3:03:26 PM

--- In tuning-math@yahoogroups.com, "Paul Erlich" <perlich@a...> wrote:
> --- In tuning-math@yahoogroups.com, "Dave Keenan" <d.keenan@b...>
> wrote:
> > Does it use alphabetical
> > ordering of indices?
>
> In the case of the trivector, yes -- and I would have thought that's
> all that matters here. Surely the question of whether 1 is the dual
> of its dual is independent of this ordering question?

You would expect so.

> All the
> directly tuning-interpretable results of Grassmann algebra should be
> independent of this ordering question, and the cross-product is,
> thank goodness. Maybe the question of whether 1 is the dual of its
> dual is not intepretable in tuning terms.

Hmmm. This is rather mystifying. I'm afraid I'm just going to go with
Browne's Euclidean complement and forget the GABLE "dual". Two reasons.
(a) GABLE is clearly not concerned with any dimension greater than 3.
(b) GABLE is "geometric algebra" which appears to be Grassman algebra
using "homogeneous" coordinates. This is where they add one more
component to the vector than there are dimensions in the space, so
they can distinguish points from vectors, or some such.

🔗Dave Keenan <d.keenan@bigpond.net.au>

11/22/2003 4:40:08 PM

--- In tuning-math@yahoogroups.com, "Gene Ward Smith" <gwsmith@s...>
wrote:
> --- In tuning-math@yahoogroups.com, Carl Lumma <ekin@l...> wrote:
> > >That's great Graham. I think I get it now. Let me try feeding it
> back
> > >in a different way so you can tell me if I've got it right, and so
> > >others may have another chance at following it.
> >
> > Thanks Dave. Can someone confirm this? I'm about to take it as
> > Gospel.
>
> It looked good to me.

Thanks Gene. I'll bet there were lots of mathematical nits you could
have picked, with my presentation, so I really appreciate a simple
response like this. And I expect Carl does too. Thanks for all your
help in getting us to this point.

🔗Dave Keenan <d.keenan@bigpond.net.au>

11/22/2003 6:15:37 PM

It would be nice to have a shortcut to avoid actually doing all those
index position swaps to find the sign of each product of scalars.

We already have such a shortcut rule when calculating the complement,
namely sum the indexes plus Ceiling(grade/2) and negate if odd. But
that's no use for the wedge product.

We want a simple function of the (possibly compound) indexes of the
two coefficients, that gives us the sign of the result.

We can write the two indices as I = {i1 i2 i3 ...} and J = {j1 j2 j3
...} where the i's and j's are integers (simple indices). Note that
the compound-indices are rightly represented as sets since the order
of their elements doesn't matter, and we never have duplicates,
_within_ each compound-index.

These sets could be implemented efficiently on a computer as a
bit-array or bit-set with a one-bit for each simple index that's in
the set. 16 bits would be plenty for any conceivable tuning
application. These could either be carried around with the
coefficients or computed as needed, given the grade and the number of
coefficients, or grade and dimension.

The condition for throwing away the product (of coefficients), can
then be expressed as I * J =/= {}, where "*" is set-intersection. i.e.
Throw it away if there is any simple index common to both sets.

And the index of the product is I + J, where "+" is set-union.

Now what's the simplest algorithm to give us the sign of the product
given those two index sets, in the right order?

🔗Dave Keenan <d.keenan@bigpond.net.au>

11/22/2003 8:16:28 PM

I think I've found one shortcut. But there may yet be a simpler one.

Given that the indexes of the two coefficients are respectively
I = {i1 i2 i3 ...} and J = {j1 j2 j3 ...}.

The sign of the product is given by the parity (oddness) of
Min(Sum(I)-Card(I)*(Card(I)+1)/2, Card(J)*(2*Card(U)+1-Card(J))/2)-Sum(J))

where Sum({i1 i2 ... ig}) = i1 + i2 + ... ig
i.e. the sum of the digits in the coefficient's compound index.
and Card({i1 i2 ... ig}) = g
i.e. the grade of the thing that the coefficient came from.
and Card(U) is the cardinality of the universal set, in other words
the dimensionality n of the arguments, or their maximum simple index
number n.

I'll restate this in different terms.

We're talking about calculating a wedge product of two arguments. A
part of that process is finding the correct sign for each product of
coefficients.

Lets use
n = the dimension of the arguments and result e.g. 3 for 5-limit, 4
for 7-limit, etc.
g1 = the grade of the first argument. e.g. 0 for a scalar, 1 for a
vector, 2 for a bivector, etc.
g2 = the grade of the second argument.
a = a coefficient of the first argument. i.e. one of the numbers
inside [ ... >, or [[ ... >>, etc.
b = a coefficient of the second argument.
s1 = the sum of the indices for the coefficient of the first argument (a).
s2 = the sum of the indices for the coefficient of the second argument
(b).

You negate the product a*b whenever the following expression is odd.

Min(s1 - g1*(g1+1)/2, g2*(2*n+1-g2)/2) - s2)

Of course I'm not 100% certain of this.

The expression g*(2*n+1-g)/2) in the second argument to Min() is
intended to be equivalent to

n*(n+1)/2 - (n-g)*(n-g+1)/2

🔗Dave Keenan <d.keenan@bigpond.net.au>

11/22/2003 10:10:35 PM

The more I think about it the less I think that index permutation
parity algorithm will work in general.

Here's one that does
http://mathforum.org/epigone/geometry-college/jandyimploo/q15fcmq60g8m@legacy

It's very simple and designed for pencil and paper. It is much less
error-prone than trying to count how many index-swaps you need to get
to alphabetical/numerical order. It should be fairly easily adapted to
whatever data-structure is used for the compound indices.

🔗Carl Lumma <ekin@lumma.org>

11/22/2003 10:32:48 PM

>Oops. Something went missing near the end there. It should have been:

Can you post the entire corrected thing?

-C.

🔗Gene Ward Smith <gwsmith@svpal.org>

11/22/2003 11:26:31 PM

--- In tuning-math@yahoogroups.com, "Dave Keenan" <d.keenan@b...>
wrote:

> We want a simple function of the (possibly compound) indexes of the
> two coefficients, that gives us the sign of the result.

Product of the differences might do.

🔗monz <monz@attglobal.net>

11/22/2003 11:26:27 PM

--- In tuning-math@yahoogroups.com, Carl Lumma <ekin@l...> wrote:
> >Oops. Something went missing near the end there. It should have
been:
>
> Can you post the entire corrected thing?
>
> -C.

i've already done it here:

http://sonic-arts.org/dict/wedge-product.htm

Gene, can you give me the rigorous mathematical definition
as well?

-monz

🔗Graham Breed <graham@microtonal.co.uk>

11/23/2003 12:57:15 AM

Dave Keenan wrote:

> Here's one that does
> http://mathforum.org/epigone/geometry-college/jandyimploo/q15fcmq60g8m@legacy
> > It's very simple and designed for pencil and paper. It is much less
> error-prone than trying to count how many index-swaps you need to get
> to alphabetical/numerical order. It should be fairly easily adapted to
> whatever data-structure is used for the compound indices.

I think that's equivalent to the one I'm using, which I got from a group theory book. (Actually, the book gave a slightly different algorithm, presumably what Gene meant by "product of differences". But that's less efficient because multiplication's harder than addition.)

def equivalentValue(base, value):
"""alternative algorithm that avoids the evil bubblesort"""
for i in range(len(base)-1):
for j in range(i+1, len(base)):
if base[j]<base[i]:
value = -value
return value

And here's the same kind of thing in C, from another program I happen to be working on:

int odd_permutation(const int board[N_CELLS]) {
int i, j, total=0;

for (i=0; i<N_CELLS-1; i++) {
for (j=i+1; j<N_CELLS; j++) {
total += board[i] > board[j];
}
}
return total % 2;
}

It's still an O(n**2) algorighm, so there's no huge saving over bubble sorting and counting swaps, especially if you want the result sorted anyway.

Graham

🔗Paul Erlich <perlich@aya.yale.edu>

11/23/2003 11:34:01 AM

--- In tuning-math@yahoogroups.com, "Gene Ward Smith" <gwsmith@s...>
wrote:
> --- In tuning-math@yahoogroups.com, "Paul Erlich" <perlich@a...>
> wrote:
>
> Maybe the question of whether 1 is the dual of its
> > dual is not intepretable in tuning terms.
>
> It's a part of the standard convention allowing us to define how
the
> complement is going to work--e1^e2^...^en is taken to define volume
1.

So is GABLE just wrong?

🔗Paul Erlich <perlich@aya.yale.edu>

11/23/2003 11:38:13 AM

--- In tuning-math@yahoogroups.com, "Dave Keenan" <d.keenan@b...>
wrote:
> --- In tuning-math@yahoogroups.com, "Paul Erlich" <perlich@a...>
wrote:
> > --- In tuning-math@yahoogroups.com, "Dave Keenan" <d.keenan@b...>
> > wrote:
> > > Does it use alphabetical
> > > ordering of indices?
> >
> > In the case of the trivector, yes -- and I would have thought
that's
> > all that matters here. Surely the question of whether 1 is the
dual
> > of its dual is independent of this ordering question?
>
> You would expect so.
>
> > All the
> > directly tuning-interpretable results of Grassmann algebra should
be
> > independent of this ordering question, and the cross-product is,
> > thank goodness. Maybe the question of whether 1 is the dual of
its
> > dual is not intepretable in tuning terms.
>
> Hmmm. This is rather mystifying. I'm afraid I'm just going to go
with
> Browne's Euclidean complement and forget the GABLE "dual". Two
reasons.
> (a) GABLE is clearly not concerned with any dimension greater than
3.
> (b) GABLE is "geometric algebra" which appears to be Grassman
algebra
> using "homogeneous" coordinates. This is where they add one more
> component to the vector than there are dimensions in the space, so
> they can distinguish points from vectors, or some such.

Hmm? In GABLE there are eight components to every object, the basis
being (to within signs){1,e1,e2,e3,e1^e2,e2^e3,e1^e3,e1^e2^e3}.

🔗Graham Breed <graham@microtonal.co.uk>

11/23/2003 12:37:57 PM

Dave Keenan wrote:

> (b) GABLE is "geometric algebra" which appears to be Grassman algebra
> using "homogeneous" coordinates. This is where they add one more
> component to the vector than there are dimensions in the space, so
> they can distinguish points from vectors, or some such.

Oh, geometric algebra. Here are some pages about it:

http://www.kuro5hin.org/story/2002/9/7/11112/27943

http://www.kuro5hin.org/story/2002/9/10/22212/3455

It's similar to Grassman algebra, but not the same.

Graham

🔗Gene Ward Smith <gwsmith@svpal.org>

11/23/2003 1:03:47 PM

--- In tuning-math@yahoogroups.com, "Paul Erlich" <perlich@a...>
wrote:
> --- In tuning-math@yahoogroups.com, "Gene Ward Smith"
<gwsmith@s...>
> wrote:
> > --- In tuning-math@yahoogroups.com, "Paul Erlich" <perlich@a...>
> > wrote:
> >
> > Maybe the question of whether 1 is the dual of its
> > > dual is not intepretable in tuning terms.
> >
> > It's a part of the standard convention allowing us to define how
> the
> > complement is going to work--e1^e2^...^en is taken to define
volume
> 1.
>
> So is GABLE just wrong?

If it isn't calling e1^...^en a 1, it isn't right for our purposes.

🔗Paul Erlich <perlich@aya.yale.edu>

11/23/2003 1:18:21 PM

--- In tuning-math@yahoogroups.com, "Gene Ward Smith" <gwsmith@s...>
wrote:

> If it isn't calling e1^...^en a 1, it isn't right for our purposes.

Calling it a 1? Isn't it an n-vector, not a scalar?

🔗Gene Ward Smith <gwsmith@svpal.org>

11/23/2003 2:18:32 PM

--- In tuning-math@yahoogroups.com, "Paul Erlich" <perlich@a...>
wrote:
> --- In tuning-math@yahoogroups.com, "Gene Ward Smith"
<gwsmith@s...>
> wrote:
>
> > If it isn't calling e1^...^en a 1, it isn't right for our
purposes.
>
> Calling it a 1? Isn't it an n-vector, not a scalar?

Right, but the complement is a 1.

🔗Paul Erlich <perlich@aya.yale.edu>

11/23/2003 2:37:47 PM

--- In tuning-math@yahoogroups.com, "Gene Ward Smith" <gwsmith@s...>
wrote:
> --- In tuning-math@yahoogroups.com, "Paul Erlich" <perlich@a...>
> wrote:
> > --- In tuning-math@yahoogroups.com, "Gene Ward Smith"
> <gwsmith@s...>
> > wrote:
> >
> > > If it isn't calling e1^...^en a 1, it isn't right for our
> purposes.
> >
> > Calling it a 1? Isn't it an n-vector, not a scalar?
>
> Right, but the complement is a 1.

As you may have seen, GABLE defines the dual as division by e1^e2^e3.
division is in the sense of the so-called 'geometric product'. Is the
geometric product non-existent and/or meaningless in Grassmann
algebra?

🔗Dave Keenan <d.keenan@bigpond.net.au>

11/23/2003 5:38:26 PM

--- In tuning-math@yahoogroups.com, Graham Breed <graham@m...> wrote:
> It's still an O(n**2) algorighm, so there's no huge saving over bubble
> sorting and counting swaps, especially if you want the result sorted
> anyway.

Right, but if you use a fixed-length bitset implementation of the
compound indices (e.g. 32 bits) then there's no requirement for
sorting. You just OR them together to get the compound index of the
result. And the parity algorithm is then only O(n) and consists of
shifts and ANDs followed by XORing the parity of the number of 1 bits
in the results. I guess this is still O(n*log(n)) unless you have an
O(1) bitwise parity operation. Otherwise bitwise parity will need to
be implemented as log(n) shifts and xors. Here's some pseudo-C-code.

long function Parity(long i, j)
/* Where i and j representing the two compound indices as bitsets */
result = 0
for n = 1 to 31
i >>= 1
result ^= bitParity(i & j)
next n
return result

long function bitParity(long i)
i ^= i>>1
i ^= i>>2
i ^= i>>4
i ^= i>>8
i ^= i>>16
i &= 1
return i

🔗Paul Erlich <perlich@aya.yale.edu>

11/23/2003 7:40:57 PM

--- In tuning-math@yahoogroups.com, "Dave Keenan" <d.keenan@b...>
wrote:
> --- In tuning-math@yahoogroups.com, "Paul Erlich" <perlich@a...>
wrote:
> > --- In tuning-math@yahoogroups.com, "Dave Keenan" <d.keenan@b...>
> > wrote:
> > > Does it use alphabetical
> > > ordering of indices?
> >
> > In the case of the trivector, yes -- and I would have thought
that's
> > all that matters here. Surely the question of whether 1 is the
dual
> > of its dual is independent of this ordering question?
>
> You would expect so.
>
> > All the
> > directly tuning-interpretable results of Grassmann algebra should
be
> > independent of this ordering question, and the cross-product is,
> > thank goodness. Maybe the question of whether 1 is the dual of
its
> > dual is not intepretable in tuning terms.
>
> Hmmm. This is rather mystifying. I'm afraid I'm just going to go
with
> Browne's Euclidean complement and forget the GABLE "dual". Two
reasons.
> (a) GABLE is clearly not concerned with any dimension greater than
3.
> (b) GABLE is "geometric algebra" which appears to be Grassman
algebra
> using "homogeneous" coordinates. This is where they add one more
> component to the vector than there are dimensions in the space, so
> they can distinguish points from vectors, or some such.

In any case, could such considerations argue that we should make
standard use of, as defined in section 6.9 or pp. 32-37 and motivated
further down here,

http://www.ses.swin.edu.au/homes/browne/grassmannalgebra/book/bookpdf/
TheInteriorProduct.pdf

the (generalized) cross-product?

🔗Gene Ward Smith <gwsmith@svpal.org>

11/23/2003 8:28:34 PM

--- In tuning-math@yahoogroups.com, "Paul Erlich" <perlich@a...>
wrote:

> As you may have seen, GABLE defines the dual as division by
e1^e2^e3.
> division is in the sense of the so-called 'geometric product'. Is
the
> geometric product non-existent and/or meaningless in Grassmann
> algebra?

Geometric algebra in some sense encompasses Grassmann algebra, but
not in a way that strikes me as useful for our purposes. Even more
general are Clifford algebras, which is what algebraists are most
interested in; but again, I don't see a payoff.

🔗Paul Erlich <perlich@aya.yale.edu>

11/23/2003 8:34:50 PM

--- In tuning-math@yahoogroups.com, "Gene Ward Smith" <gwsmith@s...>
wrote:
> --- In tuning-math@yahoogroups.com, "Paul Erlich" <perlich@a...>
> wrote:
>
> > As you may have seen, GABLE defines the dual as division by
> e1^e2^e3.
> > division is in the sense of the so-called 'geometric product'. Is
> the
> > geometric product non-existent and/or meaningless in Grassmann
> > algebra?
>
> Geometric algebra in some sense encompasses Grassmann algebra, but
> not in a way that strikes me as useful for our purposes. Even more
> general are Clifford algebras, which is what algebraists are most
> interested in; but again, I don't see a payoff.

I've come to section 10:

http://www.ses.swin.edu.au/homes/browne/grassmannalgebra/book/bookpdf/
ExpTheGeneralizedProduct.pdf

Is this 'generalized product' of Grassman product nearly, but not
quite, identical to the geometric product?

🔗Carl Lumma <ekin@lumma.org>

11/25/2003 11:49:34 AM

>The more I think about it the less I think that index permutation
>parity algorithm will work in general.

You mean I shouldn't take your thing as Gospel just yet?

>Here's one that does //

http://tinyurl.com/wiz6

So, can we get a version of your Gospel with this rolled in?

-Carl

🔗Paul Erlich <perlich@aya.yale.edu>

11/25/2003 12:27:10 PM

--- In tuning-math@yahoogroups.com, "Dave Keenan" <d.keenan@b...>
wrote:

> This is where they add one more
> component to the vector than there are dimensions in the space, so
> they can distinguish points from vectors, or some such.

I actually found this not in GABLE, but in Browne's book, right in
chapter 1!!

Chapter 1 is going quite well so far, but with no mention of
contravariant vs. covariant, the analogy with what we're doing here
is not clear yet. What's disturbing to me so far is that the
complement defines a metric, but I would have hoped all our
operations could be done without any choice of metric. And then, why
we would need to take the *complement* of the wedge product to get
the val -- in 3D, the wedge product is a bivector, and the complement
of that (given a metric) would be a vector, but don't vectors
represent monzos? But onwards!

🔗Graham Breed <graham@microtonal.co.uk>

11/25/2003 1:10:19 PM

Paul Erlich wrote:

> Chapter 1 is going quite well so far, but with no mention of > contravariant vs. covariant, the analogy with what we're doing here > is not clear yet. What's disturbing to me so far is that the > complement defines a metric, but I would have hoped all our > operations could be done without any choice of metric. And then, why > we would need to take the *complement* of the wedge product to get > the val -- in 3D, the wedge product is a bivector, and the complement > of that (given a metric) would be a vector, but don't vectors > represent monzos? But onwards!

No, I don't think you need covariant vs contravariant. It's only a way of labelling the elements so that you know when you have to take the complement. If you think of the complement as a way of transforming one exterior element into another it still works.

The number of steps to the octave of an equal temperament is the same as the area of an octave-equivalent periodicity block. To calculate an area, you need a metric, and we're implying one by relating unison vectors to mappings. Geometric complexity might make sense in terms of a different metric, but I don't understand that yet.

Yes, vectors represent both vals and monzos. If you don't like them both to be plain vectors, you can call one "covariant" and the other "contravariant".

Graham

🔗Paul Erlich <perlich@aya.yale.edu>

11/25/2003 2:24:17 PM

--- In tuning-math@yahoogroups.com, Graham Breed <graham@m...> wrote:
> Paul Erlich wrote:
>
> > Chapter 1 is going quite well so far, but with no mention of
> > contravariant vs. covariant, the analogy with what we're doing
here
> > is not clear yet. What's disturbing to me so far is that the
> > complement defines a metric, but I would have hoped all our
> > operations could be done without any choice of metric. And then,
why
> > we would need to take the *complement* of the wedge product to
get
> > the val -- in 3D, the wedge product is a bivector, and the
complement
> > of that (given a metric) would be a vector, but don't vectors
> > represent monzos? But onwards!
>
> No, I don't think you need covariant vs contravariant. It's only a
way
> of labelling the elements so that you know when you have to take
the
> complement. If you think of the complement as a way of
transforming one
> exterior element into another it still works.
>
> The number of steps to the octave of an equal temperament is the
same as
> the area of an octave-equivalent periodicity block. To calculate
an
> area, you need a metric,

I don't believe you need a metric to calculate the number of steps
per octave. The exterior product gives you the right answer, without
assuming any metric -- just linearity.

> and we're implying one by relating unison
> vectors to mappings.

I don't think that's necessarily true either.

> Yes, vectors represent both vals and monzos. If you don't like
them
> both to be plain vectors, you can call one "covariant" and the
other
> "contravariant".

I guess I'll have to wait 'till I get to the relevant section in
Browne's book . . .

🔗Gene Ward Smith <gwsmith@svpal.org>

11/25/2003 2:35:13 PM

--- In tuning-math@yahoogroups.com, Graham Breed <graham@m...> wrote:
> Paul Erlich wrote:
>
> > Chapter 1 is going quite well so far, but with no mention of
> > contravariant vs. covariant, the analogy with what we're doing
here
> > is not clear yet. What's disturbing to me so far is that the
> > complement defines a metric, but I would have hoped all our
> > operations could be done without any choice of metric.

Browne has a certain point of view which isn't always what we need;
for us the bracket between vals and monzos gives us what we want
without a metric, or serves in place of one.

> No, I don't think you need covariant vs contravariant.

For our purposes this most certainly is what we want.

> The number of steps to the octave of an equal temperament is the
same as
> the area of an octave-equivalent periodicity block. To calculate
an
> area, you need a metric, and we're implying one by relating unison
> vectors to mappings.

You don't actually need a metric.

> Yes, vectors represent both vals and monzos.

Bad idea.

If you don't like them
> both to be plain vectors, you can call one "covariant" and the
other
> "contravariant".

Good idea!

🔗Dave Keenan <d.keenan@bigpond.net.au>

11/26/2003 1:28:58 AM

--- In tuning-math@yahoogroups.com, Carl Lumma <ekin@l...> wrote:
> So, can we get a version of your Gospel with this rolled in?

Lets first take the simplest case worth considering. The wedge product
of two 3-limit (2D) vectors.

[a1 a2> ^ [b1 b2>

The procedure is to first list every product of a coefficient from A
with a coefficient from B, i.e. their ordinary scalar products. So
with 2 coefficients in each there will be 2x2 = 4 products to
consider, a1*b1, a1*b2, a2*b1, a2*b2.

As you calculate each product, combine the indices of the two
coefficients to make a compound index for it. It is important to keep
the indices in their original order at this stage. So we have

product index
a1*b1 11
a1*b2 12
a2*b1 21
a2*b2 22

There are certain rules about what to to with each product now,
depending on its compound index. There are 3 possibilities:

1. If the indexes have a digit in common then ignore it. Just throw
the product away. So we throw away a1*b1 and a2*b2.

2. Otherwise if the digits in the compound index are already in
alphabetical order, do nothing. So a1*b2 is just fine as it is.

3. Otherwise if they are not in alphabetical order, then put them in
alphabetical order. But first, look at each digit of the compound
index in turn, and count how many larger digits are to the left of it.
Add up all these left-and-larger counts as you go, or just keep
counting so their counts accumulate. If the result is an odd number
then negate the product, otherwise leave it as it was. Consider the
index 21. There are zero larger digits to the left of the 2 (because
there are _no_ digits to the left of it), and there is one larger
digit to the left of the 1, namely the 2. So the total of the
left-and-larger counts is 1, an odd number. So a2*b1 becomes -a2*b1.
We now have

product index
a1*b2 12
-a2*b1 21

Now find any products that have the same index and add them together.
So we have only

product index
a1*b2 - a2*b1 12.

Now list all these sums in alphabetical order of their indices, inside
as many brackets as the sum of the number of brackets in the two
arguments, and pointing in the same direction. The wedge
product is only defined for values having their brackets pointing the
same way.

So our answer is

[[a1*b2-a2*b1>>

Now lets try something more messy. A 7-limit (4D) vector wedged with a
7-limit bivector. This might represent combining a third comma with
two that have already been combined, as an intermediate result on the
way to finding the ET mapping where these all vanish.

[a1 a2 a3 a4> ^ [[b12 b13 b14 b23 b24 b34>>

We first make the list of products of all pairs, with their compound
indices.

product index
a1*b12 112
a1*b13 113
a1*b14 114
a1*b23 123
a1*b24 124
a1*b34 134
a2*b12 212
a2*b13 213
a2*b14 214
a2*b23 223
a2*b24 224
a2*b34 234
a3*b12 312
a3*b13 313
a3*b14 314
a3*b23 323
a3*b24 324
a3*b34 334
a4*b12 412
a4*b13 413
a4*b14 414
a4*b23 423
a4*b24 424
a4*b34 434

Now we get rid of all those with two digits the same. Of course once
you've got the idea, you wouldn't even bother writing them down in the
first place. This leaves.

product index left-and-larger count
a1*b23 123
a1*b24 124
a1*b34 134
a2*b13 213 1
a2*b14 214 1
a2*b34 234
a3*b12 312 2
a3*b14 314 1
a3*b24 324 1
a4*b12 412 2
a4*b13 413 2
a4*b23 423 2

And we do the left-and-larger counts on the indices that aren't
already in alphabetical order (shown above), and negate the product if
this is odd. And we end up with:

product index
a1*b23 123
a1*b24 124
a1*b34 134
-a2*b13 123
-a2*b14 124
a2*b34 234
a3*b12 123
-a3*b14 134
-a3*b24 234
a4*b12 124
a4*b13 134
a4*b23 234

Now we sum the products having the same index.

product index
a1*b23 + a3*b12 - a2*b13 123
a1*b24 - a2*b14 + a4*b12 124
a1*b34 - a3*b14 + a4*b13 134
a2*b34 - a3*b24 + a4*b23 234

Now we list them in alphabetical (also numerical) order of index
inside the correct number of brackets.

[[[a1*b23+a3*b12-a2*b13 a1*b24-a2*b14+a4*b12 a1*b34-a3*b14+a4*b13
a2*b34-a3*b24+a4*b23>>>

Voila!

🔗Carl Lumma <ekin@lumma.org>

11/26/2003 3:52:54 PM

>Now we list them in alphabetical (also numerical) order of index
>inside the correct number of brackets.

"Lexigraphic order", no?

More later; I can't think in this hick country! (Montana)

-Carl

🔗Dave Keenan <d.keenan@bigpond.net.au>

11/26/2003 5:37:22 PM

--- In tuning-math@yahoogroups.com, Carl Lumma <ekin@l...> wrote:
> >Now we list them in alphabetical (also numerical) order of index
> >inside the correct number of brackets.
>
> "Lexigraphic order", no?

Yes. Although I think it's "lexicographic".