Skip to content
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

Open
wants to merge 44 commits into
base: master
Choose a base branch
from

Conversation

brunorochapaiva
Copy link

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.

Copy link
Collaborator

@andreasabel andreasabel left a 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
Copy link
Collaborator

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 ∥
Copy link
Collaborator

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)?

@andreasabel
Copy link
Collaborator

(Notes to myself from looking at the CI results:)

  • stacking layout keywords abstract mutual not supported by 2.6.1
  • --lossy-unification not supported by 2.6.2 (probably not needed...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants