However, perhaps the right thing is to find a way to express an inversion of a
KeyPathto aBoolinstead of unnecessarily expandingBool's API.
I agree with your sentiment, however, such a solution escapes me. It looks like the key path code only deals with downcats.
swift/KeyPath.swift at main · apple/swift (github.com)](https://github.com/apple/swift/blob/main/stdlib/public/core/KeyPath.swift))
So, something like this may not work,
extension KeyPath where Value == Bool {
var not: KeyPath<Root, Bool> {
return <#...#>
}
}