5.25. arith_or

Origin

Used in the definition of several automata

Constraint

$\mathrm{𝚊𝚛𝚒𝚝𝚑}_\mathrm{𝚘𝚛}\left(\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}\mathtt{1},\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}\mathtt{2},\mathrm{𝚁𝙴𝙻𝙾𝙿},\mathrm{𝚅𝙰𝙻𝚄𝙴}\right)$

Arguments
 $\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}\mathtt{1}$ $\mathrm{𝚌𝚘𝚕𝚕𝚎𝚌𝚝𝚒𝚘𝚗}\left(\mathrm{𝚟𝚊𝚛}-\mathrm{𝚍𝚟𝚊𝚛}\right)$ $\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}\mathtt{2}$ $\mathrm{𝚌𝚘𝚕𝚕𝚎𝚌𝚝𝚒𝚘𝚗}\left(\mathrm{𝚟𝚊𝚛}-\mathrm{𝚍𝚟𝚊𝚛}\right)$ $\mathrm{𝚁𝙴𝙻𝙾𝙿}$ $\mathrm{𝚊𝚝𝚘𝚖}$ $\mathrm{𝚅𝙰𝙻𝚄𝙴}$ $\mathrm{𝚒𝚗𝚝}$
Restrictions
 $\mathrm{𝚛𝚎𝚚𝚞𝚒𝚛𝚎𝚍}$$\left(\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}\mathtt{1},\mathrm{𝚟𝚊𝚛}\right)$ $\mathrm{𝚛𝚎𝚚𝚞𝚒𝚛𝚎𝚍}$$\left(\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}\mathtt{2},\mathrm{𝚟𝚊𝚛}\right)$ $|\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}\mathtt{1}|=|\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}\mathtt{2}|$ $\mathrm{𝚁𝙴𝙻𝙾𝙿}\in \left[=,\ne ,<,\ge ,>,\le \right]$
Purpose

Enforce for all pairs of variables $\mathrm{𝚟𝚊𝚛}{\mathtt{1}}_{i},\mathrm{𝚟𝚊𝚛}{\mathtt{2}}_{i}$ of the $\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}\mathtt{1}$ and $\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}\mathtt{2}$ collections to have $\mathrm{𝚟𝚊𝚛}{\mathtt{1}}_{i}\mathrm{𝚁𝙴𝙻𝙾𝙿}\mathrm{𝚅𝙰𝙻𝚄𝙴}\vee \mathrm{𝚟𝚊𝚛}{\mathtt{2}}_{i}\mathrm{𝚁𝙴𝙻𝙾𝙿}\mathrm{𝚅𝙰𝙻𝚄𝙴}$.

Example
$\left(\begin{array}{c}〈0,1,0,0,1〉,\hfill \\ 〈0,0,0,1,0〉,=,0\hfill \end{array}\right)$

The constraint $\mathrm{𝚊𝚛𝚒𝚝𝚑}_\mathrm{𝚘𝚛}$ holds since, for all pairs of variables $\mathrm{𝚟𝚊𝚛}{\mathtt{1}}_{i},\mathrm{𝚟𝚊𝚛}{\mathtt{2}}_{i}$ of the $\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}\mathtt{1}$ and $\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}\mathtt{2}$ collections, there is at least one variable that is equal to 0.

Typical
$|\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}\mathtt{1}|>0$
Symmetry

Items of $\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}\mathtt{1}$ and $\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}\mathtt{2}$ are permutable (same permutation used).

specialisation: $\mathrm{𝚊𝚛𝚒𝚝𝚑}$ ($\mathrm{𝚟𝚊𝚛𝚒𝚊𝚋𝚕𝚎}$ $\mathrm{𝚁𝙴𝙻𝙾𝙿}$ $\mathrm{𝚅𝙰𝙻𝚄𝙴}$ $\vee$ $\mathrm{𝚟𝚊𝚛𝚒𝚊𝚋𝚕𝚎}$ $\mathrm{𝚁𝙴𝙻𝙾𝙿}$ $\mathrm{𝚅𝙰𝙻𝚄𝙴}$ replaced by $\mathrm{𝚟𝚊𝚛𝚒𝚊𝚋𝚕𝚎}$ $\mathrm{𝚁𝙴𝙻𝙾𝙿}$ $\mathrm{𝚅𝙰𝙻𝚄𝙴}$).

