In Definitional Proof Irrelevance Without K, inductives in sProp need to satisfy three conditions to allow large elimination:
(1) Every non-forced argument must be in sProp.
(2) The return types of constructors must be pairwise orthogonal.
(3) Every recursive call must satisfy a syntactic guard condition
I have the following data definition in Agda (I have T
, <
defined elsewhere, but given as postulates here for a MWE):
{-# OPTIONS --prop #-}
postulate
T : Set
_<_ : T → T → Set
data Acc (x : T) : Prop where
acc : (∀ y → y < x → Acc y) → Acc x
Now I'd like to throw caution to the wind and eliminate Acc
to something in Set
at the expense of, as I understand it, possible nonterminating type checking. Evidently right now that's not possible since Acc
violates (3) (and this is explicitly stated as an example in the paper), yielding the type checking error:
Cannot split on datatype in Prop unless target is in Prop
when checking that the pattern acc p has type Acc x
Is there some way of only turning (3) off? Perhaps with something like {- NON_TERMINATING -}
... somewhere? I'm confident I won't actually run into nontermination issues (I've previously proven the wellfoundedness of <
, for one), and I'd like to type check the rest of my proofs without disregarding safety entirely.
EDIT: I'd be interested to know if it'd be possible to do the same in Coq as well, which currently gives me this error:
Fixpoints on proof irrelevant inductive types should produce proof irrelevant values.