How to define set in coq without defining set as a list of elements

前端 未结 3 1028
青春惊慌失措
青春惊慌失措 2021-02-09 13:31

I am trying to define (1,2,3) as a set of elements in coq. I can define it using list as (1 :: (2 :: (3 :: nil))). Is there any way to define set in coq without using list.

3条回答
  •  遥遥无期
    2021-02-09 14:31

    There are many encodings of sets in Coq (lists, function, trees, ...) which can be finite or not. You should have a look at Coq's standard library. For example the 'simplest' set definition I know is this one

提交回复
热议问题