Keywords
Arc input(s)

$\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}\mathtt{1}$ $\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}\mathtt{2}$

Arc generator
$\mathrm{𝑃𝑅𝑂𝐷𝑈𝐶𝑇}$$\left(=\right)↦\mathrm{𝚌𝚘𝚕𝚕𝚎𝚌𝚝𝚒𝚘𝚗}\left(\mathrm{𝚟𝚊𝚛𝚒𝚊𝚋𝚕𝚎𝚜}\mathtt{1},\mathrm{𝚟𝚊𝚛𝚒𝚊𝚋𝚕𝚎𝚜}\mathtt{2}\right)$

Arc arity
Arc constraint(s)
$\mathrm{𝚟𝚊𝚛𝚒𝚊𝚋𝚕𝚎𝚜}\mathtt{1}.\mathrm{𝚟𝚊𝚛}\mathrm{𝚁𝙴𝙻𝙾𝙿}\mathrm{𝚅𝙰𝙻𝚄𝙴}\vee \mathrm{𝚟𝚊𝚛𝚒𝚊𝚋𝚕𝚎𝚜}\mathtt{2}.\mathrm{𝚟𝚊𝚛}\mathrm{𝚁𝙴𝙻𝙾𝙿}\mathrm{𝚅𝙰𝙻𝚄𝙴}$
Graph property(ies)
$\mathrm{𝐍𝐀𝐑𝐂}$$=|\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}\mathtt{1}|$

Graph class
 $•$$\mathrm{𝙰𝙲𝚈𝙲𝙻𝙸𝙲}$ $•$$\mathrm{𝙱𝙸𝙿𝙰𝚁𝚃𝙸𝚃𝙴}$ $•$$\mathrm{𝙽𝙾}_\mathrm{𝙻𝙾𝙾𝙿}$

Graph model

Parts (A) and (B) of Figure 5.25.1 respectively show the initial and final graphs associated with the Example slot. Since we use the $\mathrm{𝐍𝐀𝐑𝐂}$ graph property, the arcs of the final graph are stressed in bold.

Automaton

Figure 5.25.2 depicts the automaton associated with the $\mathrm{𝚊𝚛𝚒𝚝𝚑}_\mathrm{𝚘𝚛}$ constraint. Let $\mathrm{𝚅𝙰𝚁}{\mathtt{1}}_{i}$ and $\mathrm{𝚅𝙰𝚁}{\mathtt{2}}_{i}$ be the ${i}^{th}$ variables of the $\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}\mathtt{1}$ and $\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}\mathtt{2}$ collections. To each pair of variables $\left(\mathrm{𝚅𝙰𝚁}{\mathtt{1}}_{i},\mathrm{𝚅𝙰𝚁}{\mathtt{2}}_{i}\right)$ corresponds a signature variable ${𝚂}_{i}$. The following signature constraint links $\mathrm{𝚅𝙰𝚁}{\mathtt{1}}_{i}$, $\mathrm{𝚅𝙰𝚁}{\mathtt{2}}_{i}$ and ${𝚂}_{i}$: $\mathrm{𝚅𝙰𝚁}{\mathtt{1}}_{i}\mathrm{𝚁𝙴𝙻𝙾𝙿}\mathrm{𝚅𝙰𝙻𝚄𝙴}\vee \mathrm{𝚅𝙰𝚁}{\mathtt{2}}_{i}\mathrm{𝚁𝙴𝙻𝙾𝙿}\mathrm{𝚅𝙰𝙻𝚄𝙴}⇔{𝚂}_{i}$. The automaton enforces for each pair of variables $\mathrm{𝚅𝙰𝚁}{\mathtt{1}}_{i}$,$\mathrm{𝚅𝙰𝚁}{\mathtt{2}}_{i}$ the condition $\mathrm{𝚅𝙰𝚁}{\mathtt{1}}_{i}\mathrm{𝚁𝙴𝙻𝙾𝙿}\mathrm{𝚅𝙰𝙻𝚄𝙴}\vee \mathrm{𝚅𝙰𝚁}{\mathtt{2}}_{i}\mathrm{𝚁𝙴𝙻𝙾𝙿}\mathrm{𝚅𝙰𝙻𝚄𝙴}$.