In Agda is it possible to define a datatype that has equations?
问题 I want to describe the integers: data Integer : Set where Z : Integer Succ : Integer -> Integer Pred : Integer -> Integer ?? what else The above does not define the Integers. We need Succ (Pred x) = x and Pred (Succ x) = x. However, spReduce : (m : Integer) -> Succ (Pred m) = m psReduce : (m : Integer) -> Pred (Succ m) = m Can't be added to the data type. A better definition of the integers is most certainly, data Integers : Set where Pos : Nat -> Integers Neg : Nat -> Integers But I am