Changing Data Representation in Type Theory

CDR is a tool designed to make Changing Data Representation easier in a type-theory based proof assistant like Coq.

Downloading the tool, getting it up and running

New Coq commands (immediately available in the new toplevel mytop.out)

A Basic Example (example.v)

We first specify natural numbers and addition using parameters and axioms. We then translate a proof on natural numbers into a corresponding proof in the new axiomatization.
Parameter NAT:Set.
Parameter ZERO:NAT.
Parameter SUCC:NAT->NAT.

AddIso nat NAT.
AddIso O ZERO.
AddIso S SUCC.
Parameter INDUCTION:
  forall P:NAT->Prop,
    (P ZERO) -> (forall n:NAT, P n ->P (SUCC n)) -> forall n:NAT, P n.

AddIso nat_ind INDUCTION.

Parameter PLUS: NAT -> NAT -> NAT.

Axiom PLUS_1 : forall n:NAT, (PLUS ZERO n)=n.
Axiom PLUS_2 : forall n m:NAT, (PLUS (SUCC n) m)=(SUCC (PLUS n m)).

AddIso plus PLUS.
Hint Rewrite PLUS_1 : simplification.
Hint Rewrite PLUS_2 : simplification. 

Translate plus_n_O into PLUS_n_O.
(* translates a proof plus_n_O that forall n:nat, plus n O=n *)
(* into a proof PLUS_n_O that forall n:NAT, (PLUS n ZERO)=n  *)

Case studies

Bug reports, comments

Bug reports, comments and improvement suggestions should be directed to magaud @ dpt-info.u-strasbg.fr .

Related papers


Nicolas Magaud
Last modified: Fri Jan 27 12:18:52 CET 2006