-
Notifications
You must be signed in to change notification settings - Fork 257
Filters - alternative to the base of Domain theory #2829
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
src/Relation/Binary/Filter.agda
Outdated
UpwardClosure : (A → Set ℓ₁) → Rel A ℓ₂ → Set _ | ||
UpwardClosure {A = A} F _≤_ = ∀ (x y : A) → (x ≤ y) × (F x) → F y |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[DRY]
This is redundant, as an instance of Relation.Binary.Definitions._Respects_
... noting that the use of of _×_
again involves redundant currying/uncurrying.
-- - `F` is downwards directed: there exists some x with F(x), and for | ||
-- - every x, y : P with F(x) and F(y), there exists some z : P with | ||
-- F(z) × z ≤ x × z ≤ y |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose that the thing which makes me uneasy about such a definition is that it fuses two aspects of the definition, in the interest of avoiding some of the difficulties that Reed alludes to in #2814 , namely:
- the 'subset' implicitly defined by the predicate
F
- the abstract property of a relation, here '
_≤_
restricted to the subset defined byF
', as being directed
I think as far as stdlib
is concerned, it would be (more) helpful to isolate the second one, as for example in #2813 (where it would make sense simply to cherry-pick the definition, and perhaps some of its properties, and leave the Pointed
extension construction to a separate PR), and as to the first, perhaps introduce a/the construction, analogous to Function.Base._on_
, corresponding to the first one?
Not sure whether we should continue the discussion here, or else on #2814 though.
@gabriellisboaconegero and I have had some offline discussions about using a homomorphism-based definition that seems to be the One True Way. The idea is that we can define a setoidal analog of the order on propositions by defining a poset whose carrier is
This removes the need for upwards and downwards closure, as a homomorphism Next, we can define the order-theoretic analog of the category of elements. This transforms a monotone map Finally, we can define a filter as a monotone map EDIT: It was pointed out on zulip that this equivalence relation already exists as https://agda.github.io/agda-stdlib/master/Function.Properties.Equivalence.html#1935, so it should be really easy to assemble this from kit that we already have. |
This work aims to be an alternative to the base of domain theory (#2809). There were a lot of discussions about the decisions, and talking with @TOTBWF, a good alternative would be using filters. So, we introduced a generalised way.
Added
Structure
I know the current implementation does not follow the stdlib patterns, but some of the facts and definitions I was not sure about were to be put.