Thorsten Altenkirch
2018-06-26 09:52:36 UTC
I can switch off positivity checking locally by saying
{-# NO_POSITIVITY_CHECK #-}
But I canât say
{-# TYPE-IN-TYPE #-}
data Prop : Set
T : Prop â Set
data Prop where
pi : (A : Set)(b : A â Prop) â Prop
T (pi A b) = (x : A) â T (b x)
Or is there a difference syntax? This would be useful for a simple-minded encoding of the calculus of constructions.
Thorsten
P.S. I know I can avoid this by adding another level:
data Prop : Set
T : Prop â Set
data U : Set
El : U â Set
{-# NO_POSITIVITY_CHECK #-}
data U where
prop : U
pi : (a : U)(b : El a â U) â U
emb : Prop â U
El prop = Prop
El (pi a b) = (x : El a) â El (b x)
El (emb p) = T p
data Prop where
pi : (a : U)(b : El a â Prop) â Prop
T (pi a b) = (x : El a) â T (b x)
This message and any attachment are intended solely for the addressee
and may contain confidential information. If you have received this
message in error, please contact the sender and delete the email and
attachment.
Any views or opinions expressed by the author of this email do not
necessarily reflect the views of the University of Nottingham. Email
communications with the University of Nottingham may be monitored
where permitted by law.
{-# NO_POSITIVITY_CHECK #-}
But I canât say
{-# TYPE-IN-TYPE #-}
data Prop : Set
T : Prop â Set
data Prop where
pi : (A : Set)(b : A â Prop) â Prop
T (pi A b) = (x : A) â T (b x)
Or is there a difference syntax? This would be useful for a simple-minded encoding of the calculus of constructions.
Thorsten
P.S. I know I can avoid this by adding another level:
data Prop : Set
T : Prop â Set
data U : Set
El : U â Set
{-# NO_POSITIVITY_CHECK #-}
data U where
prop : U
pi : (a : U)(b : El a â U) â U
emb : Prop â U
El prop = Prop
El (pi a b) = (x : El a) â El (b x)
El (emb p) = T p
data Prop where
pi : (a : U)(b : El a â Prop) â Prop
T (pi a b) = (x : El a) â T (b x)
This message and any attachment are intended solely for the addressee
and may contain confidential information. If you have received this
message in error, please contact the sender and delete the email and
attachment.
Any views or opinions expressed by the author of this email do not
necessarily reflect the views of the University of Nottingham. Email
communications with the University of Nottingham may be monitored
where permitted by law.