From 82626520a1db23bf551e4a2660a01eb553f024f3 Mon Sep 17 00:00:00 2001 From: Alexander McCord <11488393+alexmccord@users.noreply.github.com> Date: Wed, 8 May 2024 21:53:46 -0700 Subject: [PATCH] Fluff around what a cofinite set is. --- docs/negation-types.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/negation-types.md b/docs/negation-types.md index 18d69e7..e51f814 100644 --- a/docs/negation-types.md +++ b/docs/negation-types.md @@ -8,7 +8,7 @@ A type that represents the complement of the type being negated, which is a unio Type refinements will produce negation types to get the complementation. For the most part, users will never need to write these negation types themselves, except for when they want to _maintain_ some invariants beyond the scope of the branch. -A [cofinite set](https://en.wikipedia.org/wiki/Cofiniteness) arises when you have a negation type in conjunction with intersection types. For example, `string & ~"a"` is a cofinite string set that accepts any `string` excluding `"a"`. This happens often with type refinements where `typeof(x) == "string" and x ~= "a"` gives rise to the type `string & ~"a"`. +A [cofinite set](https://en.wikipedia.org/wiki/Cofiniteness) arises when you have some negated `X` in conjunction with some supertype of `X`. For example, `string & ~"a"` is a cofinite string set that accepts any `string` excluding `"a"`. This happens often with type refinements where `typeof(x) == "string" and x ~= "a"` gives rise to the type `string & ~"a"`. ## Design