[Agda] type:type locally?

Thorsten Altenkirch Thorsten.Altenkirch at nottingham.ac.uk
Tue Jun 26 11:52:36 CEST 2018


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.




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.chalmers.se/pipermail/agda/attachments/20180626/72c42ede/attachment.html>


More information about the Agda mailing list