Skip to Content.
Sympa Menu

coq-club - [Coq-Club] [Coq Club]a strange question when using function

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] [Coq Club]a strange question when using function


chronological Thread 
  • From: ldou AT cs.ecnu.edu.cn
  • To: coq-club AT inria.fr
  • Subject: [Coq-Club] [Coq Club]a strange question when using function
  • Date: Wed, 24 Aug 2011 22:33:56 +0800

Hi,everyone. I just meet a strange issue below:
=======================
Require Import String Bool ListSet List Classical.
Open Scope nat_scope.
Open Scope type_scope.
Open Scope string_scope.
Open Scope list_scope.
Definition e:=string.
Definition t := list e.
Definition o := set t.
Definition m:=set o.

Definition o_dec:forall (a b:o) ,{a = b} + {a <> b}.
   repeat decide equality.
Defined.

Inductive Diag:Set :=
 DE: e->Diag.

Fixpoint interp (D:Diag) {struct D}: m  :=
match D with
|DE e => ((e::nil)::nil)::nil
end.

Lemma test: set_mem o_dec 
   (("e0" :: nil) :: nil) ((("e0" :: nil) :: nil) ::nil)=true.
Proof.
  simpl. auto.
Qed.

Lemma existselement:forall d:Diag,
  exists o':o, set_mem  o_dec o' (interp d )=true.
Proof.
  intro d.
  induction d. simpl.
=============
the problem is :when do simpl in existselement, the result turns out to be:
exists o' : o, (if o_dec o' ((e0 :: nil) :: nil) then true else false) = true
but it should be :
exists o' : o, (if o_dec o' ((("e0" :: nil) :: nil) ::nil) then true else false) = true
Why is that?




Archive powered by MhonArc 2.6.16.

Top of Page