-
Notifications
You must be signed in to change notification settings - Fork 259
Adds "pushforward" to Relation.Unary #2840
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
|
This seems a reasonable addition, but I'm not familiar with the term "pushforward" in this context. Where does it come from? |
I'm using the term as in "pushfoward measure" from measure theory. If there's something more standard in the context of predicates, it's fine with me to change. |
|
I'd personally call the preimage of P under f. But let's wait to see if anyone else has naming ideas before changing it |
|
If you're going to add this... ... better IMNSVHO that you also prove it is the left adjoint to the change-of-base/pullback operation (as to our calling that operation ... But clearly we can't have a notation which is subscripted wrt one argument, moreover which might clash with existing Also, see #436 (generalisation to Function.Related.TypeIsomorphisms.∃-≡ : ∀ (P : A → Set b) {x} → P x ↔ (∃[ y ] y ≡ x × P y)so at least there are/would be refactoring opportunities here... So: yes to the addition, but I think we can do better, and to do this well would need a bit more design, I think. Not least because if we add this now, any subsequent generalisation might complicate the name space later wrt deprecation etc., ... |
As for 'preimage', I'd rather call it/think it should be called 'image'... ;-) but again, overloaded terminology considered harmful? As for 'pushforward', I'm aware of the usage in (modern) measure theory, but again, proliferation of new terms-of-art from various domains frustrates any attempt to unify notation/properties... DRY! |
You're absolutely right! I got myself confused. |
|
D'oh... The fine print needs checking though!
Plus, of course: discoverability as an issue (and perhaps should be added as a new label for issues/PRs... @JacquesCarette !?) |
Oh, that's interesting. I can see that, though it was not at all obvious to me until you pointed it out. However |
Yes, they need to be generalised from |
For that matter, I would've called |
Ok, though I'm not clear exactly what, if anything, I can/should do now. |
|
Let me offer an orthogonal remark. Instead of I would prefer The idea behind Conversely, I'd expect a peeling off action to keep the family |
Thanks. This makes sense. |
Works for me. |
|
As for how to proceed now, we could merge the definition as is (modulo exact shape of types)essentially as a provisional addition for v2.4, but I think that leaves a complicated refactoring downstream for v3.0 to generalise things ... appropriately. But I'm guessing that that might be more work than you're able to take on for the present PR @bsaul ? My teaching this semester might make it tricky for me to take on before the new year, for example. So I'd welcome further input from the other core maintainers on this one! |
... that may be fine for the left adjoint, but what about the right adjoint? Hence my suggested generalisation of diamond (left) and box (right), rather than more turnstiles... |
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.
My (new suggested) names are only suggestions, but I think in the interests of treating the left- and right- adjoints on an even footing, we shouldn't simply use a symbol which flips the turnstile for the sake of privileging one over the other.
As for the proofs of the adjoint transformers in Relation.Unary.Properties, those too can be added downstream, unless you feel like adding them here yourself?
| _⊣_ : (A → B) → Pred A ℓ → Pred B _ | ||
| f ⊣ P = λ b → ∃ λ a → f a ≡ b × P a |
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.
In a spirit of 'compromise', and taking @gallais 's nudge about relative position wrt the turnstile, suggest instead:
| _⊣_ : (A → B) → Pred A ℓ → Pred B _ | |
| f ⊣ P = λ b → ∃ λ a → f a ≡ b × P a | |
| ∃[_]⊢_ : (A → B) → Pred A ℓ → Pred B ℓ | |
| ∃[ f ]⊢ P = λ b → ∃ λ a → f a ≡ b × P a |
so that one can also then add (plus fixing up the fixity declarations! sigh...)
∀[_]⊢_ : (A → B) → Pred A ℓ → Pred B ℓ
∀[ f ]⊢ P = λ b → ∀ a → f a ≡ b → P aper Lawvere, and consider refinements of this in a setoidal context downstream?
This PR adds the pushforward of predicate along a function.