What is the idiomatic way to express countable infinity in Coq? -



What is the idiomatic way to express countable infinity in Coq? -

suppose wish assert countably infinite number of distinct x : x's exist. first guess follow definition of countable infinity literally, such :

definition aleph_null ( x : type ) := exists ( r : nat -> x -> prop ), ( forall ( n : nat ), exists ( x : x ), r n x ) /\ ( forall ( x : x ), exists ( n : nat ), r n x ) /\ ( forall ( n : nat ) ( x y : x ), r n x -> r n y -> x = y ) /\ ( forall ( n m : nat ) ( x : x ), r n x -> r m x -> n = m ).

but seems bit unwieldy utilize in actual proofs, , doesn't create utilize of libraries. thought create shorter using existing definition of bijectivity, definitions can find functions, not binary relations.

is there better, idiomatic way express countable infinity in coq?

the best selection much depend on particular application have in mind. using functions easiest alternative cases. since mentioned library support, ssreflect library has back upwards kind of reasoning; can define, instance

inductive count_inf (x : type) : type := countinf { count : x -> nat; _ : bijective count }.

ssreflect comes own definition of countable types, includes both finite , infinite types, doesn't give want want out of box.

coq

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -