From a3fe9f6a7df6a870a6f7bf94a94631a28b3d9d00 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Thu, 8 Dec 2016 20:22:53 +1100 Subject: [PATCH] design/caps: fix and clarify subset operations with empty fields https://bugzilla.gnome.org/show_bug.cgi?id=775786 --- markdown/design/caps.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/markdown/design/caps.md b/markdown/design/caps.md index 3f15ec9991..cf868974fa 100644 --- a/markdown/design/caps.md +++ b/markdown/design/caps.md @@ -41,9 +41,13 @@ One caps "A" is a subset of another caps "B" if for each structure in in "A". A structure "a" is the subset of a structure "b" if it has the same -structure name, the same caps features and each field in "b" exists in -"a" and the value of the field in "a" is a subset of the value of the -field in "b". "a" can have additional fields that are not in "b". +structure name, the same caps features and each field in "b" either does not +exist in "a", or the value of the field in "a" is a subset of the value of the +field in "b". "a" must not have additional fields that are not in "b". Fields +that are in "b" but not in "a" (aka, an empty field) are always a subset. +This is different to the intuitive mathematical definition as an empty field +is defined to contain all possible values. This means that the empty field is +always a superset of any other field. EMPTY caps are a subset of every other caps. Every caps are a subset of ANY caps.