Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] records ?

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] records ?


Chronological Thread 
  • From: Agnishom Chattopadhyay <agnishom AT cmi.ac.in>
  • To: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] records ?
  • Date: Sun, 5 Sep 2021 22:32:52 -0500
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=agnishom AT cmi.ac.in; spf=Pass smtp.mailfrom=agnishom AT cmi.ac.in; spf=None smtp.helo=postmaster AT mail.cmi.ac.in
  • Ironport-hdrordr: A9a23:o1Cfk6jAj8CKlZOFHSdducJbPHBQXv4ji2hC6mlwRA09TyX4rbHUoB11726RtN98YgBEpTnEAtjjfZq+z/5ICOsqTNGftWDd0QPCRuwP0WKh+UyCJ8SUzJ8l6U4PSdkHNDQyNzdHpPe/zg2xE9Nl5sKG/qCujeKb63t2VwllZ+VBwm5Ce2Gm+4FNKjWuzKBZKKah
  • Ironport-phdr: A9a23:MZP9LRLMLyImNkEUCNmcuJ9mWUAX0o4c3iYr45Yqw4hDbr6kt8y7ehCFvbM81RSUAs3y0LFts6LuqafuWGgNs96qkUspV9hybSIDktgchAc6AcSIWgXRJf/uaDEmTowZDAc2t360PlJIF8ngelbcvmO97SIIGhX4KAF5Ovn5FpTdgsipy+y+4ZnebxhHiDe9Y755MQm7oxjWusQKm4VpN7w/ygHOontGeuRWwX1nKFeOlBvi5cm+4YBu/T1It/0u68BPX6P6f78lTbNDFzQpL3o15MzwuhbdSwaE+2YRXX8XkhpMBAjF8Q36U5LsuSb0quZxxC+XNtDwQLspWzqt8r1rRQfnhycJNTE38G/ZhM9tgqxFvB2svAZwz5LObYyPKPZyYqHQcNUHTmRBRMZRUClBD5ugYosACeoBPP1Yr4n6p1sLsBCzGwmsC/nzyj9UgX/2xbc13PkhEQDGxgMhH88FvXPOo9X6MqcSUPu1zKnPzTXGdP5ZxTL96InSfh87vf6AR7NwcczIxEQpCgjKgUmep5b/MDOJyuQCrXKb7+x4WOyhi2AqqQ5/ryWhyMowiITEgoIbx1DL+Ct53Io4IdO2RU5/bNOlEJVcqT2XOolqTs8/Q2xlvCc3x7IYtZOlciYHzoksyRDYa/yCaYeI4xTjWf6MITdgmn1lfrS/iwys/ke91+3xUNS/3lVSriddj9XAq3AA2wbN5sWISfZx5Fmt1SuV2wzO6exIPVg4mbTHJ5Ml2LI9lZoevV7eEiL3mkj6lq+belki9+O18eroeK/mqYWZN4JsigHxLKAumsunDOQ9KAcOXmyb9f6g273m/E31Wq9FgeEsnqnYtpDWPcUbpqinDA9Jyosv9guzAje83NgGknQKL0hJdAyag4TzJl3DI+z0Ae+6g1u2kTdrw/7GPqfmApXINnXMirjhfbB8605HyAozytVf6olIBbEEIfL/QFX+u8DCAh84NQy42/znB8ll1oMCRWKPBbeUP7/VsV+R/+4gP+2MZJIOtzvmMPgk5/vujWcjllMHfKmp24EXaHGiEfh8LUWZeymkvtBUGmAT+wE6UebCiVuYUDcVaWzhcbg742QSB4SnFofEQ8iGgLWdwCCjF5FWd2lXQgSFHnHpbIWDXt8HbSPUK8QnkzpSBuvpcJMoyRz77Fyy8LFgNOeBokXwULro0dkz7uaVlBdgrVSc4OyW1mDLRmoyn2VaHlfePYh6qE15jFyG0O5xiLpZE44Lj84=

Records are like a product type, with desginated function for each projection function. Informally, you can think of them as a class with fields in some object oriented language.

For example,

class Person {
  String name;
  int age;
}

would be

Definition Person : Type := {
  name : String;
  age : int;
}.

You can read the section titled "Records are Products" from https://softwarefoundations.cis.upenn.edu/qc-current/Typeclasses.html
(The rest of the page is not really relevant for this purpose.)

Records are also a feature in OCaml or Haskell. You can google that.



On Sun, Sep 5, 2021 at 10:20 PM Agnishom Chattopadhyay <agnishom AT cmi.ac.in> wrote:
Locate locates notation that is defined by the programmer. I believe that "{|" is syntax which is part of Gallina.

As for the next step, have you tried split? You can also try solving this with exact.

--agnishom

On Sun, Sep 5, 2021, 21:25 Jeremy Dawson <Jeremy.Dawson AT anu.edu.au> wrote:

Hi,

I have a hypothesis (got by playing around with someone else's code) of
the form {| c := ccc ; i := iii |}

The command Locate "{|". produces no results.

I found in the documentation a syntax definition

term_record::={| field_def*; ;? |}

but I can't find anything about what that means or what you can do with it.

Does it mean I have a thing of type ccc and another thing of type iii?

If so how do I actually get hold of those things?

Then, when I have a goal of the form {| c := ccc ; i := iii |}
what does that mean and what is the next step to solving it?

Thanks

Jeremy




Archive powered by MHonArc 2.6.19+.

Top of Page