Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] interactively constructing witnesses of sig types

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] interactively constructing witnesses of sig types


chronological Thread 
  • From: Sean Wilson <sean.wilson AT ed.ac.uk>
  • To: Keiko Nakata <keiko AT kurims.kyoto-u.ac.jp>, coq-club AT pauillac.inria.fr
  • Subject: Re: [Coq-Club] interactively constructing witnesses of sig types
  • Date: Thu, 5 Mar 2009 19:33:02 +0000
  • List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>

On Thursday 05 March 2009 19:00:23 you wrote:
> Hello.
>
> Could I interactively construct witnesses of sig types?
>
...
> and I want to use (x, x0) as a witness by interactively proving
> that (x, x0) inhabits the sig type.
>
> I am aware that I can complete the rest of the proof with:
>
>   apply (satisfy_intro
>   (Build_spec
>   ({x: prod (index p1) (index p2) |
>     eq (gen p1 (fst x))  (gen p2 (snd x))})
>   (fun x => match x with exist (n, _) _ => gen p1 n end))
>   (@exist (prod (index p1) (index p2))
>                 (fun x => eq (gen p1 (fst x)) (gen p2 (snd x)))
>                 (x, x0) (eq_trans _ _ _ H (eq_sym _ _ H0))) n).
>   simpl. apply H.

You can use the "assert" tactic to state what type of term you want to 
construct and use "exists" to make use of (x, x0). You can then interactively 
construct the proof part of your term:

assert {x: prod (index p1) (index p2) | eq (gen p1 (fst x))  (gen p2 (snd 
x))}.
exists (x, x0).
simpl.
eapply eq_trans.
apply H.
apply eq_sym.
apply H0.
...

Regards,

Sean





Archive powered by MhonArc 2.6.16.

Top of Page