coqide - How to access the elements of a record in coq -



coqide - How to access the elements of a record in coq -

suppose have record

record toymodel:={ universe:set; aniceproperty:universe->prop; color:universe->nat }.

i define notion of compatibility elements of type toymodel.

definition compatible(t1 t2: toymodel):= if there element of t1.universe color there exists element of t2.universe color a.

how can write in coq? problem don't know how access elements within record.

the fields of record become accessor functions it, should matter of:

universe t (* t : toymodel *) color t u (* t : toymodel, u : universe *)

or:

t.(universe) t.(color) u

you might have to:

set printing projections.

cf. https://coq.inria.fr/distrib/current/refman/reference-manual004.html#toc15

coq coqide

Comments

Popular posts from this blog

javascript - THREE.js reposition vertices for RingGeometry -

javascript - I need to update the text of a paragraph by inline edit -

assembly - What is the addressing mode for ld, add, and rjmp instructions? -