-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add Binary Sum Types and Truncations #12
base: master
Are you sure you want to change the base?
Conversation
still working on cases
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.
Hello Bruno, thanks for the contribution!
Would you be willing to share the motivation for these additions?
Looking at the typing rules, what is called truncation here seems to be a generic monad (with just the left identity law).
Since the formalisation already has Sigma types, an alternative to the sum type would have been booleans or more generally, finite (enum) types. Then disjoint sum types would be encodable with Sigma. Or maybe they already are as Sigma Nat T
where T zero = A
and T (suc n) = B
.
→ Γ ⊢ u ∷ A ▹▹ C | ||
→ Γ ⊢ v ∷ B ▹▹ C | ||
→ Γ ⊢ C -- necessary? | ||
→ Γ ⊢ cases C t u v ∷ C |
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.
So case distinction on the binary sum is non-dependent, it seems.
→ Γ ⊢ B | ||
→ Γ ⊢ a ∷ A | ||
→ Γ ⊢ f ∷ A ▹▹ ∥ B ∥ | ||
→ Γ ⊢ ∥ₑ B (∥ᵢ a) f ≡ f ∘ a ∷ ∥ B ∥ |
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.
What is called "truncation" here looks like a generic monad with just the left identity law.
Are there any special equalities for truncation (like extensionality laws)?
(Notes to myself from looking at the CI results:)
|
We have extended the type theory with binary sum types denoted
A ∪ B
and truncations denoted∥ A ∥
and proved decidability of conversion for this extended theory.