Skip to content

Commit dec5d77

Browse files
committed
Make terms clearer using boolean expressions
I tried to make it clear that a CDNL terms is a conjunction of negations of conjunctions by desugaring them into boolean expressions. I'm having trouble making what's going on sufficiently clear since we need to write the negations out to apply transformation rules to them, but then they are not incompatibilities anymore but constraints that must be satisfied.
1 parent 81f3898 commit dec5d77

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

Diff for: src/internals/incompatibilities.md

+16-12
Original file line numberDiff line numberDiff line change
@@ -89,28 +89,32 @@ With incompatibilities, we would note
8989
\Rightarrow \quad \\{ a: T_a, c: \overline{T_c} \\}. \\]
9090

9191
This is the simplified version of the rule of resolution.
92-
For the generalization, let's reuse the "more mathematical" notation of conjunctions
93-
for incompatibilities \\( T_a \land T_b \\) and the above rule would be
92+
For the generalization, let's write them as [boolean expressions][boolean_expression].
9493

95-
\\[ T_a \land \overline{T_b}, \quad
96-
T_b \land \overline{T_c} \quad
97-
\Rightarrow \quad T_a \land \overline{T_c}. \\]
94+
\\[ \neg (T_a \land \overline{T_b}) \quad \land \quad
95+
\neg (T_b \land \overline{T_c}) \quad
96+
\Rightarrow \quad \neg (T_a \land \overline{T_c}). \\]
9897

9998
In fact, the above rule can also be expressed as follows
10099

101-
\\[ T_a \land \overline{T_b}, \quad
102-
T_b \land \overline{T_c} \quad
103-
\Rightarrow \quad T_a \land (\overline{T_b} \lor T_b) \land \overline{T_c} \\]
100+
\\[ \neg (T_a \land \overline{T_b}) \quad \land \quad
101+
\neg (T_b \land \overline{T_c}) \quad
102+
\Rightarrow \quad \neg (T_a \land (\overline{T_b} \lor T_b) \land \overline{T_c}) \\]
104103

105104
since for any term \\( T \\), the disjunction \\( T \lor \overline{T} \\) is always true.
106-
In general, for any two incompatibilities \\( T_a^1 \land T_b^1 \land \cdots \land T_z^1 \\)
107-
and \\( T_a^2 \land T_b^2 \land \cdots \land T_z^2 \\) we can deduce a third,
108-
called the resolvent whose expression is
105+
In general, for any two incompatibilities \\( \\{ a: T_a^1, \cdots, z: T_z^1 \\} \\) and
106+
\\( \\{ a: T_a^2, \cdots, z: T_z^2 \\}, \\)
107+
or
109108

110-
\\[ (T_a^1 \lor T_a^2) \land (T_b^1 \land T_b^2) \land \cdots \land (T_z^1 \land T_z^2). \\]
109+
\\[ \neg (T_a^1 \land T_b^1 \land \cdots \land T_z^1) \land \neg (T_a^2 \land T_b^2 \land \cdots \land T_z^2), \\]
110+
we can deduce a third, called the resolvent whose expression is
111+
112+
\\[ \neg ((T_a^1 \lor T_a^2) \land (T_b^1 \land T_b^2) \land \cdots \land (T_z^1 \land T_z^2)). \\]
111113

112114
In that expression, only one pair of package terms is regrouped as a union (a disjunction),
113115
the others are all intersected (conjunction).
114116
If a term for a package does not exist in one incompatibility,
115117
it can safely be replaced by the term \\( \neg [\varnothing] \\) in the expression above
116118
as we have already explained before.
119+
120+
[boolean_expression]: https://en.wikipedia.org/wiki/Boolean_expression#Boolean_operators

0 commit comments

Comments
 (0)