# Substituable Values (SV Semantics)

## Definitions

The relation is called *Substitutable Values* or *SV relation* iff the following three propositions hold:

**Indifference**:

Consider a preference and two values with . If none of them is better than the other, they are indifferent, **Substitution of Equivalently Better Tuples**:**Substitution of Equivalently Worse Tuples**:

Any SV relation is reflexive, symmetric and transitive thus being an equivalence relation.

### REGULAR SV Semantics

Having a weak order preference as equivalence relation this prerequisite yields the so-called **REGULAR** SV semantics.

Preference SQL uses REGULAR SV semantics by default.

### TRIVIAL SV Semantics

If the identy relation as smallest equivalence relation is chosen the identity yields the so-called **TRIVIAL** SV semantics.

Since only x = x is valid the propositions (1)-(3) get trivial.

### User-defined SV Semantics

**User-defined** SV semantics is enabled by clauses of the kind like *SV((value*_{i}, ... , value_{j}), ... ,(value_{x}, ... , value_{y})) by postponing this clause at the end of any preference clause. The ANTICHAIN preference constructor in combination with complex preference constructors offers the easiest way to demonstrate the effects of user-defined SV semantics.

### GROUPING Clause with User-defined SV Semantics

The

**GROUPING** clause behaves as the GROUP BY clause. This means all null values, which are not equal, are grouped by one

**NULL equivalence class** whereas all other values are treated by

**TRIVIAL** SV semantics. Having no null values or explicitly excluding null values, GROUPING may be expressed by the

ANTICHAIN preference constructor in the first position of a

priorization. **GROUPING** with

**user-defined SV semantics** is enabled by clauses of the kind like

`SV((value `_{i}, ... , value _{j}) [AS 'Class_1'] , ... ,

(value _{x}, ... , value _{y}) [AS 'Class_n'] ) AS newGroupingAttribute

by attaching this clause behind any grouping attribute. Also each

*newGroupingAttribute* must have a unique attribute name. Obviously, aggregation functions in conjunction with newGroupingAttribute take care of the user-defined SV semantics.

### Multi-Level BMO (ML-BMO) induced SV Semantics

By using the **REGULARIZED** keyword behind **any** complex preference in brackets, the outcome of the complex preference is inherenty transformed to a layered preference . Each layer corresponds to a BMO_{i} which is generated by a muli-level BMO evaluation ( EP15for the special case of a Pareto preference) where BMO_{0} is the standard BMO set . Obviously, the level function of each layer is defined by f(x) = i. For simplicity, the **REGULARIZED** keyword is at present restricted to just the combintation of ** (p**_{1}) REGULARIZED PRIOR TO (p_{2}) ... REGULARIZED PRIOR TO (p_{n}). Thus, this special case of regularization is implemented as a LAYERED_{1} preference, because the generation of BMO_{0} is sufficient and correct with respect to prioritization.

Indifferent values, which are not substitutable values, are called *Alternative Values*.