The Forum for Discussion about The Third Manifesto and Related Matters

Please or Register to create posts and topics.

On the cardinality of (scalar) types

RM Pre 1 requires (in effect) all scalar types have at least one value. ("With the sole exception of the system defined empty type omega ...", which I presume could never be the type of an attribute; or if there were an attribute at type omega in some heading HΩ, the only valid relation values with that heading would be empty.)

By the same argument of uselessness of HΩ, why/how could there be a type with cardinality one? If there were an attribute at some type T1 with cardinality 1, in some heading H1, all nonempty relation values must have T1's only value in that attribute, so the appearance of that value is information equivalent to 'non-empty', the meaning of which could be built into the relvar's characteristic predicate.

Is H1 as useless as HΩ?

Would the TTM model be hopelessly hobbled if RM Pre 1 required all scalar types have more than one value?

Does the situation change when we consider also Tuple-valued and Relation-valued Attributes? Could there be a TVA or RVA with a only single valid value?

Reason for asking: I'm still pursuing the lattice-theoretic axiomatisation of relations. If all attribute types are required to have more than one value, I can say that the relation values with empty heading (DEE, DUM) are the only ones with so few as two values; for all other headings there are more than two (actually, at least four).

I can't think of any interesting use for a type with only one valid value. It would seem that such a type would only have some use in speculative engineering where you intend to add more values at some later point, and that we shouldn't be doing anyway.

Having scalar types with exactly 1 value, also known as singleton types, are immensely useful.

BUT, that usefulness mainly exists in a type system supporting type unions, which base TTM does not but as I recall TTM+IM does.

So example uses of such singleton types is to represent special values such as negative or positive infinity.

These can then be unioned with a regular numeric type to allow regular numbers or infinities, where the regular numeric type itself only allows normal numbers.

 

Quote from Darren Duncan on April 15, 2021, 6:20 am

Having scalar types with exactly 1 value, also known as singleton types, are immensely useful.

BUT, that usefulness mainly exists in a type system supporting type unions, which base TTM does not but as I recall TTM+IM does.

So example uses of such singleton types is to represent special values such as negative or positive infinity.

These can then be unioned with a regular numeric type to allow regular numbers or infinities, where the regular numeric type itself only allows normal numbers.

 

Seems like a question of semantic hair-splitting to me. I would argue that neither infinity is useful in isolation. There is also no need to consider it to be a type in itself, other than that you have been restricted to do so by a certain implementation, it is really just another value of the number type.

Quote from Darren Duncan on April 15, 2021, 6:20 am

Having scalar types with exactly 1 value, also known as singleton types, are immensely useful.

BUT, that usefulness mainly exists in a type system supporting type unions, which base TTM does not but as I recall TTM+IM does.

So example uses of such singleton types is to represent special values such as negative or positive infinity.

These can then be unioned with a regular numeric type to allow regular numbers or infinities, where the regular numeric type itself only allows normal numbers.

 

Ah yes, fair point. I'm taking it that those singleton types have the same role as the IM's omega: they're part of the machinery for defining and manipulating inheritance of types.

You wouldn't have an attribute at type singleton 'negative infinity'. You would have an attribute at type 'negative infinity'-union-'regular numeric'-union-'positive infinity'.