Skip to Content.
Sympa Menu

coq-club - [Coq-Club] string comparison

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] string comparison


chronological Thread 
  • From: "Theodoros G. Tsokos" <T.Tsokos AT cs.bham.ac.uk>
  • To: coq-club AT pauillac.inria.fr
  • Subject: [Coq-Club] string comparison
  • Date: Wed, 16 Jan 2008 19:18:33 +0000
  • List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>

Dear all,

I'm having the following definition (representing identifiers of a language)

Variable string : Type.
Variables x y z : string.

I'm trying to find a way to compare the above strings, that is the identifiers themselves, not their values, and get a boolean number as an output. That is, something like:

Variables A B : string.
if (A=B) then true else false.

where :
for A= x and B=x it'll give me true, but for A=x and B=y it'll give me false.

I tried to use sumbool, like implemented in Yves Bertot's Semantics Survey [1] :
Variable string_dec : forall a b:string, {a=b}+{a<>b}

but I got really confused.

Thank you very much in advance for your time and help. It's probably a trivial solution so apologize for using the list for something like that.

Regards,
Theo.

[1] http://coq.inria.fr/contribs/Semantics_survey.html

--
| Theodoros G. Tsokos                                      |
http://www.cs.bham.ac.uk/~txt                            ;|
| School of Computer Science, The University of Birmingham |
| Edgbaston, Birmingham, B15 2TT, United Kingdom           |
| -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |
| "The freedom of speech includes the freedom to shut up"  |
| -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |
| "Democracy: the freedom to say whatever one wants and    |
| the capital to implement whatever it wants"              |
--






Archive powered by MhonArc 2.6.16.

Top of Page