[Add] Initial files for Domain theory #2721
Conversation
|
Any particular reason to introduce this material as a separate sub-hierarchy under |
Increased findability, because of the occurrence of In any case, for |
| record IsDirectedFamily {Ix : Set c} (s : Ix → Carrier) : Set (c ⊔ ℓ₁ ⊔ ℓ₂) where | ||
| no-eta-equality | ||
| field | ||
| elt : Ix |
There was a problem hiding this comment.
What does elt stand for?
There was a problem hiding this comment.
elt stands for element, should I change it ?
| A B : Set a | ||
|
|
||
|
|
||
| module _ {c ℓ₁ ℓ₂ : Level} (P : Poset c ℓ₁ ℓ₂) where |
There was a problem hiding this comment.
Do these definitions really need a Poset or just a relation? I don't immediately see the use of any of the other fields of Poset below.
There was a problem hiding this comment.
The definition doesn't need a Poset, but this is essentially always going to be used with a Poset/Preorder. Using a bare relation could cause rather poor inference later down the line, so I'd hesitate a bit on this generalization.
We could also use a Preorder here, but that doesn't really buy us much. Doing posetal completions is really, really cheap with setoids, and the preorder versions of lemmas would be essentially the same thing as the plugging in a posetal completion to a poset-based version.
There was a problem hiding this comment.
Speaking of which: is posetal completion anywhere in the stdlib?
There was a problem hiding this comment.
Looping back to @TOTBWF 's question re poset completion: no. Please consider adding to stdlib!
As for 'not buying much' between Preorder and Poset, we tend to try to state (and prove!) things wrt maximum-sensible generality, and antisymmetry feels like 'noise' much of the time in developing the basics... but YMMV.
There was a problem hiding this comment.
Apologies, I think I was wrong on poset completion: I think that
agda-stdlib/src/Relation/Binary/Construct/Interior/Symmetric.agda
Lines 84 to 107 in 54f5c38
gives you what you want, but not necessarily in a recognisable form... I had to think about it a bit harder while looping back to #2070 / #2071
|
|
||
| {-# OPTIONS --cubical-compatible --safe #-} | ||
|
|
||
| module Relation.Binary.Domain.Definitions where |
There was a problem hiding this comment.
Given that neither of the definitions here depend on Poset (now), maybe they should go where all the other binary relations are defined?
There was a problem hiding this comment.
What I mean is that all 3 definitions below should be moved to Relation.Binary.Definitions, with the naming made consistent with the names already in that file.
|
Could you please resolve the CHANGELOG conflicts? |
|
Also: you don't seem to have addressed the latest 2 items that I asked about? |
|
|
||
| {-# OPTIONS --cubical-compatible --safe #-} | ||
|
|
||
| module Relation.Binary.Domain.Definitions where |
There was a problem hiding this comment.
What I mean is that all 3 definitions below should be moved to Relation.Binary.Definitions, with the naming made consistent with the names already in that file.
|
|
||
| {-# OPTIONS --cubical-compatible --safe #-} | ||
|
|
||
| module Relation.Binary.Domain.Structures where |
There was a problem hiding this comment.
To 'fit' the rest of stdlib, even though this is all "most useful" for a full Poset, these structures should be in terms of a RawRelation, as that is all that is used in the definitions.
There was a problem hiding this comment.
See my latest round of comments on #2809 ... further input from you would be welcome!
|
Depending on what others think (and my review being taken into account), I do think this could make it to 2.3. |
|
Suggest that we close in favour of #2809 ? |
|
Since the attributions are correct in that further PR, it's probably best to close this one. |
This draft pull request introduces three new files under src/Relation/Binary/Domain, providing foundational modules for domain theory in the Agda standard library. The new modules include definitions and structures such as DCPO, Lub, and ScottContinuous, aiming to extend the library's support for domain-theoretic formalizations. This is an initial draft and feedback is welcome on the design and implementation.
For the second part see the pull request : [Add] Properties for DCPOs
The definition of Lub provided here is likely better placed elsewhere in the library and may require a different name. For further discussion, see issue #2717.
Source
1Lab library