coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Christina Peterson <clp8199 AT knights.ucf.edu>
- To: "coq-club AT inria.fr" <coq-club AT inria.fr>
- Cc: "Dr. Damian Dechev" <dechev AT cs.ucf.edu>
- Subject: [Coq-Club] Coq Proof Assistant Question
- Date: Tue, 9 Aug 2016 15:31:08 +0000
- Accept-language: en-US
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=clp8199 AT knights.ucf.edu; spf=Pass smtp.mailfrom=clp8199 AT knights.ucf.edu; spf=Pass smtp.helo=postmaster AT NAM03-BY2-obe.outbound.protection.outlook.com
- Ironport-phdr: 9a23:KUMTCRRhNnd8LWhIGcdvnLM1pNpsv+yvbD5Q0YIujvd0So/mwa65ZBWN2/xhgRfzUJnB7Loc0qyN4vmmATVIoc7Y9itTKNoUD15NoP5VtjRoONSCB0z/IayiRA0BN+MGamVY+WqmO1NeAsf0ag6aiHSz6TkPBke3blItdazLE4Lfx/66y/q1s8WKJV4Z3XzlOPsydEzw9lSJ8JFOwMNLEeUY8lPxuHxGeuBblytDBGm4uFLC3Pq254Np6C9KuvgspIZqWKT+eLkkH/QDVGx1e0h83sDgtAHCQA2T/TNcFzxOylsbSzTCuVvxWY60uS/nvMJ83jObNIv4V/p8DT+l9uJgTALioCYBLT8wtm/N3J9elqVe9TmhvR1k34/SacmtOeZzZLjae5tOTm5ZDp8ABgRCBIKzb5cUSfcKM6BVo5Sr9AhGlge3GQT5XLCn8TRPnHKjmPRii+k=
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
Hello,
I am working with a record in the Coq Proof Assistant and would like to be able to access and display elements of the record in the proof environment so that I can apply formal logic to them. I have attached the file Example.v which is a simple reproducible example of the problem.
Sincerely,
Christina
Notation "x :: l" := (cons x l) (at level 60, right associativity). Notation "[ ]" := nil. Notation "[ x ; .. ; y ]" := (cons x .. (cons y nil) ..). Record program : Type := mkprogram { prog_defs: list nat }. Definition program1 := mkprogram (1::2::3::4::nil). Definition func_program(x:program) := match x with | _ => x.(prog_defs) end. Definition head (default:nat) (l: list nat) : nat := match l with | nil => default | h :: t => h end. (*Definition prog_const := program -> Prop. Example example_proof : forall c: prog_const, c program1. Proof. *) (* This example shows that the head of the list is 1 *) Example list_head : head 0 (func_program program1) = 1. Proof. unfold func_program. unfold prog_defs. (*This is the point where I want to visually see the list 1::2::3::4::nil*) reflexivity. Qed. (*As you can see, it is possible to complete the proof without visually showing the list. However, when proving properties of more complex examples, it is helpful to visually display the data stored in the record field*)
- [Coq-Club] Coq Proof Assistant Question, Christina Peterson, 08/09/2016
- Re: [Coq-Club] Coq Proof Assistant Question, Asya Bergal, 08/09/2016
- Re: [Coq-Club] Coq Proof Assistant Question, Tej Chajed, 08/09/2016
Archive powered by MHonArc 2.6.18.