I am formalizing a system that support pair of tuple and nat as input for function. However, I have some problem with the pair type in Coq.
From what I have learnt about Coq, pair is defined to be left-associative. i.e. (1, 2, 3)
and ((1, 2), 3)
have the same type of nat * nat * nat
. Sometimes, it can be treated as a 3-tuple of nat. One the other hand, (1, (2, 3))
has type nat * (nat * nat)
, which is a pair of nat and pair (or 2-tuple).
Idealy, I want to have a system that allows pair of nat and tuple and pair of tuple and nat. i.e. Both (1, (2, 3))
and ((1, 2), 3)
are differ from (1, 2, 3)
. Is there any suggested datatype in Coq for such model?