Encodings for sums of relational vocabularies #
Vocabulary.sum enumerates the left language's relation symbols before the right language's.
Consequently concatenating the two lists of relation tables gives the encoding for the sum
language. Table lookup preserves both parts, and well-formedness splits into the corresponding
conditions on the two lists. No tables for function symbols are introduced.
Main definitions #
Cslib.Logic.Vocabulary.sum: the concatenated enumeration of two relational vocabularies.
Main results #
Cslib.Logic.Vocabulary.table_sum_inl,Cslib.Logic.Vocabulary.table_sum_inr: lookup in concatenated relation tables.Cslib.Logic.Vocabulary.wellFormed_sum_iff: well-formedness of the combined input, including malformed source inputs when the right-hand table count is fixed.
Enumerate the symbols of the left vocabulary followed by the symbols of the right one.
The sum vocabulary has one entry for each entry of its two summands.
A left relation retains its original table index.
A right relation's table index is shifted by the number of left relations.
The arity of a left entry in the combined enumeration is unchanged.
The arity of a right entry in the combined enumeration is unchanged.
Left relation tables are preserved by concatenation when the left list has its expected number of tables.
Right relation tables are preserved by concatenation when the left list has its expected number of tables.
If the number of right tables is fixed, combined well-formedness is exactly well-formedness of both inputs. In particular a malformed left input cannot be repaired by appending right tables.
Concatenating well-formed relation tables gives a well-formed sum-language input.