proj1_sig is the usual way. Another solution is to match the pattern:
match z1 with exist _ z hz => ... end
z will be your projection, and hz will be the proof that z > 0 . I usually leave the first parameter anonymous, because I know that z : Z
In the latest version of Coq, there is another way to do this using let (because sig is inductive with only one constructor):
Definition Zmod_gt0 (z1 z2: Z_gt0) : Z := let (a, _) := z1 in let (b, _) := z2 in Zmod a b.
source share