IntersectMBO / IntersectMBO/formal-ledger-specifications

Should we use dependent sum and product types visibly?

Open
#691 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Agda
Stars
52
Forks
20
Avg merge
6d 14h
Merged PRs (30d)
7

Description

We should first try to assess the necessity for this. So the questions to ask are:
- where do we actually show dependent function and product types in the PDF, and
- do we actually need to show them?

By the second item, I don't necessarily mean to just hide them. It can also mean to refactor the code to remove it completely. Once we have this information, we can then make an assessment: what's the cost of not using these (for us and our audience), versus the cost of having to read a tutorial on it?

Dependent sum and product types came up twice recently:
- For `KeyPair` (a dependent sum type), which is only ever used in expressing properties of crypto primitives. I think this can be refactored at quite a low cost.
- For defining our own universes, e.g. here: https://github.com/IntersectMBO/formal-ledger-specifications/issues/130.

Are there any other instances of dependent pairs that would be more difficult to get rid of?

If we end up using universes for something, I don't think we need to fully explain dependent products. An explanation that covers the situation we're interested in would be sufficient and probably much easier for a novice.

Explanations could use #276 as a starting point.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.