Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Help prooving that string_dec is symmetric

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Help prooving that string_dec is symmetric


Chronological Thread 
  • From: Adam Chlipala <adamc AT csail.mit.edu>
  • To: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] Help prooving that string_dec is symmetric
  • Date: Sun, 25 Jan 2015 11:07:19 -0500

On 01/25/2015 11:03 AM, Saulo Araujo wrote:
I am trying to prove the following theorem:

Definition strEq x y := if string_dec x y then true else false.

Theorem strEq_t1 :
forall s s',
strEq s s' = true -> strEq s' s = true.

With richly typed functions like [string_dec], it often works to case-analyze everything and let basic automation pick up the pieces.

Proof.
unfold strEq; intros; destruct (string_dec s s'), (string_dec s' s); congruence.
Qed.




Archive powered by MHonArc 2.6.18.

Top of Page