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

Impredicative Prop #3883

Open
amp12 opened this issue Jul 4, 2019 · 3 comments
Open

Impredicative Prop #3883

amp12 opened this issue Jul 4, 2019 · 3 comments
Labels
impredicativity Impredicative Prop and similar prop Prop, definitional proof irrelevance termination Issues relating to the termination checker type: enhancement Issues and pull requests about possible improvements ux: options Issues relating to Agda's command line options
Milestone

Comments

@amp12
Copy link

amp12 commented Jul 4, 2019

Would it be possible to have a "--prop-in-prop" option that collapses the Prop_ hierarchy and makes Prop into an impredicative (but hopefully still consistent) universe of proof-irrelevant propositions?

@gallais gallais added ux: options Issues relating to Agda's command line options prop Prop, definitional proof irrelevance labels Jul 4, 2019
@jespercockx
Copy link
Member

Currently Agda's termination check assumes predicativity so such an option would not be consistent:

{-# OPTIONS --prop --type-in-type #-}

data  : Prop where

data Bad : Prop where
  b : ((P : Prop)  P  P)  Bad

bad : Bad
bad = b (λ P p  p)

no-bad : Bad  ⊥
no-bad (b x) = no-bad (x Bad bad)

very-bad : ⊥
very-bad = no-bad bad

So first we would have to patch the termination checker.

@jespercockx jespercockx added termination Issues relating to the termination checker type: enhancement Issues and pull requests about possible improvements labels Jul 4, 2019
@jespercockx jespercockx added this to the icebox milestone Nov 18, 2019
@jespercockx jespercockx changed the title --prop-in-prop ? Impredicative Prop May 10, 2023
@jespercockx
Copy link
Member

It seems this could now be implemented easily, thanks to a change by @plt-amy to the termination checker for --prop: #6639 (comment)

@andreasabel
Copy link
Member

andreasabel commented May 2, 2024

We could have --impredicative-prop disable --syntax-based-termination, because type-based termination does not have the inconsistency issue with impredicativity.

We would have to go through the constraint solver to look for predicativity assumptions. At least the comment here would have to change:

-- If @Prop l == funSort s1 s2@, then @s2@ must be of the
-- form @Prop l2@, and @s1@ can be one of @Set l1@, Prop
-- l1@, or @SizeUniv@.
Prop l -> do
l2 <- forceUniv UProp s2
leqLevel l2 l
s1b <- reduceB s1
let s1 = ignoreBlocking s1b
blocker = getBlocker s1b
case funSort' s1 (Prop l2) of
-- If the work we did makes the @funSort@ compute,
-- continue working.
Right s -> equalSort (Prop l) s
-- Otherwise: postpone
Left _ -> patternViolation blocker

We need to relax the fitsIn check for Prop.

@andreasabel andreasabel modified the milestones: 2.7.0, icebox May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impredicativity Impredicative Prop and similar prop Prop, definitional proof irrelevance termination Issues relating to the termination checker type: enhancement Issues and pull requests about possible improvements ux: options Issues relating to Agda's command line options
Projects
None yet
Development

No branches or pull requests

4 participants