From rbabaeecar at grad.kashanu.ac.ir Mon Aug 01 13:32:12 2011 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QnrfI-0007Lc-QV (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Mon, 01 Aug 2011 13:32:12 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamScore: s X-Cam-SpamDetails: score 1.8 from SpamAssassin-3.3.2-1152559 * 1.0 RCVD_IN_MAPS_DUL RBL: Relay in DUL, * http://www.mail-abuse.com/enduserinfo_dul.html * [80.191.138.143 listed in rbl-plus.mail-abuse.ja.net] * -0.0 BAYES_20 BODY: Bayes spam probability is 5 to 20% * [score: 0.1843] * 0.8 RDNS_NONE Delivered to internal network by a host with no rDNS * 0.0 TO_NO_BRKTS_NORDNS To: misformatted and no rDNS X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from [80.191.138.143] (port=46641 helo=grad.kashanu.ac.ir) by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25) with esmtp (csa=unknown) id 1QnrfC-0000WV-ZC (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Mon, 01 Aug 2011 13:32:12 +0100 Received: from grad.kashanu.ac.ir (localhost.localdomain [127.0.0.1]) by grad.kashanu.ac.ir (8.13.8/8.13.8) with ESMTP id p71DN3NU017898 for ; Mon, 1 Aug 2011 16:53:03 +0330 From: "Reza Babaee" To: cl-isabelle-users at lists.cam.ac.uk Date: Mon, 1 Aug 2011 17:53:03 +0430 Message-Id: <20110801132242.M94725 at grad.kashanu.ac.ir> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-kashanu_ac_ir-MailScanner-Information: Please contact the ISP for more information X-MailScanner-ID: p71DN3NU017898 X-kashanu_ac_ir-MailScanner: Found to be clean X-kashanu_ac_ir-MailScanner-From: rbabaeecar at grad.kashanu.ac.ir X-Spam-Status: No X-Mailman-Approved-At: Tue, 02 Aug 2011 08:38:27 +0100 Subject: [isabelle] Isabelle and Runtime Verification X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list Reply-To: Reza Babaee List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2011 12:32:12 -0000 Status: O X-Status: X-Keywords: X-UID: 5822 Hello All Isabelle Users I am a graduate student interested in runtime verification specifically in distributed systems. I wonder if I can use "Isabelle" as a constraint prover when system is on-the-fly. If there are any people working on the same topic (runtime verification or monitoring) I would appreciate if they can provide pertinent information on Isabelle usage in runtime monitoring or verification. thanks in advance for your kind helps, Bests, Reza Babaee (grad.kashanu.ac.ir) -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. From bertram.felgenhauer at googlemail.com Tue Aug 02 22:10:08 2011 Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QoME4-0007W8-Tr (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Tue, 02 Aug 2011 22:10:08 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1152704 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.161.51 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (bertram.felgenhauer[at]googlemail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from * author's domain * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature * 0.0 T_TO_NO_BRKTS_FREEMAIL To: misformatted and free email service X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-fx0-f51.google.com ([209.85.161.51]:56247) by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25) with esmtp (csa=unknown) id 1QoME4-00049z-DA (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Tue, 02 Aug 2011 22:10:08 +0100 Received: by fxh10 with SMTP id 10so213202fxh.38 for ; Tue, 02 Aug 2011 14:10:07 -0700 (PDT) Received: by 10.223.74.131 with SMTP id u3mr1091301faj.113.1312319407715; Tue, 02 Aug 2011 14:10:07 -0700 (PDT) Received: from bat (lap46-cl-c703.uibk.ac.at [138.232.66.246]) by mx.google.com with ESMTPS id x13sm94859fah.29.2011.08.02.14.10.03 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 02 Aug 2011 14:10:04 -0700 (PDT) Date: Tue, 2 Aug 2011 23:10:01 +0200 From: Bertram Felgenhauer To: cl-isabelle-users at lists.cam.ac.uk Message-ID: <20110802211001.GA2459 at 24f89f8c-e6a1-4e75-85ee-bb8a3743bb9f> References: <20110727112106.GA2460 at 24f89f8c-e6a1-4e75-85ee-bb8a3743bb9f> <4E3165D3.9080306 at in.tum.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4E3165D3.9080306 at in.tum.de> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Lars Noschinski Subject: Re: [isabelle] Odd failure to match local statement with pending goal. X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Aug 2011 21:10:09 -0000 Status: O X-Status: X-Keywords: X-UID: 5823 Hi, > As Larry stated, this is indeed a strange problem. I tried to find a > minimal example; here is what I came up with: > > ------------------- > lemma > shows "â‹€c d. d ∈ Z ⟹ x = c ⟹ > ∃e. e ∈ {_. ∃e. e ∈ Z ∧ y = e}" > apply (unfold mem_Collect_eq) > proof - > fix s t > assume "x = s" and "t ∈ Z" > then show "∃s t. t ∈ Z ∧ y = t" > sorry > qed > ------------------- > The show statement fails with [...] So do we know whether this is an obscure feature or possibly a bug? (If it's a feature I'd love to hear the underlying story.) Best regards, Bertram From huffman.brian.c at gmail.com Tue Aug 02 22:55:08 2011 Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QoMvc-000026-Jy (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Tue, 02 Aug 2011 22:55:08 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.6 from SpamAssassin-3.3.2-1152704 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [74.125.82.179 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (huffman.brian.c[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-wy0-f179.google.com ([74.125.82.179]:36059) by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25) with esmtp (csa=unknown) id 1QoMvb-000714-FB (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Tue, 02 Aug 2011 22:55:08 +0100 Received: by wyh21 with SMTP id 21so174177wyh.38 for ; Tue, 02 Aug 2011 14:55:07 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.229.210 with SMTP id h60mr2314weq.29.1312322107357; Tue, 02 Aug 2011 14:55:07 -0700 (PDT) Sender: huffman.brian.c at gmail.com Received: by 10.216.221.31 with HTTP; Tue, 2 Aug 2011 14:55:07 -0700 (PDT) In-Reply-To: <20110802211001.GA2459 at 24f89f8c-e6a1-4e75-85ee-bb8a3743bb9f> References: <20110727112106.GA2460 at 24f89f8c-e6a1-4e75-85ee-bb8a3743bb9f> <4E3165D3.9080306 at in.tum.de> <20110802211001.GA2459 at 24f89f8c-e6a1-4e75-85ee-bb8a3743bb9f> Date: Tue, 2 Aug 2011 14:55:07 -0700 X-Google-Sender-Auth: qq_lU-5IreA9LI9T-HWy09lTAlU Message-ID: From: Brian Huffman To: Bertram Felgenhauer Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: Lars Noschinski , cl-isabelle-users at lists.cam.ac.uk Subject: Re: [isabelle] Odd failure to match local statement with pending goal. X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Aug 2011 21:55:08 -0000 Status: O X-Status: X-Keywords: X-UID: 5824 On Tue, Aug 2, 2011 at 2:10 PM, Bertram Felgenhauer wrote: > Hi, > >> As Larry stated, this is indeed a strange problem. I tried to find a >> minimal example; here is what I came up with: >> >> ------------------- >> lemma >> shows "=E2=8B=80c d. d =E2=88=88 Z =E2=9F=B9 x =3D c =E2=9F=B9 >> =E2=88=83e. e =E2=88=88 {_. =E2=88=83e. e =E2=88=88 Z =E2=88=A7 = y =3D e}" >> apply (unfold mem_Collect_eq) >> proof - >> fix s t >> assume "x =3D s" and "t =E2=88=88 Z" >> then show "=E2=88=83s t. t =E2=88=88 Z =E2=88=A7 y =3D t" >> sorry >> qed >> ------------------- >> The show statement fails with > [...] > > So do we know whether this is an obscure feature or possibly a bug? > (If it's a feature I'd love to hear the underlying story.) It certainly looks like a bug to me. I don't have an idea yet of why it happens, but I found an even smaller example. I constrained everything to type "nat" just to rule out any weirdness with polymorphism. Note the repeated bound variable name in the goal (the argument to Q is the second "c", which pretty-prints as "ca"). This seems to be necessary to make the error happen. lemma shows "=E2=8B=80(a::nat) (b::nat). P a b =E2=9F=B9 =E2=88=80(c::nat) (c::= nat). Q c" proof - fix s t :: nat assume "P s t" thus "=E2=88=80(s::nat) (t::nat). Q t" (* Local statement will fail to re= fine... *) Swapping the order of the bound variable names in the conclusion also gives the same error: thus "=E2=88=80(t::nat) (s::nat). Q s" Just about any other modification to the lemma or proof that I could think of seems to make it work again. - Brian From ggrov at staffmail.ed.ac.uk Wed Aug 03 17:30:37 2011 Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QoeL7-0002Xp-Dp (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Wed, 03 Aug 2011 17:30:37 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -4.9 from SpamAssassin-3.3.2-1153066 * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, * medium trust * [129.215.13.205 listed in list.dnswl.dnsbl.ja.net] * -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay * domain * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta1.cl.cam.ac.uk ([128.232.25.21]:58409) by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25) with esmtp id 1QoeL6-0004o3-F7 (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Wed, 03 Aug 2011 17:30:37 +0100 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by mta1.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1QoeL6-0004jB-Kj for isabelle-users at cl.cam.ac.uk; Wed, 03 Aug 2011 17:30:36 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -4.9 from SpamAssassin-3.3.2-1153066 * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, * medium trust * [129.215.13.205 listed in list.dnswl.dnsbl.ja.net] * -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay * domain * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from nougat.ucs.ed.ac.uk ([129.215.13.205]:46026) by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25) with esmtp (csa=unknown) id 1QoeL1-0001Mv-Xl (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Wed, 03 Aug 2011 17:30:33 +0100 Received: from dandy.inf.ed.ac.uk (dandy.inf.ed.ac.uk [129.215.33.80]) by nougat.ucs.ed.ac.uk (8.13.8/8.13.4) with ESMTP id p73GUU7a013345 for ; Wed, 3 Aug 2011 17:30:31 +0100 (BST) Received: from dhcp-91-118.inf.ed.ac.uk (dhcp-91-118.inf.ed.ac.uk [129.215.91.118]) (authenticated bits=0) by dandy.inf.ed.ac.uk (8.13.8/8.13.8) with ESMTP id p73GUUuq022470 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Wed, 3 Aug 2011 17:30:31 +0100 From: Gudmund Grov Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Date: Wed, 3 Aug 2011 17:30:31 +0100 Message-Id: To: isabelle-users at cl.cam.ac.uk Mime-Version: 1.0 X-Mailer: Apple Mail (2.1244.3) X-Edinburgh-Scanned: at nougat.ucs.ed.ac.uk with MIMEDefang 2.60, Sophie, Sophos Anti-Virus, Clam AntiVirus Content-Disposition: inline X-Scanned-By: MIMEDefang 2.60 on 129.215.13.205 Subject: [isabelle] VSTTE 2012 : Fourth Call for Papers - 4 weeks to go X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Aug 2011 16:30:37 -0000 Status: O X-Status: X-Keywords: X-UID: 5825 VSTTE 2012 Verified Software: Theories, Tools and Experiments January 28-29, 2012 Philadelphia, USA (co-located with POPL and VMCAI) https://sites.google.com/site/vstte2012/ The Fourth International Conference on Verified Software: Theories, Tools, and Experiments will take place on January 28-29, 2012. The focus of the conference is the development of systematic methods for specifying, building, and verifying software. The goal of this conference is to advance the state of the art through the interaction of theory development, tool evolution, and experimental validation. Historically, the conference came out of the Verified Software Initiative (VSI), a cooperative, international initiative directed at the scientific challenges of large-scale software verification. An informal verification competition will be held in paralle= l=20 to the conference. More information will be available from the=20 website. Topics of interest include: * Specification and verification techniques * Tool support for specification languages * Tool for various design methodologies * Tool integration and plug-ins * Automation in formal verification * Tool comparisons and benchmark repositories * Combination of tools and techniques (e.g. formal vs. semiformal, software specification vs. engineering techniques) * Customizing tools for particular applications * Challenge problems * Refinement methodologies * Requirements modeling * Specification languages * Specification/verification case-studies * Software design methods * Program logic SUBMISSIONS Submitted research papers and system descriptions must be original and not submitted for publication elsewhere. Research paper submissions are limited to 15 proceedings pages in LNCS format and must include a cogent and self-contained description of the ideas, methods and results, together with a comparison to existing work. System descriptions are also limited to 15 proceedings pages in LNCS format. Authors are encouraged to submit work in progress, particularly if = the work involves collaboration, theory unification, and tool integration. Papers can be submitted at https://www.easychair.org/conferences/?conf=3Dvstte2012 Submissions that arrive late, are not in the proper format, or are too long will not be considered. The proceedings of VSTTE 2012 will be published by Springer-Verlag in the LNCS series. Authors of accepted papers will be requested to sign a form transferring copyright of their contribution to Springer-Verlag. IMPORTANT DATES August 31, 2011: Conference Paper Submission Deadline October 20, 2011: Notification of acceptance November 15, 2011: Final conference paper versions due January 28-29, 2012: Main conference KEYNOTE SPEAKERS Rupak Majumdar, Max Planck Institute for Software Systems Wolfgang Paul, Saarland University TUTORIALS Francesco Logozzo, Microsoft Research Rustan Leino, Microsoft Research CONFERENCE CHAIR Ernie Cohen, European Microsoft Innovation Center=20 PROGRAM CHAIRS Rajeev Joshi, NASA Jet Propulsion Laboratory Peter M=FCller, ETH Zurich Andreas Podelski, University of Freiburg PROGRAM COMMITTEE Clark Barrett, New York University Lars Birkedal, IT University of Copenhagen Patrick Cousot, Ecole normale Sup=E9rieure, Paris and New York University Leonardo De Moura, Microsoft Research Jean-Christophe Filliatre, CNRS Universit=E9 Paris Sud John Hatcliff, Kansas State University Bart Jacobs, Katholieke Universiteit Leuven=20 Ranjit Jhala, University of California, San Diego Rajeev Joshi, NASA JPL Gerwin Klein, NICTA=20 Viktor Kuncak, EPF Lausanne=20 Gary T. Leavens, University of Central Florida=20 Rustan Leino, Microsoft Research Panagiotis Manolios, Northeastern University Peter M=FCller, ETH Zurich Tobias Nipkow, Technische Universit=E4t M=FCnchen=20 Matthew Parkinson, Microsoft Research Corina Pasareanu, NASA Ames Wolfgang Paul, Saarland University Andreas Podelski, University of Freiburg Natasha Sharygina, University of Lugano=20 Willem Visser, University of Stellenbosch Thomas Wies, IST Austria PUBLICITY CHAIR Gudmund Grov, University of Edinburgh VERIFICATION COMPETITION ORGANISER=20 Jean-Christophe Filliatre, CNRS Universit=E9 Paris Sud STEERING COMMITTEE Tony Hoare, Microsoft Research Andrew Ireland, Heriot-Watt University Jay Misra, UT Austin Natarajan Shankar, SRI International Jim Woodcock, University of York --=20 The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. From Aart.Middeldorp at uibk.ac.at Wed Aug 03 13:21:58 2011 Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QoaSU-0004au-0q (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Wed, 03 Aug 2011 13:21:58 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -3.3 from SpamAssassin-3.3.2-1153066 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [138.232.1.142 listed in list.dnswl.dnsbl.ja.net] * -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay * domain * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 LOTS_OF_MONEY Huge... sums of money X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from lmr1.uibk.ac.at ([138.232.1.142]:33461 helo=smtp.uibk.ac.at) by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25) with esmtp (csa=unknown) id 1QoaSO-0003id-DT (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Wed, 03 Aug 2011 13:21:58 +0100 Received: from [192.168.1.151] (wifi.ii.uni.wroc.pl [156.17.4.250]) (authenticated bits=0) by smtp.uibk.ac.at (8.13.8/8.13.8/F1) with ESMTP id p73CLUJk032360 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 3 Aug 2011 14:21:31 +0200 Message-ID: <4E393D4A.9090806 at uibk.ac.at> Date: Wed, 03 Aug 2011 14:21:30 +0200 From: Aart Middeldorp User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.15) Gecko/20101027 Fedora/3.0.10-1.fc12 Thunderbird/3.0.10 MIME-Version: 1.0 To: cl-isabelle-users at lists.cam.ac.uk Content-Type: multipart/mixed; boundary="------------010202070300000705010309" X-Spam-Score: () -15.0 ALL_TRUSTED, RCV_SMTP_AUTH, RCV_SMTP_UIBK, T_LOTS_OF_MONEY X-Scanned-By: MIMEDefang 2.61 at uibk.ac.at on 138.232.1.140 X-Mailman-Approved-At: Thu, 04 Aug 2011 08:56:10 +0100 Subject: [isabelle] postdoctoral researcher position in Innsbruck X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Aug 2011 12:21:58 -0000 Status: O X-Status: X-Keywords: X-UID: 5826 This is a multi-part message in MIME format. --------------010202070300000705010309 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit The University of Innsbruck invites applications for a 6 year position as postdoctoral researcher at the Computational Logic research group. Candidates must hold a PhD degree in computer science. A strong background in computational logic (in particular SMT, automated and interactive theorem proving) is desired. The ideal candidate complements existing strengths and enjoys working with students at all levels. Candidates are expected to conduct research leading to a habilitation and contribute to teaching and administration. Knowledge of German is not essential. The position is a full-time "B1/3 position" with teaching obligations of 4 hours per semester. The annual gross salary is approximately EUR 46,000. The official job advert appeared in the "Mitteilungsblatt" of the University on 3 August 2011 (code MIP-6659) http://orawww.uibk.ac.at/public_prod/owa/karriereportal.home Applications (including CV, publication list, and two references) may be mailed to the address stated there or, by email, to aart.middeldorp at uibk.ac.at no later than 24 August 2011. Informal inquiries are also welcome at the same email address. The preferred starting date is 2 November 2011. The city of Innsbruck, which hosted the Olympic Winter Games in 1964 and 1976, is superbly located in the beautiful surroundings of the Tyrolean Alps. The combination of the Alpine environment and urban life in this historic town provides a high quality of living. The University of Innsbruck has a long tradition dating back to the 16th century and offers a wide spectrum of research and teaching activities with interesting opportunities for interdisciplinary collaboration. Further information is available from the following links: Computational Logic: http://cl-informatik.uibk.ac.at/ Institute of Computer Science: http://informatik.uibk.ac.at/ University of Innsbruck: http://www.uibk.ac.at/ City of Innsbruck: http://www.innsbruck.at/ --- Univ.-Prof. Dr. Aart Middeldorp Institute of Computer Science, University of Innsbruck Technikerstr. 21a, 6020 Innsbruck, Austria phone: +43 512 507 6430 fax: +43 512 507 9887 --------------010202070300000705010309 Content-Type: text/x-vcard; charset=utf-8; name="Aart_Middeldorp.vcf" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="Aart_Middeldorp.vcf" begin:vcard fn:Prof. Dr. Aart Middeldorp n:Middeldorp;Aart org:Institute of Computer Science;University of Innsbruck adr:;;Technikerstr. 21a;Innsbruck;;6020;Austria email;internet:aart.middeldorp at uibk.ac.at x-mozilla-html:FALSE url:http://cl-informatik.uibk.ac.at/~ami/ version:2.1 end:vcard --------------010202070300000705010309-- From jonathan.von_schroeder at dfki.de Wed Aug 03 11:57:27 2011 Received: from ppsw-50.csi.cam.ac.uk ([131.111.8.150]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QoZ8h-0002vD-OX (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Wed, 03 Aug 2011 11:57:27 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.6 from SpamAssassin-3.3.2-1153066 * -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay * domain * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 HTML_MESSAGE BODY: HTML included in message X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from sea-mail.dfki.de ([134.96.191.185]:56756) by ppsw-50.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.147]:25) with esmtp (csa=unknown) id 1QoZ8g-0004L6-sh (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Wed, 03 Aug 2011 11:57:27 +0100 Received: from sea-mail.dfki.de (localhost.localdomain [127.0.0.1]) by localhost (Email Security Appliance) with SMTP id 778F6A08C6_E392996B for ; Wed, 3 Aug 2011 10:57:26 +0000 (GMT) Received: from mail.dfki.de (lnv-104.sb.dfki.de [134.96.191.146]) by sea-mail.dfki.de (Sophos Email Appliance) with ESMTP id 356B1A08A3_E392996F for ; Wed, 3 Aug 2011 10:57:26 +0000 (GMT) Received: from ox6 (lnv-91187.sb.dfki.de [134.96.191.187]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by mail.dfki.de (Postfix) with ESMTPSA id 2EBB43111D for ; Wed, 3 Aug 2011 12:57:26 +0200 (CEST) Date: Wed, 3 Aug 2011 12:57:26 +0200 (CEST) From: Jonathan von Schroeder To: cl-isabelle-users at lists.cam.ac.uk Message-ID: <1761421701.4856.1312369046188.JavaMail.open-xchange at ox6> MIME-Version: 1.0 X-Priority: 3 Importance: Medium X-Mailer: Open-Xchange Mailer v6.18.2-Rev33 X-Mailman-Approved-At: Thu, 04 Aug 2011 08:56:18 +0100 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.8 Subject: [isabelle] Get an ML value from a theory context X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Aug 2011 10:57:27 -0000 Status: O X-Status: X-Keywords: X-UID: 5827 Hello all, I'm currently working on a way to export Isabelle/HOL type definitions and their attached (user defined) axioms/theorems from a given theory in Isabel= le. I have already managed to get this workign by simply going through all the constants, axioms and theorems present in the theories' context. But unluck= ily I currently get more axioms / theorems than I'm interested in, because the theorems automatically generated by http://isabelle.in.tum.de/repos/isabelle/file/6d736d983d5c/src/HOL/Tools/Da= tatype/ are not really "user generated" and thus do not foll within the scope of theorems I wish to export. Thus I'd really like to have (in the top-level raw ML loop) access to the structure http://isabelle.in.tum.de/repos/isabelle/file/6d736d983d5c/src/HOL/Tools/Da= tatype/datatype_data.ML (which lives in the context of http://isabelle.in.tum.de/repos/isabelle/file/6d736d983d5c/src/HOL/Datatype= .thy from what i can tell) to be able to figure out which theorems were generate= d by the Datatype-Tool. Does anybody have any suggestions on how to do this, bec= ause the Manual http://isabelle.in.tum.de/doc/implementation.pdf only mentions o= n page 11 that "... [the function factorial] is not yet accessible in the preceding paragraph, nor in a different theory that is independent from the current one in the import hierarchy", but I wasn't able to find any informa= tion on how to "get" access to it (or for that matter to any ml functions / structures defined within a theory). I'd greatly appreciate any information anybody can provide on this matter. Jonathan =C2=A0 From bulwahn at in.tum.de Thu Aug 04 12:50:18 2011 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QowRO-0000XV-Aa (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Thu, 04 Aug 2011 12:50:18 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1153391 * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-out1.informatik.tu-muenchen.de ([131.159.0.8]:34668) by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25) with esmtp (csa=unknown) id 1QowRN-000729-YS (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Thu, 04 Aug 2011 12:50:18 +0100 Received: from [10.55.58.172] (unknown [82.113.99.44]) (using SSLv3 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.in.tum.de (Postfix) with ESMTP id 3DAA5515E; Thu, 4 Aug 2011 13:50:16 +0200 (CEST) Message-ID: <4E3A8774.6080907 at in.tum.de> Date: Thu, 04 Aug 2011 13:50:12 +0200 From: Lukas Bulwahn User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.18) Gecko/20110617 Thunderbird/3.1.11 MIME-Version: 1.0 To: Jonathan von Schroeder References: <1761421701.4856.1312369046188.JavaMail.open-xchange at ox6> In-Reply-To: <1761421701.4856.1312369046188.JavaMail.open-xchange at ox6> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: cl-isabelle-users at lists.cam.ac.uk Subject: Re: [isabelle] Get an ML value from a theory context X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Aug 2011 11:50:18 -0000 Status: O X-Status: X-Keywords: X-UID: 5828 On 08/03/2011 12:57 PM, Jonathan von Schroeder wrote: > Hello all, > I'm currently working on a way to export Isabelle/HOL type definitions and > their attached (user defined) axioms/theorems from a given theory in Isabelle. I > have already managed to get this workign by simply going through all the > constants, axioms and theorems present in the theories' context. But unluckily I > currently get more axioms / theorems than I'm interested in, because thep, > theorems automatically generated by > http://isabelle.in.tum.de/repos/isabelle/file/6d736d983d5c/src/HOL/Tools/Datatype/ > are not really "user generated" and thus do not foll within the scope of > theorems I wish to export. > > Thus I'd really like to have (in the top-level raw ML loop) access to the > structure > http://isabelle.in.tum.de/repos/isabelle/file/6d736d983d5c/src/HOL/Tools/Datatype/datatype_data.ML > (which lives in the context of > http://isabelle.in.tum.de/repos/isabelle/file/6d736d983d5c/src/HOL/Datatype.thy > from what i can tell) to be able to figure out which theorems were generated by > the Datatype-Tool. Does anybody have any suggestions on how to do this, because > the Manual http://isabelle.in.tum.de/doc/implementation.pdf only mentions on > page 11 that "... [the function factorial] is not yet accessible in the > preceding paragraph, nor in a different theory that is independent from the > current one in the import hierarchy", but I wasn't able to find any information > on how to "get" access to it (or for that matter to any ml functions / > structures defined within a theory). I'd greatly appreciate any information > anybody can provide on this matter. > If you work properly on the Isabelle/ML level, within the HOL image, the datatype package is loaded and set up. Hence, you can then access the structure simply by its name "Datatype_Data". Lukas > Jonathan > From jmaransay at gmail.com Thu Aug 04 12:56:04 2011 Received: from ppsw-50.csi.cam.ac.uk ([131.111.8.150]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QowWy-0000bT-E0 (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Thu, 04 Aug 2011 12:56:04 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.6 from SpamAssassin-3.3.2-1153391 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.210.43 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (jmaransay[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-pz0-f43.google.com ([209.85.210.43]:64370) by ppsw-50.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.147]:25) with esmtp (csa=unknown) id 1QowWx-0006b6-qR (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Thu, 04 Aug 2011 12:56:04 +0100 Received: by pzk1 with SMTP id 1so1280956pzk.16 for ; Thu, 04 Aug 2011 04:56:02 -0700 (PDT) Received: by 10.142.224.15 with SMTP id w15mr714341wfg.159.1312458962153; Thu, 04 Aug 2011 04:56:02 -0700 (PDT) MIME-Version: 1.0 Sender: jmaransay at gmail.com Received: by 10.143.157.19 with HTTP; Thu, 4 Aug 2011 04:55:42 -0700 (PDT) From: Jesus Aransay Date: Thu, 4 Aug 2011 13:55:42 +0200 X-Google-Sender-Auth: aXBYx57ScS0VAhk5fzIIVGvfaQo Message-ID: To: cl-isabelle-users Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: [isabelle] A special notation for function application X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Aug 2011 11:56:04 -0000 Status: O X-Status: X-Keywords: X-UID: 5829 Dear all, I was trying to introduce some additional notation for linear functionals in vector spaces; the idea is to use: "[x, f]" as an alternative notation for "f x", where "f" is a linear functional (let's say, type "'a =3D> 'b") and "x" is an element of type "'a" (note that the arguments f and x are interchanged in the proposed notation). I would like that all notation available for "f x" would still work for the new notation "[x, f]", in such a way that [x, f] \oplus [y, f] would be equivalent to (without unfolding any particular definition): f x \oplus f y Is it possible to reach these behavior? How? Maybe brackets are already a bit overloaded in terms of notation (lists, propositions...) so a notation based for instance in "" would be also acceptable. I tried the following approach (which does not interchange arguments) abbreviation app :: "('b =3D> 'a) =3D> 'b =3D> 'a" ("<(_),(_)>" 90) where " =3D=3D f x" but then when I write, for instance, "term " the system does not seem to find the correct type of the expression. Thanks for any hint, Jesus --=20 Jes=FAs Mar=EDa Aransay Azofra Universidad de La Rioja Dpto. de Matem=E1ticas y Computaci=F3n tlf.: (+34) 941299438 fax: (+34) 941299460 mail: jesus-maria.aransay at unirioja.es ; web: http://www.unirioja.es/cu/jear= ansa Edificio Luis Vives, c/ Luis de Ulloa s/n, 26004 Logro=F1o, Espa=F1a From andreas.lochbihler at kit.edu Thu Aug 04 13:23:53 2011 Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1Qowxt-00012O-Lp (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Thu, 04 Aug 2011 13:23:53 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -5.0 from SpamAssassin-3.3.2-1153391 * -0.8 RP_MATCHES_RCVD Envelope sender domain matches handover relay * domain * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, * medium trust * [129.13.185.202 listed in list.dnswl.dnsbl.ja.net] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from scc-mailout.scc.kit.edu ([129.13.185.202]:42034) by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25) with esmtp (csa=unknown) id 1Qowxs-0002XW-Sw (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Thu, 04 Aug 2011 13:23:53 +0100 Received: from i44pc43.info.uni-karlsruhe.de (i44pc43.info.uni-karlsruhe.de [172.22.85.171]) by scc-mailout-02.scc.kit.edu with esmtp (Exim 4.72 #1) id 1Qowxs-0003IW-1W; Thu, 04 Aug 2011 14:23:52 +0200 Message-ID: <4E3A8F58.4050807 at kit.edu> Date: Thu, 04 Aug 2011 14:23:52 +0200 From: Andreas Lochbihler User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7 MIME-Version: 1.0 To: Jesus Aransay References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: cl-isabelle-users Subject: Re: [isabelle] A special notation for function application X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Aug 2011 12:23:53 -0000 Status: O X-Status: X-Keywords: X-UID: 5830 Dear Jesus, do you need your notation only as input syntax or do you want Isabelle to print function application this way, too? If it is for input only, you just have to restrict your abbreviation to the input parser and it works fine: abbreviation (input) app :: "('b => 'a) => 'b => 'a" ("<(_),(_)>" 90) where " == f x" term "" Without the (input) restriction, Isabelle's pretty printer loops when it tries to display the term again. I do not recommend that you use such syntax translations for output, because such a translation would apply to all function applications, which is probably not what you want. You could, however, restrict your translation to certain type classes (e.g., arbitrary functions from vector spaces to vector spaces). Still, you will have to install your own print translation to guarantee termination of the pretty printer. By the way, any notation that works for "f x" also works for "[x, f]" even "[x, f]" is a proper constant instead of an abbreviation. Hope this helps, Andreas Am 04.08.2011 13:55, schrieb Jesus Aransay: > Dear all, > > I was trying to introduce some additional notation for linear > functionals in vector spaces; the idea is to use: > > "[x, f]" as an alternative notation for "f x", where "f" is a linear > functional (let's say, type "'a => 'b") and "x" is an element of type > "'a" (note that the arguments f and x are interchanged in the proposed > notation). > > I would like that all notation available for "f x" would still work > for the new notation "[x, f]", in such a way that > > [x, f] \oplus [y, f] > > would be equivalent to (without unfolding any particular definition): > > f x \oplus f y > > Is it possible to reach these behavior? How? Maybe brackets are > already a bit overloaded in terms of notation (lists, propositions...) > so a notation based for instance in "" would be also > acceptable. > > I tried the following approach (which does not interchange arguments) > > abbreviation > app :: "('b => 'a) => 'b => 'a" ("<(_),(_)>" 90) > where " == f x" > > but then when I write, for instance, "term" the system does not > seem to find the correct type of the expression. > > Thanks for any hint, > > Jesus > -- Karlsruher Institut für Technologie IPD Snelting Andreas Lochbihler wissenschaftlicher Mitarbeiter Adenauerring 20a, Geb. 50.41, Raum 031 76131 Karlsruhe Telefon: +49 721 608-47399 Fax: +49 721 608-48457 E-Mail: andreas.lochbihler at kit.edu http://pp.info.uni-karlsruhe.de KIT - Universität des Landes Baden-Württemberg und nationales Forschungszentrum in der Helmholtz-Gemeinschaft From alfio.martini at gmail.com Thu Aug 04 22:39:25 2011 Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1Qp5dV-0003ln-Df (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Thu, 04 Aug 2011 22:39:25 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.6 from SpamAssassin-3.3.2-1153391 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [74.125.82.54 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (alfio.martini[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 HTML_MESSAGE BODY: HTML included in message * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature * 0.0 T_TO_NO_BRKTS_FREEMAIL To: misformatted and free email service X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta1.cl.cam.ac.uk ([128.232.25.21]:40137) by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25) with esmtp id 1Qp5dU-000796-G3 (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Thu, 04 Aug 2011 22:39:25 +0100 Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141]) by mta1.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1Qp5dU-0007tZ-Ti for isabelle-users at cl.cam.ac.uk; Thu, 04 Aug 2011 22:39:24 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.6 from SpamAssassin-3.3.2-1153391 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [74.125.82.54 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (alfio.martini[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 HTML_MESSAGE BODY: HTML included in message * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature * 0.0 T_TO_NO_BRKTS_FREEMAIL To: misformatted and free email service X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-ww0-f54.google.com ([74.125.82.54]:33530) by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25) with esmtp (csa=unknown) id 1Qp5dR-0003sG-RY (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Thu, 04 Aug 2011 22:39:21 +0100 Received: by wwf4 with SMTP id 4so2206920wwf.23 for ; Thu, 04 Aug 2011 14:39:21 -0700 (PDT) MIME-Version: 1.0 Received: by 10.227.39.14 with SMTP id d14mr1214655wbe.33.1312493961326; Thu, 04 Aug 2011 14:39:21 -0700 (PDT) Sender: alfio.martini at gmail.com Received: by 10.227.133.209 with HTTP; Thu, 4 Aug 2011 14:39:21 -0700 (PDT) Date: Thu, 4 Aug 2011 18:39:21 -0300 X-Google-Sender-Auth: gP0fjQi4i1mk_s9aljPP-JCwLX0 Message-ID: From: Alfio Martini To: isabelle-users at cl.cam.ac.uk Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.8 Subject: [isabelle] Accessing (individual) simplification rules of function definitions X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Aug 2011 21:39:25 -0000 Status: O X-Status: X-Keywords: X-UID: 5831 Dear Isabelle Users, Usually, after a function f has been defined via fun or primrec, its defining equations are available under the name f.simps as theorems, e.g., thm "f.simps". However, how could I access specifically each one of these equations (simplification rules)? I tried something as f.simps_1 (after seeing the trace example in the tutorial), f.simps_2, etc., but it did not work. Thanks! -- Alfio Ricardo Martini PhD in Computer Science (TU Berlin) Associate Professor at Faculty of Informatics (PUCRS) Porto Alegre - RS - Brasil From rpollack0 at gmail.com Thu Aug 04 23:01:49 2011 Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1Qp5zB-00048j-BU (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Thu, 04 Aug 2011 23:01:49 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.5 from SpamAssassin-3.3.2-1153391 * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (rpollack0[at]gmail.com) * 0.1 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in * digit (rpollack0[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.210.46 listed in list.dnswl.dnsbl.ja.net] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta1.cl.cam.ac.uk ([128.232.25.21]:50952) by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25) with esmtp id 1Qp5zA-0005Ey-Fy (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Thu, 04 Aug 2011 23:01:49 +0100 Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141]) by mta1.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1Qp5zA-0008D2-T5 for isabelle-users at cl.cam.ac.uk; Thu, 04 Aug 2011 23:01:48 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.5 from SpamAssassin-3.3.2-1153391 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.210.46 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (rpollack0[at]gmail.com) * 0.1 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in * digit (rpollack0[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-pz0-f46.google.com ([209.85.210.46]:39995) by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25) with esmtp (csa=unknown) id 1Qp5z7-00028S-Qx (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Thu, 04 Aug 2011 23:01:45 +0100 Received: by pzk32 with SMTP id 32so3857380pzk.33 for ; Thu, 04 Aug 2011 15:01:41 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.118.25 with SMTP id q25mr1233569wfc.274.1312495300945; Thu, 04 Aug 2011 15:01:40 -0700 (PDT) Sender: rpollack0 at gmail.com Received: by 10.68.63.232 with HTTP; Thu, 4 Aug 2011 15:01:40 -0700 (PDT) In-Reply-To: References: Date: Thu, 4 Aug 2011 18:01:40 -0400 X-Google-Sender-Auth: 4fQnYqkQ1gXQ8stKNEEb7GUUpxw Message-ID: From: Randy Pollack To: Alfio Martini Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: isabelle-users at cl.cam.ac.uk Subject: Re: [isabelle] Accessing (individual) simplification rules of function definitions X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Aug 2011 22:01:49 -0000 Status: O X-Status: X-Keywords: X-UID: 5832 f.simps(2) On Thu, Aug 4, 2011 at 5:39 PM, Alfio Martini wrote= : > Dear Isabelle Users, > > Usually, after a function f has been defined via fun or primrec, its > defining equations are available under the name > f.simps as theorems, e.g., thm "f.simps". > However, how could I access specifically each one of these equations > (simplification rules)? > I tried something as f.simps_1 (after seeing the trace example in the > tutorial), f.simps_2, =A0etc., but > it did not work. > > Thanks! > > -- > Alfio Ricardo Martini > PhD in Computer Science (TU Berlin) > Associate Professor at Faculty of Informatics (PUCRS) > Porto Alegre - RS - Brasil > > From alfio.martini at gmail.com Thu Aug 04 23:13:31 2011 Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1Qp6AV-0004Iq-4M (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Thu, 04 Aug 2011 23:13:31 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.6 from SpamAssassin-3.3.2-1153391 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [74.125.82.174 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (alfio.martini[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 HTML_MESSAGE BODY: HTML included in message * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta1.cl.cam.ac.uk ([128.232.25.21]:44929) by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25) with esmtp id 1Qp6AU-0005Fm-S3 (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Thu, 04 Aug 2011 23:13:31 +0100 Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141]) by mta1.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1Qp6AU-0008O1-L6 for isabelle-users at cl.cam.ac.uk; Thu, 04 Aug 2011 23:13:30 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.6 from SpamAssassin-3.3.2-1153391 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [74.125.82.174 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (alfio.martini[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 HTML_MESSAGE BODY: HTML included in message * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-wy0-f174.google.com ([74.125.82.174]:61064) by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25) with esmtp (csa=unknown) id 1Qp6AR-0005FJ-QD (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Thu, 04 Aug 2011 23:13:27 +0100 Received: by wyf22 with SMTP id 22so1103767wyf.5 for ; Thu, 04 Aug 2011 15:13:27 -0700 (PDT) MIME-Version: 1.0 Received: by 10.227.197.8 with SMTP id ei8mr1185836wbb.18.1312496006888; Thu, 04 Aug 2011 15:13:26 -0700 (PDT) Sender: alfio.martini at gmail.com Received: by 10.227.133.209 with HTTP; Thu, 4 Aug 2011 15:13:26 -0700 (PDT) In-Reply-To: References: Date: Thu, 4 Aug 2011 19:13:26 -0300 X-Google-Sender-Auth: wkplx_5ndIpTHyzsTpMNzFpyE0Q Message-ID: From: Alfio Martini To: Randy Pollack Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.8 Cc: isabelle-users at cl.cam.ac.uk Subject: Re: [isabelle] Accessing (individual) simplification rules of function definitions X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Aug 2011 22:13:31 -0000 Status: O X-Status: X-Keywords: X-UID: 5833 Great!! Thanks for the quick reply! On Thu, Aug 4, 2011 at 7:01 PM, Randy Pollack wrote: > f.simps(2) > > On Thu, Aug 4, 2011 at 5:39 PM, Alfio Martini > wrote: > > Dear Isabelle Users, > > > > Usually, after a function f has been defined via fun or primrec, its > > defining equations are available under the name > > f.simps as theorems, e.g., thm "f.simps". > > However, how could I access specifically each one of these equations > > (simplification rules)? > > I tried something as f.simps_1 (after seeing the trace example in the > > tutorial), f.simps_2, etc., but > > it did not work. > > > > Thanks! > > > > -- > > Alfio Ricardo Martini > > PhD in Computer Science (TU Berlin) > > Associate Professor at Faculty of Informatics (PUCRS) > > Porto Alegre - RS - Brasil > > > > > -- Alfio Ricardo Martini PhD in Computer Science (TU Berlin) Associate Professor at Faculty of Informatics (PUCRS) Porto Alegre - RS - Brasil From krauss at in.tum.de Fri Aug 05 07:38:35 2011 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QpE3H-0000jz-T3 (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Fri, 05 Aug 2011 07:38:35 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1153786 * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta0.cl.cam.ac.uk ([128.232.25.20]:34527) by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25) with esmtp id 1QpE3H-0005dX-Xf (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Fri, 05 Aug 2011 07:38:35 +0100 Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152]) by mta0.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1QpE3H-0004O8-9c for isabelle-users at cl.cam.ac.uk; Fri, 05 Aug 2011 07:38:35 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1153786 * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-out1.informatik.tu-muenchen.de ([131.159.0.8]:55327) by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25) with esmtp (csa=unknown) id 1QpE3G-0002Q4-Fw (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Fri, 05 Aug 2011 07:38:35 +0100 Received: from localhost (scanbroy [10.46.146.16]) by mailbroy.informatik.tu-muenchen.de (Postfix) with ESMTP id C7B198143573A; Fri, 5 Aug 2011 08:38:33 +0200 (CEST) X-Virus-Scanned: by amavisd-new using ClamAV at mailbroy.informatik.tu-muenchen.de Received: from mailbroy.informatik.tu-muenchen.de ([10.46.146.15]) by localhost (mailbroy.informatik.tu-muenchen.de [10.46.146.16]) (amavisd-new, port 10024) with ESMTP id c49TQN-qxFlp; Fri, 5 Aug 2011 08:38:33 +0200 (CEST) Received: from [192.168.178.34] (e181007146.adsl.alicedsl.de [85.181.7.146]) by mailbroy.informatik.tu-muenchen.de (Postfix) with ESMTPSA id 7579F885ED29B; Fri, 5 Aug 2011 08:38:33 +0200 (CEST) Message-ID: <4E3B90B3.4090602 at in.tum.de> Date: Fri, 05 Aug 2011 08:41:55 +0200 From: Alexander Krauss User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.16) Gecko/20101227 Icedove/3.0.11 MIME-Version: 1.0 To: Alfio Martini References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: isabelle-users at cl.cam.ac.uk, Randy Pollack Subject: Re: [isabelle] Accessing (individual) simplification rules of function definitions X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Aug 2011 06:38:36 -0000 Status: O X-Status: X-Keywords: X-UID: 5834 On 08/05/2011 12:13 AM, Alfio Martini wrote: > Great!! Thanks for the quick reply! > >> f.simps(2) You can also name the rules at definition time: fun/primrec f :: "..." where name1: "..." | name2: "..." Alex From alfio.martini at gmail.com Fri Aug 05 12:43:49 2011 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QpIof-0000Ux-E3 (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Fri, 05 Aug 2011 12:43:49 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.6 from SpamAssassin-3.3.2-1153786 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [74.125.82.54 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (alfio.martini[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 HTML_MESSAGE BODY: HTML included in message * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta1.cl.cam.ac.uk ([128.232.25.21]:50261) by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25) with esmtp id 1QpIod-0006dA-WS (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Fri, 05 Aug 2011 12:43:49 +0100 Received: from ppsw-50.csi.cam.ac.uk ([131.111.8.150]) by mta1.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1QpIod-0006y0-0s for isabelle-users at cl.cam.ac.uk; Fri, 05 Aug 2011 12:43:47 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.6 from SpamAssassin-3.3.2-1153786 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [74.125.82.54 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (alfio.martini[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 HTML_MESSAGE BODY: HTML included in message * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-ww0-f54.google.com ([74.125.82.54]:41916) by ppsw-50.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.147]:25) with esmtp (csa=unknown) id 1QpIoY-0005wj-rf (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Fri, 05 Aug 2011 12:43:44 +0100 Received: by wwg9 with SMTP id 9so406197wwg.23 for ; Fri, 05 Aug 2011 04:43:42 -0700 (PDT) MIME-Version: 1.0 Received: by 10.227.165.202 with SMTP id j10mr1803414wby.18.1312544622379; Fri, 05 Aug 2011 04:43:42 -0700 (PDT) Sender: alfio.martini at gmail.com Received: by 10.227.133.209 with HTTP; Fri, 5 Aug 2011 04:43:42 -0700 (PDT) In-Reply-To: <4E3B90B3.4090602 at in.tum.de> References: <4E3B90B3.4090602 at in.tum.de> Date: Fri, 5 Aug 2011 08:43:42 -0300 X-Google-Sender-Auth: 7vQjxlxtiLgPt4bCmn2FIjjY68k Message-ID: From: Alfio Martini To: Alexander Krauss Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.8 Cc: isabelle-users at cl.cam.ac.uk, Randy Pollack Subject: Re: [isabelle] Accessing (individual) simplification rules of function definitions X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Aug 2011 11:43:49 -0000 Status: O X-Status: X-Keywords: X-UID: 5835 Hi Alexander, This is also very nice, because one now can refer to the specific rule as f.name1 and so on. Very helpful. Many thanks again! On Fri, Aug 5, 2011 at 3:41 AM, Alexander Krauss wrote: > On 08/05/2011 12:13 AM, Alfio Martini wrote: > >> Great!! Thanks for the quick reply! >> >> f.simps(2) >>> >> > You can also name the rules at definition time: > > fun/primrec f :: "..." > where > name1: "..." > | name2: "..." > > > Alex > -- Alfio Ricardo Martini PhD in Computer Science (TU Berlin) Associate Professor at Faculty of Informatics (PUCRS) Porto Alegre - RS - Brasil From alfio.martini at gmail.com Fri Aug 05 18:59:10 2011 Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QpOfu-00004y-Ku (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Fri, 05 Aug 2011 18:59:10 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.6 from SpamAssassin-3.3.2-1153786 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [74.125.82.174 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (alfio.martini[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 HTML_MESSAGE BODY: HTML included in message * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta0.cl.cam.ac.uk ([128.232.25.20]:55112) by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25) with esmtp id 1QpOft-0003d8-ST (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Fri, 05 Aug 2011 18:59:10 +0100 Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141]) by mta0.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1QpOft-0006uO-PP for isabelle-users at cl.cam.ac.uk; Fri, 05 Aug 2011 18:59:09 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.6 from SpamAssassin-3.3.2-1153786 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [74.125.82.174 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (alfio.martini[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 HTML_MESSAGE BODY: HTML included in message * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-wy0-f174.google.com ([74.125.82.174]:55126) by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25) with esmtp (csa=unknown) id 1QpOfs-0003d3-S9 (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Fri, 05 Aug 2011 18:59:09 +0100 Received: by wyf22 with SMTP id 22so1785271wyf.5 for ; Fri, 05 Aug 2011 10:59:08 -0700 (PDT) MIME-Version: 1.0 Received: by 10.227.165.202 with SMTP id j10mr2174170wby.18.1312567148497; Fri, 05 Aug 2011 10:59:08 -0700 (PDT) Sender: alfio.martini at gmail.com Received: by 10.227.133.209 with HTTP; Fri, 5 Aug 2011 10:59:08 -0700 (PDT) In-Reply-To: <4E3B90B3.4090602 at in.tum.de> References: <4E3B90B3.4090602 at in.tum.de> Date: Fri, 5 Aug 2011 14:59:08 -0300 X-Google-Sender-Auth: ftC9kv84q_mhW1zAUpogtC6_MOY Message-ID: From: Alfio Martini To: Alexander Krauss Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.8 Cc: isabelle-users at cl.cam.ac.uk, Randy Pollack Subject: Re: [isabelle] Accessing (individual) simplification rules of function definitions X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Aug 2011 17:59:10 -0000 Status: O X-Status: X-Keywords: X-UID: 5836 Dear Isabelle Users, In order to keep it in the same thread, I am pasting an answer Alexander gave me about a remaining doubt I had concerning the main topic of all these messages. Best! ----------------------------------------------xxxxxxxx-------------------------------------------------- Hi Alfio, I have small problem. Using 'primrec" I can access the individual rules > both using subscripts and tags, as you suggested. > But If i define using 'fun" it works only with subscripts. In the > following small script, Isabelle (2009-2) can not process > the last thm command. It sends an error message: unknown fact. Thanks > for any help! > theory playing_tags imports Main begin datatype Nat = Z | suc Nat primrec add::"Nat=>Nat=>Nat" where add01: "(add x Z) = x" | add02: "(add x (suc y)) = suc(add x y)" thm "add.simps" thm "add.simps"(2) thm "add.simps"(1) thm "add.add01" thm "add.add02" fun sum::"Nat * Nat => Nat" where sum01: "sum(x,Z)=x" | sum02: "sum(x,suc(y)) = suc(sum(x,y))" thm "sum.simps" thm "sum.simps"(1) thm "sum.simps"(2) thm "sum.sum01" end The function packages produces names without the function name as (optional) qualifier. So plain "sum01" instead of "sum.sum01" works. This should probably be made more uniform. btw: you can inspect the theorems produced by a command by using "print_theorems" afterwards. Alex --------------------------------------------xxxxxxxxxxxxxxxx------------------------------------------ On Fri, Aug 5, 2011 at 3:41 AM, Alexander Krauss wrote: > On 08/05/2011 12:13 AM, Alfio Martini wrote: > >> Great!! Thanks for the quick reply! >> >> f.simps(2) >>> >> > You can also name the rules at definition time: > > fun/primrec f :: "..." > where > name1: "..." > | name2: "..." > > > Alex > -- Alfio Ricardo Martini PhD in Computer Science (TU Berlin) Associate Professor at Faculty of Informatics (PUCRS) Porto Alegre - RS - Brasil From lp15 at cam.ac.uk Fri Aug 05 14:49:04 2011 Received: from ppsw-50.csi.cam.ac.uk ([131.111.8.150]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QpKls-0003r9-9G (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Fri, 05 Aug 2011 14:49:04 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -3.8 from SpamAssassin-3.3.2-1153786 * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * -0.9 RP_MATCHES_RCVD Envelope sender domain matches handover relay * domain * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta1.cl.cam.ac.uk ([128.232.25.21]:52780) by ppsw-50.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.147]:25) with esmtp id 1QpKlq-0001KI-ry (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Fri, 05 Aug 2011 14:49:04 +0100 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by mta1.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1QpKlq-0000b7-M4 for isabelle-users at cl.cam.ac.uk; Fri, 05 Aug 2011 14:49:02 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: not scanned X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from epicure.cl.cam.ac.uk ([128.232.1.188]:53734) by ppsw-51.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.158]:587) with esmtpsa (PLAIN:lp15) (TLSv1:AES128-SHA:128) id 1QpKlm-0000oI-Wp (Exim 4.72) (return-path ); Fri, 05 Aug 2011 14:48:58 +0100 From: Lawrence Paulson Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Date: Fri, 5 Aug 2011 14:48:57 +0100 Message-Id: <57204C61-9AEE-426E-9BD4-010627DAB245 at cam.ac.uk> To: pvs at csl.sri.com, isabelle-users , hol-info at lists.sourceforge.net, om-announce at openmath.org, theorem-provers at ai.mit.edu Mime-Version: 1.0 (Apple Message framework v1084) X-Mailer: Apple Mail (2.1084) X-Mailman-Approved-At: Sat, 06 Aug 2011 08:18:26 +0100 Cc: Geoff Sutcliffe Subject: [isabelle] MetiTarski 1.9 released! X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Aug 2011 13:49:04 -0000 Status: O X-Status: X-Keywords: X-UID: 5837 MetiTarski is an automatic theorem prover based on a combination of = resolution and computer algebra technology. It is designed to prove = theorems involving real-valued special functions such as ln, exp, sin, = cos, arctan and sqrt. All variables are assumed to range over the real = numbers. MetiTarski can be downloaded from = http://www.cl.cam.ac.uk/~lp15/papers/Arith/. You will be asked to leave = your name and e-mail address so that we can have an idea how many users = there are. You will not receive regular e-mails from us. Version 1.9 represents over 6 months of development over the previous = version, incorporating code by James Bridge and Grant Passmore, along = with new problems supplied by William Denman. Please see the release = notes for details. Remark about CASC: The version run in the competition was 1.8. We did = not push to release this version in time for CASC because most of our = work would have been irrelevant. None of the problems used in the = competition Involve real-valued special functions. Please note that MetiTarski is experimental research software and may = require a certain amount of effort to build on your machine. Feedback is = welcome!! Larry Paulson From wneuper at ist.tugraz.at Sat Aug 06 09:12:02 2011 Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QpbzG-0006Wh-K7 (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Sat, 06 Aug 2011 09:12:02 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.6 from SpamAssassin-3.3.2-1154128 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [129.27.2.202 listed in list.dnswl.dnsbl.ja.net] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta0.cl.cam.ac.uk ([128.232.25.20]:50214) by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25) with esmtp id 1QpbzG-0008Nq-Qw (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Sat, 06 Aug 2011 09:12:02 +0100 Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141]) by mta0.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1QpbzG-0006pC-9o for isabelle-users at cl.cam.ac.uk; Sat, 06 Aug 2011 09:12:02 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.6 from SpamAssassin-3.3.2-1154128 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [129.27.2.202 listed in list.dnswl.dnsbl.ja.net] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mailrelay.tu-graz.ac.at ([129.27.2.202]:54602 helo=mailrelay.tugraz.at) by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25) with esmtp (csa=unknown) id 1QpbzF-0008Mj-RV (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Sat, 06 Aug 2011 09:12:02 +0100 Received: from [10.0.1.4] (chello080108063136.8.11.vie.surfer.at [80.108.63.136]) (authenticated bits=0) by mailrelay2.tugraz.at (8.14.4/8.14.4) with ESMTP id p768BuW4008043 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 6 Aug 2011 10:11:56 +0200 (CEST) X-DKIM: Sendmail DKIM Filter v2.8.3 mailrelay2.tugraz.at p768BuW4008043 Message-ID: <4E3CF74B.70305 at ist.tugraz.at> Date: Sat, 06 Aug 2011 10:11:55 +0200 From: Walther Neuper User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8 MIME-Version: 1.0 To: isabelle-users at cl.cam.ac.uk Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-TUG-Backscatter-control: waObeELIUl4ypBWmcn/8wQ X-Spam-Scanner: SpamAssassin 3.003000 X-Spam-Score-relay: 0.0 X-Scanned-By: MIMEDefang 2.70 on 129.27.10.19 Subject: [isabelle] FFT.thy ? X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Aug 2011 08:12:02 -0000 Status: O X-Status: X-Keywords: X-UID: 5838 In Sascha's and Jasmin's talk at CADE they mentioned "FFT" in their benchmarks, i.e. fast fourier transform as they confirmed in personal communication. From the most recent clone 01d6ab227069 I get nothing by Isabelle/src$ find -name "F*.thy" Isabelle/src$ grep -r "ourier" * I'd be grateful for another hint, Walther From gerwin.klein at nicta.com.au Sat Aug 06 09:31:57 2011 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QpcIX-0006eC-Ap (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Sat, 06 Aug 2011 09:31:57 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -4.2 from SpamAssassin-3.3.2-1154128 * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, * medium trust * [129.94.242.24 listed in list.dnswl.dnsbl.ja.net] * 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay * lines * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta0.cl.cam.ac.uk ([128.232.25.20]:54406) by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25) with esmtp id 1QpcIV-0006TH-Ys (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Sat, 06 Aug 2011 09:31:57 +0100 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by mta0.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1QpcIV-0007Az-Om for isabelle-users at cl.cam.ac.uk; Sat, 06 Aug 2011 09:31:55 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -4.2 from SpamAssassin-3.3.2-1154128 * 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay * lines * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, * medium trust * [129.94.242.24 listed in list.dnswl.dnsbl.ja.net] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from note.orchestra.cse.unsw.edu.au ([129.94.242.24]:54582) by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25) with esmtp (csa=unknown) id 1QpcIU-0006SV-Wv (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Sat, 06 Aug 2011 09:31:55 +0100 Received: From [10.5.48.39] ([84.153.180.189] == p5499B4BD.dip.t-dialin.net) (auth-user kleing) (cse-authentic-sender kleing) (for ) By note With Smtp ; Sat, 6 Aug 2011 18:31:46 +1000 From: Gerwin Klein To: isabelle-users at cl.cam.ac.uk Date: Sat, 6 Aug 2011 10:31:03 +0200 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1084) In-Reply-To: <4E3CF74B.70305 at ist.tugraz.at> Content-Transfer-Encoding: quoted-printable Message-Id: <4B8735EF-BA44-46FF-B760-E42251876824 at nicta.com.au> References: <4E3CF74B.70305 at ist.tugraz.at> X-Mailer: Apple Mail (2.1084) Subject: Re: [isabelle] FFT.thy ? X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Aug 2011 08:31:57 -0000 Status: O X-Status: X-Keywords: X-UID: 5839 On 06/08/2011, at 10:11 AM, Walther Neuper wrote: > In Sascha's and Jasmin's talk at CADE they mentioned "FFT" in their = benchmarks, i.e. fast fourier transform as they confirmed in personal = communication. >=20 > =46rom the most recent clone 01d6ab227069 I get nothing by >=20 > Isabelle/src$ find -name "F*.thy" > Isabelle/src$ grep -r "ourier" * >=20 > I'd be grateful for another hint, It's an AFP entry: http://afp.sourceforge.net/entries/FFT.shtml (Harder to grep for, but to find things in the AFP, = http://afp.sourceforge.net/search.shtml works fairly nicely) Cheers, Gerwin= From filali at irit.fr Sun Aug 07 11:02:27 2011 Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1Qq0Bf-0000Ti-TW (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Sun, 07 Aug 2011 11:02:27 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1154462 * 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay * lines * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta1.cl.cam.ac.uk ([128.232.25.21]:56444) by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25) with esmtp id 1Qq0Bf-0005ZI-Es (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Sun, 07 Aug 2011 11:02:27 +0100 Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141]) by mta1.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1Qq0Bf-0001A9-Dq for isabelle-users at cl.cam.ac.uk; Sun, 07 Aug 2011 11:02:27 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1154462 * 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay * lines * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from smtp1.cict.fr ([195.220.59.41]:48515) by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25) with esmtp (csa=unknown) id 1Qq0Bc-00087p-Px (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Sun, 07 Aug 2011 11:02:24 +0100 Received: from smtp1.cict.fr (localhost.localdomain [127.0.0.1]) by smtp1.cict.fr (8.14.5/8.14.4) with ESMTP id p77A2NFb021174 for ; Sun, 7 Aug 2011 12:02:23 +0200 Received: from smtp1.irit.fr (smtp1.irit.fr [141.115.24.2]) by smtp1.cict.fr (8.14.5/8.14.5) with ESMTP id p77A2Nlx021171 for ; Sun, 7 Aug 2011 12:02:23 +0200 Received: from irit.fr Message-ID: <4E3E6287.9090109 at irit.fr> Date: Sun, 07 Aug 2011 12:01:43 +0200 From: Mamoun FILALI-AMINE Organization: IRIT CNRS =?ISO-8859-1?Q?Universit=E9_de_Toulouse?= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: isabelle-users at cl.cam.ac.uk Content-Type: multipart/mixed; boundary="------------040508070603000006070804" X-Virus-Scanned: clamav-milter 0.97.2 at smtp1.cict.fr X-Virus-Status: Clean Subject: [isabelle] schematic variables X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Aug 2011 10:02:28 -0000 Status: O X-Status: X-Keywords: X-UID: 5840 This is a multi-part message in MIME format. --------------040508070603000006070804 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hello, I wonder if it is possible to instantiate schematic variables after unfolding (see example below). thanks Mamoun -------- definition "ref P Q = (\ s. P s \ Q s)" theorem assumes r1: "ref A A'" assumes r2: "ref B B'" shows "ref (A \ B) (A' \ B')" proof - have "?thesis" unfolding ref_def (* is "\ s. ?L s \ ?R s" *) --------------040508070603000006070804 Content-Type: text/x-vcard; charset=utf-8; name="filali.vcf" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="filali.vcf" begin:vcard fn:Mamoun FILALI-AMINE n:FILALI-AMINE;Mamoun adr;quoted-printable:118 Route de Narbonne;;IRIT Universit=C3=A9 Paul Sabatier;Toulouse;;31062 cedex 9;France email;internet:filali at irit.fr tel;work:00 33 5 61 55 69 26 tel;fax:00 33 5 61 55 64 48 version:2.1 end:vcard --------------040508070603000006070804-- From boehmes at in.tum.de Sun Aug 07 12:26:17 2011 Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1Qq1Un-00011l-Cq (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Sun, 07 Aug 2011 12:26:17 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1154462 * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta1.cl.cam.ac.uk ([128.232.25.21]:54309) by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25) with esmtp id 1Qq1Um-0003xU-G0 (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Sun, 07 Aug 2011 12:26:17 +0100 Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141]) by mta1.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1Qq1Um-0001pj-T2 for isabelle-users at cl.cam.ac.uk; Sun, 07 Aug 2011 12:26:16 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1154462 * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-out1.informatik.tu-muenchen.de ([131.159.0.8]:42754) by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25) with esmtp (csa=unknown) id 1Qq1Uj-0007bD-RD (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Sun, 07 Aug 2011 12:26:13 +0100 Received: from localhost (scanbroy [10.46.146.16]) by mailbroy.informatik.tu-muenchen.de (Postfix) with ESMTP id A0F5A80C9FCB2; Sun, 7 Aug 2011 13:26:12 +0200 (CEST) X-Virus-Scanned: by amavisd-new using ClamAV at mailbroy.informatik.tu-muenchen.de Received: from mailbroy.informatik.tu-muenchen.de ([10.46.146.15]) by localhost (mailbroy.informatik.tu-muenchen.de [10.46.146.16]) (amavisd-new, port 10024) with ESMTP id 4hdPQoUc4LSt; Sun, 7 Aug 2011 13:26:12 +0200 (CEST) Received: from eloas (unknown [188.174.157.155]) by mailbroy.informatik.tu-muenchen.de (Postfix) with ESMTPSA id 29B0980C6CC30; Sun, 7 Aug 2011 13:26:12 +0200 (CEST) Date: Sun, 7 Aug 2011 13:26:19 +0200 From: Sascha Boehme To: Mamoun FILALI-AMINE Message-ID: <20110807112618.GA823 at eloas> References: <4E3E6287.9090109 at irit.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4E3E6287.9090109 at irit.fr> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: isabelle-users at cl.cam.ac.uk Subject: Re: [isabelle] schematic variables X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Aug 2011 11:26:17 -0000 Status: O X-Status: X-Keywords: X-UID: 5841 Hello Mamoun, Your example does not contain schematic variables after unfolding with ref_def. Instead, the goal looks as follows: \s. (A \ B) s \ (A' \ B') s The most common form to instantiate schematic variables in facts is via the "of" attribute, for example as follows: thm refl (* is "?t = ?t" *) thm refl[of x] (* is "x = x" *) This can also be applied to intermediate steps in a proof: lemma "\n::nat. n \ 0" proof - { fix n :: nat have "n \ 0" by simp } (* we proved "?n \ 0" *) note this[of "1 :: nat"] (* is "1 \ 0" *) then show ?thesis .. qed A different form of this proof introduces schematic variables into the goal, but in most cases it's best to let some tactic instantiate these variables automatically: lemma "\n::nat. n \ 0" apply (rule exI) (* the goal is now "?n \ 0" *) apply simp (* instantiates "?n" appropriately and solves the goal *) done Cheers, Sascha Mamoun FILALI-AMINE wrote: > Hello, > > I wonder if it is possible to instantiate schematic variables > after unfolding (see example below). > thanks > > Mamoun > > -------- > > definition "ref P Q = (\ s. P s \ Q s)" > > theorem > assumes r1: "ref A A'" > assumes r2: "ref B B'" > shows "ref (A \ B) (A' \ B')" > proof - > have "?thesis" unfolding ref_def (* is "\ s. ?L s > \ ?R s" *) > > begin:vcard > fn:Mamoun FILALI-AMINE > n:FILALI-AMINE;Mamoun > adr;quoted-printable:118 Route de Narbonne;;IRIT Universit=C3=A9 Paul Sabatier;Toulouse;;31062 cedex 9;France > email;internet:filali at irit.fr > tel;work:00 33 5 61 55 69 26 > tel;fax:00 33 5 61 55 64 48 > version:2.1 > end:vcard > From florian.haftmann at informatik.tu-muenchen.de Sun Aug 07 15:33:05 2011 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1Qq4PZ-0002Fy-6p (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Sun, 07 Aug 2011 15:33:05 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1154462 * -0.8 RP_MATCHES_RCVD Envelope sender domain matches handover relay * domain * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta0.cl.cam.ac.uk ([128.232.25.20]:42371) by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25) with esmtp id 1Qq4PX-00030r-YA (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Sun, 07 Aug 2011 15:33:05 +0100 Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152]) by mta0.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1Qq4PX-0006so-G6 for isabelle-users at cl.cam.ac.uk; Sun, 07 Aug 2011 15:33:03 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1154462 * -0.8 RP_MATCHES_RCVD Envelope sender domain matches handover relay * domain * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-out1.informatik.tu-muenchen.de ([131.159.0.8]:53232) by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25) with esmtp (csa=unknown) id 1Qq4PW-0000Xn-EU (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Sun, 07 Aug 2011 15:33:03 +0100 Received: from localhost (scanbroy [10.46.146.16]) by mailbroy.informatik.tu-muenchen.de (Postfix) with ESMTP id 9170081DE5244; Sun, 7 Aug 2011 16:33:01 +0200 (CEST) X-Virus-Scanned: by amavisd-new using ClamAV at mailbroy.informatik.tu-muenchen.de Received: from mailbroy.informatik.tu-muenchen.de ([10.46.146.15]) by localhost (mailbroy.informatik.tu-muenchen.de [10.46.146.16]) (amavisd-new, port 10024) with ESMTP id m+nUQ4gmaFZW; Sun, 7 Aug 2011 16:33:01 +0200 (CEST) Received: from [192.168.2.24] (p57A3395C.dip.t-dialin.net [87.163.57.92]) by mailbroy.informatik.tu-muenchen.de (Postfix) with ESMTPSA id 998DB81DE5243; Sun, 7 Aug 2011 16:33:00 +0200 (CEST) Message-ID: <4E3EA217.7050500 at informatik.tu-muenchen.de> Date: Sun, 07 Aug 2011 16:32:55 +0200 From: Florian Haftmann Organization: TU =?ISO-8859-1?Q?M=FCnchen=2C_Lehrstuhl_Software_and?= =?ISO-8859-1?Q?_Systems_Engineering?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.18) Gecko/20110617 Lightning/1.0b2 Thunderbird/3.1.11 MIME-Version: 1.0 To: Peter Gammie , Brian Huffman References: <7C9D7FD1-17C2-4D4A-81E9-7ED88EC0EC65 at gmail.com> In-Reply-To: <7C9D7FD1-17C2-4D4A-81E9-7ED88EC0EC65 at gmail.com> X-Enigmail-Version: 1.1.2 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig55E11D82BA666ECF03180819" Cc: USR Isabelle Mailinglist Subject: Re: [isabelle] code generation for saturated naturals X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Aug 2011 14:33:05 -0000 Status: O X-Status: X-Keywords: X-UID: 5842 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig55E11D82BA666ECF03180819 Content-Type: multipart/mixed; boundary="------------070000050601010106080301" This is a multi-part message in MIME format. --------------070000050601010106080301 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Peter, hi Brian, > In his zest to ensure all uses of numerals are algebraically well-organised, Brian manufactured the attached theory of "saturated" arithmetic for the naturals for me. > > I'm now struggling to get it to work with the code generator. The problem is that the CARD('a) construct leans on the card function, and for some reason the code generator wants to enumerate nat while calculating card. I can't see why it wants to do that. Can you suggest a way forward? (The attached theory should break at an opportune point.) > find attached an experiment of mine which hopefully turn out to be helpfu= l. First, it is important that we keep such discussions on the public mailing list, since more eyes see more than less and also to make sure the generic Isabelle knowledge stays publicly available and is able to gr= ow. Here now, the answers proper to your issues: a) avoiding CARD('a) in generated code class len_card =3D len + assumes len_of_card: "len_of TYPE('a) =3D CARD('a)" This connects len_of TYPE('a) to CARD('a) and allows you to generate code for type 'a::len_card sat. Of course you have to give appropriate instantiations, or replace CARD('a) by len_of TYPE('a) in your specification throughout to gain full flexibility. @Brian: Did you ever think about including such a class as len_card into the Word libraries directly? b) use abstract type for code generation lemma Abs_Rep_sat' [simp, code abstype]: "Abs_sat' (Rep_sat n) =3D n" by (simp add: Abs_sat'_def min_CARD_Rep_sat Rep_sat_inverse) (call on me again if this sounds like Bohemian villages for you) c) prove simp rules for your "abtract" operation of the form: lemma Rep_plus_sat [simp]: "Rep_sat (x + y) =3D min (Rep_sat x + Rep_sat y) CARD('a)" by (simp add: plus_sat_def) Together with extensionality on sat values, this will greatly simplify your proofs and make them less cumbersome. Look at the theory to get more ideas. > I humbly suggest that a working version of this theory make its way into HOL/Library. I'd be happy to round out the theory with some guidance= =2E Yes, indeed. I'd first suggest to round up the proofs a little, and maybe others want to comment also on that. Hope this helps, Florian --=20 Home: http://www.in.tum.de/~haftmann PGP available: http://home.informatik.tu-muenchen.de/haftmann/pgp/florian_haftmann_at_in= formatik_tu_muenchen_de --------------070000050601010106080301 Content-Type: text/plain; name="Saturated.thy" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="Saturated.thy" (* Author: Brian Huffman *) (* Version: Isabelle2011 *) header {* Saturated arithmetic *} theory Saturated imports Main "~~/src/HOL/Library/Numeral_Type" "~~/src/HOL/Word/Type_Leng= th" begin typedef (open) 'a sat =3D "{.. CARD('a)}" by auto definition Abs_sat' :: "nat \ 'a sat" where "Abs_sat' n =3D Abs_sat (min (CARD('a)) n)" text {* More simp rules are admissible and helpful *} lemma Rep_Abs_sat' [simp]: "Rep_sat (Abs_sat' n :: 'a sat) =3D min (CARD(= 'a)) n" unfolding Abs_sat'_def by (rule Abs_sat_inverse) simp lemma Rep_sat_le_CARD [simp]: "Rep_sat (n :: 'a sat) \ CARD('a)" using Rep_sat [where x=3Dn] by simp lemma min_CARD_Rep_sat [simp]: "min CARD('a) (Rep_sat (n::'a sat)) =3D Re= p_sat n" by (rule min_max.inf_absorb2 [OF Rep_sat_le_CARD]) lemma min_Rep_sat_CARD [simp]: "min (Rep_sat (n::'a sat)) CARD('a) =3D Re= p_sat n" by (simp add: min_CARD_Rep_sat min_max.inf.commute) text {* Suggestion: Use code generation for abstract types *} lemma Abs_Rep_sat' [simp, code abstype]: "Abs_sat' (Rep_sat n) =3D n" by (simp add: Abs_sat'_def min_CARD_Rep_sat Rep_sat_inverse) text {* Suggestion: use extensionality in primitive proofs about @{typ "'= a sat"} *} lemma sat_eqI: "Rep_sat m =3D Rep_sat n \ m =3D n" by (simp add: Rep_sat_inject) lemma sat_eq_iff: "m =3D n \ Rep_sat m =3D Rep_sat n" by (simp add: Rep_sat_inject) text {* Suggestion: may can be generalized to class @{class linordered_se= miring} *} lemma nat_mult_min_left: fixes x y z :: nat shows "min x y * z =3D min (x * z) (y * z)" unfolding min_def by simp lemma nat_mult_min_right: fixes x y z :: nat shows "x * min y z =3D min (x * y) (x * z)" unfolding min_def by simp lemma nat_add_min_left: fixes x y z :: nat shows "min x y + z =3D min (x + z) (y + z)" unfolding min_def by simp lemma nat_add_min_right: fixes x y z :: nat shows "x + min y z =3D min (x + y) (x + z)" unfolding min_def by simp instantiation sat :: (type) "{minus, comm_semiring_0}" begin definition zero_sat_def: "0 =3D Abs_sat' 0" text {* Prove the @{text "Rep ..."} lemmas immediately and use for code g= eneration *} lemma Rep_zero_sat [simp, code abstract]: "Rep_sat 0 =3D 0" by (simp add: zero_sat_def) definition plus_sat_def: "x + y =3D Abs_sat' (Rep_sat x + Rep_sat y)" lemma Rep_plus_sat [simp, code abstract]: "Rep_sat (x + y) =3D min (Rep_sat x + Rep_sat y) CARD('a)" by (simp add: plus_sat_def) definition minus_sat_def: "x - y =3D Abs_sat' (Rep_sat x - Rep_sat y)" lemma Rep_minus_sat [simp, code abstract]: "Rep_sat (x - y) =3D Rep_sat x - Rep_sat y" proof - from Rep_sat_le_CARD [of x] have "Rep_sat x - Rep_sat y \ CARD('a)"= by arith then show ?thesis by (simp add: minus_sat_def) qed definition times_sat_def: "x * y =3D Abs_sat' (Rep_sat x * Rep_sat y)" lemma Rep_times_sat [simp, code abstract]: "Rep_sat (x * y) =3D min (Rep_sat x * Rep_sat y) CARD('a)" by (simp add: times_sat_def) instance apply intro_classes apply (simp_all add: sat_eq_iff mult.commute) txt {* Here two subgoals algebraic goals about @{const min} survive, whic= h should possible to be tracked to generic lemmas; still some work, but a= vast improvement over the previous apply proof *} sorry end instantiation sat :: (type) ordered_comm_semiring begin definition less_eq_sat_def: "x \ y \ Rep_sat x \ Rep_s= at y" text {* This formulation is much more nicer for unfolding *} definition less_sat_def: "(x::'a sat) < y \ Rep_sat x < Rep_sa= t y" instance apply intro_classes apply (auto simp add: less_eq_sat_def less_sat_def not_le sat_eq_iff) txt {* use proper Isar proof *} sorry end text {* Here an experiment on code generation: *} code_thms "Saturated._" -- {* There is still @{text card} for @{const plu= s} and @{const times} *} class len_card =3D len + assumes len_of_card: "len_of TYPE('a) =3D CARD('a)" lemma plus_sat_code [code abstract]: fixes x y :: "'a::len_card sat" shows "Rep_sat (x + y) =3D min (Rep_sat x + Rep_sat y) (len_of TYPE('a)= )" by (simp add: len_of_card) lemma times_sat_code [code abstract]: fixes x y :: "'a::len_card sat" shows "Rep_sat (x * y) =3D min (Rep_sat x * Rep_sat y) (len_of TYPE('a)= )" by (simp add: len_of_card) export_code "Saturated._" in Haskell file - -- {* Heureka! *} instance sat :: (type) linorder proof fix x y :: "'a sat" show "x \ y \ y \ x" unfolding less_eq_sat_def by (rule linear) qed instantiation sat :: (finite) comm_semiring_1 begin definition one_sat_def: "1 =3D Abs_sat 1" lemma Rep_sat_1: "Rep_sat 1 =3D 1" unfolding one_sat_def by (rule Abs_sat_inverse) simp instance apply intro_classes apply (unfold times_sat_def) apply (unfold Rep_sat_inject [symmetric]) apply (unfold Rep_Abs_sat' Rep_sat_0 Rep_sat_1) apply (simp add: min_CARD_Rep_sat) apply simp done end instance sat :: (type) finite proof show "finite (UNIV::'a sat set)" unfolding type_definition.univ [OF type_definition_sat] using finite by simp qed instantiation sat :: (type) number begin definition number_of_sat_def [code del]: "number_of =3D Abs_sat' \ nat" instance .. end instantiation sat :: (type) equal (*<*) begin definition "HOL.equal A B \ Rep_sat A =3D Rep_sat B" instance proof qed (simp add: equal_sat_def Rep_sat_inject) end text{* Code generator setup. *} code_datatype number_sat_inst.number_of_sat lemma zero_nat_code [code, code_unfold_post]: "0 =3D (Numeral0 :: 'a sat)" by (simp add: number_of_sat_def Abs_sat'_def Int.Pls_def zero_sat_def) lemma one_nat_code [code, code_unfold_post]: "1 =3D (Numeral1 :: ('a :: card2) sat)" apply (simp add: number_of_sat_def Abs_sat'_def one_sat_def Int.Pls_def= ) apply (subst Abs_sat_inject) apply simp apply simp sorry (* lemma Suc_code [code]: "Suc n =3D n + 1" by simp *) declare plus_sat_def[code] definition f :: "2 sat" where "f \ 1 + 0" code_thms f export_code "f" in - lemma plus_sat_code[code]: "n + m =3D nat (of_nat n + of_nat m)" by simp lemma minus_nat_code [code]: "n - m =3D nat (of_nat n - of_nat m)" by simp end --------------070000050601010106080301-- --------------enig55E11D82BA666ECF03180819 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk4+ohsACgkQZEASYmKQGuFHdACg0PG1SNN9YBWWRxjppBXa0gut e7EAn2IeFd9DZTWTXjo6FYSirgusSPAp =3mUS -----END PGP SIGNATURE----- --------------enig55E11D82BA666ECF03180819-- From florian.haftmann at informatik.tu-muenchen.de Sun Aug 07 15:35:55 2011 Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1Qq4SJ-0002HW-Kt (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Sun, 07 Aug 2011 15:35:55 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1154462 * -0.8 RP_MATCHES_RCVD Envelope sender domain matches handover relay * domain * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta0.cl.cam.ac.uk ([128.232.25.20]:52633) by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25) with esmtp id 1Qq4SH-0007Yt-Re (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Sun, 07 Aug 2011 15:35:55 +0100 Received: from ppsw-50.csi.cam.ac.uk ([131.111.8.150]) by mta0.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1Qq4SH-0006x1-Fs for isabelle-users at cl.cam.ac.uk; Sun, 07 Aug 2011 15:35:53 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1154462 * -0.8 RP_MATCHES_RCVD Envelope sender domain matches handover relay * domain * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-out1.informatik.tu-muenchen.de ([131.159.0.8]:53407) by ppsw-50.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.147]:25) with esmtp (csa=unknown) id 1Qq4SG-00035A-sO (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Sun, 07 Aug 2011 15:35:53 +0100 Received: from localhost (scanbroy [10.46.146.16]) by mailbroy.informatik.tu-muenchen.de (Postfix) with ESMTP id 3C12681DE5243; Sun, 7 Aug 2011 16:35:52 +0200 (CEST) X-Virus-Scanned: by amavisd-new using ClamAV at mailbroy.informatik.tu-muenchen.de Received: from mailbroy.informatik.tu-muenchen.de ([10.46.146.15]) by localhost (mailbroy.informatik.tu-muenchen.de [10.46.146.16]) (amavisd-new, port 10024) with ESMTP id S-RqJvAr8Vnr; Sun, 7 Aug 2011 16:35:52 +0200 (CEST) Received: from [192.168.2.24] (p57A3395C.dip.t-dialin.net [87.163.57.92]) by mailbroy.informatik.tu-muenchen.de (Postfix) with ESMTPSA id 9E0C081E4A937; Sun, 7 Aug 2011 16:35:51 +0200 (CEST) Message-ID: <4E3EA2C7.80400 at informatik.tu-muenchen.de> Date: Sun, 07 Aug 2011 16:35:51 +0200 From: Florian Haftmann Organization: TU =?ISO-8859-1?Q?M=FCnchen=2C_Lehrstuhl_Software_and?= =?ISO-8859-1?Q?_Systems_Engineering?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.18) Gecko/20110617 Lightning/1.0b2 Thunderbird/3.1.11 MIME-Version: 1.0 To: Peter Gammie , Brian Huffman References: <7C9D7FD1-17C2-4D4A-81E9-7ED88EC0EC65 at gmail.com> In-Reply-To: <7C9D7FD1-17C2-4D4A-81E9-7ED88EC0EC65 at gmail.com> X-Enigmail-Version: 1.1.2 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigACEFB4F4596FEAFFDAFF55BC" Cc: USR Isabelle Mailinglist Subject: Re: [isabelle] code generation for saturated naturals X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Aug 2011 14:35:55 -0000 Status: O X-Status: X-Keywords: X-UID: 5843 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigACEFB4F4596FEAFFDAFF55BC Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Btw. theory src/HOL/Library/Dlist.thy is a very nice example how to establish what you could call =BBabstract types with invariants=AB and corresponding code generation in Isabelle/HOL. I suggest to follow the patterns which can be found there wrt. to which auxiliary lemmas about Rep/Abs/Abs' to prove, which simp rules to prove and how to setup code generation. Maybe your Abs_sat' can just be called Sat. Florian --=20 Home: http://www.in.tum.de/~haftmann PGP available: http://home.informatik.tu-muenchen.de/haftmann/pgp/florian_haftmann_at_in= formatik_tu_muenchen_de --------------enigACEFB4F4596FEAFFDAFF55BC Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk4+oscACgkQZEASYmKQGuGWmACfU3+5Ov2ndGX94iLTkX9kyocp 8bgAn2jie8A7E3ddlH0QZ2Hxwl19buGw =OJPS -----END PGP SIGNATURE----- --------------enigACEFB4F4596FEAFFDAFF55BC-- From florian.haftmann at informatik.tu-muenchen.de Sun Aug 07 15:44:51 2011 Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1Qq4ax-0002Ko-Sq (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Sun, 07 Aug 2011 15:44:51 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1154462 * -0.8 RP_MATCHES_RCVD Envelope sender domain matches handover relay * domain * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-out1.informatik.tu-muenchen.de ([131.159.0.8]:54009) by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25) with esmtp (csa=unknown) id 1Qq4ax-0003at-Cw (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Sun, 07 Aug 2011 15:44:51 +0100 Received: from localhost (scanbroy [10.46.146.16]) by mailbroy.informatik.tu-muenchen.de (Postfix) with ESMTP id 8BF4081DC0DF7; Sun, 7 Aug 2011 16:44:50 +0200 (CEST) X-Virus-Scanned: by amavisd-new using ClamAV at mailbroy.informatik.tu-muenchen.de Received: from mailbroy.informatik.tu-muenchen.de ([10.46.146.15]) by localhost (mailbroy.informatik.tu-muenchen.de [10.46.146.16]) (amavisd-new, port 10024) with ESMTP id Pn6TRMmfBL-a; Sun, 7 Aug 2011 16:44:50 +0200 (CEST) Received: from [192.168.2.24] (p57A3395C.dip.t-dialin.net [87.163.57.92]) by mailbroy.informatik.tu-muenchen.de (Postfix) with ESMTPSA id 0CB7281438007; Sun, 7 Aug 2011 16:44:49 +0200 (CEST) Message-ID: <4E3EA4E1.5050508 at informatik.tu-muenchen.de> Date: Sun, 07 Aug 2011 16:44:49 +0200 From: Florian Haftmann Organization: TU =?ISO-8859-1?Q?M=FCnchen=2C_Lehrstuhl_Software_and?= =?ISO-8859-1?Q?_Systems_Engineering?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.18) Gecko/20110617 Lightning/1.0b2 Thunderbird/3.1.11 MIME-Version: 1.0 To: Peter Gammie References: <80A7BCBE-C1F8-4C2B-AB4F-4DF1C1B1B941 at gmail.com> <4E324C0A.5010709 at informatik.tu-muenchen.de> In-Reply-To: X-Enigmail-Version: 1.1.2 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig5E3B9629A627E4624C6B705A" Cc: cl-isabelle-users at lists.cam.ac.uk Subject: Re: [isabelle] the state of the lattice theories X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Aug 2011 14:44:51 -0000 Status: O X-Status: X-Keywords: X-UID: 5844 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig5E3B9629A627E4624C6B705A Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Peter, > OK. This being the case, could (/should) it be moved from the top-level= , to e.g. HOL/Library/ or ex/, or maybe Proofs/? here there are two misunderstandings mixed together: a) Basically, everything inside HOL/ can be considered a library as long it is a suitable development to build upon, be it HOL-Algebra or HOL-Imperative_HOL. Typically the developer of a (let's call it) extension is able to tell you whether it can suit your purpose. b) Proofs/ is not a directory, it is a particular image of the HOL session run with proof terms. > On a related note, HOL/Library/ is a zoo. Would it be reasonable to introduce more structure there, ala Haskell's hierarchical libraries? It would surely, but we have no hierarchical theory name space (yet). > Indeed it was an entirely separate Isabelle logic (built on top of HOL)= , but Brian's recent work has made HOLCF a HOL library. It provides conve= nient ways of making recursive definitions over PCPOs that strike me as u= seful for doing the same thing over complete lattices. I dimly remember that once Brian and I discussed whether some ordering stuff could be shared here, but AFAIR the major obstacle was that HOL orderings have an explicit strict part <, which seems to be inconvenient for HOLCF. Hope this helps, Florian --=20 Home: http://www.in.tum.de/~haftmann PGP available: http://home.informatik.tu-muenchen.de/haftmann/pgp/florian_haftmann_at_in= formatik_tu_muenchen_de --------------enig5E3B9629A627E4624C6B705A Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk4+pOEACgkQZEASYmKQGuFqRwCglIqPkHAntgUsidKfKhchPCd1 o1EAoNx/JpwyxfscPSU6XEv4zQk0EQ5Z =veCZ -----END PGP SIGNATURE----- --------------enig5E3B9629A627E4624C6B705A-- From florian.haftmann at informatik.tu-muenchen.de Sun Aug 07 19:35:28 2011 Received: from ppsw-50.csi.cam.ac.uk ([131.111.8.150]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1Qq8C8-0003hL-O7 (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Sun, 07 Aug 2011 19:35:28 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1154462 * -0.8 RP_MATCHES_RCVD Envelope sender domain matches handover relay * domain * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-out1.informatik.tu-muenchen.de ([131.159.0.8]:33150) by ppsw-50.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.147]:25) with esmtp (csa=unknown) id 1Qq8C7-0005W8-sS (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Sun, 07 Aug 2011 19:35:28 +0100 Received: from localhost (scanbroy [10.46.146.16]) by mailbroy.informatik.tu-muenchen.de (Postfix) with ESMTP id 481BD8143FF07; Sun, 7 Aug 2011 20:35:27 +0200 (CEST) X-Virus-Scanned: by amavisd-new using ClamAV at mailbroy.informatik.tu-muenchen.de Received: from mailbroy.informatik.tu-muenchen.de ([10.46.146.15]) by localhost (mailbroy.informatik.tu-muenchen.de [10.46.146.16]) (amavisd-new, port 10024) with ESMTP id 5Oju4VFPR1eL; Sun, 7 Aug 2011 20:35:27 +0200 (CEST) Received: from [192.168.2.24] (p57A32DA2.dip.t-dialin.net [87.163.45.162]) by mailbroy.informatik.tu-muenchen.de (Postfix) with ESMTPSA id 5B1EC8143162A; Sun, 7 Aug 2011 20:35:26 +0200 (CEST) Message-ID: <4E3EDAE9.3050307 at informatik.tu-muenchen.de> Date: Sun, 07 Aug 2011 20:35:21 +0200 From: Florian Haftmann Organization: TU =?ISO-8859-1?Q?M=FCnchen=2C_Lehrstuhl_Software_and?= =?ISO-8859-1?Q?_Systems_Engineering?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.18) Gecko/20110617 Lightning/1.0b2 Thunderbird/3.1.11 MIME-Version: 1.0 To: cl-isabelle-users at lists.cam.ac.uk, Peter Gammie , Brian Huffman References: <7C9D7FD1-17C2-4D4A-81E9-7ED88EC0EC65 at gmail.com> <4E3EA2C7.80400 at informatik.tu-muenchen.de> In-Reply-To: <4E3EA2C7.80400 at informatik.tu-muenchen.de> X-Enigmail-Version: 1.1.2 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig582250DA8C823463A9906C37" Subject: Re: [isabelle] code generation for saturated naturals X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Aug 2011 18:35:28 -0000 Status: O X-Status: X-Keywords: X-UID: 5845 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig582250DA8C823463A9906C37 Content-Type: multipart/mixed; boundary="------------030404090607000305020704" This is a multi-part message in MIME format. --------------030404090607000305020704 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable > Maybe your Abs_sat' can just be called Sat. When going through Dlist a further suggestion came to my mind: I have modified the theory further: Abs_sat' is called Sat, and Rep_sat nat_of. Both are operations to be expected to be used in =BBuser space=AB= and should therefore carry readable names. Hope this helps, Florian --=20 Home: http://www.in.tum.de/~haftmann PGP available: http://home.informatik.tu-muenchen.de/haftmann/pgp/florian_haftmann_at_in= formatik_tu_muenchen_de --------------030404090607000305020704 Content-Type: text/plain; name="Saturated.thy" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="Saturated.thy" (* Author: Brian Huffman *) (* Version: Isabelle2011 *) header {* Saturated arithmetic *} theory Saturated imports Main "~~/src/HOL/Library/Numeral_Type" "~~/src/HOL/Word/Type_Leng= th" begin typedef (open) 'a sat =3D "{.. CARD('a)}" morphisms nat_of Abs_sat by auto text {* Suggestion: use extensionality in primitive proofs about @{typ "'= a sat"} *} lemma sat_eqI: "nat_of m =3D nat_of n \ m =3D n" by (simp add: nat_of_inject) lemma sat_eq_iff: "m =3D n \ nat_of m =3D nat_of n" by (simp add: nat_of_inject) text {* Suggestion: Use code generation for abstract types *} lemma [code abstype]: "Abs_sat (nat_of n) =3D n" by (fact nat_of_inverse) definition Sat :: "nat \ 'a sat" where "Sat n =3D Abs_sat (min CARD('a) n)" text {* More simp rules are admissible and helpful *} lemma nat_of_Sat [simp]: "nat_of (Sat n :: 'a sat) =3D min (CARD('a)) n" unfolding Sat_def by (rule Abs_sat_inverse) simp lemma nat_of_le_CARD [simp]: "nat_of (n :: 'a sat) \ CARD('a)" using nat_of [where x=3Dn] by simp lemma min_CARD_nat_of [simp]: "min CARD('a) (nat_of (n::'a sat)) =3D nat_= of n" by (rule min_max.inf_absorb2 [OF nat_of_le_CARD]) lemma min_nat_of_CARD [simp]: "min (nat_of (n::'a sat)) CARD('a) =3D nat_= of n" by (simp add: min_max.inf.commute) lemma Sat_nat_of [simp]: "Sat (nat_of n) =3D n" by (simp add: Sat_def nat_of_inverse) text {* Suggestion: may can be generalized to class @{class linordered_se= miring} *} lemma nat_mult_min_left: fixes x y z :: nat shows "min x y * z =3D min (x * z) (y * z)" unfolding min_def by simp lemma nat_mult_min_right: fixes x y z :: nat shows "x * min y z =3D min (x * y) (x * z)" unfolding min_def by simp lemma nat_add_min_left: fixes x y z :: nat shows "min x y + z =3D min (x + z) (y + z)" unfolding min_def by simp lemma nat_add_min_right: fixes x y z :: nat shows "x + min y z =3D min (x + y) (x + z)" unfolding min_def by simp instantiation sat :: (type) "{minus, comm_semiring_0}" begin definition zero_sat_def: "0 =3D Sat 0" text {* Prove the @{text "Rep ..."} lemmas immediately and use for code g= eneration *} lemma nat_of_zero_sat [simp, code abstract]: "nat_of 0 =3D 0" by (simp add: zero_sat_def) definition plus_sat_def: "x + y =3D Sat (nat_of x + nat_of y)" lemma nat_of_plus_sat [simp, code abstract]: "nat_of (x + y) =3D min (nat_of x + nat_of y) CARD('a)" by (simp add: plus_sat_def) definition minus_sat_def: "x - y =3D Sat (nat_of x - nat_of y)" lemma nat_of_minus_sat [simp, code abstract]: "nat_of (x - y) =3D nat_of x - nat_of y" proof - from nat_of_le_CARD [of x] have "nat_of x - nat_of y \ CARD('a)" by= arith then show ?thesis by (simp add: minus_sat_def) qed definition times_sat_def: "x * y =3D Sat (nat_of x * nat_of y)" lemma nat_of_times_sat [simp, code abstract]: "nat_of (x * y) =3D min (nat_of x * nat_of y) CARD('a)" by (simp add: times_sat_def) instance apply intro_classes apply (simp_all add: sat_eq_iff mult.commute) txt {* Here two subgoals algebraic goals about @{const min} survive, whic= h should possible to be tracked to generic lemmas; still some work, but a= vast improvement over the previous apply proof *} sorry end instantiation sat :: (type) ordered_comm_semiring begin definition less_eq_sat_def: "x \ y \ nat_of x \ nat_of= y" text {* This formulation is much more nicer for unfolding *} definition less_sat_def: "(x::'a sat) < y \ nat_of x < nat_of = y" instance apply intro_classes apply (auto simp add: less_eq_sat_def less_sat_def not_le sat_eq_iff) txt {* use proper Isar proof *} sorry end text {* Here an experiment on code generation: *} code_thms "Saturated._" -- {* There is still @{text card} for @{const plu= s} and @{const times} *} class len_card =3D len + assumes len_of_card: "len_of TYPE('a) =3D CARD('a)" lemma plus_sat_code [code abstract]: fixes x y :: "'a::len_card sat" shows "nat_of (x + y) =3D min (nat_of x + nat_of y) (len_of TYPE('a))" by (simp add: len_of_card) lemma times_sat_code [code abstract]: fixes x y :: "'a::len_card sat" shows "nat_of (x * y) =3D min (nat_of x * nat_of y) (len_of TYPE('a))" by (simp add: len_of_card) export_code "Saturated._" in Haskell file - -- {* Heureka! *} instance sat :: (type) linorder proof fix x y :: "'a sat" show "x \ y \ y \ x" unfolding less_eq_sat_def by (rule linear) qed instantiation sat :: (finite) comm_semiring_1 begin definition one_sat_def: "1 =3D Abs_sat 1" lemma nat_of_1 [simp, code abstract]: "nat_of 1 =3D 1" unfolding one_sat_def by (rule Abs_sat_inverse) simp instance proof qed (auto simp add: sat_eq_iff) end instance sat :: (type) finite proof show "finite (UNIV::'a sat set)" unfolding type_definition.univ [OF type_definition_sat] using finite by simp qed instantiation sat :: (type) number begin definition number_of_sat_def [code del]: "number_of =3D Sat \ nat" instance .. end instantiation sat :: (type) equal (*<*) begin definition "HOL.equal A B \ nat_of A =3D nat_of B" instance proof qed (simp add: equal_sat_def nat_of_inject) end text{* Code generator setup. *} lemma zero_nat_code [code, code_unfold_post]: "0 =3D (Numeral0 :: 'a sat)" by (simp add: sat_eq_iff number_of_sat_def Int.Pls_def) lemma one_nat_code [code, code_unfold_post]: "1 =3D (Numeral1 :: ('a :: card2) sat)" apply (simp add: sat_eq_iff number_of_sat_def Int.Pls_def Int.Bit1_def)= apply (simp add: min_def) apply auto sorry definition f :: "2 sat" where "f \ 1 + 0" text {* Add missing instantiations for @{class len_card} *} end --------------030404090607000305020704-- --------------enig582250DA8C823463A9906C37 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk4+2u0ACgkQZEASYmKQGuFKlwCfU5oW7COVMdJxDw49hIobmmNW 4FwAoLqe7r6RXfoTzSBeW+Jjo4qxxdYh =e4xA -----END PGP SIGNATURE----- --------------enig582250DA8C823463A9906C37-- From jonathan.von_schroeder at dfki.de Tue Aug 09 00:28:30 2011 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QqZFG-0004DF-M9 (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Tue, 09 Aug 2011 00:28:30 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1154673 * -0.8 RP_MATCHES_RCVD Envelope sender domain matches handover relay * domain * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 HTML_MESSAGE BODY: HTML included in message X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from sea-mail.dfki.de ([134.96.191.185]:65405) by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25) with esmtp (csa=unknown) id 1QqZFF-0006eO-Yn (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Tue, 09 Aug 2011 00:28:30 +0100 Received: from sea-mail.dfki.de (localhost.localdomain [127.0.0.1]) by localhost (Email Security Appliance) with SMTP id 4DAFE9DBD4_E40711DB; Mon, 8 Aug 2011 23:28:29 +0000 (GMT) Received: from mail.dfki.de (lnv-104.sb.dfki.de [134.96.191.146]) by sea-mail.dfki.de (Sophos Email Appliance) with ESMTP id E99C79B94B_E40711CF; Mon, 8 Aug 2011 23:28:28 +0000 (GMT) Received: from ox6 (lnv-91187.sb.dfki.de [134.96.191.187]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by mail.dfki.de (Postfix) with ESMTPSA id DA6E5310F8; Tue, 9 Aug 2011 01:28:28 +0200 (CEST) Date: Tue, 9 Aug 2011 01:28:28 +0200 (CEST) From: Jonathan von Schroeder To: Lukas Bulwahn Message-ID: <1154761579.6467.1312846108890.JavaMail.open-xchange at ox6> In-Reply-To: <4E3A8774.6080907 at in.tum.de> References: <1761421701.4856.1312369046188.JavaMail.open-xchange at ox6> <4E3A8774.6080907 at in.tum.de> MIME-Version: 1.0 X-Priority: 3 Importance: Medium X-Mailer: Open-Xchange Mailer v6.18.2-Rev33 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.8 Cc: cl-isabelle-users at lists.cam.ac.uk Subject: Re: [isabelle] Get an ML value from a theory context X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Aug 2011 23:28:30 -0000 Status: O X-Status: X-Keywords: X-UID: 5846 Hi Lukas, thanks for your response. It seems like I'm doing something wrong in "setti= ng up" the Isabelle/ML level or maybe I'm not "within the HOL image"? - Anyway= s this is what I'm currently doing. Maybe someone can point out the mistake(s= ) I'm making: =C2=A0 sternk at ubuntu:~/test$ wget http://www.cl.cam.ac.uk/research/hvg/Isabelle/dist/Isabelle2011_bundle_x86-= linux.tar.gz sternk at ubuntu:~/test$ tar xzf Isabelle2011_bundle_x86-linux.tar.gz sternk at ubuntu:~/test$ ./Isabelle2011/bin/isabelle-process HOL > val it =3D (): unit val commit =3D fn: unit -> bool ML> Datatype_Data; Error-Value or constructor (Datatype_Data) has not been declared Found near Datatype_Data Static Errors =C2=A0 Jonathan =C2=A0 Lukas Bulwahn hat am 4. August 2011 um 13:50 geschrieb= en: > On 08/03/2011 12:57 PM, Jonathan von Schroeder wrote: > > Hello all, > >=C2=A0 =C2=A0I'm currently working on a way to export Isabelle/HOL type= definitions > >and > > their attached (user defined) axioms/theorems from a given theory in > > Isabelle. I > > have already managed to get this workign by simply going through all t= he > > constants, axioms and theorems present in the theories' context. But > > unluckily I > > currently get more axioms / theorems than I'm interested in, because t= hep, > > theorems automatically generated by > > http://isabelle.in.tum.de/repos/isabelle/file/6d736d983d5c/src/HOL/Too= ls/Datatype/ > > are not really "user generated" and thus do not foll within the scope = of > > theorems I wish to export. > > > >=C2=A0 =C2=A0Thus I'd really like to have (in the top-level raw ML loop= ) access to the > > structure > > http://isabelle.in.tum.de/repos/isabelle/file/6d736d983d5c/src/HOL/Too= ls/Datatype/datatype_data.ML > > (which lives in the context of > > http://isabelle.in.tum.de/repos/isabelle/file/6d736d983d5c/src/HOL/Dat= atype.thy > > from what i can tell) to be able to figure out which theorems were > > generated by > > the Datatype-Tool. Does anybody have any suggestions on how to do this= , > > because > > the Manual http://isabelle.in.tum.de/doc/implementation.pdf only menti= ons > > on > > page 11 that "... [the function factorial] is not yet accessible in th= e > > preceding paragraph, nor in a different theory that is independent fro= m the > > current one in the import hierarchy", but I wasn't able to find any > > information > > on how to "get" access to it (or for that matter to any ml functions / > > structures defined within a theory). I'd greatly appreciate any inform= ation > > anybody can provide on this matter. > > > If you work properly on the Isabelle/ML level, within the HOL image, the > datatype package is loaded and set up. > Hence, you can then access the structure simply by its name "Datatype_Da= ta". > > > > Lukas > >=C2=A0 =C2=A0Jonathan > > > From krauss at in.tum.de Tue Aug 09 08:01:45 2011 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QqgJt-0000tc-H1 (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Tue, 09 Aug 2011 08:01:45 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1154874 * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-out1.informatik.tu-muenchen.de ([131.159.0.8]:56159) by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25) with esmtp (csa=unknown) id 1QqgJs-0001RF-ZL (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Tue, 09 Aug 2011 08:01:45 +0100 Received: from localhost (scanbroy [10.46.146.16]) by mailbroy.informatik.tu-muenchen.de (Postfix) with ESMTP id 98562804F0A8D; Tue, 9 Aug 2011 09:01:44 +0200 (CEST) X-Virus-Scanned: by amavisd-new using ClamAV at mailbroy.informatik.tu-muenchen.de Received: from mailbroy.informatik.tu-muenchen.de ([10.46.146.15]) by localhost (mailbroy.informatik.tu-muenchen.de [10.46.146.16]) (amavisd-new, port 10024) with ESMTP id b0HYrJV2Affd; Tue, 9 Aug 2011 09:01:44 +0200 (CEST) Received: from [192.168.178.34] (e181001234.adsl.alicedsl.de [85.181.1.234]) by mailbroy.informatik.tu-muenchen.de (Postfix) with ESMTPSA id 42F58885ED309; Tue, 9 Aug 2011 09:01:44 +0200 (CEST) Message-ID: <4E40DC25.6090403 at in.tum.de> Date: Tue, 09 Aug 2011 09:05:09 +0200 From: Alexander Krauss User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.16) Gecko/20101227 Icedove/3.0.11 MIME-Version: 1.0 To: Jonathan von Schroeder References: <1761421701.4856.1312369046188.JavaMail.open-xchange at ox6> <4E3A8774.6080907 at in.tum.de> <1154761579.6467.1312846108890.JavaMail.open-xchange at ox6> In-Reply-To: <1154761579.6467.1312846108890.JavaMail.open-xchange at ox6> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Lukas Bulwahn , cl-isabelle-users at lists.cam.ac.uk Subject: Re: [isabelle] Get an ML value from a theory context X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Aug 2011 07:01:45 -0000 Status: O X-Status: X-Keywords: X-UID: 5847 > sternk at ubuntu:~/test$ wget > http://www.cl.cam.ac.uk/research/hvg/Isabelle/dist/Isabelle2011_bundle_x86-linux.tar.gz > sternk at ubuntu:~/test$ tar xzf Isabelle2011_bundle_x86-linux.tar.gz > sternk at ubuntu:~/test$ ./Isabelle2011/bin/isabelle-process HOL This gets you into the internal system toplevel, which is not suitable for most applications nowadays. Instead you want to write your ML literally inside a theory context like this: theory Scratch imports Main begin ML {* Datatype.get_info @{theory} @{type_name nat} *} end Note the use of antiquotations @{theory} and @{type_name ...} to refer to formal entities from the context. See also Chapter 0 of the Implementation manual for basic examples, as well as the Programming Tutorial (aka Cookbook). Alex From berghofe at in.tum.de Tue Aug 09 23:54:16 2011 Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QqvBg-0002i6-O3 (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Tue, 09 Aug 2011 23:54:16 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1154874 * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-out1.informatik.tu-muenchen.de ([131.159.0.8]:48393) by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25) with esmtp (csa=unknown) id 1QqvBf-0007dV-FZ (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Tue, 09 Aug 2011 23:54:16 +0100 Received: from [10.0.0.3] (f053081148.adsl.alicedsl.de [78.53.81.148]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.in.tum.de (Postfix) with ESMTP id A1737D27F; Wed, 10 Aug 2011 00:54:11 +0200 (CEST) Message-ID: <4E41BB97.2030705 at in.tum.de> Date: Wed, 10 Aug 2011 00:58:31 +0200 From: Stefan Berghofer User-Agent: Thunderbird 2.0.0.6 (X11/20070801) MIME-Version: 1.0 To: Bertram Felgenhauer References: <20110727112106.GA2460 at 24f89f8c-e6a1-4e75-85ee-bb8a3743bb9f> <4E3165D3.9080306 at in.tum.de> <20110802211001.GA2459 at 24f89f8c-e6a1-4e75-85ee-bb8a3743bb9f> In-Reply-To: <20110802211001.GA2459 at 24f89f8c-e6a1-4e75-85ee-bb8a3743bb9f> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: cl-isabelle-users at lists.cam.ac.uk Subject: Re: [isabelle] Odd failure to match local statement with pending goal. X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Aug 2011 22:54:16 -0000 Status: O X-Status: X-Keywords: X-UID: 5848 Bertram Felgenhauer wrote: > So do we know whether this is an obscure feature or possibly a bug? > (If it's a feature I'd love to hear the underlying story.) Hi, this problem has now been fixed in the repository version of Isabelle (476a239d3e0e). It was caused by some rather old code in Isabelle's theorem module that renamed "all bound variables and some unknowns" in a rule during resolution, in order to preserve as many of the variable names in the goal as possible. For example, when resolving the rule ?P ?x ==> \x. P x with the proof state \foo. P foo this will result in the new proof state ?P ?foo because the schematic variable ?x in the rule has been renamed to match that of the bound variable foo in the goal. Unfortunately, such a renaming of schematic variables can cause two kinds of name clashes, neither of which were detected by the old code: 1. If two bound variables in the goal happen to have the same name, this may cause two schematic variables in the rule to be mapped to the same variable: lemma R1: "P x ==> Q y ==> (\x. P x) \ (\y. Q y)" by auto lemma "(\z. P z) \ (\z. Q z)" apply (rule R1) oops 2. If a bound variable in the goal happens to have the same name as a schematic variable in the rule, it may clash with another schematic variable in the rule after the renaming. lemma R2: "P y ==> x = y ==> \x. P x" by auto lemma "\y. P y" apply (rule R2) oops I have now introduced a check that filters out such problematic renamings. Greetings, Stefan From johannesfaber at gmx.de Tue Aug 09 10:34:15 2011 Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QqihT-0004oM-6v (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Tue, 09 Aug 2011 10:34:15 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -4.2 from SpamAssassin-3.3.2-1154874 * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (johannesfaber[at]gmx.de) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, * medium trust * [134.106.1.7 listed in list.dnswl.dnsbl.ja.net] * 0.0 T_TO_NO_BRKTS_FREEMAIL To: misformatted and free email service X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta1.cl.cam.ac.uk ([128.232.25.21]:33857) by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25) with esmtp id 1QqihS-0006cs-RZ (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Tue, 09 Aug 2011 10:34:15 +0100 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by mta1.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1QqihS-0005Cg-Fu for isabelle-users at cl.cam.ac.uk; Tue, 09 Aug 2011 10:34:14 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -4.2 from SpamAssassin-3.3.2-1154874 * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, * medium trust * [134.106.1.7 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (johannesfaber[at]gmx.de) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 T_TO_NO_BRKTS_FREEMAIL To: misformatted and free email service X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from arbi.informatik.uni-oldenburg.de ([134.106.1.7]:52661) by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25) with esmtp (csa=unknown) id 1QqihO-0000pt-Yt (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Tue, 09 Aug 2011 10:34:11 +0100 Received: from taifun.Informatik.Uni-Oldenburg.DE ([134.106.11.36]) by arbi.Informatik.Uni-Oldenburg.DE (Exim 4.72) id 1QqihL-000157-8J; Tue, 09 Aug 2011 11:34:07 +0200 Received: from theorie-29-133.Informatik.Uni-Oldenburg.DE ([134.106.29.133]) by taifun.Informatik.Uni-Oldenburg.DE (Exim 4.72) id 1QqihK-00050S-Tj; Tue, 09 Aug 2011 11:34:07 +0200 Message-Id: <17CE2470-6CAE-4622-8AA3-2CD337645919 at gmx.de> From: Johannes Faber To: isabelle-users at cl.cam.ac.uk Content-Type: multipart/signed; boundary=Apple-Mail-6--432202353; micalg=sha1; protocol="application/pkcs7-signature" Mime-Version: 1.0 (Apple Message framework v936) Date: Tue, 9 Aug 2011 11:34:06 +0200 X-Mailer: Apple Mail (2.936) X-Mailman-Approved-At: Wed, 10 Aug 2011 08:30:11 +0100 Subject: [isabelle] Question regarding sequent calculi in Isabelle X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Aug 2011 09:34:15 -0000 Status: O X-Status: X-Keywords: X-UID: 5849 --Apple-Mail-6--432202353 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Hi all, I currently work on implementing a sequent-style proof calculus over dynamic logic. To this end, I have given Isabelle a try (which I haven't used much before) and extended LK0.thy from the Sequents logic with my proof rules. This seems to work until I run into problems with a symbolic execution rule, where every symbol in a predicate needs to be replaced by a new symbol. The rule is of the shape |- p[v0/v'] --> q[v0/v] -----------------------, |- [p]q where p[v0/v'] denotes the replacement of every primed symbol in p by a fresh symbol v0 (and similarly for q). This is not a problem as long as only a single symbol is to be substituted -- but I need to replace all primed symbols in v'. Is something like this possible with Isabelle? Second, I have a more general question: it seems that the Sequents theory of Isabelle isn't used much and that the main work is on Isabelle/HOL. Does it nevertheless make sense to use the Sequents theory of Isabelle as a basis for a sequent-style calculus, or is Isabelle not the right choice for such a calculus? I have already asked Makarius about this, who pointed me to this mailing list. On 10 Jul 2011, Makarius wrote: > This looks a bit too "syntactic". The framework does not allow to > access > the term structure as such, you somehow need to reason symbolically > within > the minimal logic of Pure. > > There might be ways, say in Isabelle/HOL with a more detailed > syntactic > model of the calculus. But this also means you have to invest more > work > in the formalization. > > The Sequents theories are really old. I guess that quite a bit more > expertise has emerged in the past decades how to do such things. If > you > ask on isbelle-users some experts might tell you more. Many thanks for any help! Johannes -- Dipl.-Inform. Johannes Faber Correct System Design Group Department of Computing Science Carl von Ossietzky University of Oldenburg Phone: +49 441 798-4638 Fax: +49 441 798-2965 --Apple-Mail-6--432202353 Content-Disposition: attachment; filename=smime.p7s Content-Type: application/pkcs7-signature; name=smime.p7s Content-Transfer-Encoding: base64 MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIGczCCBm8w ggRXoAMCAQICAwffrjANBgkqhkiG9w0BAQUFADB5MRAwDgYDVQQKEwdSb290IENBMR4wHAYDVQQL ExVodHRwOi8vd3d3LmNhY2VydC5vcmcxIjAgBgNVBAMTGUNBIENlcnQgU2lnbmluZyBBdXRob3Jp dHkxITAfBgkqhkiG9w0BCQEWEnN1cHBvcnRAY2FjZXJ0Lm9yZzAeFw0wOTEyMDgyMDQ4NDlaFw0x MTEyMDgyMDQ4NDlaMIH2MRcwFQYDVQQDEw5Kb2hhbm5lcyBGYWJlcjEjMCEGCSqGSIb3DQEJARYU am9oYW5uZXNmYWJlckBnbXguZGUxJzAlBgkqhkiG9w0BCQEWGGouZmFiZXJAdW5pLW9sZGVuYnVy Zy5kZTEiMCAGCSqGSIb3DQEJARYTam9oYW5uZXNAbWpmYWJlci5kZTE5MDcGCSqGSIb3DQEJARYq am9oYW5uZXMuZmFiZXJAaW5mb3JtYXRpay51bmktb2xkZW5idXJnLmRlMS4wLAYJKoZIhvcNAQkB Fh9qb2hhbm5lcy5mYWJlckB1bmktb2xkZW5idXJnLmRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A MIIBCgKCAQEAssWwKMlm654+Z3Rf0BzooOSr88PiJ7GpsnQIP+uHg/t+Rie/2NWWuxgiVzPs2mrT LiNkRMV+f4T/kGBeZEWiUMleRURkFBDbtnNPnijZgg95Rj8DM0nE4iasBcI1lOC+mChS9RW87m7d /PRC2SpxvUYEoIFLAMcAciZhMfmE5CnIxeQ0OukAkILugloIxEqwLNv2HJqqgxy7b0P+aHAncFlq 6klhUj9GT9j4jDungO1AXdoEhJ/T985G4nRZp9JQDMwcMKDPddIclivWTVXjQCyaTl3D4YV3H7hc QRyIw1/Wm4Iq+i9IgPhLnAoDzDcF4/OtkcO0yzdErmQMmkXLFQIDAQABo4IBgDCCAXwwDAYDVR0T AQH/BAIwADBWBglghkgBhvhCAQ0ESRZHVG8gZ2V0IHlvdXIgb3duIGNlcnRpZmljYXRlIGZvciBG UkVFIGhlYWQgb3ZlciB0byBodHRwOi8vd3d3LkNBY2VydC5vcmcwQAYDVR0lBDkwNwYIKwYBBQUH AwQGCCsGAQUFBwMCBgorBgEEAYI3CgMEBgorBgEEAYI3CgMDBglghkgBhvhCBAEwMgYIKwYBBQUH AQEEJjAkMCIGCCsGAQUFBzABhhZodHRwOi8vb2NzcC5jYWNlcnQub3JnMIGdBgNVHREEgZUwgZKB FGpvaGFubmVzZmFiZXJAZ214LmRlgRhqLmZhYmVyQHVuaS1vbGRlbmJ1cmcuZGWBE2pvaGFubmVz QG1qZmFiZXIuZGWBKmpvaGFubmVzLmZhYmVyQGluZm9ybWF0aWsudW5pLW9sZGVuYnVyZy5kZYEf am9oYW5uZXMuZmFiZXJAdW5pLW9sZGVuYnVyZy5kZTANBgkqhkiG9w0BAQUFAAOCAgEAhqzXyhaC eh5XUCUeUcAbxczivrNevkUqzjTF8lSQTEdFuHX0IuikRCSwrrlHEYqDTHUU4ej67V4Z8NyLuNTO R20ioOnJ5ID8/S/CQu/QNvS5xfubV1URMqsuxph2ZSuJ3NUlPlKa6ONcdUkP4cuR6fwxagJCNeoV lqVnd/R4bjdEw1VYejvLKauQgE+85FXIL4BQM4010rbYgOAVCXktwXkIjxxy9Qfk8237rkl7Wb9Y uwPErOpZ3cJTFgCsHRe11SmNYNdKRQsbEjBpkakpS0V4t7mlfi10GSJ+ibNE8VSnZYz0dhTFRQWa YaNs7ZBY465YSCajZndihK3POJG6zZ90GJ+j6aQSNBT0X98mizLMVsB4rT93sA1i2AgQRC+304I/ G2sJGMRGQJntVLMz4JdAU+ndTU6+Cfp92ocN5lfrerimo+Y6R4NSVtmz+uUpkkb10qeHjy36LDMC J+sIXdKSy7ICuFmqN7HPnyArMQY8efbxNUTqmm76nUgb71UojEX3+YHWRkxVpHWbTE7uZOBnK45m j7KUeM6PYc/hQU4KZ4+FXQK+MeLoXUp6XyreUjVfoYQR1GQrjkVeH0IM55G778kDOwMd/q68VzwV GQ/oIrvT3CAunJRmidwoUSHgUPrXqlzNTehKjCOza3yD67hOajhC7eueHBCzmDLwosUxggMzMIID LwIBATCBgDB5MRAwDgYDVQQKEwdSb290IENBMR4wHAYDVQQLExVodHRwOi8vd3d3LmNhY2VydC5v cmcxIjAgBgNVBAMTGUNBIENlcnQgU2lnbmluZyBBdXRob3JpdHkxITAfBgkqhkiG9w0BCQEWEnN1 cHBvcnRAY2FjZXJ0Lm9yZwIDB9+uMAkGBSsOAwIaBQCgggGHMBgGCSqGSIb3DQEJAzELBgkqhkiG 9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTExMDgwOTA5MzQwN1owIwYJKoZIhvcNAQkEMRYEFHv62YEG 1WzabEKCw9JlpeY5CUEwMIGRBgkrBgEEAYI3EAQxgYMwgYAweTEQMA4GA1UEChMHUm9vdCBDQTEe MBwGA1UECxMVaHR0cDovL3d3dy5jYWNlcnQub3JnMSIwIAYDVQQDExlDQSBDZXJ0IFNpZ25pbmcg QXV0aG9yaXR5MSEwHwYJKoZIhvcNAQkBFhJzdXBwb3J0QGNhY2VydC5vcmcCAwffrjCBkwYLKoZI hvcNAQkQAgsxgYOggYAweTEQMA4GA1UEChMHUm9vdCBDQTEeMBwGA1UECxMVaHR0cDovL3d3dy5j YWNlcnQub3JnMSIwIAYDVQQDExlDQSBDZXJ0IFNpZ25pbmcgQXV0aG9yaXR5MSEwHwYJKoZIhvcN AQkBFhJzdXBwb3J0QGNhY2VydC5vcmcCAwffrjANBgkqhkiG9w0BAQEFAASCAQCHVjL4iOuiU+9n 87pfwOLfUnLT/glFuUECPnWQ4YXlq/B7iWuyPWyhKYvqMI7i6qjBJ1tXGeNWUCp/qXyujCoz8+mr iWeCqxHG4N+Gr2IFm9GLBP1FxNtxCqVx/zpvG/XRSXN4mpbZ2cC0VkArAeLndWs84qj24UXWPQqu ve1rqM1zHi4j4yG7ma5DcTURB6bedO9CSe9f6pq+0pdYqMll8Cejb8Tep69aUQCgh+8Ksq1aKgPq TQsPcWGrXnarka7N6BFeWylbMAfSsQveOtHMNAJXN78GESuPM04lGBWmklURKPNEE+u8uAev5Zut T298p1M3KIBGaCyZV+deegRKAAAAAAAA --Apple-Mail-6--432202353-- From filali at irit.fr Wed Aug 10 10:12:42 2011 Received: from ppsw-50.csi.cam.ac.uk ([131.111.8.150]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1Qr4qA-0002B7-Pp (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Wed, 10 Aug 2011 10:12:42 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -0.5 from SpamAssassin-3.3.2-1155262 * 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay * lines * 1.4 RCVD_IN_BRBL_LASTEXT RBL: RCVD_IN_BRBL_LASTEXT * [195.220.59.17 listed in bb.barracudacentral.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta1.cl.cam.ac.uk ([128.232.25.21]:33174) by ppsw-50.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.147]:25) with esmtp id 1Qr4qA-0006ZG-qx (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Wed, 10 Aug 2011 10:12:42 +0100 Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141]) by mta1.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1Qr4qA-0005S0-Av for isabelle-users at cl.cam.ac.uk; Wed, 10 Aug 2011 10:12:42 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -0.5 from SpamAssassin-3.3.2-1155262 * 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay * lines * 1.4 RCVD_IN_BRBL_LASTEXT RBL: RCVD_IN_BRBL_LASTEXT * [195.220.59.17 listed in bb.barracudacentral.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from smtp2.cict.fr ([195.220.59.17]:44139) by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25) with esmtp (csa=unknown) id 1Qr4q6-00034g-Sh (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Wed, 10 Aug 2011 10:12:39 +0100 Received: from smtp2.cict.fr (localhost.localdomain [127.0.0.1]) by smtp2.cict.fr (8.14.5/8.14.4) with ESMTP id p7A9CZeF024446 for ; Wed, 10 Aug 2011 11:12:35 +0200 Received: from smtp1.irit.fr (smtp1.irit.fr [141.115.24.2]) by smtp2.cict.fr (8.14.5/8.14.5) with ESMTP id p7A9CYdZ024437 for ; Wed, 10 Aug 2011 11:12:35 +0200 Received: from irit.fr Message-ID: <4E424B76.4080208 at irit.fr> Date: Wed, 10 Aug 2011 11:12:22 +0200 From: Mamoun FILALI-AMINE Organization: IRIT CNRS =?ISO-8859-1?Q?Universit=E9_de_Toulouse?= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: isabelle-users at cl.cam.ac.uk References: <4E3E6287.9090109 at irit.fr> <20110807112618.GA823 at eloas> In-Reply-To: <20110807112618.GA823 at eloas> Content-Type: multipart/mixed; boundary="------------090508000808060801020009" X-Virus-Scanned: clamav-milter 0.97.2 at smtp2.cict.fr X-Virus-Status: Clean Subject: Re: [isabelle] schematic variables X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Aug 2011 09:12:42 -0000 Status: O X-Status: X-Keywords: X-UID: 5850 This is a multi-part message in MIME format. --------------090508000808060801020009 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by smtp2.cict.fr id p7A9CZeF024446 Hello, After discussing with Sascha Boehme, it seems to be technically impossible to match a goal against a pattern after unfolding with some rewrite rule: definition "foo x =3D bar x x" ... have "foo (f x)" (is "foo ?X") [pattern is possible] unfolding foo_def (is "bar ?X _") [pattern is not possible] However, according to Sascha, most of the time proofs can be restructured to avoid this need or Isabelle's proof methods (e.g., simp or auto) can collapse relevant proof steps such that these patterns are not necessary. Mamoun Le 07dimanche/08/11 7 =E0 13: 19, Sascha Boehme a =E9crit : > Hello Mamoun, > > Your example does not contain schematic variables after unfolding with > ref_def. Instead, the goal looks as follows: > > \s. (A \ B) s \ (A' \ B') s > > The most common form to instantiate schematic variables in facts is > via the "of" attribute, for example as follows: > > thm refl (* is "?t =3D ?t" *) > > thm refl[of x] (* is "x =3D x" *) > > This can also be applied to intermediate steps in a proof: > > lemma "\n::nat. n \ 0" > proof - > { > fix n :: nat > have "n \ 0" by simp > } > (* we proved "?n \ 0" *) > note this[of "1 :: nat"] (* is "1 \ 0" *) > then show ?thesis .. > qed > > A different form of this proof introduces schematic variables into the > goal, but in most cases it's best to let some tactic instantiate > these variables automatically: > > lemma "\n::nat. n \ 0" > apply (rule exI) (* the goal is now "?n \ 0" *) > apply simp (* instantiates "?n" appropriately and solves the goal= *) > done > > Cheers, > Sascha > > > Mamoun FILALI-AMINE wrote: >> Hello, >> >> I wonder if it is possible to instantiate schematic variables >> after unfolding (see example below). >> thanks >> >> Mamoun >> >> -------- >> >> definition "ref P Q =3D (\ s. P s \ Q s)" >> >> theorem >> assumes r1: "ref A A'" >> assumes r2: "ref B B'" >> shows "ref (A \ B) (A' \ B')" >> proof - >> have "?thesis" unfolding ref_def (* is "\ s. ?L s >> \ ?R s" *) >> >> begin:vcard >> fn:Mamoun FILALI-AMINE >> n:FILALI-AMINE;Mamoun >> adr;quoted-printable:118 Route de Narbonne;;IRIT Universit=3DC3=3DA9 P= aul Sabatier;Toulouse;;31062 cedex 9;France >> email;internet:filali at irit.fr >> tel;work:00 33 5 61 55 69 26 >> tel;fax:00 33 5 61 55 64 48 >> version:2.1 >> end:vcard >> > > --------------090508000808060801020009 Content-Type: text/x-vcard; charset=utf-8; name="filali.vcf" Content-Disposition: attachment; filename="filali.vcf" Content-Transfer-Encoding: 7bit begin:vcard fn:Mamoun FILALI-AMINE n:FILALI-AMINE;Mamoun adr;quoted-printable:118 Route de Narbonne;;IRIT Universit=C3=A9 Paul Sabatier;Toulouse;;31062 cedex 9;France email;internet:filali at irit.fr tel;work:00 33 5 61 55 69 26 tel;fax:00 33 5 61 55 64 48 version:2.1 end:vcard --------------090508000808060801020009-- From lp15 at cam.ac.uk Wed Aug 10 11:27:26 2011 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1Qr60U-0004XB-OA (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Wed, 10 Aug 2011 11:27:26 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -3.7 from SpamAssassin-3.3.2-1155262 * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * -0.8 RP_MATCHES_RCVD Envelope sender domain matches handover relay * domain * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta1.cl.cam.ac.uk ([128.232.25.21]:36957) by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25) with esmtp id 1Qr60U-0000kl-WV (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Wed, 10 Aug 2011 11:27:26 +0100 Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141]) by mta1.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1Qr60U-0006cy-0x for isabelle-users at cl.cam.ac.uk; Wed, 10 Aug 2011 11:27:26 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: not scanned X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from epicure.cl.cam.ac.uk ([128.232.1.188]:56478) by ppsw-41.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.156]:587) with esmtpsa (PLAIN:lp15) (TLSv1:AES128-SHA:128) id 1Qr60Q-0005WP-Sq (Exim 4.72) (return-path ); Wed, 10 Aug 2011 11:27:22 +0100 Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Lawrence Paulson In-Reply-To: <17CE2470-6CAE-4622-8AA3-2CD337645919 at gmx.de> Date: Wed, 10 Aug 2011 11:27:22 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <17CE2470-6CAE-4622-8AA3-2CD337645919 at gmx.de> To: Johannes Faber X-Mailer: Apple Mail (2.1084) Cc: isabelle-users at cl.cam.ac.uk Subject: Re: [isabelle] Question regarding sequent calculi in Isabelle X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Aug 2011 10:27:26 -0000 Status: O X-Status: X-Keywords: X-UID: 5851 I hesitate to call anything impossible, because there are various ways = to attach code to a theory. However, this kind of systematic renaming of = non-variable symbols isn't directly supported by Isabelle's logical = framework. As for your second question, certainly most development focuses on = Isabelle/HOL, but much of it involves strengthening the framework in = general, which benefits all logics. We have retained a lot of ancient = developments, such as CCL, and I would be very surprised if we got rid = of the Sequents theory. Whether there exists an alternative out there I = couldn't say. There are of course ready-made implementations of dynamic = logic, http://www.key-project.org/ for example. Larry Paulson On 9 Aug 2011, at 10:34, Johannes Faber wrote: >=20 > Hi all, >=20 > I currently work on implementing a sequent-style proof calculus over = dynamic logic. To this end, I have given Isabelle a try (which I haven't = used much before) and extended LK0.thy from the Sequents logic with my = proof rules. This seems to work until I run into problems with a = symbolic execution rule, where every symbol in a predicate needs to be = replaced by a new symbol. >=20 > The rule is of the shape >=20 > |- p[v0/v'] --> q[v0/v] > -----------------------, > |- [p]q >=20 > where p[v0/v'] denotes the replacement of every primed symbol in p by = a fresh symbol v0 (and similarly for q). This is not a problem as long = as only a single symbol is to be substituted -- but I need to replace = all primed symbols in v'. Is something like this possible with Isabelle? >=20 > Second, I have a more general question: it seems that the Sequents = theory of Isabelle isn't used much and that the main work is on = Isabelle/HOL. Does it nevertheless make sense to use the Sequents theory = of Isabelle as a basis for a sequent-style calculus, or is Isabelle not = the right choice for such a calculus? >=20 > I have already asked Makarius about this, who pointed me to this = mailing list. >=20 > On 10 Jul 2011, Makarius wrote: >> This looks a bit too "syntactic". The framework does not allow to = access >> the term structure as such, you somehow need to reason symbolically = within >> the minimal logic of Pure. >>=20 >> There might be ways, say in Isabelle/HOL with a more detailed = syntactic >> model of the calculus. But this also means you have to invest more = work >> in the formalization. >>=20 >> The Sequents theories are really old. I guess that quite a bit more >> expertise has emerged in the past decades how to do such things. If = you >> ask on isbelle-users some experts might tell you more. >=20 >=20 > Many thanks for any help! >=20 > Johannes >=20 > -- > Dipl.-Inform. Johannes Faber > Correct System Design Group > Department of Computing Science > Carl von Ossietzky University of Oldenburg > Phone: +49 441 798-4638 > Fax: +49 441 798-2965 From makarius at sketis.net Wed Aug 10 21:38:49 2011 Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QrFY9-000773-6M (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Wed, 10 Aug 2011 21:38:49 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1155262 * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta0.cl.cam.ac.uk ([128.232.25.20]:52794) by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25) with esmtp id 1QrFY8-0005TU-FC (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Wed, 10 Aug 2011 21:38:49 +0100 Received: from ppsw-50.csi.cam.ac.uk ([131.111.8.150]) by mta0.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1QrFY8-0001sW-Gx for isabelle-users at cl.cam.ac.uk; Wed, 10 Aug 2011 21:38:48 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1155262 * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-out1.informatik.tu-muenchen.de ([131.159.0.8]:57287) by ppsw-50.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.147]:25) with esmtp (csa=unknown) id 1QrFY8-00039C-pp (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Wed, 10 Aug 2011 21:38:48 +0100 Received: from localhost (scanbroy [10.46.146.16]) by mailbroy.informatik.tu-muenchen.de (Postfix) with ESMTP id 45C4D80C77F50; Wed, 10 Aug 2011 22:38:44 +0200 (CEST) X-Virus-Scanned: by amavisd-new using ClamAV at mailbroy.informatik.tu-muenchen.de Received: from mailbroy.informatik.tu-muenchen.de ([10.46.146.15]) by localhost (mailbroy.informatik.tu-muenchen.de [10.46.146.16]) (amavisd-new, port 10024) with ESMTP id Py9hbrT9fKtO; Wed, 10 Aug 2011 22:38:44 +0200 (CEST) Received: from atbroy100.informatik.tu-muenchen.de (atbroy100.informatik.tu-muenchen.de [131.159.47.193]) by mailbroy.informatik.tu-muenchen.de (Postfix) with ESMTPS id 08A1F80C77EC6; Wed, 10 Aug 2011 22:38:44 +0200 (CEST) Date: Wed, 10 Aug 2011 22:38:34 +0200 (CEST) From: Makarius X-X-Sender: wenzelm at atbroy100.informatik.tu-muenchen.de To: Mamoun FILALI-AMINE In-Reply-To: <4E424B76.4080208 at irit.fr> Message-ID: References: <4E3E6287.9090109 at irit.fr> <20110807112618.GA823 at eloas> <4E424B76.4080208 at irit.fr> User-Agent: Alpine 1.10 (LNX 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: isabelle-users at cl.cam.ac.uk Subject: Re: [isabelle] schematic variables X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Aug 2011 20:38:49 -0000 Status: O X-Status: X-Keywords: X-UID: 5852 On Wed, 10 Aug 2011, Mamoun FILALI-AMINE wrote: > After discussing with Sascha Boehme, it seems to be technically > impossible to match a goal against a pattern after unfolding with > some rewrite rule: > > definition "foo x = bar x x" > > ... > > have "foo (f x)" (is "foo ?X") [pattern is possible] > unfolding foo_def (is "bar ?X _") [pattern is not possible] Strictly speaking it is not *technically* impossible, merely outside the scope of the structured proof language of Isar. Structure emerges by restricting low-level technical operations to something that conforms to certain higher concepts. Take ML as programming language for example: it allows much less operations than machine language, and is thus far more powerful -- the compiler and runtime system can do smart things for you. One of the key principles of Isar is the distinction of the proof text and the proof state. Information may flow only from text to state, not the other way round. Anyway, your example reminds me of the Ltac tactic definition language of Coq, with matching against the goal state. After so many years, Isar still lacks a structured proof method definition language. You have to use plain ML for that (via the 'method_setup' command, which is not really difficult). When drafting the first versions of the Isar proof language, I was aware of this omission of a method definition language. It made certain things easier, and the quality of proofs (readability and maintainability) has actually improved by making the language more restrictive. Structured proof method definition languages are still an interesting area of research, but I see more potential for the future in sophisticated editing support of Isar text in the Prover IDE. (The current Isabelle/jEdit implementation is a very modest beginning in that direction.) This can be illustrated by looking again at what Coq has to offer. Since I am myself located in France, I have the privilege to discuss with many Coq users first-hand. I see two main movements of power-users at the moment: (1) Hardcore Ltac scripting according Chlipala. (This reminds me a lot of a tactical style that was popular in Isabelle/HOL in the late 1990-ies, e.g. see HOL/Bali or HOL/Hoare_Parallel). (2) Quick in-place tactic composition via ssreflect, according to Gonthier. His language assigns a meaning to almost every character in the ASCII set, to make typing as efficient as possible. This wins more and more converts, and recent versions of Matita seem to have adopted it as well. Instead of imitating any of the above, I would eventually like to see a Prover IDE that allows very quick proof composition, but producing proper Isar proof text instead of recording the keystrokes in the script. This would be analogous to a typical Java IDE: a relatively weak language (here Isar) is composed and maintained by relatively strong tooling. Makarius From florian.haftmann at informatik.tu-muenchen.de Thu Aug 11 14:00:51 2011 Received: from ppsw-50.csi.cam.ac.uk ([131.111.8.150]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QrUsV-0007bc-6I (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Thu, 11 Aug 2011 14:00:51 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1156072 * -0.8 RP_MATCHES_RCVD Envelope sender domain matches handover relay * domain * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta1.cl.cam.ac.uk ([128.232.25.21]:36985) by ppsw-50.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.147]:25) with esmtp id 1QrUsU-0001UZ-rj (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Thu, 11 Aug 2011 14:00:51 +0100 Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141]) by mta1.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1QrUsU-0002k5-K0 for isabelle-users at cl.cam.ac.uk; Thu, 11 Aug 2011 14:00:50 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1156072 * -0.8 RP_MATCHES_RCVD Envelope sender domain matches handover relay * domain * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-out1.informatik.tu-muenchen.de ([131.159.0.8]:61349) by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25) with esmtp (csa=unknown) id 1QrUsR-0007wX-Pp (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Thu, 11 Aug 2011 14:00:47 +0100 Received: from localhost (scanbroy [10.46.146.16]) by mailbroy.informatik.tu-muenchen.de (Postfix) with ESMTP id 932B4812CF4FB for ; Thu, 11 Aug 2011 15:00:43 +0200 (CEST) X-Virus-Scanned: by amavisd-new using ClamAV at mailbroy.informatik.tu-muenchen.de Received: from mailbroy.informatik.tu-muenchen.de ([10.46.146.15]) by localhost (mailbroy.informatik.tu-muenchen.de [10.46.146.16]) (amavisd-new, port 10024) with ESMTP id SVS+PCnJT05w for ; Thu, 11 Aug 2011 15:00:43 +0200 (CEST) Received: from [192.168.2.24] (p57A33A2C.dip.t-dialin.net [87.163.58.44]) by mailbroy.informatik.tu-muenchen.de (Postfix) with ESMTPSA id 2FAB080C87C83 for ; Thu, 11 Aug 2011 15:00:43 +0200 (CEST) Message-ID: <4E43D27B.3040306 at informatik.tu-muenchen.de> Date: Thu, 11 Aug 2011 15:00:43 +0200 From: Florian Haftmann Organization: TU =?ISO-8859-15?Q?M=FCnchen=2C_Lehrstuhl_Software_an?= =?ISO-8859-15?Q?d_Systems_Engineering?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.18) Gecko/20110617 Lightning/1.0b2 Thunderbird/3.1.11 MIME-Version: 1.0 To: USR Isabelle Mailinglist X-Enigmail-Version: 1.1.2 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigDBA7A3B8A06E13E2C34CE110" Subject: [isabelle] Scala Code Generation X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Aug 2011 13:00:51 -0000 Status: O X-Status: X-Keywords: X-UID: 5853 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigDBA7A3B8A06E13E2C34CE110 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Hi all, since Isabelle2011 there is the possibility to generate Scala code from HOL theories. Some minor problems can be circumvented by a suitable patch and will disappear in the next release. Apart from that, is there any further feedback (positive or negative) on code generation for Scala? I would like to announce it on the Scala mailing list after the next release, but for this I need some evidence that it is really working. Thanks for any feedback, Florian --=20 Home: http://www.in.tum.de/~haftmann PGP available: http://home.informatik.tu-muenchen.de/haftmann/pgp/florian_haftmann_at_in= formatik_tu_muenchen_de --------------enigDBA7A3B8A06E13E2C34CE110 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk5D0nsACgkQZEASYmKQGuEEhQCg3WkGN7g+m0MzvKdnngsHCQ3R TRYAn0agL4Y59pQJaSlxl/B69zQ1Jo+q =piBO -----END PGP SIGNATURE----- --------------enigDBA7A3B8A06E13E2C34CE110-- From nipkow at in.tum.de Thu Aug 11 15:15:43 2011 Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QrW2x-0001hm-IV (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Thu, 11 Aug 2011 15:15:43 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1156072 * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta1.cl.cam.ac.uk ([128.232.25.21]:37195) by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25) with esmtp id 1QrW2x-00036A-Q2 (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Thu, 11 Aug 2011 15:15:43 +0100 Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141]) by mta1.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1QrW2x-00040P-13 for isabelle-users at cl.cam.ac.uk; Thu, 11 Aug 2011 15:15:43 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1156072 * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-out1.informatik.tu-muenchen.de ([131.159.0.8]:36560) by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25) with esmtp (csa=unknown) id 1QrW2t-00035F-RE (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Thu, 11 Aug 2011 15:15:39 +0100 Received: from localhost (scanbroy [10.46.146.16]) by mailbroy.informatik.tu-muenchen.de (Postfix) with ESMTP id CADE68132A1D2; Thu, 11 Aug 2011 16:15:38 +0200 (CEST) X-Virus-Scanned: by amavisd-new using ClamAV at mailbroy.informatik.tu-muenchen.de Received: from mailbroy.informatik.tu-muenchen.de ([10.46.146.15]) by localhost (mailbroy.informatik.tu-muenchen.de [10.46.146.16]) (amavisd-new, port 10024) with ESMTP id p11Av8oc+Zbg; Thu, 11 Aug 2011 16:15:38 +0200 (CEST) Received: from lapbroy100.local (p5499AFD0.dip.t-dialin.net [84.153.175.208]) by mailbroy.informatik.tu-muenchen.de (Postfix) with ESMTPSA id 32C3680C9FCC4; Thu, 11 Aug 2011 16:15:35 +0200 (CEST) Message-ID: <4E43E405.50704 at in.tum.de> Date: Thu, 11 Aug 2011 16:15:33 +0200 From: Tobias Nipkow User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: Isabelle Users X-Enigmail-Version: 1.2 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Cc: Jim Woodcock Subject: [isabelle] Research Associate position at the University of York X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Aug 2011 14:15:43 -0000 Status: O X-Status: X-Keywords: X-UID: 5854 From: Jim Woodcock Applications are invited for one post of Research Associate in the High-Integrity Systems Engineering and Real-time Systems Research Groups in the Department of Computer Science, University of York. The post, which is limited to 3 years period in the first instance, is available from October 2011. Please the following for further details. https://www22.i-grasp.com/fe/tpl_YorkUni01.asp?newms=jj&id=46061 The closing date for receipt of applications is midnight on Friday 26 August 2011. James Woodcock FREng Anniversary Professor of Software Engineering Department of Computer Science University of York From M.Roggenbach at swansea.ac.uk Thu Aug 11 21:39:46 2011 Received: from ppsw-50.csi.cam.ac.uk ([131.111.8.150]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1Qrc2c-0000HF-Nz (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Thu, 11 Aug 2011 21:39:46 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.6 from SpamAssassin-3.3.2-1156072 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [137.44.1.237 listed in list.dnswl.dnsbl.ja.net] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 HTML_MESSAGE BODY: HTML included in message X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from laurel.swan.ac.uk ([137.44.1.237]:51808) by ppsw-50.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.147]:25) with esmtp (csa=unknown) id 1Qrc2c-00087t-pc (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Thu, 11 Aug 2011 21:39:46 +0100 Received: from [137.44.2.59] (helo=cs-svr1.swan.ac.uk) by laurel.swan.ac.uk with esmtp (Exim 4.76) (envelope-from ) id 1Qrc2b-0001G6-Ld for cl-isabelle-users at lists.cam.ac.uk; Thu, 11 Aug 2011 21:39:45 +0100 Received: from [192.168.2.4] (host86-128-145-178.range86-128.btcentralplus.com [86.128.145.178]) by cs-svr1.swan.ac.uk (Postfix) with ESMTPSA id 5D997306449 for ; Thu, 11 Aug 2011 21:39:45 +0100 (BST) Message-Id: <0BB79716-B97A-4B3E-8A09-D2404496154E at swansea.ac.uk> From: Markus Roggenbach To: cl-isabelle-users at lists.cam.ac.uk Mime-Version: 1.0 (Apple Message framework v936) Date: Thu, 11 Aug 2011 21:39:44 +0100 X-Mailer: Apple Mail (2.936) X-Mailman-Approved-At: Fri, 12 Aug 2011 08:16:41 +0100 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.8 Subject: [isabelle] CFP: Special Issue on Automated Verification of Critical Systems X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Aug 2011 20:39:46 -0000 Status: O X-Status: X-Keywords: X-UID: 5855 (Apologies for duplicates) Call For Papers Science of Computer Programming Special Issue on Automated Verification of Critical Systems Guest editors: Jens Bendispoto, Michael Leuschel, Markus Roggenbach Submission deadline: 9.9.2011 This special issue is devoted to the scope of the international workshop on Automated Verification of Critical Systems (AVoCS 2010 - see http://www.formal-methods.de/avocs2010/) which Duesseldorf University hosted in September 2010. AVoCS is devoted to tools and techniques for the verification of critical systems. These topics are to be interpreted broadly and inclusively. Typical, but not exclusive topics of interest are: - Model Checking, - Automatic and Interactive Theorem Proving, - Abstract Interpretation, - Specification and Refinement, - Requirements Capture and Analysis, - Verification of Software and Hardware, - Verification of Security-Critical Systems, - Probabilistic and Real-Time Systems, - Verified System Development, and - Industrial Applications. Submission to this special issue is completely open. We expect original articles (typically 20-30 pages) that present high-quality contributions that have not been previously published in an archival venue and that must not be simultaneously submitted for publication elsewhere. Submissions must comply with SCP's author guidelines (see http://www.elsevier.com/wps/find/journaldescription.cws_home/505623/authorinstructions) and be written in English. Submission is over the SCP website: http://ees.elsevier.com/scico/default.asp?pg=login.asp This is a login page. You will need to register first if you do not have an account. When submitting your paper please choose the article type "Special Issue: AVOCS'10". AVoCS From peteg42 at gmail.com Fri Aug 12 12:20:34 2011 Received: from ppsw-50.csi.cam.ac.uk ([131.111.8.150]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1Qrpn0-0004ye-QY (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Fri, 12 Aug 2011 12:20:34 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.6 from SpamAssassin-3.3.2-1156542 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.160.179 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (peteg42[at]gmail.com) * 0.1 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in * digit (peteg42[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from * author's domain * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-gy0-f179.google.com ([209.85.160.179]:65266) by ppsw-50.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.147]:25) with esmtp (csa=unknown) id 1Qrpmy-0002zK-sR (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Fri, 12 Aug 2011 12:20:34 +0100 Received: by gyd8 with SMTP id 8so62444gyd.38 for ; Fri, 12 Aug 2011 04:20:31 -0700 (PDT) Received: by 10.42.169.6 with SMTP id z6mr825568icy.343.1313148031159; Fri, 12 Aug 2011 04:20:31 -0700 (PDT) Received: from 192-168-1-2.tpgi.com.au (60-240-189-184.static.tpgi.com.au [60.240.189.184]) by mx.google.com with ESMTPS id fu7sm2244256ibb.36.2011.08.12.04.20.27 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 12 Aug 2011 04:20:29 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: multipart/mixed; boundary=Apple-Mail-143--166625312 From: Peter Gammie In-Reply-To: <4E3EDAE9.3050307 at informatik.tu-muenchen.de> Date: Fri, 12 Aug 2011 21:20:23 +1000 Message-Id: References: <7C9D7FD1-17C2-4D4A-81E9-7ED88EC0EC65 at gmail.com> <4E3EA2C7.80400 at informatik.tu-muenchen.de> <4E3EDAE9.3050307 at informatik.tu-muenchen.de> To: Florian Haftmann X-Mailer: Apple Mail (2.1084) Cc: Brian Huffman , cl-isabelle-users at lists.cam.ac.uk Subject: Re: [isabelle] code generation for saturated naturals X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Aug 2011 11:20:34 -0000 Status: O X-Status: X-Keywords: X-UID: 5856 --Apple-Mail-143--166625312 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 Florian, On 08/08/2011, at 4:35 AM, Florian Haftmann wrote: >> Maybe your Abs_sat' can just be called Sat. >=20 > When going through Dlist a further suggestion came to my mind: >=20 > I have modified the theory further: Abs_sat' is called Sat, and = Rep_sat > nat_of. Both are operations to be expected to be used in =BBuser = space=AB > and should therefore carry readable names. Thanks for this. I've tidied it up a bit. See the attached. cheers peter --Apple-Mail-143--166625312 Content-Disposition: attachment; filename=Saturated.thy Content-Type: application/octet-stream; x-unix-mode=0644; name="Saturated.thy" Content-Transfer-Encoding: 7bit (* Author: Brian Huffman *) (* Author: Peter Gammie *) (* Author: Florian Haftmann *) (* Version: Isabelle2011 *) header {* Saturated arithmetic *} theory Saturated imports Main "~~/src/HOL/Library/Numeral_Type" "~~/src/HOL/Word/Type_Length" begin typedef (open) ('a::len) sat = "{.. len_of TYPE('a)}" morphisms nat_of Abs_sat by auto lemma sat_eqI: "nat_of m = nat_of n \ m = n" by (simp add: nat_of_inject) lemma sat_eq_iff: "m = n \ nat_of m = nat_of n" by (simp add: nat_of_inject) text {* Use code generation for abstract types. *} lemma [code abstype]: "Abs_sat (nat_of n) = n" by (fact nat_of_inverse) definition Sat :: "nat \ ('a::len) sat" where "Sat n = Abs_sat (min (len_of TYPE('a)) n)" lemma nat_of_Sat [simp]: "nat_of (Sat n :: ('a::len) sat) = min (len_of TYPE('a)) n" unfolding Sat_def by (rule Abs_sat_inverse) simp lemma nat_of_le_len_of [simp]: "nat_of (n :: ('a::len) sat) \ len_of TYPE('a)" using nat_of [where x=n] by simp lemma min_len_of_nat_of [simp]: "min (len_of TYPE('a)) (nat_of (n::('a::len) sat)) = nat_of n" by (rule min_max.inf_absorb2 [OF nat_of_le_len_of]) lemma min_nat_of_len_of [simp]: "min (nat_of (n::('a::len) sat)) (len_of TYPE('a)) = nat_of n" by (subst min_max.inf.commute) simp lemma Sat_nat_of [simp]: "Sat (nat_of n) = n" by (simp add: Sat_def nat_of_inverse) lemma nat_mult_min_left: fixes x y z :: nat shows "min x y * z = min (x * z) (y * z)" unfolding min_def by simp lemma nat_mult_min_right: fixes x y z :: nat shows "x * min y z = min (x * y) (x * z)" unfolding min_def by simp lemma nat_add_min_left: fixes x y z :: nat shows "min x y + z = min (x + z) (y + z)" unfolding min_def by simp lemma nat_add_min_right: fixes x y z :: nat shows "x + min y z = min (x + y) (x + z)" unfolding min_def by simp instantiation sat :: (len) linorder begin definition less_eq_sat_def: "x \ y \ nat_of x \ nat_of y" text {* This formulation is much nicer for unfolding *} definition less_sat_def: "(x::'a sat) < y \ nat_of x < nat_of y" instance by default (auto simp add: less_eq_sat_def less_sat_def not_le sat_eq_iff min_max.le_infI1 nat_mult_commute) end text {* Suggestion: may be generalized to class @{class linordered_semiring} *} instantiation sat :: (len) "{minus, comm_semiring_0, comm_semiring_1}" begin definition zero_sat_def: "0 = Sat 0" definition one_sat_def: "1 = Sat 1" text {* Prove the @{text "Rep ..."} lemmas immediately and use for code generation *} lemma nat_of_zero_sat [simp, code abstract]: "nat_of 0 = 0" by (simp add: zero_sat_def) lemma nat_of_one_sat [simp, code abstract]: "nat_of 1 = min 1 (len_of TYPE('a))" by (simp add: one_sat_def) definition plus_sat_def: "x + y = Sat (nat_of x + nat_of y)" lemma nat_of_plus_sat [simp, code abstract]: "nat_of (x + y) = min (nat_of x + nat_of y) (len_of TYPE('a))" by (simp add: plus_sat_def) definition minus_sat_def: "x - y = Sat (nat_of x - nat_of y)" lemma nat_of_minus_sat [simp, code abstract]: "nat_of (x - y) = nat_of x - nat_of y" proof - from nat_of_le_len_of [of x] have "nat_of x - nat_of y \ len_of TYPE('a)" by arith then show ?thesis by (simp add: minus_sat_def) qed definition times_sat_def: "x * y = Sat (nat_of x * nat_of y)" lemma nat_of_times_sat [simp, code abstract]: "nat_of (x * y) = min (nat_of x * nat_of y) (len_of TYPE('a))" by (simp add: times_sat_def) instance proof fix a b c :: "('a::len) sat" show "a * b * c = a * (b * c)" proof(cases "a = 0") case True thus ?thesis by (simp add: sat_eq_iff) next case False show ?thesis proof(cases "c = 0") case True thus ?thesis by (simp add: sat_eq_iff) next case False with `a \ 0` show ?thesis by (simp add: sat_eq_iff nat_mult_min_left nat_mult_min_right mult_assoc min_max.inf_assoc min_max.inf_absorb2) qed qed next fix a :: "('a::len) sat" show "1 * a = a" apply (simp add: sat_eq_iff) apply (metis One_nat_def len_gt_0 less_Suc0 less_zeroE linorder_not_less min_max.le_iff_inf min_nat_of_len_of nat_mult_1_right nat_mult_commute) done next fix a b c :: "('a::len) sat" show "(a + b) * c = a * c + b * c" proof(cases "c = 0") case True thus ?thesis by (simp add: sat_eq_iff) next case False thus ?thesis by (simp add: sat_eq_iff nat_mult_min_left add_mult_distrib nat_add_min_left nat_add_min_right min_max.inf_assoc min_max.inf_absorb2) qed qed (simp_all add: sat_eq_iff mult.commute) end instantiation sat :: (len) ordered_comm_semiring begin instance by default (auto simp add: less_eq_sat_def less_sat_def not_le sat_eq_iff min_max.le_infI1 nat_mult_commute) end instantiation sat :: (len) number begin definition number_of_sat_def [code del]: "number_of = Sat \ nat" instance .. end lemma [code abstract]: "nat_of (number_of n :: ('a::len) sat) = min (nat n) (len_of TYPE('a))" unfolding number_of_sat_def by simp instance sat :: (len) finite proof show "finite (UNIV::'a sat set)" unfolding type_definition.univ [OF type_definition_sat] using finite by simp qed instantiation sat :: (len) equal begin definition "HOL.equal A B \ nat_of A = nat_of B" instance proof qed (simp add: equal_sat_def nat_of_inject) end end --Apple-Mail-143--166625312 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii -- http://peteg.org/ --Apple-Mail-143--166625312-- From lists at necoro.eu Fri Aug 12 12:53:50 2011 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QrqJC-0005oB-1j (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Fri, 12 Aug 2011 12:53:50 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1156542 * -0.8 RP_MATCHES_RCVD Envelope sender domain matches handover relay * domain * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from travincal.necoro.eu ([46.4.139.38]:38313) by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25) with esmtp (csa=unknown) id 1QrqJB-0000P8-YB (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Fri, 12 Aug 2011 12:53:50 +0100 Received: from [192.168.248.86] (fish.informatik.tu-muenchen.de [131.159.22.21]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by travincal.necoro.eu (Postfix) with ESMTPSA id B7D6E1BAC02E for ; Fri, 12 Aug 2011 13:53:47 +0200 (CEST) Message-ID: <4E45144B.2070708 at necoro.eu> Date: Fri, 12 Aug 2011 13:53:47 +0200 From: =?ISO-8859-15?Q?Ren=E9_Neumann?= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110727 Lightning/1.0b3pre Thunderbird/3.1.10 MIME-Version: 1.0 To: cl-isabelle-users at lists.cam.ac.uk Content-Type: multipart/mixed; boundary="------------080700020002010201010707" Subject: [isabelle] An 'isabelle emacs' wrapper X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Aug 2011 11:53:50 -0000 Status: O X-Status: X-Keywords: X-UID: 5857 This is a multi-part message in MIME format. --------------080700020002010201010707 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Hi, I just wanted to share a small script I created to have a more convenient 'isabelle emacs' behavior: Especially when dealing with different logic images, it is quite cumbersome to manually change the image in PG each time you open a file needing a special image. This script should change this: 1.) It can be passed a logic-pattern: This pattern is matched against all logics as returned by `isabelle findlogics` and then the first match is taken: So if you have 'HOL HOL-Cava-Libs HOL-Graphs HOL-Library Pure' as images, "C" would match 'HOL-Cava-Libs' as would "L" (first match wins). 2.) This behavior is nice, but when working with the very same project over and over, it is again cumbersome. Therefore the script also is able to evaluate the file ".isabelle-logic" in the current directory. This file should contain exactly one line with the image name (it is taken as a pattern, but spelling out the complete name is probably better to avoid surprises). If the file contains "..", ../.isabelle-logic is looked up (this works recursively). So perhaps someone finds this useful. Feel free to edit/enhance it as you like :). - Ren=E9 P.S.: By specifiying the logic during startup the chooser in the menu in PG is not altered(!), hence always states "HOL". The correct image is nevertheless loaded when starting isabelle from PG. P.P.S.: The script is a ported version of a personal zsh-script of mine. It may therefore contain constructs which look strange to a bash-user :) --------------080700020002010201010707 Content-Type: application/x-sh; name="IE.sh" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="IE.sh" #!/bin/bash -x # This script is a wrapper around 'isabelle emacs' # Usage: ./IE.sh [logic-pattern] [file] [options] # # - logic-pattern: this is expanded to *logic-pattern* and matched # against all logics as returned by `isabelle findlogics` # the first match wins # - file: file to open # - options: options passed verbatim to 'isabelle emacs' # # If no logic-pattern is given, the file .isabelle-logic is # evaluated: This file should contain one line, being either the logic to load, # or '..', which makes the script take the .isabelle-logic in the parent directory. # default arguments to isabelle emacs declare defargs="-x true -m iff" # fall-through logic declare -r default="HOL" # be nice and declare variables beforehand :) declare file logic # safety check to avoid failing later on if [[ ! -x `type -P isabelle` ]]; then echo "Isabelle not found. Aborting" return 1 fi # try to map the arguments to the correct option # usage is: [logic] [file] [isabelle opts] case x$1 in x*.thy) file=$1; shift;; x-*);; # argument to isabelle emacs -> ignore x) ;; # empty -> ignore x*) # a logic pattern :) logic=$1; shift if [[ -n $1 && $1 != -* ]]; then file=$1; shift fi esac # have a .isabelle-logic file that contains a logic-image pattern # if it contains "..", the parent directory is searched if [[ -z $logic && -e .isabelle-logic ]]; then declare p=.isabelle-logic declare line=$(head -1 $p) while [[ $line == .. ]]; do p=../$p if [[ -e $p ]]; then line=$(head -1 $p) else line= fi done if [[ -n $line ]]; then logic=$line echo "Setting logic to '$logic' as found in local settings." fi fi # try to find the correct logic # special case HOL, just to be sure :) if [[ -n $logic && $logic != 'HOL' ]]; then declare found for l in $(isabelle findlogics); do if [[ $l == *${logic}* ]]; then logic=$l; found=1 echo "Using logic '$logic'" break fi done if [[ -z $found ]]; then echo "No logic found that matches the pattern *${logic}*" echo "Existing logics are: $(isabelle findlogics)" unset logic fi fi # fall-through if no logic could be determined if [[ -z $logic ]]; then logic=$default echo "Defaulting to '$logic'." fi # AAAAND ... FIRE! isabelle emacs ${defargs} -l $logic "$@" $file # vim: ft=sh --------------080700020002010201010707-- From lists at necoro.eu Fri Aug 12 12:56:25 2011 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QrqLh-0005zn-00 (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Fri, 12 Aug 2011 12:56:25 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1156542 * -0.8 RP_MATCHES_RCVD Envelope sender domain matches handover relay * domain * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from travincal.necoro.eu ([46.4.139.38]:38508) by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25) with esmtp (csa=unknown) id 1QrqLf-000138-ZQ (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Fri, 12 Aug 2011 12:56:24 +0100 Received: from [192.168.248.86] (fish.informatik.tu-muenchen.de [131.159.22.21]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by travincal.necoro.eu (Postfix) with ESMTPSA id 90C901BAC02E for ; Fri, 12 Aug 2011 13:56:23 +0200 (CEST) Message-ID: <4E4514E7.2040704 at necoro.eu> Date: Fri, 12 Aug 2011 13:56:23 +0200 From: =?ISO-8859-15?Q?Ren=E9_Neumann?= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110727 Lightning/1.0b3pre Thunderbird/3.1.10 MIME-Version: 1.0 To: cl-isabelle-users at lists.cam.ac.uk References: <4E45144B.2070708 at necoro.eu> In-Reply-To: <4E45144B.2070708 at necoro.eu> Content-Type: multipart/mixed; boundary="------------080104060002000009000302" Subject: Re: [isabelle] An 'isabelle emacs' wrapper X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Aug 2011 11:56:25 -0000 Status: O X-Status: X-Keywords: X-UID: 5858 This is a multi-part message in MIME format. --------------080104060002000009000302 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Short correction ... the debugging slipped in. - Ren=E9 --------------080104060002000009000302 Content-Type: application/x-sh; name="IE.sh" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="IE.sh" #!/bin/bash # This script is a wrapper around 'isabelle emacs' # Usage: ./IE.sh [logic-pattern] [file] [options] # # - logic-pattern: this is expanded to *logic-pattern* and matched # against all logics as returned by `isabelle findlogics` # the first match wins # - file: file to open # - options: options passed verbatim to 'isabelle emacs' # # If no logic-pattern is given, the file .isabelle-logic is # evaluated: This file should contain one line, being either the logic to load, # or '..', which makes the script take the .isabelle-logic in the parent directory. # default arguments to isabelle emacs declare defargs="-x true -m iff" # fall-through logic declare -r default="HOL" # be nice and declare variables beforehand :) declare file logic # safety check to avoid failing later on if [[ ! -x `type -P isabelle` ]]; then echo "Isabelle not found. Aborting" return 1 fi # try to map the arguments to the correct option # usage is: [logic] [file] [isabelle opts] case x$1 in x*.thy) file=$1; shift;; x-*);; # argument to isabelle emacs -> ignore x) ;; # empty -> ignore x*) # a logic pattern :) logic=$1; shift if [[ -n $1 && $1 != -* ]]; then file=$1; shift fi esac # have a .isabelle-logic file that contains a logic-image pattern # if it contains "..", the parent directory is searched if [[ -z $logic && -e .isabelle-logic ]]; then declare p=.isabelle-logic declare line=$(head -1 $p) while [[ $line == .. ]]; do p=../$p if [[ -e $p ]]; then line=$(head -1 $p) else line= fi done if [[ -n $line ]]; then logic=$line echo "Setting logic to '$logic' as found in local settings." fi fi # try to find the correct logic # special case HOL, just to be sure :) if [[ -n $logic && $logic != 'HOL' ]]; then declare found for l in $(isabelle findlogics); do if [[ $l == *${logic}* ]]; then logic=$l; found=1 echo "Using logic '$logic'" break fi done if [[ -z $found ]]; then echo "No logic found that matches the pattern *${logic}*" echo "Existing logics are: $(isabelle findlogics)" unset logic fi fi # fall-through if no logic could be determined if [[ -z $logic ]]; then logic=$default echo "Defaulting to '$logic'." fi # AAAAND ... FIRE! isabelle emacs ${defargs} -l $logic "$@" $file # vim: ft=sh --------------080104060002000009000302-- From tjm1983 at gmail.com Sun Aug 14 23:28:35 2011 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QsjAZ-0006GO-OF (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Sun, 14 Aug 2011 23:28:35 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.6 from SpamAssassin-3.3.2-1157350 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.213.179 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (tjm1983[at]gmail.com) * 0.1 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in * digit (tjm1983[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from * author's domain * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature * 0.0 T_TO_NO_BRKTS_FREEMAIL To: misformatted and free email service X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-yx0-f179.google.com ([209.85.213.179]:59324) by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25) with esmtp (csa=unknown) id 1QsjAZ-0002Tu-Wg (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Sun, 14 Aug 2011 23:28:35 +0100 Received: by yxm34 with SMTP id 34so2942729yxm.38 for ; Sun, 14 Aug 2011 15:28:34 -0700 (PDT) Received: by 10.101.111.1 with SMTP id o1mr3258757anm.49.1313360913731; Sun, 14 Aug 2011 15:28:33 -0700 (PDT) Received: from [192.168.1.34] (158.195.69.111.dynamic.snap.net.nz [111.69.195.158]) by mx.google.com with ESMTPS id l38sm4597511ani.18.2011.08.14.15.28.30 (version=SSLv3 cipher=OTHER); Sun, 14 Aug 2011 15:28:31 -0700 (PDT) Message-ID: <4E484C0C.6080102 at gmail.com> Date: Mon, 15 Aug 2011 10:28:28 +1200 From: "Tim (McKenzie) Makarios" User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110617 Thunderbird/3.1.11 MIME-Version: 1.0 To: cl-isabelle-users at lists.cam.ac.uk References: <4E45144B.2070708 at necoro.eu> In-Reply-To: <4E45144B.2070708 at necoro.eu> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 8bit Subject: Re: [isabelle] An 'isabelle emacs' wrapper X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Aug 2011 22:28:35 -0000 Status: O X-Status: X-Keywords: X-UID: 5859 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 12/08/11 23:53, René Neumann wrote: > 1.) It can be passed a logic-pattern: This pattern is matched against > all logics as returned by `isabelle findlogics` and then the first match > is taken: > So if you have 'HOL HOL-Cava-Libs HOL-Graphs HOL-Library Pure' as > images, "C" would match 'HOL-Cava-Libs' as would "L" (first match wins). I haven't looked at the script, but wouldn't "L" match 'HOL' first? Tim <>< -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk5ITAYACgkQ/cBxZIxl6rmh9gCg2sQcTUsPp85YhSoiI3JzfjtL 3CsAoIwjBDkAO0elUERtyQuIuoocAb85 =fRE/ -----END PGP SIGNATURE----- From nipkow at in.tum.de Mon Aug 15 10:20:03 2011 Received: from ppsw-50.csi.cam.ac.uk ([131.111.8.150]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QstL1-000747-TF (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Mon, 15 Aug 2011 10:20:03 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1157497 * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta1.cl.cam.ac.uk ([128.232.25.21]:38536) by ppsw-50.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.147]:25) with esmtp id 1QstL1-0005CT-q6 (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Mon, 15 Aug 2011 10:20:03 +0100 Received: from ppsw-50.csi.cam.ac.uk ([131.111.8.150]) by mta1.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1QstL1-0005jq-3W for isabelle-users at cl.cam.ac.uk; Mon, 15 Aug 2011 10:20:03 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1157497 * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-out1.informatik.tu-muenchen.de ([131.159.0.8]:55324) by ppsw-50.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.147]:25) with esmtp (csa=unknown) id 1QstKw-00058o-qn (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Mon, 15 Aug 2011 10:20:00 +0100 Received: from localhost (scanbroy [10.46.146.16]) by mailbroy.informatik.tu-muenchen.de (Postfix) with ESMTP id ADAAB8094F77A for ; Mon, 15 Aug 2011 11:19:57 +0200 (CEST) X-Virus-Scanned: by amavisd-new using ClamAV at mailbroy.informatik.tu-muenchen.de Received: from mailbroy.informatik.tu-muenchen.de ([10.46.146.15]) by localhost (mailbroy.informatik.tu-muenchen.de [10.46.146.16]) (amavisd-new, port 10024) with ESMTP id 0X2z5s65J-z3 for ; Mon, 15 Aug 2011 11:19:57 +0200 (CEST) Received: from lapbroy100.local (ppp-93-104-101-116.dynamic.mnet-online.de [93.104.101.116]) by mailbroy.informatik.tu-muenchen.de (Postfix) with ESMTPSA id 6330D8093AF65 for ; Mon, 15 Aug 2011 11:19:57 +0200 (CEST) Message-ID: <4E48E4BD.9030402 at in.tum.de> Date: Mon, 15 Aug 2011 11:19:57 +0200 From: Tobias Nipkow User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: Isabelle Users X-Enigmail-Version: 1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [isabelle] New AFP entry: Maximum Cardinality Matching X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Aug 2011 09:20:04 -0000 Status: O X-Status: X-Keywords: X-UID: 5860 Maximum Cardinality Matching Christine Rizkallah A matching in a graph G is a subset M of the edges of G such that no two share an endpoint. A matching has maximum cardinality if its cardinality is at least as large as that of any other matching. An odd-set cover OSC of a graph G is a labeling of the nodes of G with integers such that every edge of G is either incident to a node labeled 1 or connects two nodes labeled with the same number i =E2=89=A5 2. This article proves Edm= onds theorem: Let M be a matching in a graph G and let OSC be an odd-set cover of G. For any i =E2=89=A5 0, let n(i) be the number of nodes labele= d i. If |M| =3D n(1) + =E2=88=91i =E2=89=A5 2(n(i) div 2), then M is a maximum ca= rdinality matching. http://afp.sourceforge.net/entries/Max-Card-Matching.shtml From lists at necoro.eu Mon Aug 15 11:13:27 2011 Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QsuAg-0000io-Vb (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Mon, 15 Aug 2011 11:13:26 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.9 from SpamAssassin-3.3.2-1157497 * -1.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay * domain * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from travincal.necoro.eu ([46.4.139.38]:49478) by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25) with esmtp (csa=unknown) id 1QsuAg-0008Cx-EM (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Mon, 15 Aug 2011 11:13:26 +0100 Received: from [192.168.1.5] (e178106222.adsl.alicedsl.de [85.178.106.222]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by travincal.necoro.eu (Postfix) with ESMTPSA id AFE8D1BAC030 for ; Mon, 15 Aug 2011 12:13:25 +0200 (CEST) Message-ID: <4E48F145.7070302 at necoro.eu> Date: Mon, 15 Aug 2011 12:13:25 +0200 From: =?ISO-8859-15?Q?Ren=E9_Neumann?= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110727 Lightning/1.0b3pre Thunderbird/3.1.10 MIME-Version: 1.0 To: cl-isabelle-users at lists.cam.ac.uk References: <4E45144B.2070708 at necoro.eu> <4E484C0C.6080102 at gmail.com> In-Reply-To: <4E484C0C.6080102 at gmail.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [isabelle] An 'isabelle emacs' wrapper X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Aug 2011 10:13:27 -0000 Status: O X-Status: X-Keywords: X-UID: 5861 Am 15.08.2011 00:28, schrieb Tim (McKenzie) Makarios: > On 12/08/11 23:53, Ren=E9 Neumann wrote: >> 1.) It can be passed a logic-pattern: This pattern is matched against >> all logics as returned by `isabelle findlogics` and then the first mat= ch >> is taken: >> So if you have 'HOL HOL-Cava-Libs HOL-Graphs HOL-Library Pure' as >> images, "C" would match 'HOL-Cava-Libs' as would "L" (first match wins= ). >=20 > I haven't looked at the script, but wouldn't "L" match 'HOL' first? Uh - of course. My fault, sorry. - Ren=E9 From alfio.martini at gmail.com Wed Aug 17 15:51:16 2011 Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QthSe-0001yS-7L (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Wed, 17 Aug 2011 15:51:16 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.6 from SpamAssassin-3.3.2-1158155 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [74.125.82.174 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (alfio.martini[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 HTML_MESSAGE BODY: HTML included in message * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature * 0.0 T_TO_NO_BRKTS_FREEMAIL To: misformatted and free email service X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta1.cl.cam.ac.uk ([128.232.25.21]:46307) by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25) with esmtp id 1QthSd-0002ll-E0 (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Wed, 17 Aug 2011 15:51:16 +0100 Received: from ppsw-50.csi.cam.ac.uk ([131.111.8.150]) by mta1.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1QthSd-0001ys-98 for isabelle-users at cl.cam.ac.uk; Wed, 17 Aug 2011 15:51:15 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.6 from SpamAssassin-3.3.2-1158155 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [74.125.82.174 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (alfio.martini[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 HTML_MESSAGE BODY: HTML included in message * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature * 0.0 T_TO_NO_BRKTS_FREEMAIL To: misformatted and free email service X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-wy0-f174.google.com ([74.125.82.174]:33222) by ppsw-50.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.147]:25) with esmtp (csa=unknown) id 1QthSZ-00008K-se (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Wed, 17 Aug 2011 15:51:12 +0100 Received: by wyg24 with SMTP id 24so943090wyg.5 for ; Wed, 17 Aug 2011 07:51:08 -0700 (PDT) MIME-Version: 1.0 Received: by 10.227.205.139 with SMTP id fq11mr972079wbb.25.1313592667940; Wed, 17 Aug 2011 07:51:07 -0700 (PDT) Sender: alfio.martini at gmail.com Received: by 10.227.121.70 with HTTP; Wed, 17 Aug 2011 07:51:07 -0700 (PDT) Date: Wed, 17 Aug 2011 11:51:07 -0300 X-Google-Sender-Auth: 0waYmDCyAbBypvOSDbrUdGLZvhQ Message-ID: From: Alfio Martini To: isabelle-users at cl.cam.ac.uk Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.8 Subject: [isabelle] Renaming names of arbitrary values in document preparation X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Aug 2011 14:51:16 -0000 Status: O X-Status: X-Keywords: X-UID: 5862 Dear Isabelle Users, Assuming the context of the declaration datatype Nat = Z | suc Nat the following antiquotation command produces a very nicely typeset inference rule: \begin{center} @{thm [mode=Rule,show_types] Nat.induct [no_vars]}{\sc Ind-Nat} \end{center} However, Isabelle chooses the same name (in this case /\ Nat) for the bound variable in the rule. In proof mode one can rename such choices using the rename_tac command. Unfortunately I did not find how to do it in the above. Took a careful look at chapter 4 of Isabelle reference manual (and LaTex sugar too) but I did not guess the way to do it. Hope it is possible. Many thanks -- Alfio Ricardo Martini PhD in Computer Science (TU Berlin) Associate Professor at Faculty of Informatics (PUCRS) Porto Alegre - RS - Brasil From ggrov at staffmail.ed.ac.uk Wed Aug 17 16:21:37 2011 Received: from ppsw-50.csi.cam.ac.uk ([131.111.8.150]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1Qthw1-0002wK-UY (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Wed, 17 Aug 2011 16:21:37 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -5.3 from SpamAssassin-3.3.2-1158155 * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, * medium trust * [129.215.13.205 listed in list.dnswl.dnsbl.ja.net] * -1.1 RP_MATCHES_RCVD Envelope sender domain matches handover relay * domain * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta0.cl.cam.ac.uk ([128.232.25.20]:49405) by ppsw-50.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.147]:25) with esmtp id 1Qthw1-000580-qD (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Wed, 17 Aug 2011 16:21:37 +0100 Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152]) by mta0.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1Qthw1-00013t-4d for isabelle-users at cl.cam.ac.uk; Wed, 17 Aug 2011 16:21:37 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -5.3 from SpamAssassin-3.3.2-1158155 * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, * medium trust * [129.215.13.205 listed in list.dnswl.dnsbl.ja.net] * -1.1 RP_MATCHES_RCVD Envelope sender domain matches handover relay * domain * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from nougat.ucs.ed.ac.uk ([129.215.13.205]:63419) by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25) with esmtp (csa=unknown) id 1Qthvz-0001Cg-Fm (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Wed, 17 Aug 2011 16:21:37 +0100 Received: from dandy.inf.ed.ac.uk (dandy.inf.ed.ac.uk [129.215.33.80]) by nougat.ucs.ed.ac.uk (8.13.8/8.13.4) with ESMTP id p7HFLW6D017869 for ; Wed, 17 Aug 2011 16:21:32 +0100 (BST) Received: from dhcp-91-118.inf.ed.ac.uk (dhcp-91-118.inf.ed.ac.uk [129.215.91.118]) (authenticated bits=0) by dandy.inf.ed.ac.uk (8.13.8/8.13.8) with ESMTP id p7HFLWAj017722 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Wed, 17 Aug 2011 16:21:32 +0100 From: Gudmund Grov Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Date: Wed, 17 Aug 2011 16:21:38 +0100 Message-Id: <5989F7EF-9448-4F78-B58C-870FD7927C64 at staffmail.ed.ac.uk> To: isabelle-users at cl.cam.ac.uk Mime-Version: 1.0 X-Mailer: Apple Mail (2.1244.3) X-Edinburgh-Scanned: at nougat.ucs.ed.ac.uk with MIMEDefang 2.60, Sophie, Sophos Anti-Virus, Clam AntiVirus Content-Disposition: inline X-Scanned-By: MIMEDefang 2.60 on 129.215.13.205 Subject: [isabelle] VSTTE 2012: Final Call for Papers - Submission Deadline: August 31 X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Aug 2011 15:21:38 -0000 Status: O X-Status: X-Keywords: X-UID: 5863 VSTTE 2012 Verified Software: Theories, Tools and Experiments January 28-29, 2012 Philadelphia, USA (co-located with POPL and VMCAI) https://sites.google.com/site/vstte2012/ The Fourth International Conference on Verified Software: Theories, Tools, and Experiments will take place on January 28-29, 2012. The focus of the conference is the development of systematic methods for specifying, building, and verifying software. The goal of this conference is to advance the state of the art through the interaction of theory development, tool evolution, and experimental validation. Historically, the conference came out of the Verified Software Initiative (VSI), a cooperative, international initiative directed at the scientific challenges of large-scale software verification. An informal verification competition will be held in paralle= l=20 to the conference. More information will be available from the=20 website. Topics of interest include: * Specification and verification techniques * Tool support for specification languages * Tool for various design methodologies * Tool integration and plug-ins * Automation in formal verification * Tool comparisons and benchmark repositories * Combination of tools and techniques (e.g. formal vs. semiformal, software specification vs. engineering techniques) * Customizing tools for particular applications * Challenge problems * Refinement methodologies * Requirements modeling * Specification languages * Specification/verification case-studies * Software design methods * Program logic SUBMISSIONS Submitted research papers and system descriptions must be original and not submitted for publication elsewhere. Research paper submissions are limited to 15 proceedings pages in LNCS format and must include a cogent and self-contained description of the ideas, methods and results, together with a comparison to existing work. System descriptions are also limited to 15 proceedings pages in LNCS format. Authors are encouraged to submit work in progress, particularly if = the work involves collaboration, theory unification, and tool integration. Papers can be submitted at https://www.easychair.org/conferences/?conf=3Dvstte2012 Submissions that arrive late, are not in the proper format, or are too long will not be considered. The proceedings of VSTTE 2012 will be published by Springer-Verlag in the LNCS series. Authors of accepted papers will be requested to sign a form transferring copyright of their contribution to Springer-Verlag. IMPORTANT DATES August 31, 2011: Conference Paper Submission Deadline October 20, 2011: Notification of acceptance November 15, 2011: Final conference paper versions due January 28-29, 2012: Main conference KEYNOTE SPEAKERS Rupak Majumdar, Max Planck Institute for Software Systems Wolfgang Paul, Saarland University TUTORIALS Francesco Logozzo, Microsoft Research Rustan Leino, Microsoft Research CONFERENCE CHAIR Ernie Cohen, European Microsoft Innovation Center=20 PROGRAM CHAIRS Rajeev Joshi, NASA Jet Propulsion Laboratory Peter M=FCller, ETH Zurich Andreas Podelski, University of Freiburg PROGRAM COMMITTEE Clark Barrett, New York University Lars Birkedal, IT University of Copenhagen Patrick Cousot, Ecole normale Sup=E9rieure, Paris and New York University Leonardo De Moura, Microsoft Research Jean-Christophe Filliatre, CNRS Universit=E9 Paris Sud John Hatcliff, Kansas State University Bart Jacobs, Katholieke Universiteit Leuven=20 Ranjit Jhala, University of California, San Diego Rajeev Joshi, NASA JPL Gerwin Klein, NICTA=20 Viktor Kuncak, EPF Lausanne=20 Gary T. Leavens, University of Central Florida=20 Rustan Leino, Microsoft Research Panagiotis Manolios, Northeastern University Peter M=FCller, ETH Zurich Tobias Nipkow, Technische Universit=E4t M=FCnchen=20 Matthew Parkinson, Microsoft Research Corina Pasareanu, NASA Ames Wolfgang Paul, Saarland University Andreas Podelski, University of Freiburg Natasha Sharygina, University of Lugano=20 Willem Visser, University of Stellenbosch Thomas Wies, IST Austria PUBLICITY CHAIR Gudmund Grov, University of Edinburgh VERIFICATION COMPETITION ORGANISER=20 Jean-Christophe Filliatre, CNRS Universit=E9 Paris Sud STEERING COMMITTEE Tony Hoare, Microsoft Research Andrew Ireland, Heriot-Watt University Jay Misra, UT Austin Natarajan Shankar, SRI International Jim Woodcock, University of York --=20 The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. From alfio.martini at gmail.com Wed Aug 17 19:36:20 2011 Received: from ppsw-50.csi.cam.ac.uk ([131.111.8.150]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QtkyS-0005zM-8A (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Wed, 17 Aug 2011 19:36:20 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.6 from SpamAssassin-3.3.2-1158155 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [74.125.82.174 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (alfio.martini[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 HTML_MESSAGE BODY: HTML included in message * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature * 0.0 T_TO_NO_BRKTS_FREEMAIL To: misformatted and free email service X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta0.cl.cam.ac.uk ([128.232.25.20]:58895) by ppsw-50.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.147]:25) with esmtp id 1QtkyO-0001vN-qA (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Wed, 17 Aug 2011 19:36:20 +0100 Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152]) by mta0.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1QtkyO-0005ca-3i for isabelle-users at cl.cam.ac.uk; Wed, 17 Aug 2011 19:36:16 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.6 from SpamAssassin-3.3.2-1158155 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [74.125.82.174 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (alfio.martini[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 HTML_MESSAGE BODY: HTML included in message * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature * 0.0 T_TO_NO_BRKTS_FREEMAIL To: misformatted and free email service X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-wy0-f174.google.com ([74.125.82.174]:41455) by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25) with esmtp (csa=unknown) id 1QtkyN-0006Zs-F7 (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Wed, 17 Aug 2011 19:36:16 +0100 Received: by wyg24 with SMTP id 24so1137344wyg.5 for ; Wed, 17 Aug 2011 11:36:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.227.197.194 with SMTP id el2mr1152334wbb.55.1313606172440; Wed, 17 Aug 2011 11:36:12 -0700 (PDT) Sender: alfio.martini at gmail.com Received: by 10.227.35.196 with HTTP; Wed, 17 Aug 2011 11:36:12 -0700 (PDT) Date: Wed, 17 Aug 2011 15:36:12 -0300 X-Google-Sender-Auth: TyOwtz1C1tFs0IOzsUBbmLhqQDk Message-ID: From: Alfio Martini To: isabelle-users at cl.cam.ac.uk Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.8 Subject: [isabelle] Renaming names of arbitrary values in document preparation (Answer) X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Aug 2011 18:36:20 -0000 Status: O X-Status: X-Keywords: X-UID: 5864 Dear Isabelle Users, Looking again at LaTeXsugar, I found how to do it. It=B4s been always there= , right in front of my nose. So what I wanted is something like: \begin{center} @{thm [mode=3DRule,show_types] Nat.induct [where Nat =3D n,no_vars,rename_a= bs x0]}{\sc Ind-Nat} \end{center} Best!! ---------- Forwarded message ---------- From: Alfio Martini Date: Wed, Aug 17, 2011 at 11:51 AM Subject: Renaming names of arbitrary values in document preparation To: isabelle-users at cl.cam.ac.uk Dear Isabelle Users, Assuming the context of the declaration datatype Nat =3D Z | suc Nat the following antiquotation command produces a very nicely typeset inferenc= e rule: \begin{center} @{thm [mode=3DRule,show_types] Nat.induct [no_vars]}{\sc Ind-Nat} \end{center} However, Isabelle chooses the same name (in this case /\ Nat) for the bound variable in the rule. In proof mode one can rename such choices using the rename_tac command. Unfortunately I did not find how to do it in the above. Took a careful look at chapter 4 of Isabelle reference manual (and LaTex sugar too) but I did not guess the way to do it. Hope it is possible. Many thanks --=20 Alfio Ricardo Martini PhD in Computer Science (TU Berlin) Associate Professor at Faculty of Informatics (PUCRS) Porto Alegre - RS - Brasil --=20 Alfio Ricardo Martini PhD in Computer Science (TU Berlin) Associate Professor at Faculty of Informatics (PUCRS) Porto Alegre - RS - Brasil From florian.haftmann at informatik.tu-muenchen.de Thu Aug 18 07:29:32 2011 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1Qtw6e-0004V3-RE (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Thu, 18 Aug 2011 07:29:32 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -3.1 from SpamAssassin-3.3.2-1158582 * -1.2 RP_MATCHES_RCVD Envelope sender domain matches handover relay * domain * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-out1.informatik.tu-muenchen.de ([131.159.0.8]:49554) by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25) with esmtp (csa=unknown) id 1Qtw6e-00067a-Wj (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Thu, 18 Aug 2011 07:29:32 +0100 Received: from localhost (scanbroy [10.46.146.16]) by mailbroy.informatik.tu-muenchen.de (Postfix) with ESMTP id 72FD282742646; Thu, 18 Aug 2011 08:29:31 +0200 (CEST) X-Virus-Scanned: by amavisd-new using ClamAV at mailbroy.informatik.tu-muenchen.de Received: from mailbroy.informatik.tu-muenchen.de ([10.46.146.15]) by localhost (mailbroy.informatik.tu-muenchen.de [10.46.146.16]) (amavisd-new, port 10024) with ESMTP id agrPPOgHfKVb; Thu, 18 Aug 2011 08:29:31 +0200 (CEST) Received: from [192.168.2.24] (p57A37A1C.dip.t-dialin.net [87.163.122.28]) by mailbroy.informatik.tu-muenchen.de (Postfix) with ESMTPSA id D4BA382741B8B; Thu, 18 Aug 2011 08:29:30 +0200 (CEST) Message-ID: <4E4CB14A.8040406 at informatik.tu-muenchen.de> Date: Thu, 18 Aug 2011 08:29:30 +0200 From: Florian Haftmann Organization: TU =?ISO-8859-1?Q?M=FCnchen=2C_Lehrstuhl_Software_and?= =?ISO-8859-1?Q?_Systems_Engineering?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.18) Gecko/20110617 Lightning/1.0b2 Thunderbird/3.1.11 MIME-Version: 1.0 To: Peter Gammie References: <7C9D7FD1-17C2-4D4A-81E9-7ED88EC0EC65 at gmail.com> <4E3EA2C7.80400 at informatik.tu-muenchen.de> <4E3EDAE9.3050307 at informatik.tu-muenchen.de> In-Reply-To: X-Enigmail-Version: 1.1.2 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig6FACDA4B66607E0ACB00EDE3" Cc: Brian Huffman , cl-isabelle-users at lists.cam.ac.uk Subject: Re: [isabelle] code generation for saturated naturals X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Aug 2011 06:29:32 -0000 Status: O X-Status: X-Keywords: X-UID: 5865 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig6FACDA4B66607E0ACB00EDE3 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Peter, > Thanks for this. I've tidied it up a bit. See the attached. Thanks a lot. One further remark: the lemmas nat_mult_min_left etc. are quite generic. These should go into a separate prelude section at the beginning of the theory, from where, after becoming part of the library, they should be move to appropriate theories in the HOL distribution. What also comes to my mind is that saturated numbers seem to be a nice example for complete lattices (with inf =3D min etc.). Maybe you still want to add those instances. Cheers, Florian --=20 Home: http://www.in.tum.de/~haftmann PGP available: http://home.informatik.tu-muenchen.de/haftmann/pgp/florian_haftmann_at_in= formatik_tu_muenchen_de --------------enig6FACDA4B66607E0ACB00EDE3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk5MsUoACgkQZEASYmKQGuHe5ACgq5G1teX7Opms6R16AQ2fOcRB 0nkAnjuk7iQEPhGiuI5+Igj243LNzWdm =Dwto -----END PGP SIGNATURE----- --------------enig6FACDA4B66607E0ACB00EDE3-- From Brendan.Mahony at dsto.defence.gov.au Fri Aug 19 02:09:03 2011 Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QuDa3-0001WQ-Ba (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Fri, 19 Aug 2011 02:09:03 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -5.4 from SpamAssassin-3.3.2-1158582 * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, * medium trust * [203.5.217.4 listed in list.dnswl.dnsbl.ja.net] * -1.2 RP_MATCHES_RCVD Envelope sender domain matches handover relay * domain * 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay * lines * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 T_HK_NAME_DR T_HK_NAME_DR X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta0.cl.cam.ac.uk ([128.232.25.20]:49496) by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25) with esmtp id 1QuDa2-0000Wy-FD (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Fri, 19 Aug 2011 02:09:03 +0100 Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141]) by mta0.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1QuDa2-0006V7-14 for isabelle-users at cl.cam.ac.uk; Fri, 19 Aug 2011 02:09:02 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -5.4 from SpamAssassin-3.3.2-1158582 * -1.2 RP_MATCHES_RCVD Envelope sender domain matches handover relay * domain * 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay * lines * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, * medium trust * [203.5.217.4 listed in list.dnswl.dnsbl.ja.net] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 T_HK_NAME_DR T_HK_NAME_DR X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from digger1.defence.gov.au ([203.5.217.4]:53234) by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25) with esmtp (csa=unknown) id 1QuDZz-0000ca-Sb (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Fri, 19 Aug 2011 02:09:01 +0100 Received: from ednmsw520.dsto.defence.gov.au (ednmsw520.dsto.defence.gov.au [131.185.68.60]) by digger1.defence.gov.au (DSTO/DSTO) with ESMTP id p7J14wv0015103 for ; Fri, 19 Aug 2011 10:34:59 +0930 (CST) Received: from ednex510.dsto.defence.gov.au (ednex510.dsto.defence.gov.au) by ednmsw520.dsto.defence.gov.au (Clearswift SMTPRS 5.4.0) with ESMTP id for ; Fri, 19 Aug 2011 10:38:54 +0930 Received: from tcsrushby.dsto.defence.gov.au ([131.185.7.55]) by ednex510.dsto.defence.gov.au with Microsoft SMTPSVC(6.0.3790.4675); Fri, 19 Aug 2011 10:38:53 +0930 Content-Type: text/plain; charset="us-ascii" Mime-Version: 1.0 (Apple Message framework v1084) From: "Dr. Brendan Patrick Mahony" In-Reply-To: <4E4D8FE6.9000800 at in.tum.de> Date: Fri, 19 Aug 2011 10:38:51 +0930 Content-Transfer-Encoding: quoted-printable Message-Id: <83207B35-82C1-4073-B2AB-C1C04792BF54 at dsto.defence.gov.au> References: <4E43CE59.9080001 at informatik.tu-muenchen.de> <4E4D8FE6.9000800 at in.tum.de> To: isabelle-users at cl.cam.ac.uk X-Mailer: Apple Mail (2.1084) X-OriginalArrivalTime: 19 Aug 2011 01:08:53.0549 (UTC) FILETIME=[9000C5D0:01CC5E0C] X-TM-AS-Product-Ver: SMEX-10.0.0.1412-6.800.1017-18332.000 X-TM-AS-Result: No-1.446700-0.000000-31 X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No Subject: Re: [isabelle] [isabelle-dev] (Re-)introducing set as a type constructor rather than as mere abbreviation[SEC=UNCLASSIFIED] X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Aug 2011 01:09:03 -0000 Status: O X-Status: X-Keywords: X-UID: 5866 I admit to a certain feeling surreality listening in on this exchange. A blow-by-blow defence and repudiation of strong typing played out in the m= inutiae of Isabelle's reasoning mechanisms. It is especially amusing as I would also find it useful to distinguish pred= icates from boolean-valued operators :-), using /\ ,\/ instead of cap,cup e= tc. Surely Isabelle-HOL is a logic for those who believe in the value of strong= typing and are willing to wear the need to use explicit type coercions? Brendan IMPORTANT: This email remains the property of the Department of Defence and= is subject to the jurisdiction of section 70 of the Crimes Act 1914. If yo= u have received this email in error, you are requested to contact the sende= r and delete the email. From nipkow at in.tum.de Fri Aug 19 16:32:23 2011 Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QuR3X-0002km-DY (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Fri, 19 Aug 2011 16:32:23 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1159091 * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta0.cl.cam.ac.uk ([128.232.25.20]:39590) by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25) with esmtp id 1QuR3W-0006uX-Ss (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Fri, 19 Aug 2011 16:32:23 +0100 Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141]) by mta0.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1QuR3W-0005Ck-TS for isabelle-users at cl.cam.ac.uk; Fri, 19 Aug 2011 16:32:22 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1159091 * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-out1.informatik.tu-muenchen.de ([131.159.0.8]:33295) by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25) with esmtp (csa=unknown) id 1QuR3W-0006uP-Qt (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Fri, 19 Aug 2011 16:32:22 +0100 Received: from localhost (scanbroy [10.46.146.16]) by mailbroy.informatik.tu-muenchen.de (Postfix) with ESMTP id BC041885F39DC for ; Fri, 19 Aug 2011 17:32:21 +0200 (CEST) X-Virus-Scanned: by amavisd-new using ClamAV at mailbroy.informatik.tu-muenchen.de Received: from mailbroy.informatik.tu-muenchen.de ([10.46.146.15]) by localhost (mailbroy.informatik.tu-muenchen.de [10.46.146.16]) (amavisd-new, port 10024) with ESMTP id 9ZgtG9eGsqo6 for ; Fri, 19 Aug 2011 17:32:21 +0200 (CEST) Received: from lapbroy100.informatik.tu-muenchen.de (lapbroy100.informatik.tu-muenchen.de [131.159.46.196]) by mailbroy.informatik.tu-muenchen.de (Postfix) with ESMTPSA id 974B5885F3904 for ; Fri, 19 Aug 2011 17:32:21 +0200 (CEST) Message-ID: <4E4E8205.3090606 at in.tum.de> Date: Fri, 19 Aug 2011 17:32:21 +0200 From: Tobias Nipkow User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:6.0) Gecko/20110812 Thunderbird/6.0 MIME-Version: 1.0 To: Isabelle Users X-Enigmail-Version: 1.3 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: [isabelle] New AFP entry: Gauss-Jordan Elimination for Matrices Represented as Functions X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Aug 2011 15:32:23 -0000 Status: O X-Status: X-Keywords: X-UID: 5867 Gauss-Jordan Elimination for Matrices Represented as Functions Tobias Nipkow This theory provides a compact formulation of Gauss-Jordan elimination for matrices represented as functions. Its distinctive feature is succinctness. It is not meant for large computations. http://afp.sourceforge.net/entries/Gauss-Jordan-Elim-Fun.shtml From makarius at sketis.net Sat Aug 20 15:16:34 2011 Received: from ppsw-50.csi.cam.ac.uk ([131.111.8.150]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QumLi-0000w9-Jo (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Sat, 20 Aug 2011 15:16:34 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1159550 * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta1.cl.cam.ac.uk ([128.232.25.21]:42610) by ppsw-50.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.147]:25) with esmtp id 1QumLi-0004kp-q0 (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Sat, 20 Aug 2011 15:16:34 +0100 Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152]) by mta1.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1QumLh-0006sW-Si for isabelle-users at cl.cam.ac.uk; Sat, 20 Aug 2011 15:16:33 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1159550 * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-out1.informatik.tu-muenchen.de ([131.159.0.8]:37984) by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25) with esmtp (csa=unknown) id 1QumLe-000327-EA (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Sat, 20 Aug 2011 15:16:30 +0100 Received: from localhost (scanbroy [10.46.146.16]) by mailbroy.informatik.tu-muenchen.de (Postfix) with ESMTP id 8C947812D82C0 for ; Sat, 20 Aug 2011 16:16:29 +0200 (CEST) X-Virus-Scanned: by amavisd-new using ClamAV at mailbroy.informatik.tu-muenchen.de Received: from mailbroy.informatik.tu-muenchen.de ([10.46.146.15]) by localhost (mailbroy.informatik.tu-muenchen.de [10.46.146.16]) (amavisd-new, port 10024) with ESMTP id zzAzKSf1RSOC for ; Sat, 20 Aug 2011 16:16:29 +0200 (CEST) Received: from atbroy100.informatik.tu-muenchen.de (atbroy100.informatik.tu-muenchen.de [131.159.47.193]) by mailbroy.informatik.tu-muenchen.de (Postfix) with ESMTPS id 597B6885ED309 for ; Sat, 20 Aug 2011 16:16:29 +0200 (CEST) Date: Sat, 20 Aug 2011 16:16:18 +0200 (CEST) From: Makarius X-X-Sender: wenzelm at atbroy100.informatik.tu-muenchen.de To: isabelle-users at cl.cam.ac.uk In-Reply-To: <83207B35-82C1-4073-B2AB-C1C04792BF54 at dsto.defence.gov.au> Message-ID: References: <4E43CE59.9080001 at informatik.tu-muenchen.de> <4E4D8FE6.9000800 at in.tum.de> <83207B35-82C1-4073-B2AB-C1C04792BF54 at dsto.defence.gov.au> User-Agent: Alpine 1.10 (LNX 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Subject: Re: [isabelle] [isabelle-dev] (Re-)introducing set as a type constructor rather than as mere abbreviation[SEC=UNCLASSIFIED] X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Aug 2011 14:16:34 -0000 Status: O X-Status: X-Keywords: X-UID: 5868 On Fri, 19 Aug 2011, Dr. Brendan Patrick Mahony wrote: > I admit to a certain feeling surreality listening in on this exchange. Of course, anybody can join the discussion, either on isabelle-dev or isabelle-users. See also http://news.gmane.org/gmane.science.mathematics.logic.isabelle.devel Please chose exactly one list for your answers, to avoid crossposting and thus duplication for those on isabelle-dev (which is a subset of isabelle-users). Makarius From rpollack0 at gmail.com Tue Aug 23 20:41:21 2011 Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1Qvwqf-0004bH-8s (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Tue, 23 Aug 2011 20:41:21 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.5 from SpamAssassin-3.3.2-1160145 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.210.46 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (rpollack0[at]gmail.com) * 0.1 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in * digit (rpollack0[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature * 0.0 T_TO_NO_BRKTS_FREEMAIL To: misformatted and free email service X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta1.cl.cam.ac.uk ([128.232.25.21]:35472) by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25) with esmtp id 1Qvwqe-0003AK-S6 (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Tue, 23 Aug 2011 20:41:21 +0100 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by mta1.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1Qvwqe-0005Rd-Li for isabelle-users at cl.cam.ac.uk; Tue, 23 Aug 2011 20:41:20 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.5 from SpamAssassin-3.3.2-1160145 * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (rpollack0[at]gmail.com) * 0.1 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in * digit (rpollack0[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.210.46 listed in list.dnswl.dnsbl.ja.net] * 0.0 T_TO_NO_BRKTS_FREEMAIL To: misformatted and free email service X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-pz0-f46.google.com ([209.85.210.46]:55850) by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25) with esmtp (csa=unknown) id 1Qvwqa-0002yG-Xx (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Tue, 23 Aug 2011 20:41:17 +0100 Received: by pzk32 with SMTP id 32so18221pzk.33 for ; Tue, 23 Aug 2011 12:41:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.201.15 with SMTP id y15mr2221237wff.338.1314128472046; Tue, 23 Aug 2011 12:41:12 -0700 (PDT) Sender: rpollack0 at gmail.com Received: by 10.68.63.164 with HTTP; Tue, 23 Aug 2011 12:41:12 -0700 (PDT) Date: Tue, 23 Aug 2011 15:41:12 -0400 X-Google-Sender-Auth: KnXsmBup_C_G_XcVcw0Fm3WkYqc Message-ID: From: Randy Pollack To: isabelle-users at cl.cam.ac.uk Content-Type: text/plain; charset=ISO-8859-1 Subject: [isabelle] locale expressions? X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Aug 2011 19:41:21 -0000 Status: O X-Status: X-Keywords: X-UID: 5869 Consider the following (HOL/Main, Isabelle 2011) locale preordX2 = le: preorder le lt + le': preorder le' lt' for le::"'a => 'a => bool" and lt::"'a => 'a => bool" and le'::"'b => 'b => bool" and lt'::"'b => 'b => bool" + fixes preordX2_opn:: "'a => 'b => 'a" begin This locale is abstracted over two preorders. I have an operation "preordX2_opn" on objects of both preorders, so I need explicit type variables 'a, 'b, for the constituent preorders in order to correctly specify this operation. Now consider the trivial lemma: lemma fixes a::'a shows "~ (lt a a)" using less_irrefl . --"less_irrefl from typeclass preorder" This proof FAILS: *** Failed to finish proof *** At command "." I suppose the failure is due to typing: thm less_irrefl \ (lt'\'b \ 'b \ bool) (?x\'b) ?x It seems that type variable 'b is incorrect here; less_irrefl should have a generalized type. Indeed, the following proof succeeds: lemma fixes b::'b shows "~ (lt' b b)" using less_irrefl . Randy From huffman.brian.c at gmail.com Tue Aug 23 21:30:50 2011 Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QvxcY-0004ux-Oa (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Tue, 23 Aug 2011 21:30:50 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.6 from SpamAssassin-3.3.2-1160145 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [74.125.82.42 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (huffman.brian.c[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta1.cl.cam.ac.uk ([128.232.25.21]:49289) by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25) with esmtp id 1QvxcY-0000dK-EB (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Tue, 23 Aug 2011 21:30:50 +0100 Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152]) by mta1.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1QvxcY-0005vP-Aj for isabelle-users at cl.cam.ac.uk; Tue, 23 Aug 2011 21:30:50 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.6 from SpamAssassin-3.3.2-1160145 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [74.125.82.42 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (huffman.brian.c[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-ww0-f42.google.com ([74.125.82.42]:65278) by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25) with esmtp (csa=unknown) id 1QvxcU-0000cZ-Eg (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Tue, 23 Aug 2011 21:30:47 +0100 Received: by wwe5 with SMTP id 5so3779116wwe.5 for ; Tue, 23 Aug 2011 13:30:45 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.169.211 with SMTP id n61mr1072953wel.83.1314131445108; Tue, 23 Aug 2011 13:30:45 -0700 (PDT) Sender: huffman.brian.c at gmail.com Received: by 10.216.88.131 with HTTP; Tue, 23 Aug 2011 13:30:41 -0700 (PDT) In-Reply-To: References: Date: Tue, 23 Aug 2011 13:30:41 -0700 X-Google-Sender-Auth: LZSAYXtdFYCuBq_fclcFi1Fnkek Message-ID: From: Brian Huffman To: Randy Pollack Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: isabelle-users at cl.cam.ac.uk Subject: Re: [isabelle] locale expressions? X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Aug 2011 20:30:50 -0000 Status: O X-Status: X-Keywords: X-UID: 5870 On Tue, Aug 23, 2011 at 12:41 PM, Randy Pollack wro= te: > Consider the following (HOL/Main, Isabelle 2011) > > locale preordX2 =3D le: preorder le lt + le': preorder le' lt' > =A0for le::"'a =3D> 'a =3D> bool" and lt::"'a =3D> 'a =3D> bool" > =A0and le'::"'b =3D> 'b =3D> bool" and lt'::"'b =3D> 'b =3D> bool" > =A0+ > =A0fixes preordX2_opn:: "'a =3D> 'b =3D> =A0'a" > begin Within this locale, you have these two lemmas in scope: le.less_irrefl: "~ lt x x" le'.less_irrefl: "~ lt' x x" > Now consider the trivial lemma: > > lemma > =A0fixes a::'a > =A0shows "~ (lt a a)" > =A0using less_irrefl . =A0 =A0 =A0 --"less_irrefl from typeclass preorder= " The unqualified lemma name "less_irrefl" is ambiguous here. Isabelle resolves the ambiguity by picking the most-recently-introduced name that matches, which happens to be "le'.less_irrefl". If you explicitly say "using le.less_irrefl" the proof will work. - Brian From lists at necoro.eu Tue Aug 23 22:19:29 2011 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QvyNd-0005NL-00 (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Tue, 23 Aug 2011 22:19:29 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.4 from SpamAssassin-3.3.2-1160145 * -0.5 RP_MATCHES_RCVD Envelope sender domain matches handover relay * domain * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta1.cl.cam.ac.uk ([128.232.25.21]:39215) by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25) with esmtp id 1QvyNc-0002XN-YT (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Tue, 23 Aug 2011 22:19:28 +0100 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by mta1.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1QvyNc-0006T4-KF for isabelle-users at cl.cam.ac.uk; Tue, 23 Aug 2011 22:19:28 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.4 from SpamAssassin-3.3.2-1160145 * -0.5 RP_MATCHES_RCVD Envelope sender domain matches handover relay * domain * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from travincal.necoro.eu ([46.4.139.38]:54065) by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25) with esmtp (csa=unknown) id 1QvyNY-0002Wk-WL (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Tue, 23 Aug 2011 22:19:25 +0100 Received: from [IPv6:2001:4dd0:fccf:0:e191:90c5:5e23:5f2] (unknown [IPv6:2001:4dd0:fccf:0:e191:90c5:5e23:5f2]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by travincal.necoro.eu (Postfix) with ESMTPSA id 992771BAC034 for ; Tue, 23 Aug 2011 23:19:22 +0200 (CEST) Message-ID: <4E541957.1050105 at necoro.eu> Date: Tue, 23 Aug 2011 23:19:19 +0200 From: =?UTF-8?B?UmVuw6kgTmV1bWFubg==?= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110808 Lightning/1.0b3pre Thunderbird/3.1.10 MIME-Version: 1.0 To: isabelle-users at cl.cam.ac.uk X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [isabelle] Function Termination X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Aug 2011 21:19:29 -0000 Status: O X-Status: X-Keywords: X-UID: 5871 Hi all, I had to define a function that needed its own proof of termination. Thereby I noticed an issue, I'd like to show by example: Let succs :: "('a =C3=97 'a) set =E2=87=92 'a =E2=87=92 'a set" and then define some example function "foo": function foo :: "('a =C3=97 'a) set =E2=87=92 'a =E2=87=92 nat =E2=87=92 = nat" where "foo E v n =3D (if n > 0 then fold (=CE=BBv'.=CE=BBn. if n =3D 0 then 0 else foo E v' n) (n - 1) (succs E v) else 0)" This function might f.ex. being seen as walking depth-first through a graph, doing at most n steps. The problem now arises when showing termination: A 'termination proof' wants me to show the following goal (the concrete measurement ?R should be unimportant to my issue, but should probably rely on n): =E2=8B=80E v n x xa. =E2=9F=A60 < n; xa =E2=89=A0 0=E2=9F=A7 =E2=9F=B9 ((= E, x, xa), E, v, n) =E2=88=88 ?R As you might notice there is no relation between xa and n, though it should be something like "xa =3D n - 1". Is it possible somehow to put the relation in again without doing some heavy rewriting of the function? (As this might work for one case but not for another) Thanks, Ren=C3=A9 From konrad.slind at gmail.com Tue Aug 23 23:59:14 2011 Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QvzwA-0006KO-UO (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Tue, 23 Aug 2011 23:59:14 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1160145 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.161.46 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (konrad.slind[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from * author's domain * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta1.cl.cam.ac.uk ([128.232.25.21]:47643) by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25) with esmtp id 1QvzwA-0001gg-Ee (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Tue, 23 Aug 2011 23:59:14 +0100 Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141]) by mta1.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1QvzwA-0007Iv-Fs for isabelle-users at cl.cam.ac.uk; Tue, 23 Aug 2011 23:59:14 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1160145 * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (konrad.slind[at]gmail.com) * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.161.46 listed in list.dnswl.dnsbl.ja.net] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from * author's domain * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-fx0-f46.google.com ([209.85.161.46]:48889) by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25) with esmtp (csa=unknown) id 1Qvzw7-0004PG-Q6 (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Tue, 23 Aug 2011 23:59:11 +0100 Received: by fxh19 with SMTP id 19so731506fxh.5 for ; Tue, 23 Aug 2011 15:59:07 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.9.154 with SMTP id l26mr3437961fal.36.1314140347800; Tue, 23 Aug 2011 15:59:07 -0700 (PDT) Received: by 10.223.143.65 with HTTP; Tue, 23 Aug 2011 15:59:07 -0700 (PDT) In-Reply-To: <4E541957.1050105 at necoro.eu> References: <4E541957.1050105 at necoro.eu> Date: Tue, 23 Aug 2011 17:59:07 -0500 Message-ID: From: Konrad Slind To: =?ISO-8859-1?Q?Ren=E9_Neumann?= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: isabelle-users at cl.cam.ac.uk Subject: Re: [isabelle] Function Termination X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Aug 2011 22:59:15 -0000 Status: O X-Status: X-Keywords: X-UID: 5872 Hi Rene, Since there is an occurrence of fold, you need to have a congruence rule for fold installed so the termination extraction machinery will do the right thing. I imagine the documentation discusses this. Cheers, Konrad. On Tue, Aug 23, 2011 at 4:19 PM, Ren=C3=A9 Neumann wrote: > Hi all, > > I had to define a function that needed its own proof of termination. > Thereby I noticed an issue, I'd like to show by example: > > Let succs :: "('a =C3=97 'a) set =E2=87=92 'a =E2=87=92 'a set" > and then define some example function "foo": > > function foo :: "('a =C3=97 'a) set =E2=87=92 'a =E2=87=92 nat =E2=87=92 = nat" where > "foo E v n =3D (if n > 0 then > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 fold (=CE=BBv'.=CE=BBn. = if n =3D 0 then 0 > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 else foo E v' n) (n - 1) (succs E v) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0else 0)" > > This function might f.ex. being seen as walking depth-first through a > graph, doing at most n steps. > > The problem now arises when showing termination: A 'termination proof' > wants me to show the following goal (the concrete measurement ?R should > be unimportant to my issue, but should probably rely on n): > > =E2=8B=80E v n x xa. =E2=9F=A60 < n; xa =E2=89=A0 0=E2=9F=A7 =E2=9F=B9 ((= E, x, xa), E, v, n) =E2=88=88 ?R > > As you might notice there is no relation between xa and n, though it > should be something like "xa =3D n - 1". > > Is it possible somehow to put the relation in again without doing some > heavy rewriting of the function? (As this might work for one case but > not for another) > > Thanks, > Ren=C3=A9 > > From munddr at gmail.com Wed Aug 24 00:03:06 2011 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1Qvzzu-0006UL-45 (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Wed, 24 Aug 2011 00:03:06 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1160145 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.212.46 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (munddr[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from * author's domain * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature * 0.0 T_TO_NO_BRKTS_FREEMAIL To: misformatted and free email service X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta0.cl.cam.ac.uk ([128.232.25.20]:35813) by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25) with esmtp id 1Qvzzt-0000X1-Yz (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Wed, 24 Aug 2011 00:03:06 +0100 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by mta0.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1Qvzzt-0006y9-PR for isabelle-users at cl.cam.ac.uk; Wed, 24 Aug 2011 00:03:05 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1160145 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.212.46 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (munddr[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from * author's domain * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature * 0.0 T_TO_NO_BRKTS_FREEMAIL To: misformatted and free email service X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-vw0-f46.google.com ([209.85.212.46]:52001) by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25) with esmtp (csa=unknown) id 1Qvzzs-0000Wm-YX (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Wed, 24 Aug 2011 00:03:05 +0100 Received: by vws1 with SMTP id 1so698160vws.5 for ; Tue, 23 Aug 2011 16:03:04 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.21.194 with SMTP id x2mr4640841vde.389.1314140583856; Tue, 23 Aug 2011 16:03:03 -0700 (PDT) Received: by 10.52.185.232 with HTTP; Tue, 23 Aug 2011 16:03:03 -0700 (PDT) Date: Wed, 24 Aug 2011 00:03:03 +0100 Message-ID: From: John Munroe To: isabelle-users at cl.cam.ac.uk Content-Type: text/plain; charset=ISO-8859-1 Subject: [isabelle] Subtyping X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Aug 2011 23:03:06 -0000 Status: O X-Status: X-Keywords: X-UID: 5873 Hi, I'm trying to define a function 'f' such that when the input is of type 'A' it gives true, but when it's of type 'B' it gives false: Would I need to make A and B subtypes of some parent type, say, 'P', and that 'f' is of type "P => bool"? I can't seem to find much documentation on subtyping. If I use type classes instead: class P classes A < P B < P I can't seem to define the type of 'f' in terms of neither A, B, or P. Any help on this will be much appreciated! Thanks John From tjm1983 at gmail.com Wed Aug 24 03:40:05 2011 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1Qw3Nt-0001VO-DQ (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Wed, 24 Aug 2011 03:40:05 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.6 from SpamAssassin-3.3.2-1160145 * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (tjm1983[at]gmail.com) * 0.1 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in * digit (tjm1983[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from * author's domain * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.160.174 listed in list.dnswl.dnsbl.ja.net] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta1.cl.cam.ac.uk ([128.232.25.21]:44313) by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25) with esmtp id 1Qw3Ns-0001DF-YQ (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Wed, 24 Aug 2011 03:40:05 +0100 Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141]) by mta1.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1Qw3Ns-0000Rl-Je for isabelle-users at cl.cam.ac.uk; Wed, 24 Aug 2011 03:40:04 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.6 from SpamAssassin-3.3.2-1160145 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.160.174 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (tjm1983[at]gmail.com) * 0.1 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in * digit (tjm1983[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from * author's domain * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-gy0-f174.google.com ([209.85.160.174]:52265) by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25) with esmtp (csa=unknown) id 1Qw3No-000879-Se (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Wed, 24 Aug 2011 03:40:01 +0100 Received: by gya6 with SMTP id 6so651377gya.5 for ; Tue, 23 Aug 2011 19:39:57 -0700 (PDT) Received: by 10.150.193.14 with SMTP id q14mr4312362ybf.366.1314153596961; Tue, 23 Aug 2011 19:39:56 -0700 (PDT) Received: from [192.168.1.34] (2.199.69.111.dynamic.snap.net.nz [111.69.199.2]) by mx.google.com with ESMTPS id j45sm883005yhe.8.2011.08.23.19.39.54 (version=SSLv3 cipher=OTHER); Tue, 23 Aug 2011 19:39:55 -0700 (PDT) Message-ID: <4E546478.7030708 at gmail.com> Date: Wed, 24 Aug 2011 14:39:52 +1200 From: "Tim (McKenzie) Makarios" User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110617 Thunderbird/3.1.11 MIME-Version: 1.0 To: John Munroe References: In-Reply-To: X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: isabelle-users at cl.cam.ac.uk Subject: Re: [isabelle] Subtyping X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Aug 2011 02:40:05 -0000 Status: O X-Status: X-Keywords: X-UID: 5874 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 24/08/11 11:03, John Munroe wrote: > Hi, > > I'm trying to define a function 'f' such that when the input is of > type 'A' it gives true, but when it's of type 'B' it gives false: > Would I need to make A and B subtypes of some parent type, say, 'P', > and that 'f' is of type "P => bool"? I can't seem to find much > documentation on subtyping. It sounds like you might want to use a sum type, so that the type "'p" is "'a + 'b". There was a discussion about this quite recently on this very list, starting here: http://tinyurl.com/3jzx3ny Then you could have something like "f p = \ a. p = Inl a" (but I haven't tested this). Tim <>< -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk5UZHMACgkQ/cBxZIxl6rmwnACfdWxXr+HPTl/8EOuAg0Y6j1Ai 378An1HvQucFMwMdkCUv4a+PtWuAXzbO =Z7Ie -----END PGP SIGNATURE----- From munddr at gmail.com Wed Aug 24 04:32:59 2011 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1Qw4D5-0001uZ-2B (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Wed, 24 Aug 2011 04:32:59 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1160145 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.212.46 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (munddr[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from * author's domain * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta1.cl.cam.ac.uk ([128.232.25.21]:55065) by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25) with esmtp id 1Qw4D4-0003hA-Xm (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Wed, 24 Aug 2011 04:32:59 +0100 Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141]) by mta1.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1Qw4D4-0001Iz-E4 for isabelle-users at cl.cam.ac.uk; Wed, 24 Aug 2011 04:32:58 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1160145 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.212.46 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (munddr[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from * author's domain * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-vw0-f46.google.com ([209.85.212.46]:45820) by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25) with esmtp (csa=unknown) id 1Qw4D0-0002iq-S4 (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Wed, 24 Aug 2011 04:32:55 +0100 Received: by vws1 with SMTP id 1so868332vws.5 for ; Tue, 23 Aug 2011 20:32:54 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.21.194 with SMTP id x2mr4955096vde.389.1314156773896; Tue, 23 Aug 2011 20:32:53 -0700 (PDT) Received: by 10.52.185.232 with HTTP; Tue, 23 Aug 2011 20:32:53 -0700 (PDT) In-Reply-To: <4E546478.7030708 at gmail.com> References: <4E546478.7030708 at gmail.com> Date: Wed, 24 Aug 2011 04:32:53 +0100 Message-ID: From: John Munroe To: "Tim (McKenzie) Makarios" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: isabelle-users at cl.cam.ac.uk Subject: Re: [isabelle] Subtyping X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Aug 2011 03:32:59 -0000 Status: O X-Status: X-Keywords: X-UID: 5875 > > On 24/08/11 11:03, John Munroe wrote: >> Hi, >> >> I'm trying to define a function 'f' such that when the input is of >> type 'A' it gives true, but when it's of type 'B' it gives false: >> Would I need to make A and B subtypes of some parent type, say, 'P', >> and that 'f' is of type "P =3D> bool"? I can't seem to find much >> documentation on subtyping. > > It sounds like you might want to use a sum type, so that the type "'p" > is "'a + 'b". =A0There was a discussion about this quite recently on this > very list, starting here: http://tinyurl.com/3jzx3ny > > Then you could have something like "f p =3D \ a. p =3D Inl a" (bu= t I > haven't tested this). Thanks for that. I'm not certain if I properly understand "f p =3D \ a. p =3D Inl a". So, for my example, is the type of f "A + B =3D> bool"? This is what I have: typedecl A typedecl B axiomatization f :: "A + B =3D> bool" where ax1 : "f p =3D (EX a. p =3D Inl a)" consts a :: "A + 'b" lemma "f a =3D True" apply (simp add: ax1) ?? I can't seem to find out what Inl actually does. It's defined in Sum_Type to be "Inl =3D Abs_sum \ Inl_Rep", but I can't seem to find where Abs_sum is defined. Thanks John > > Tim > <>< > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.10 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAk5UZHMACgkQ/cBxZIxl6rmwnACfdWxXr+HPTl/8EOuAg0Y6j1Ai > 378An1HvQucFMwMdkCUv4a+PtWuAXzbO > =3DZ7Ie > -----END PGP SIGNATURE----- > From christian.sternagel at uibk.ac.at Wed Aug 24 09:48:41 2011 Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141]) by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1Qw98b-0003Nd-Ts (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Wed, 24 Aug 2011 09:48:41 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -3.1 from SpamAssassin-3.3.2-1160585 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [138.232.1.142 listed in list.dnswl.dnsbl.ja.net] * -0.5 RP_MATCHES_RCVD Envelope sender domain matches handover relay * domain * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta1.cl.cam.ac.uk ([128.232.25.21]:34686) by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25) with esmtp id 1Qw98b-0001TG-Qy (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Wed, 24 Aug 2011 09:48:41 +0100 Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141]) by mta1.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1Qw98b-0004G7-AS for isabelle-users at cl.cam.ac.uk; Wed, 24 Aug 2011 09:48:41 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -3.1 from SpamAssassin-3.3.2-1160585 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [138.232.1.142 listed in list.dnswl.dnsbl.ja.net] * -0.5 RP_MATCHES_RCVD Envelope sender domain matches handover relay * domain * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from lmr1.uibk.ac.at ([138.232.1.142]:47760 helo=smtp.uibk.ac.at) by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25) with esmtp (csa=unknown) id 1Qw98S-0001M8-Qv (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Wed, 24 Aug 2011 09:48:38 +0100 Received: from lap39-cl-c703.uibk.ac.at (ip212-238-46-3.hotspotsvankpn.com [212.238.46.3]) (authenticated bits=0) by smtp.uibk.ac.at (8.13.8/8.13.8/F1) with ESMTP id p7O8mAs0007801 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 24 Aug 2011 10:48:11 +0200 Message-ID: <4E54BACA.40700 at uibk.ac.at> Date: Wed, 24 Aug 2011 10:48:10 +0200 From: Christian Sternagel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0 MIME-Version: 1.0 To: John Munroe References: <4E546478.7030708 at gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: () -15.0 ALL_TRUSTED,RCV_SMTP_AUTH,RCV_SMTP_UIBK X-Scanned-By: MIMEDefang 2.61 at uibk.ac.at on 138.232.1.140 Cc: isabelle-users at cl.cam.ac.uk, "Tim \(McKenzie\) Makarios" Subject: Re: [isabelle] Subtyping X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Aug 2011 08:48:42 -0000 Status: O X-Status: X-Keywords: X-UID: 5876 (sorry for multiple copies) Hi there, I would refrain from going into the "implementation" level of the sum type (Abs_sum, Inl_rep) and just use pattern matching. The type A + B represents a type that incorporates values of type A /and/ values of type B. Since we are in a strongly typed setting we need a new type for this, which is essentially an algebraic datatype definable by (also the internal construction is different, I think) datatype 'a + 'b = Inl 'a | Inr 'b here the Inl and Inr are the left and right injections. To extract values you can just use pattern matching. fun is_Inl where is_Inl (Inl _) = True" | is_Inl (Inr _) = False" Hope this helps. cheers chris On 08/24/2011 05:32 AM, John Munroe wrote: >> >> On 24/08/11 11:03, John Munroe wrote: >>> Hi, >>> >>> I'm trying to define a function 'f' such that when the input is of >>> type 'A' it gives true, but when it's of type 'B' it gives false: >>> Would I need to make A and B subtypes of some parent type, say, 'P', >>> and that 'f' is of type "P => bool"? I can't seem to find much >>> documentation on subtyping. >> >> It sounds like you might want to use a sum type, so that the type "'p" >> is "'a + 'b". There was a discussion about this quite recently on this >> very list, starting here: http://tinyurl.com/3jzx3ny >> >> Then you could have something like "f p = \ a. p = Inl a" (but I >> haven't tested this). > > Thanks for that. I'm not certain if I properly understand "f p = > \ a. p = Inl a". So, for my example, is the type of f "A + B > => bool"? This is what I have: > > typedecl A > typedecl B > > axiomatization > f :: "A + B => bool" > where > ax1 : "f p = (EX a. p = Inl a)" > > consts a :: "A + 'b" > > lemma "f a = True" > apply (simp add: ax1) > ?? > > I can't seem to find out what Inl actually does. It's defined in > Sum_Type to be "Inl = Abs_sum \ Inl_Rep", but I can't seem to > find where Abs_sum is defined. > > Thanks > > John > >> >> Tim >> <>< >> -----BEGIN PGP SIGNATURE----- >> Version: GnuPG v1.4.10 (GNU/Linux) >> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ >> >> iEYEARECAAYFAk5UZHMACgkQ/cBxZIxl6rmwnACfdWxXr+HPTl/8EOuAg0Y6j1Ai >> 378An1HvQucFMwMdkCUv4a+PtWuAXzbO >> =Z7Ie >> -----END PGP SIGNATURE----- >> > > From munddr at gmail.com Wed Aug 24 15:27:53 2011 Received: from ppsw-50.csi.cam.ac.uk ([131.111.8.150]) by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QwEQr-0007LW-Kw (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Wed, 24 Aug 2011 15:27:53 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1160585 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.220.174 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (munddr[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from * author's domain * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta1.cl.cam.ac.uk ([128.232.25.21]:42135) by ppsw-50.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.147]:25) with esmtp id 1QwEQm-0002gF-ql (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Wed, 24 Aug 2011 15:27:53 +0100 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by mta1.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1QwEQm-0000yU-AG for isabelle-users at cl.cam.ac.uk; Wed, 24 Aug 2011 15:27:48 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1160585 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.220.174 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (munddr[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from * author's domain * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-vx0-f174.google.com ([209.85.220.174]:34332) by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25) with esmtp (csa=unknown) id 1QwEQi-0004rs-Y9 (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Wed, 24 Aug 2011 15:27:45 +0100 Received: by vxi9 with SMTP id 9so1342234vxi.5 for ; Wed, 24 Aug 2011 07:27:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.71.145 with SMTP id v17mr5723886vdu.322.1314196063933; Wed, 24 Aug 2011 07:27:43 -0700 (PDT) Received: by 10.52.185.232 with HTTP; Wed, 24 Aug 2011 07:27:43 -0700 (PDT) In-Reply-To: <4E54BA54.7090600 at gmail.com> References: <4E546478.7030708 at gmail.com> <4E54BA54.7090600 at gmail.com> Date: Wed, 24 Aug 2011 15:27:43 +0100 Message-ID: From: John Munroe To: Christian Sternagel Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: isabelle-users at cl.cam.ac.uk, "Tim \(McKenzie\) Makarios" Subject: Re: [isabelle] Subtyping X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Aug 2011 14:27:53 -0000 Status: O X-Status: X-Keywords: X-UID: 5877 Thanks for the reply. I've just tested datatype 'a + 'b =3D Inl 'a | Inr 'b but it complains about *** Outer syntax error: name declaration expected, *** but keyword + was found It works if I instead have datatype ('a, 'b) sum =3D Inl 'a | Inr 'b Should this produce the same effect? Using your is_Inl function, how should I then test that if a constant is of the type A, then is_Inl returns True? is_Inl takes an input of type 'a + 'b (or ('a,'b) sum, in my case), so how do I supply a constant of type A? Thanks John On Wed, Aug 24, 2011 at 9:46 AM, Christian Sternagel wrote: > Hi there, > > I would refrain from going into the "implementation" level of the sum typ= e > (Abs_sum, Inl_rep) and just use pattern matching. > > The type A + B represents a type that incorporates values of type A /and/ > values of type B. Since we are in a strongly typed setting we need a new > type for this, which is essentially an algebraic datatype definable by (a= lso > the internal construction is different, I think) > > datatype 'a + 'b =3D Inl 'a | Inr 'b > > here the Inl and Inr are the left and right injections. To extract values > you can just use pattern matching. > > fun is_Inl where > =A0is_Inl (Inl _) =3D True" > | is_Inl (Inr _) =3D False" > > Hope this helps. > > cheers > > chris > > On 08/24/2011 05:32 AM, John Munroe wrote: >>> >>> On 24/08/11 11:03, John Munroe wrote: >>>> >>>> Hi, >>>> >>>> I'm trying to define a function 'f' such that when the input is of >>>> type 'A' it gives true, but when it's of type 'B' it gives false: >>>> Would I need to make A and B subtypes of some parent type, say, 'P', >>>> and that 'f' is of type "P =3D> =A0bool"? I can't seem to find much >>>> documentation on subtyping. >>> >>> It sounds like you might want to use a sum type, so that the type "'p" >>> is "'a + 'b". =A0There was a discussion about this quite recently on th= is >>> very list, starting here: http://tinyurl.com/3jzx3ny >>> >>> Then you could have something like "f p =3D \ =A0a. p =3D Inl a= " (but I >>> haven't tested this). >> >> Thanks for that. I'm not certain if I properly understand "f p =3D >> \ =A0a. p =3D Inl a". So, for my example, is the type of f "A + = B >> =3D> =A0bool"? This is what I have: >> >> typedecl A >> typedecl B >> >> axiomatization >> f :: "A + B =3D> =A0bool" >> where >> ax1 : "f p =3D (EX a. p =3D Inl a)" >> >> consts a :: "A + 'b" >> >> lemma "f a =3D True" >> apply (simp add: ax1) >> ?? >> >> I can't seem to find out what Inl actually does. It's defined in >> Sum_Type to be "Inl =3D Abs_sum \ =A0Inl_Rep", but I can't seem to >> find where Abs_sum is defined. >> >> Thanks >> >> John >> >>> >>> Tim >>> <>< >>> -----BEGIN PGP SIGNATURE----- >>> Version: GnuPG v1.4.10 (GNU/Linux) >>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ >>> >>> iEYEARECAAYFAk5UZHMACgkQ/cBxZIxl6rmwnACfdWxXr+HPTl/8EOuAg0Y6j1Ai >>> 378An1HvQucFMwMdkCUv4a+PtWuAXzbO >>> =3DZ7Ie >>> -----END PGP SIGNATURE----- >>> >> >> > > From munddr at gmail.com Wed Aug 24 19:10:34 2011 Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141]) by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QwHuM-0003LT-IO (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Wed, 24 Aug 2011 19:10:34 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1160585 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.212.46 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (munddr[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from * author's domain * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta1.cl.cam.ac.uk ([128.232.25.21]:52987) by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25) with esmtp id 1QwHuL-0003v4-SZ (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Wed, 24 Aug 2011 19:10:34 +0100 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by mta1.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1QwHuL-0004Cj-Pt for isabelle-users at cl.cam.ac.uk; Wed, 24 Aug 2011 19:10:33 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1160585 * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (munddr[at]gmail.com) * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.212.46 listed in list.dnswl.dnsbl.ja.net] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from * author's domain * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-vw0-f46.google.com ([209.85.212.46]:63788) by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25) with esmtp (csa=unknown) id 1QwHuH-00051u-WX (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Wed, 24 Aug 2011 19:10:30 +0100 Received: by vws1 with SMTP id 1so1579294vws.5 for ; Wed, 24 Aug 2011 11:10:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.72.116 with SMTP id c20mr5329487vdv.188.1314209303400; Wed, 24 Aug 2011 11:08:23 -0700 (PDT) Received: by 10.52.185.232 with HTTP; Wed, 24 Aug 2011 11:08:23 -0700 (PDT) In-Reply-To: References: <4E546478.7030708 at gmail.com> <4E54BA54.7090600 at gmail.com> Date: Wed, 24 Aug 2011 19:08:23 +0100 Message-ID: From: John Munroe To: Christian Sternagel Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: isabelle-users at cl.cam.ac.uk, "Tim \(McKenzie\) Makarios" Subject: Re: [isabelle] Subtyping X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Aug 2011 18:10:34 -0000 Status: O X-Status: X-Keywords: X-UID: 5878 OK. I suspect I'm doing something wrong here, but here's what I have: typedecl A typedecl B datatype ('a, 'b) sum =3D Inl 'a | Inr 'b fun is_Inl where is1: "is_Inl (Inl _) =3D True" | is2: "is_Inl (Inr _) =3D False" axiomatization inst_parent_type :: "(A,B) sum" and inst_child_type :: A where ax1: "Inl inst_child_type =3D inst_parent_type" lemma "is_Inl inst_parent_type" apply (simp add: is1 ax1) I'm guessing that the lemma tests whether the type of 'inst_parent_type', i.e. (A,B) sum, has a left injection, i.e. whether there exists an instance of the "left" child type. Axiom ax1 asserts that 'inst_child_type' is the left injection. So, should the lemma be provable? This approach is supposed to imitate subtyping, but it seems to require that an instance of the "parent type" to be constructed in order to do any reasoning about subtypes. If I'm right, then it's somewhat more restrictive because such an instance must be first assumed to exist. Any clarification on this will be much appreciated! Thanks John On Wed, Aug 24, 2011 at 3:27 PM, John Munroe wrote: > Thanks for the reply. I've just tested > > datatype 'a + 'b =3D Inl 'a | Inr 'b > > but it complains about > > *** Outer syntax error: name declaration expected, > *** but keyword + was found > > It works if I instead have > > datatype ('a, 'b) sum =3D Inl 'a | Inr 'b > > Should this produce the same effect? > > Using your is_Inl function, how should I then test that if a constant > is of the type A, then is_Inl returns True? is_Inl takes an input of > type 'a + 'b (or ('a,'b) sum, in my case), so how do I supply a > constant of type A? > > Thanks > > John > > On Wed, Aug 24, 2011 at 9:46 AM, Christian Sternagel > wrote: >> Hi there, >> >> I would refrain from going into the "implementation" level of the sum ty= pe >> (Abs_sum, Inl_rep) and just use pattern matching. >> >> The type A + B represents a type that incorporates values of type A /and= / >> values of type B. Since we are in a strongly typed setting we need a new >> type for this, which is essentially an algebraic datatype definable by (= also >> the internal construction is different, I think) >> >> datatype 'a + 'b =3D Inl 'a | Inr 'b >> >> here the Inl and Inr are the left and right injections. To extract value= s >> you can just use pattern matching. >> >> fun is_Inl where >> =A0is_Inl (Inl _) =3D True" >> | is_Inl (Inr _) =3D False" >> >> Hope this helps. >> >> cheers >> >> chris >> >> On 08/24/2011 05:32 AM, John Munroe wrote: >>>> >>>> On 24/08/11 11:03, John Munroe wrote: >>>>> >>>>> Hi, >>>>> >>>>> I'm trying to define a function 'f' such that when the input is of >>>>> type 'A' it gives true, but when it's of type 'B' it gives false: >>>>> Would I need to make A and B subtypes of some parent type, say, 'P', >>>>> and that 'f' is of type "P =3D> =A0bool"? I can't seem to find much >>>>> documentation on subtyping. >>>> >>>> It sounds like you might want to use a sum type, so that the type "'p" >>>> is "'a + 'b". =A0There was a discussion about this quite recently on t= his >>>> very list, starting here: http://tinyurl.com/3jzx3ny >>>> >>>> Then you could have something like "f p =3D \ =A0a. p =3D Inl = a" (but I >>>> haven't tested this). >>> >>> Thanks for that. I'm not certain if I properly understand "f p =3D >>> \ =A0a. p =3D Inl a". So, for my example, is the type of f "A += B >>> =3D> =A0bool"? This is what I have: >>> >>> typedecl A >>> typedecl B >>> >>> axiomatization >>> f :: "A + B =3D> =A0bool" >>> where >>> ax1 : "f p =3D (EX a. p =3D Inl a)" >>> >>> consts a :: "A + 'b" >>> >>> lemma "f a =3D True" >>> apply (simp add: ax1) >>> ?? >>> >>> I can't seem to find out what Inl actually does. It's defined in >>> Sum_Type to be "Inl =3D Abs_sum \ =A0Inl_Rep", but I can't seem t= o >>> find where Abs_sum is defined. >>> >>> Thanks >>> >>> John >>> >>>> >>>> Tim >>>> <>< >>>> -----BEGIN PGP SIGNATURE----- >>>> Version: GnuPG v1.4.10 (GNU/Linux) >>>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ >>>> >>>> iEYEARECAAYFAk5UZHMACgkQ/cBxZIxl6rmwnACfdWxXr+HPTl/8EOuAg0Y6j1Ai >>>> 378An1HvQucFMwMdkCUv4a+PtWuAXzbO >>>> =3DZ7Ie >>>> -----END PGP SIGNATURE----- >>>> >>> >>> >> >> > From munddr at gmail.com Wed Aug 24 20:40:42 2011 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QwJJa-00049d-41 (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Wed, 24 Aug 2011 20:40:42 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1160585 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.213.46 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (munddr[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from * author's domain * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta1.cl.cam.ac.uk ([128.232.25.21]:51143) by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25) with esmtp id 1QwJJZ-0002AI-Yf (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Wed, 24 Aug 2011 20:40:42 +0100 Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141]) by mta1.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1QwJJZ-000549-MV for isabelle-users at cl.cam.ac.uk; Wed, 24 Aug 2011 20:40:41 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1160585 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.213.46 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (munddr[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from * author's domain * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-yw0-f46.google.com ([209.85.213.46]:45382) by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25) with esmtp (csa=unknown) id 1QwJJW-00019u-QT (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Wed, 24 Aug 2011 20:40:38 +0100 Received: by ywf7 with SMTP id 7so1292598ywf.5 for ; Wed, 24 Aug 2011 12:40:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.26.97 with SMTP id k1mr6129499vdg.523.1314214837490; Wed, 24 Aug 2011 12:40:37 -0700 (PDT) Received: by 10.52.185.232 with HTTP; Wed, 24 Aug 2011 12:40:37 -0700 (PDT) Date: Wed, 24 Aug 2011 20:40:37 +0100 Message-ID: From: John Munroe To: Florian Haftmann , isabelle-users at cl.cam.ac.uk Content-Type: text/plain; charset=ISO-8859-1 Subject: [isabelle] Overloading in locales X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Aug 2011 19:40:42 -0000 Status: O X-Status: X-Keywords: X-UID: 5879 Hi, Thanks for the pointer to overloading. Can the class declaring the class operation or the instantiation of the class be constructed within a locale? i.e., using the example in the tutorial: class plus = fixes plus :: "'a => 'a => 'a" instantiation nat :: plus begin primrec plus_nat :: "nat => nat => nat" where ... Can all or part of the overloading happen inside a locale rather than at the top level, e.g., can the instantiation of plus be created inside a locale? Also, if I were to overload a function 'foo' that returns true if the input is of type A and false if it's of type B, then is the following correct? class Foo = fixes foo :: "'a => bool" typedecl A typedecl B instantiation A :: Foo begin fun foo :: "A => bool" where "foo x = True" instance .. end instantiation B :: Foo begin fun foo :: "B => bool" where "foo x = False" instance .. end I believe the second instantiation duplicates the declaration of foo. Thanks for the help in advance. John From tjm1983 at gmail.com Thu Aug 25 01:52:30 2011 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QwOBK-0006gK-U0 (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Thu, 25 Aug 2011 01:52:30 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.6 from SpamAssassin-3.3.2-1160585 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.212.46 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (tjm1983[at]gmail.com) * 0.1 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in * digit (tjm1983[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from * author's domain * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta0.cl.cam.ac.uk ([128.232.25.20]:58760) by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25) with esmtp id 1QwOBK-0004bQ-XQ (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Thu, 25 Aug 2011 01:52:30 +0100 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by mta0.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1QwOBK-0005SB-9w for isabelle-users at cl.cam.ac.uk; Thu, 25 Aug 2011 01:52:30 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.6 from SpamAssassin-3.3.2-1160585 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.212.46 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (tjm1983[at]gmail.com) * 0.1 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in * digit (tjm1983[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from * author's domain * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-vw0-f46.google.com ([209.85.212.46]:57510) by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25) with esmtp (csa=unknown) id 1QwOBJ-0004BM-Xn (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Thu, 25 Aug 2011 01:52:30 +0100 Received: by vws1 with SMTP id 1so1997582vws.5 for ; Wed, 24 Aug 2011 17:52:25 -0700 (PDT) Received: by 10.52.20.133 with SMTP id n5mr5974689vde.302.1314233545612; Wed, 24 Aug 2011 17:52:25 -0700 (PDT) Received: from [192.168.1.34] (83.196.69.111.dynamic.snap.net.nz [111.69.196.83]) by mx.google.com with ESMTPS id o3sm19704vca.2.2011.08.24.17.52.22 (version=SSLv3 cipher=OTHER); Wed, 24 Aug 2011 17:52:23 -0700 (PDT) Message-ID: <4E559CC4.1080703 at gmail.com> Date: Thu, 25 Aug 2011 12:52:20 +1200 From: "Tim (McKenzie) Makarios" User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110617 Thunderbird/3.1.11 MIME-Version: 1.0 To: John Munroe References: <4E546478.7030708 at gmail.com> <4E54BA54.7090600 at gmail.com> In-Reply-To: X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: isabelle-users at cl.cam.ac.uk, Christian Sternagel Subject: Re: [isabelle] Subtyping X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Aug 2011 00:52:31 -0000 Status: O X-Status: X-Keywords: X-UID: 5880 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 25/08/11 06:08, John Munroe wrote: > OK. I suspect I'm doing something wrong here, but here's what I have: > > typedecl A > typedecl B > datatype ('a, 'b) sum = Inl 'a | Inr 'b > > fun is_Inl where > is1: "is_Inl (Inl _) = True" > | is2: "is_Inl (Inr _) = False" > > axiomatization > inst_parent_type :: "(A,B) sum" and > inst_child_type :: A > where > ax1: "Inl inst_child_type = inst_parent_type" > > > lemma "is_Inl inst_parent_type" > apply (simp add: is1 ax1) > > I'm guessing that the lemma tests whether the type of > 'inst_parent_type', i.e. (A,B) sum, has a left injection, i.e. whether > there exists an instance of the "left" child type. Axiom ax1 asserts > that 'inst_child_type' is the left injection. So, should the lemma be > provable? The lemma asserts that inst_parent_type is of the form "Inl a" for some a. It is provable "by (simp add: ax1 [symmetric])". > This approach is supposed to imitate subtyping, but it seems to > require that an instance of the "parent type" to be constructed in > order to do any reasoning about subtypes. If I'm right, then it's > somewhat more restrictive because such an instance must be first > assumed to exist. You don't need to assume anything. Whenever you've got an element a of type 'a, you've got a corresponding element "Inl a" of type "'a + 'b"; you don't need to assume this. Given any element c of type "'a + 'b", there is either - - exactly one element a of type 'a such that "c = Inl a" or - - exactly one element b of type 'b such that "c = Inr b" but not both. is_Inl tells you whether or not it's the first of these two possibilities. > Any clarification on this will be much appreciated! > > Thanks > > John I hope this has helped. Tim <>< -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk5VnL4ACgkQ/cBxZIxl6rmpnACfZY9urcaOfhUhfzBxJJ9ip+B3 Kv0AoNc9v9xGgMurYt6dez55S2rFCJIQ =EjHt -----END PGP SIGNATURE----- From munddr at gmail.com Thu Aug 25 02:08:03 2011 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QwOQN-0006nO-HG (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Thu, 25 Aug 2011 02:08:03 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1160585 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.212.46 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (munddr[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from * author's domain * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta1.cl.cam.ac.uk ([128.232.25.21]:39828) by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25) with esmtp id 1QwOQM-0007N9-Ys (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Thu, 25 Aug 2011 02:08:03 +0100 Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152]) by mta1.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1QwOQM-00081Z-Oi for isabelle-users at cl.cam.ac.uk; Thu, 25 Aug 2011 02:08:02 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1160585 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.212.46 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (munddr[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from * author's domain * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-vw0-f46.google.com ([209.85.212.46]:48257) by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25) with esmtp (csa=unknown) id 1QwOQI-0001c8-G6 (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Thu, 25 Aug 2011 02:07:59 +0100 Received: by vws1 with SMTP id 1so2015264vws.5 for ; Wed, 24 Aug 2011 18:07:55 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.90.67 with SMTP id bu3mr1681797vdb.456.1314234474274; Wed, 24 Aug 2011 18:07:54 -0700 (PDT) Received: by 10.52.185.232 with HTTP; Wed, 24 Aug 2011 18:07:54 -0700 (PDT) In-Reply-To: <4E559CC4.1080703 at gmail.com> References: <4E546478.7030708 at gmail.com> <4E54BA54.7090600 at gmail.com> <4E559CC4.1080703 at gmail.com> Date: Thu, 25 Aug 2011 02:07:54 +0100 Message-ID: From: John Munroe To: "Tim (McKenzie) Makarios" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: isabelle-users at cl.cam.ac.uk, Christian Sternagel Subject: Re: [isabelle] Subtyping X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Aug 2011 01:08:03 -0000 Status: O X-Status: X-Keywords: X-UID: 5881 Thanks so much. It surely has been helpful! One thing though: I can't define the datatype "'a + 'b" with datatype 'a + 'b =3D Inl 'a | Inr 'b It doesn't seem to like the '+' operator. Is using "datatype ('a,'b) sum" the only way? (I see that it doesn't have to be 'sum' but any arbitrary name seems to do.) Also, is the approach of using sum type more appropriate than overloading for my application? Would overloading allow the same effect to be produced, i.e. defining a function that gives True only if the input is of a particular type? Thanks again. John On Thu, Aug 25, 2011 at 1:52 AM, Tim (McKenzie) Makarios wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 25/08/11 06:08, John Munroe wrote: >> OK. I suspect I'm doing something wrong here, but here's what I have: >> >> typedecl A >> typedecl B >> datatype ('a, 'b) sum =3D Inl 'a | Inr 'b >> >> fun is_Inl where >> =A0 is1: "is_Inl (Inl _) =3D True" >> | is2: "is_Inl (Inr _) =3D False" >> >> axiomatization >> inst_parent_type :: "(A,B) sum" and >> inst_child_type :: A >> where >> ax1: "Inl inst_child_type =3D inst_parent_type" >> >> >> lemma "is_Inl inst_parent_type" >> apply (simp add: is1 ax1) >> >> I'm guessing that the lemma tests whether the type of >> 'inst_parent_type', i.e. (A,B) sum, has a left injection, i.e. whether >> there exists an instance of the "left" child type. Axiom ax1 asserts >> that 'inst_child_type' is the left injection. So, should the lemma be >> provable? > > The lemma asserts that inst_parent_type is of the form "Inl a" for some > a. =A0It is provable "by (simp add: ax1 [symmetric])". > >> This approach is supposed to imitate subtyping, but it seems to >> require that an instance of the "parent type" to be constructed in >> order to do any reasoning about subtypes. If I'm right, then it's >> somewhat more restrictive because such an instance must be first >> assumed to exist. > > You don't need to assume anything. =A0Whenever you've got an element a of > type 'a, you've got a corresponding element "Inl a" of type "'a + 'b"; > you don't need to assume this. > > Given any element c of type "'a + 'b", there is either > - - exactly one element a of type 'a such that "c =3D Inl a" or > - - exactly one element b of type 'b such that "c =3D Inr b" > but not both. =A0is_Inl tells you whether or not it's the first of these > two possibilities. > >> Any clarification on this will be much appreciated! >> >> Thanks >> >> John > > I hope this has helped. > > Tim > <>< > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.10 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAk5VnL4ACgkQ/cBxZIxl6rmpnACfZY9urcaOfhUhfzBxJJ9ip+B3 > Kv0AoNc9v9xGgMurYt6dez55S2rFCJIQ > =3DEjHt > -----END PGP SIGNATURE----- > From tjm1983 at gmail.com Thu Aug 25 02:58:33 2011 Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141]) by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QwPDF-0007JO-3r (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Thu, 25 Aug 2011 02:58:33 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.6 from SpamAssassin-3.3.2-1160585 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.220.174 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (tjm1983[at]gmail.com) * 0.1 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in * digit (tjm1983[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from * author's domain * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta1.cl.cam.ac.uk ([128.232.25.21]:59625) by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25) with esmtp id 1QwPDC-00013V-Ql (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Thu, 25 Aug 2011 02:58:33 +0100 Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152]) by mta1.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1QwPDC-0008Ja-84 for isabelle-users at cl.cam.ac.uk; Thu, 25 Aug 2011 02:58:30 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.6 from SpamAssassin-3.3.2-1160585 * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (tjm1983[at]gmail.com) * 0.1 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in * digit (tjm1983[at]gmail.com) * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.220.174 listed in list.dnswl.dnsbl.ja.net] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from * author's domain * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-vx0-f174.google.com ([209.85.220.174]:44059) by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25) with esmtp (csa=unknown) id 1QwPD8-0003dz-EY (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Thu, 25 Aug 2011 02:58:27 +0100 Received: by vxi9 with SMTP id 9so1683145vxi.5 for ; Wed, 24 Aug 2011 18:58:25 -0700 (PDT) Received: by 10.52.22.229 with SMTP id h5mr5606062vdf.4.1314237505587; Wed, 24 Aug 2011 18:58:25 -0700 (PDT) Received: from [192.168.1.34] (83.196.69.111.dynamic.snap.net.nz [111.69.196.83]) by mx.google.com with ESMTPS id z9sm37018vco.14.2011.08.24.18.58.23 (version=SSLv3 cipher=OTHER); Wed, 24 Aug 2011 18:58:24 -0700 (PDT) Message-ID: <4E55AC3D.8060909 at gmail.com> Date: Thu, 25 Aug 2011 13:58:21 +1200 From: "Tim (McKenzie) Makarios" User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110617 Thunderbird/3.1.11 MIME-Version: 1.0 To: John Munroe References: <4E546478.7030708 at gmail.com> <4E54BA54.7090600 at gmail.com> <4E559CC4.1080703 at gmail.com> In-Reply-To: X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: isabelle-users at cl.cam.ac.uk, Christian Sternagel Subject: Re: [isabelle] Subtyping X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Aug 2011 01:58:33 -0000 Status: O X-Status: X-Keywords: X-UID: 5882 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 25/08/11 13:07, John Munroe wrote: > Thanks so much. It surely has been helpful! > > One thing though: I can't define the datatype "'a + 'b" with > > datatype 'a + 'b = Inl 'a | Inr 'b > > It doesn't seem to like the '+' operator. Is using "datatype ('a,'b) > sum" the only way? (I see that it doesn't have to be 'sum' but any > arbitrary name seems to do.) I don't think you need to define it. I'm pretty sure everything I said is true of the built-in sum type. However, Christian's suggestion of how it could be defined is useful to help understand how it works. If you use the built-in sum type, you can still define is_Inl as Christian suggested (a way I have little experience with), or you can define it like this: definition is_Inl :: "'a + 'b => bool" where "is_Inl x == \ a. x = Inl a" > Also, is the approach of using sum type more appropriate than > overloading for my application? Would overloading allow the same > effect to be produced, i.e. defining a function that gives True only > if the input is of a particular type? I don't have much experience with overloading, so I might let someone else answer this. But their answer might depend on what your intended application really is --- what do you want to use this for? Tim <>< -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk5VrDcACgkQ/cBxZIxl6rmq5QCcD0zBV6lXqzOkUHQETFj+3Y/4 uPoAoMXhC6dyoX+E9R+E7ehjtcLNr09A =wgW0 -----END PGP SIGNATURE----- From munddr at gmail.com Thu Aug 25 13:53:23 2011 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QwZQx-0005TY-Jo (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Thu, 25 Aug 2011 13:53:23 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1161015 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.212.46 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (munddr[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from * author's domain * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature * 0.0 T_TO_NO_BRKTS_FREEMAIL To: misformatted and free email service X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta1.cl.cam.ac.uk ([128.232.25.21]:42314) by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25) with esmtp id 1QwZQw-0006fU-YD (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Thu, 25 Aug 2011 13:53:23 +0100 Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152]) by mta1.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1QwZQw-0000f0-IE for isabelle-users at cl.cam.ac.uk; Thu, 25 Aug 2011 13:53:22 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1161015 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.212.46 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (munddr[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from * author's domain * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature * 0.0 T_TO_NO_BRKTS_FREEMAIL To: misformatted and free email service X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-vw0-f46.google.com ([209.85.212.46]:63988) by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25) with esmtp (csa=unknown) id 1QwZQt-0000W0-DN (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Thu, 25 Aug 2011 13:53:19 +0100 Received: by vws1 with SMTP id 1so2729413vws.5 for ; Thu, 25 Aug 2011 05:53:18 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.21.194 with SMTP id x2mr7260629vde.389.1314276798429; Thu, 25 Aug 2011 05:53:18 -0700 (PDT) Received: by 10.52.185.232 with HTTP; Thu, 25 Aug 2011 05:53:18 -0700 (PDT) Date: Thu, 25 Aug 2011 13:53:18 +0100 Message-ID: From: John Munroe To: isabelle-users at cl.cam.ac.uk Content-Type: text/plain; charset=ISO-8859-1 Subject: [isabelle] Various ways of overloading X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Aug 2011 12:53:23 -0000 Status: O X-Status: X-Keywords: X-UID: 5883 Hi all, I'm looking into overloading and it seems that consts/axioms already allow overloading: typedecl A consts g :: "'a => bool" a :: A axioms axA: "g (x::A) = True" axB: "g (x::B) = False" lemma "g a" using axA by auto whereas, axiomatization doesn't: axiomatization g :: "'a => bool" where axA: "g (x::A) = True" which gives a type unification error: *** Type unification failed *** *** Type error in application: incompatible operand type *** *** Operator: g::'a => bool :: 'a => bool *** Operand: x::A :: A Why is there such a discrepancy? Is it one of the reasons why consts/axioms are legacy features? The documentation seems to imply that overloading can only be achieved using type classes, but one could also do a similar thing in locales: consts g :: "'a => bool" locale L = assumes "g (x::A) = True" and "g (y::B) = False" Any advice on this will be much appreciated! Thanks John From florian.haftmann at informatik.tu-muenchen.de Thu Aug 25 20:45:13 2011 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QwfrV-0005ni-1p (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Thu, 25 Aug 2011 20:45:13 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.4 from SpamAssassin-3.3.2-1161015 * -0.5 RP_MATCHES_RCVD Envelope sender domain matches handover relay * domain * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-out1.informatik.tu-muenchen.de ([131.159.0.8]:57614) by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25) with esmtp (csa=unknown) id 1QwfrU-0002RH-WZ (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Thu, 25 Aug 2011 20:45:13 +0100 Received: from localhost (scanbroy [10.46.146.16]) by mailbroy.informatik.tu-muenchen.de (Postfix) with ESMTP id 82634804F329B for ; Thu, 25 Aug 2011 21:45:11 +0200 (CEST) X-Virus-Scanned: by amavisd-new using ClamAV at mailbroy.informatik.tu-muenchen.de Received: from mailbroy.informatik.tu-muenchen.de ([10.46.146.15]) by localhost (mailbroy.informatik.tu-muenchen.de [10.46.146.16]) (amavisd-new, port 10024) with ESMTP id quUJvI5On3jw for ; Thu, 25 Aug 2011 21:45:11 +0200 (CEST) Received: from [192.168.2.24] (p57A3359B.dip.t-dialin.net [87.163.53.155]) by mailbroy.informatik.tu-muenchen.de (Postfix) with ESMTPSA id 17226885ED004 for ; Thu, 25 Aug 2011 21:45:11 +0200 (CEST) Message-ID: <4E56A646.3050502 at informatik.tu-muenchen.de> Date: Thu, 25 Aug 2011 21:45:10 +0200 From: Florian Haftmann Organization: TU =?ISO-8859-1?Q?M=FCnchen=2C_Lehrstuhl_Software_and?= =?ISO-8859-1?Q?_Systems_Engineering?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.18) Gecko/20110617 Lightning/1.0b2 Thunderbird/3.1.11 MIME-Version: 1.0 To: cl-isabelle-users at lists.cam.ac.uk References: In-Reply-To: X-Enigmail-Version: 1.1.2 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig05F590006D841724727BA5A9" Subject: Re: [isabelle] Overloading in locales X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Aug 2011 19:45:13 -0000 Status: O X-Status: X-Keywords: X-UID: 5884 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig05F590006D841724727BA5A9 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi John, > Thanks for the pointer to overloading. Can the class declaring the > class operation or the instantiation of the class be constructed > within a locale?=20 > Can all or part of the overloading happen inside a locale rather than > at the top level, e.g., can the instantiation of plus be created > inside a locale? Class instantiations are always global, since there is no concept of =BBlocal sort algebra=AB or such in Isabelle. > Also, if I were to overload a function 'foo' that returns true if the > input is of type A and false if it's of type B, then is the following > correct? Rule of thumb: Try out and report if you get into problems ;-) Regards, Florian --=20 Home: http://www.in.tum.de/~haftmann PGP available: http://home.informatik.tu-muenchen.de/haftmann/pgp/florian_haftmann_at_in= formatik_tu_muenchen_de --------------enig05F590006D841724727BA5A9 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk5WpkYACgkQZEASYmKQGuG52QCfayVznpTDH+0htIBxh439QHqk KzMAoNoOhwWK+GxDLhyERK6n1YGU9WVq =0PKi -----END PGP SIGNATURE----- --------------enig05F590006D841724727BA5A9-- From florian.haftmann at informatik.tu-muenchen.de Thu Aug 25 21:00:10 2011 Received: from ppsw-50.csi.cam.ac.uk ([131.111.8.150]) by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1Qwg5y-0005vP-1Z (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Thu, 25 Aug 2011 21:00:10 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.4 from SpamAssassin-3.3.2-1161015 * -0.5 RP_MATCHES_RCVD Envelope sender domain matches handover relay * domain * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-out1.informatik.tu-muenchen.de ([131.159.0.8]:58815) by ppsw-50.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.147]:25) with esmtp (csa=unknown) id 1Qwg5x-0001m0-qG (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Thu, 25 Aug 2011 21:00:09 +0100 Received: from localhost (scanbroy [10.46.146.16]) by mailbroy.informatik.tu-muenchen.de (Postfix) with ESMTP id A6B438386F01F for ; Thu, 25 Aug 2011 22:00:08 +0200 (CEST) X-Virus-Scanned: by amavisd-new using ClamAV at mailbroy.informatik.tu-muenchen.de Received: from mailbroy.informatik.tu-muenchen.de ([10.46.146.15]) by localhost (mailbroy.informatik.tu-muenchen.de [10.46.146.16]) (amavisd-new, port 10024) with ESMTP id qcoESXveIWE9 for ; Thu, 25 Aug 2011 22:00:08 +0200 (CEST) Received: from [192.168.2.24] (p57A3359B.dip.t-dialin.net [87.163.53.155]) by mailbroy.informatik.tu-muenchen.de (Postfix) with ESMTPSA id 3CC6B80BE105C for ; Thu, 25 Aug 2011 22:00:08 +0200 (CEST) Message-ID: <4E56A9C7.6000904 at informatik.tu-muenchen.de> Date: Thu, 25 Aug 2011 22:00:07 +0200 From: Florian Haftmann Organization: TU =?ISO-8859-1?Q?M=FCnchen=2C_Lehrstuhl_Software_and?= =?ISO-8859-1?Q?_Systems_Engineering?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.18) Gecko/20110617 Lightning/1.0b2 Thunderbird/3.1.11 MIME-Version: 1.0 To: cl-isabelle-users at lists.cam.ac.uk References: In-Reply-To: X-Enigmail-Version: 1.1.2 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig9573185FC1311A80046C63B7" Subject: Re: [isabelle] Various ways of overloading X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Aug 2011 20:00:10 -0000 Status: O X-Status: X-Keywords: X-UID: 5885 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig9573185FC1311A80046C63B7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable > I'm looking into overloading and it seems that consts/axioms already > allow overloading: >=20 > typedecl A >=20 > consts > g :: "'a =3D> bool" > a :: A >=20 > axioms > axA: "g (x::A) =3D True" > axB: "g (x::B) =3D False" Well, no wonder: axioms allow you to specify everything. Overloaded definitions are also part of the logical primitives, but type classes provide a neat integrated interface, which internally maps again on overloaded definitions. > axiomatization > g :: "'a =3D> bool" > where axA: "g (x::A) =3D True" By giving an explicit constant specification, you specify a *new* constant to be declared, and its type signature (with type variables locally fixed) must match its occurences in axiom propositions. Without the constant specification, =BBaxiomatization=AB will just state = an axiom. > The documentation seems to imply > that overloading can only be achieved using type classes The tutorial describes typical mechanisms for the end user. The more primitive interfaces are covered in the Isar Reference Manual. > but one > could also do a similar thing in locales: >=20 > consts > g :: "'a =3D> bool" >=20 > locale L =3D > assumes "g (x::A) =3D True" and > "g (y::B) =3D False" In locale assumptions, you can state everything since it is only hypothetical. The question is whether you can give an interpretation actually satisfying the assumptions. Regards, Florian --=20 Home: http://www.in.tum.de/~haftmann PGP available: http://home.informatik.tu-muenchen.de/haftmann/pgp/florian_haftmann_at_in= formatik_tu_muenchen_de --------------enig9573185FC1311A80046C63B7 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk5WqccACgkQZEASYmKQGuG88gCfXxG1lNubTf5MmZWvC0n0qMZh OcoAoIQsjtP3SyUoXvJ23hjuKnFkseLp =Yl9u -----END PGP SIGNATURE----- --------------enig9573185FC1311A80046C63B7-- From makarius at sketis.net Fri Aug 26 12:27:01 2011 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QwuYv-0002U1-Id (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Fri, 26 Aug 2011 12:27:01 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1161446 * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta0.cl.cam.ac.uk ([128.232.25.20]:56386) by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25) with esmtp id 1QwuYv-0005St-Wr (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Fri, 26 Aug 2011 12:27:01 +0100 Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141]) by mta0.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1QwuYv-0001eP-3f for isabelle-users at cl.cam.ac.uk; Fri, 26 Aug 2011 12:27:01 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1161446 * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-out1.informatik.tu-muenchen.de ([131.159.0.8]:40117) by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25) with esmtp (csa=unknown) id 1QwuYu-00082D-SD (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Fri, 26 Aug 2011 12:27:01 +0100 Received: from localhost (scanbroy [10.46.146.16]) by mailbroy.informatik.tu-muenchen.de (Postfix) with ESMTP id 2B864896A282C; Fri, 26 Aug 2011 13:27:00 +0200 (CEST) X-Virus-Scanned: by amavisd-new using ClamAV at mailbroy.informatik.tu-muenchen.de Received: from mailbroy.informatik.tu-muenchen.de ([10.46.146.15]) by localhost (mailbroy.informatik.tu-muenchen.de [10.46.146.16]) (amavisd-new, port 10024) with ESMTP id xosFoTfOW5PV; Fri, 26 Aug 2011 13:27:00 +0200 (CEST) Received: from atbroy100.informatik.tu-muenchen.de (atbroy100.informatik.tu-muenchen.de [131.159.47.193]) by mailbroy.informatik.tu-muenchen.de (Postfix) with ESMTPS id ED8FC896A1016; Fri, 26 Aug 2011 13:26:59 +0200 (CEST) Date: Fri, 26 Aug 2011 13:26:47 +0200 (CEST) From: Makarius X-X-Sender: wenzelm at atbroy100.informatik.tu-muenchen.de To: Steve Wong In-Reply-To: Message-ID: References: User-Agent: Alpine 1.10 (LNX 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: isabelle-users at cl.cam.ac.uk Subject: Re: [isabelle] [isabelle-dev] Malformed YXML encoding X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Aug 2011 11:27:01 -0000 Status: O X-Status: X-Keywords: X-UID: 5886 On Fri, 26 Aug 2011, Steve Wong wrote: > I'm trying to generate a proof goal from string using the following: I am answering this on isabelle-users, because it is a perfectly normal user question. (Using ML alone does not mean it is relevant for isabelle-dev.) > fun generate x lthy = > let > val thy = Local_Theory.exit_global lthy > val ctxt = ProofContext.init_global thy > in This is a bit odd. You can use lthy, which is called "auxiliary context" in local theory parlance directly as your context for the subsequent operations. A lthy: local_theory is a semantic subtype of ctxt: Proof.context, and the lthy naming convention is used whenever actual local theory operations follow, like the subsequent Specification.theorem_cmd. > (Specification.theorem_cmd > Thm.lemmaK NONE (K I) > (Binding.name "", []) [] > > (Element.Shows [(Attrib.empty_binding, > [(Syntax.string_of_term ctxt @{term "F"} ^ " = > " ^ > Syntax.string_of_term ctxt @{term "G"} > > , [])])]) x lthy) > end > *** Malformed YXML encoding: multiple results > *** At command "verify_with" Syntax.string_of_term turns internal formal entities (terms) into external text representation for user-consumption. For historic reasons the string type is used here, but it is in fact some kind of quasi-abstract datatype for marked-up document content. In general it is not allowed either to split text input that is passed in or paste together text that is passed out of the formal environment. Working with string interfaces for formal entities was never robust, even 20 years ago, but now the fragility has become immediately apparent. When "generating" things, you should always use the regular non-text versions of tools and packages. (Sometines people forget to provide them, but for almost everything in the regular Isabelle distribution there is such a proper non-text version, taking directly typ and term values etc.) Anyway, instead of Specification.theorem it is probably easier to use Proof.theorem, although you need to store the result yourself in the "after_qed" continuation. Makarius From alfio.martini at gmail.com Fri Aug 26 12:57:06 2011 Received: from ppsw-50.csi.cam.ac.uk ([131.111.8.150]) by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1Qwv22-00034W-4G (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Fri, 26 Aug 2011 12:57:06 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.6 from SpamAssassin-3.3.2-1161446 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [74.125.82.174 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (alfio.martini[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 HTML_MESSAGE BODY: HTML included in message * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature * 0.0 T_TO_NO_BRKTS_FREEMAIL To: misformatted and free email service X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta1.cl.cam.ac.uk ([128.232.25.21]:41396) by ppsw-50.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.147]:25) with esmtp id 1Qwv21-0000gW-rk (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Fri, 26 Aug 2011 12:57:06 +0100 Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152]) by mta1.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1Qwv21-0000R9-Jb for isabelle-users at cl.cam.ac.uk; Fri, 26 Aug 2011 12:57:05 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.6 from SpamAssassin-3.3.2-1161446 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [74.125.82.174 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (alfio.martini[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 HTML_MESSAGE BODY: HTML included in message * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature * 0.0 T_TO_NO_BRKTS_FREEMAIL To: misformatted and free email service X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-wy0-f174.google.com ([74.125.82.174]:56888) by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25) with esmtp (csa=unknown) id 1Qwv1x-00017v-Fr (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Fri, 26 Aug 2011 12:57:02 +0100 Received: by wyg24 with SMTP id 24so3037543wyg.5 for ; Fri, 26 Aug 2011 04:56:58 -0700 (PDT) MIME-Version: 1.0 Received: by 10.227.147.5 with SMTP id j5mr831893wbv.109.1314359818634; Fri, 26 Aug 2011 04:56:58 -0700 (PDT) Sender: alfio.martini at gmail.com Received: by 10.227.205.141 with HTTP; Fri, 26 Aug 2011 04:56:58 -0700 (PDT) Date: Fri, 26 Aug 2011 08:56:58 -0300 X-Google-Sender-Auth: _VHl49yKxJ5TvruAtc0_L7IOVwI Message-ID: From: Alfio Martini To: isabelle-users at cl.cam.ac.uk Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.8 Subject: [isabelle] Isabelle2011: Where is that locked region (stronger) blue in PG? X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Aug 2011 11:57:06 -0000 Status: O X-Status: X-Keywords: X-UID: 5887 Dear Isabelle Users, Yesterday I downloaded Isabelle2011 to give it a try. Everything works fine (it is quite fast, indeed) up to Proof General behavior (at least to my expectations). The usual locked processed region is now with a very faint blue (not the usual classic one), which for me is almost impossible to see. Now we have a (kind of) black cursor at the left of the window showing the next part of the buffer to be processed (?). At the beginning I thought it was something to do with PG 4.1, but when I use Isabelle2009-2 with PG 4.1, that lovely stronger blue is back. Can anybody help me to get back that good-old fashioned PG stronger blue when using Isabelle2011? It is so catchy, at least for me, and without it ,the whole experience becomes very questionable :-). Thanks anyway! PS: I expect it to be something very simple and almost silly. -- Alfio Ricardo Martini PhD in Computer Science (TU Berlin) Associate Professor at Faculty of Informatics (PUCRS) Porto Alegre - RS - Brasil From s.wong.731 at gmail.com Fri Aug 26 13:07:23 2011 Received: from ppsw-50.csi.cam.ac.uk ([131.111.8.150]) by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QwvBz-0003G8-3K (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Fri, 26 Aug 2011 13:07:23 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.6 from SpamAssassin-3.3.2-1161446 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.216.181 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (s.wong.731[at]gmail.com) * 0.1 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in * digit (s.wong.731[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 HTML_MESSAGE BODY: HTML included in message * -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from * author's domain * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta1.cl.cam.ac.uk ([128.232.25.21]:45341) by ppsw-50.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.147]:25) with esmtp id 1QwvBy-0004mE-rg (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Fri, 26 Aug 2011 13:07:23 +0100 Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141]) by mta1.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1QwvBy-0000Zg-JF for isabelle-users at cl.cam.ac.uk; Fri, 26 Aug 2011 13:07:22 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.6 from SpamAssassin-3.3.2-1161446 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.216.181 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (s.wong.731[at]gmail.com) * 0.1 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in * digit (s.wong.731[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 HTML_MESSAGE BODY: HTML included in message * -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from * author's domain * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-qy0-f181.google.com ([209.85.216.181]:46175) by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25) with esmtp (csa=unknown) id 1QwvBt-0006FJ-SE (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Fri, 26 Aug 2011 13:07:19 +0100 Received: by qyk34 with SMTP id 34so2486588qyk.5 for ; Fri, 26 Aug 2011 05:07:14 -0700 (PDT) MIME-Version: 1.0 Received: by 10.43.134.10 with SMTP id ia10mr1003641icc.339.1314360433949; Fri, 26 Aug 2011 05:07:13 -0700 (PDT) Received: by 10.42.222.197 with HTTP; Fri, 26 Aug 2011 05:07:13 -0700 (PDT) In-Reply-To: References: Date: Fri, 26 Aug 2011 13:07:13 +0100 Message-ID: From: Steve Wong To: Makarius Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.8 Cc: isabelle-users at cl.cam.ac.uk Subject: Re: [isabelle] [isabelle-dev] Malformed YXML encoding X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Aug 2011 12:07:23 -0000 Status: O X-Status: X-Keywords: X-UID: 5888 On Fri, Aug 26, 2011 at 12:26 PM, Makarius wrote: > On Fri, 26 Aug 2011, Steve Wong wrote: > > > Syntax.string_of_term turns internal formal entities (terms) into external > text representation for user-consumption. For historic reasons the string > type is used here, but it is in fact some kind of quasi-abstract datatype > for marked-up document content. In general it is not allowed either to > split text input that is passed in or paste together text that is passed out > of the formal environment. > > Working with string interfaces for formal entities was never robust, even > 20 years ago, but now the fragility has become immediately apparent. When > "generating" things, you should always use the regular non-text versions of > tools and packages. (Sometines people forget to provide them, but for > almost everything in the regular Isabelle distribution there is such a > proper non-text version, taking directly typ and term values etc.) > > Anyway, instead of Specification.theorem it is probably easier to use > Proof.theorem, although you need to store the result yourself in the > "after_qed" continuation. > > Thanks a lot for that. So, which are the tools recommended for constructing new terms (based on some existing terms)? Are you referring to functions like dest_Free in term.ML, i.e. destruct a term into parts and then create a new term from ground up? Thanks again. Steve > Makarius > > From huffman.brian.c at gmail.com Fri Aug 26 14:11:35 2011 Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141]) by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QwwC7-0004TK-1I (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Fri, 26 Aug 2011 14:11:35 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.6 from SpamAssassin-3.3.2-1161446 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [74.125.82.174 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (huffman.brian.c[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta0.cl.cam.ac.uk ([128.232.25.20]:51159) by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25) with esmtp id 1QwwC6-0001ER-QJ (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Fri, 26 Aug 2011 14:11:35 +0100 Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152]) by mta0.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1QwwC6-0003vQ-3c for isabelle-users at cl.cam.ac.uk; Fri, 26 Aug 2011 14:11:34 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.6 from SpamAssassin-3.3.2-1161446 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [74.125.82.174 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (huffman.brian.c[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-wy0-f174.google.com ([74.125.82.174]:43707) by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25) with esmtp (csa=unknown) id 1QwwC4-0004Lk-Do (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Fri, 26 Aug 2011 14:11:34 +0100 Received: by wyg24 with SMTP id 24so3101894wyg.5 for ; Fri, 26 Aug 2011 06:11:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.71.76 with SMTP id q54mr869671wed.83.1314364288807; Fri, 26 Aug 2011 06:11:28 -0700 (PDT) Sender: huffman.brian.c at gmail.com Received: by 10.216.88.131 with HTTP; Fri, 26 Aug 2011 06:11:28 -0700 (PDT) In-Reply-To: References: Date: Fri, 26 Aug 2011 06:11:28 -0700 X-Google-Sender-Auth: zgkfZ5Pd-EmOPTusNaTLUkWTH8A Message-ID: From: Brian Huffman To: Alfio Martini Content-Type: text/plain; charset=ISO-8859-1 Cc: isabelle-users at cl.cam.ac.uk Subject: Re: [isabelle] Isabelle2011: Where is that locked region (stronger) blue in PG? X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Aug 2011 13:11:35 -0000 Status: O X-Status: X-Keywords: X-UID: 5889 On Fri, Aug 26, 2011 at 4:56 AM, Alfio Martini wrote: > Can anybody help me to get back that good-old fashioned PG stronger blue > when using Isabelle2011? In emacs, try customizing the face called "proof-locked-face". If you have a setting for this saved in your .emacs file, it should override any defaults that the various Isabelle versions may have. - Brian From s.wong.731 at gmail.com Fri Aug 26 17:58:55 2011 Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152]) by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1Qwzk7-0001rd-Gl (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Fri, 26 Aug 2011 17:58:55 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.6 from SpamAssassin-3.3.2-1161446 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.213.46 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (s.wong.731[at]gmail.com) * 0.1 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in * digit (s.wong.731[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 HTML_MESSAGE BODY: HTML included in message * -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from * author's domain * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta0.cl.cam.ac.uk ([128.232.25.20]:56302) by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25) with esmtp id 1Qwzk7-0003Ur-DG (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Fri, 26 Aug 2011 17:58:55 +0100 Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141]) by mta0.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1Qwzk7-0003Uv-27 for isabelle-users at cl.cam.ac.uk; Fri, 26 Aug 2011 17:58:55 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.6 from SpamAssassin-3.3.2-1161446 * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (s.wong.731[at]gmail.com) * 0.1 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in * digit (s.wong.731[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 HTML_MESSAGE BODY: HTML included in message * -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from * author's domain * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.213.46 listed in list.dnswl.dnsbl.ja.net] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-yw0-f46.google.com ([209.85.213.46]:44807) by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25) with esmtp (csa=unknown) id 1Qwzk6-0007E5-R7 (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Fri, 26 Aug 2011 17:58:54 +0100 Received: by ywf7 with SMTP id 7so3458800ywf.5 for ; Fri, 26 Aug 2011 09:58:53 -0700 (PDT) MIME-Version: 1.0 Received: by 10.236.72.169 with SMTP id t29mr7960439yhd.110.1314377933653; Fri, 26 Aug 2011 09:58:53 -0700 (PDT) Received: by 10.146.168.20 with HTTP; Fri, 26 Aug 2011 09:58:53 -0700 (PDT) Date: Fri, 26 Aug 2011 17:58:53 +0100 Message-ID: From: Steve Wong To: isabelle-users Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.8 Subject: [isabelle] Better way to beta apply two terms X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Aug 2011 16:58:55 -0000 Status: O X-Status: X-Keywords: X-UID: 5890 Hi, What is a better way to beta-apply two terms without using betapply, which can cause a type mismatch. For example: consts a :: nat F :: "'a => nat" ML {* val ftrm = @{term "F"}; val atrm = @{term "a"}; val res = betapply((ftrm,atrm)); type_of res *} The application succeeds, but the resulting term isn't well-typed (thus type_of fails). betapply doesn't seem to change the input type of F from a variable to "Nat.nat". Is there a better way of beta applying such that the input type can automatically be updated? Thanks for the help in advance! Steve From Thomas.Genet at irisa.fr Sun Aug 28 15:21:03 2011 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QxgER-000271-Dp (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Sun, 28 Aug 2011 15:21:03 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -6.9 from SpamAssassin-3.3.2-1162027 * -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high * trust * [192.134.164.105 listed in list.dnswl.dnsbl.ja.net] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta1.cl.cam.ac.uk ([128.232.25.21]:38153) by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25) with esmtp id 1QxgEQ-0002xU-YY (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Sun, 28 Aug 2011 15:21:03 +0100 Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152]) by mta1.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1QxgEQ-0004L5-Lb for isabelle-users at cl.cam.ac.uk; Sun, 28 Aug 2011 15:21:02 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -6.9 from SpamAssassin-3.3.2-1162027 * -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high * trust * [192.134.164.105 listed in list.dnswl.dnsbl.ja.net] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail4-relais-sop.national.inria.fr ([192.134.164.105]:49180) by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25) with esmtp (csa=unknown) id 1QxgEM-0002PC-Fx (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Sun, 28 Aug 2011 15:20:59 +0100 X-IronPort-AV: E=Sophos;i="4.68,292,1312149600"; d="scan'208";a="106869294" Received: from mal35-2-82-228-176-233.fbx.proxad.net (HELO macbook-de-thomas-genet.local) ([82.228.176.233]) by mail4-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-CAMELLIA256-SHA; 28 Aug 2011 16:20:58 +0200 Message-ID: <4E5A4EC9.1060700 at irisa.fr> Date: Sun, 28 Aug 2011 16:20:57 +0200 From: Thomas Genet User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: Florian Haftmann References: <4E43D27B.3040306 at informatik.tu-muenchen.de> In-Reply-To: <4E43D27B.3040306 at informatik.tu-muenchen.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: USR Isabelle Mailinglist Subject: Re: [isabelle] Scala Code Generation X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Aug 2011 14:21:03 -0000 Status: O X-Status: X-Keywords: X-UID: 5891 Le 11/08/11 15:00, Florian Haftmann a écrit : > Hi all, > > since Isabelle2011 there is the possibility to generate Scala code from > HOL theories. Some minor problems can be circumvented by a suitable > patch and will disappear in the next release. > > Apart from that, is there any further feedback (positive or negative) on > code generation for Scala? I would like to announce it on the Scala > mailing list after the next release, but for this I need some evidence > that it is really working. > > Thanks for any feedback, > Florian Dear Florian, as I already mentioned to you, we will use Isabelle2011 and Scala export for teaching on the second semester here at Rennes 1 University at master level. We already experimented a bit with the scala export in order to integrate formally developed components (in Isabelle) into Java software. For the moment everything is OK... but it is true that we will use only simple things: integers, strings, lists, etc... no exotic Isabelle theory :-) Best regards, Thomas -- Thomas Genet ISTIC/IRISA Campus de Beaulieu, 35042 Rennes cedex, France Tél: +33 (0) 2 99 84 73 44 E-mail: genet at irisa.fr http://www.irisa.fr/celtique/genet From alfio.martini at gmail.com Sun Aug 28 21:36:31 2011 Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152]) by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1Qxm5n-0006av-D1 (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Sun, 28 Aug 2011 21:36:31 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.6 from SpamAssassin-3.3.2-1162027 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [74.125.82.174 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (alfio.martini[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 HTML_MESSAGE BODY: HTML included in message * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta1.cl.cam.ac.uk ([128.232.25.21]:48605) by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25) with esmtp id 1Qxm5m-0002Ho-FK (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Sun, 28 Aug 2011 21:36:31 +0100 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by mta1.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1Qxm5m-0001c8-Jq for isabelle-users at cl.cam.ac.uk; Sun, 28 Aug 2011 21:36:30 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.6 from SpamAssassin-3.3.2-1162027 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [74.125.82.174 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (alfio.martini[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 HTML_MESSAGE BODY: HTML included in message * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-wy0-f174.google.com ([74.125.82.174]:55779) by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25) with esmtp (csa=unknown) id 1Qxm5i-0006eT-ZI (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Sun, 28 Aug 2011 21:36:27 +0100 Received: by wyg24 with SMTP id 24so4466799wyg.5 for ; Sun, 28 Aug 2011 13:36:26 -0700 (PDT) MIME-Version: 1.0 Received: by 10.227.42.75 with SMTP id r11mr3048967wbe.79.1314563786662; Sun, 28 Aug 2011 13:36:26 -0700 (PDT) Sender: alfio.martini at gmail.com Received: by 10.227.205.141 with HTTP; Sun, 28 Aug 2011 13:36:26 -0700 (PDT) In-Reply-To: References: Date: Sun, 28 Aug 2011 17:36:26 -0300 X-Google-Sender-Auth: gFWXbmVJE6cS_B_GToWnP02ZKTU Message-ID: From: Alfio Martini To: Brian Huffman Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.8 Cc: isabelle-users at cl.cam.ac.uk Subject: Re: [isabelle] Isabelle2011: Where is that locked region (stronger) blue in PG? X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Aug 2011 20:36:31 -0000 Status: O X-Status: X-Keywords: X-UID: 5892 Thanks Brian. I found it: "Cornflower Blue". Now I can rest in piece. Cheers On Fri, Aug 26, 2011 at 10:11 AM, Brian Huffman wrote: > On Fri, Aug 26, 2011 at 4:56 AM, Alfio Martini > wrote: > > Can anybody help me to get back that good-old fashioned PG stronger blue > > when using Isabelle2011? > > In emacs, try customizing the face called "proof-locked-face". If you > have a setting for this saved in your .emacs file, it should override > any defaults that the various Isabelle versions may have. > > - Brian > -- Alfio Ricardo Martini PhD in Computer Science (TU Berlin) Associate Professor at Faculty of Informatics (PUCRS) Porto Alegre - RS - Brasil From munddr at gmail.com Mon Aug 29 06:41:37 2011 Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152]) by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QxubJ-0004IE-5D (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Mon, 29 Aug 2011 06:41:37 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1162027 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.220.174 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (munddr[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 HTML_MESSAGE BODY: HTML included in message * -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from * author's domain * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature * 0.0 T_TO_NO_BRKTS_FREEMAIL To: misformatted and free email service X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta0.cl.cam.ac.uk ([128.232.25.20]:57612) by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25) with esmtp id 1QxubI-0007gS-FZ (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Mon, 29 Aug 2011 06:41:37 +0100 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by mta0.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1QxubI-0004bx-P0 for isabelle-users at cl.cam.ac.uk; Mon, 29 Aug 2011 06:41:36 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1162027 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.220.174 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (munddr[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 HTML_MESSAGE BODY: HTML included in message * -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from * author's domain * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature * 0.0 T_TO_NO_BRKTS_FREEMAIL To: misformatted and free email service X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-vx0-f174.google.com ([209.85.220.174]:53176) by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25) with esmtp (csa=unknown) id 1QxubI-0002XB-XS (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Mon, 29 Aug 2011 06:41:36 +0100 Received: by vxi9 with SMTP id 9so5370542vxi.5 for ; Sun, 28 Aug 2011 22:41:32 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.178.3 with SMTP id bk3mr661179vcb.193.1314596492585; Sun, 28 Aug 2011 22:41:32 -0700 (PDT) Received: by 10.52.115.5 with HTTP; Sun, 28 Aug 2011 22:41:32 -0700 (PDT) Date: Mon, 29 Aug 2011 06:41:32 +0100 Message-ID: From: John Munroe To: isabelle-users at cl.cam.ac.uk Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.8 Subject: [isabelle] Type unification failed X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Aug 2011 05:41:37 -0000 Status: O X-Status: X-Keywords: X-UID: 5893 Hi, Does anyone know why there's a type error in ML {* val trm = @{term "(f::'a=>nat) (a::nat)"}; *} but not in consts f:: "'a => nat" a :: nat ML {* @{term "f a" *} Why are the two cases treated differently? Thanks John From ramana.kumar at gmail.com Mon Aug 29 08:07:15 2011 Received: from ppsw-50.csi.cam.ac.uk ([131.111.8.150]) by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QxvwB-0006eV-F2 (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Mon, 29 Aug 2011 08:07:15 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.6 from SpamAssassin-3.3.2-1162027 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.210.46 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (ramana.kumar[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 HTML_MESSAGE BODY: HTML included in message * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature * 0.0 T_TO_NO_BRKTS_FREEMAIL To: misformatted and free email service X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta0.cl.cam.ac.uk ([128.232.25.20]:43250) by ppsw-50.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.147]:25) with esmtp id 1QxvwB-0000WL-py (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Mon, 29 Aug 2011 08:07:15 +0100 Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141]) by mta0.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1QxvwB-0007WO-2N for isabelle-users at cl.cam.ac.uk; Mon, 29 Aug 2011 08:07:15 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.6 from SpamAssassin-3.3.2-1162027 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.210.46 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (ramana.kumar[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 HTML_MESSAGE BODY: HTML included in message * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature * 0.0 T_TO_NO_BRKTS_FREEMAIL To: misformatted and free email service X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-pz0-f46.google.com ([209.85.210.46]:36901) by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25) with esmtp (csa=unknown) id 1QxvwA-0008Tw-RY (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Mon, 29 Aug 2011 08:07:15 +0100 Received: by pzk32 with SMTP id 32so9276292pzk.33 for ; Mon, 29 Aug 2011 00:07:13 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.224.2 with SMTP id w2mr1282006wfg.333.1314601633318; Mon, 29 Aug 2011 00:07:13 -0700 (PDT) Sender: ramana.kumar at gmail.com Received: by 10.142.194.20 with HTTP; Mon, 29 Aug 2011 00:07:13 -0700 (PDT) Received: by 10.142.194.20 with HTTP; Mon, 29 Aug 2011 00:07:13 -0700 (PDT) In-Reply-To: References: Date: Mon, 29 Aug 2011 08:07:13 +0100 X-Google-Sender-Auth: zI7d6CNcxmHGo4Lwl4p2n7sx8Ck Message-ID: From: Ramana Kumar To: isabelle-users at cl.cam.ac.uk Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.8 Subject: Re: [isabelle] Type unification failed X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Aug 2011 07:07:15 -0000 Status: O X-Status: X-Keywords: X-UID: 5894 Because 'a is not equal to nat and in the first case you are asking for them to be the same. In the second case, f is first specified to be polymorphic then the use, in "f a", is instantiated appropriately by type inference, that is, you really have "(f::nat => nat) a", which is allowed because "nat => nat" refines "'a => nat". On Aug 29, 2011 7:42 AM, "John Munroe" wrote: > > Hi, > > Does anyone know why there's a type error in > > ML {* > val trm = @{term "(f::'a=>nat) (a::nat)"}; > *} > > but not in > > consts > f:: "'a => nat" > a :: nat > > ML {* @{term "f a" *} > > Why are the two cases treated differently? > > Thanks > > John From ggrov at staffmail.ed.ac.uk Mon Aug 29 09:02:55 2011 Received: from ppsw-50.csi.cam.ac.uk ([131.111.8.150]) by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1Qxwo3-0007Ag-Qe (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Mon, 29 Aug 2011 09:02:55 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -4.7 from SpamAssassin-3.3.2-1162027 * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, * medium trust * [129.215.16.102 listed in list.dnswl.dnsbl.ja.net] * -0.5 RP_MATCHES_RCVD Envelope sender domain matches handover relay * domain * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta0.cl.cam.ac.uk ([128.232.25.20]:50591) by ppsw-50.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.147]:25) with esmtp id 1Qxwo3-0004gm-pr (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Mon, 29 Aug 2011 09:02:55 +0100 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by mta0.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1Qxwo3-0001Ac-0p for isabelle-users at cl.cam.ac.uk; Mon, 29 Aug 2011 09:02:55 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -4.7 from SpamAssassin-3.3.2-1162027 * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, * medium trust * [129.215.16.102 listed in list.dnswl.dnsbl.ja.net] * -0.5 RP_MATCHES_RCVD Envelope sender domain matches handover relay * domain * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from treacle.ucs.ed.ac.uk ([129.215.16.102]:56166) by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25) with esmtp (csa=unknown) id 1Qxwo2-0008F9-X0 (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Mon, 29 Aug 2011 09:02:54 +0100 Received: from dandy.inf.ed.ac.uk (dandy.inf.ed.ac.uk [129.215.33.80]) by treacle.ucs.ed.ac.uk (8.13.8/8.13.4) with ESMTP id p7T82odR018257 for ; Mon, 29 Aug 2011 09:02:50 +0100 (BST) Received: from dhcp-91-118.inf.ed.ac.uk (dhcp-91-118.inf.ed.ac.uk [129.215.91.118]) (authenticated bits=0) by dandy.inf.ed.ac.uk (8.13.8/8.13.8) with ESMTP id p7T7woTp009673 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Mon, 29 Aug 2011 09:02:50 +0100 From: Gudmund Grov Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Date: Mon, 29 Aug 2011 09:02:54 +0100 Message-Id: To: isabelle-users at cl.cam.ac.uk Mime-Version: 1.0 X-Mailer: Apple Mail (2.1244.3) X-Edinburgh-Scanned: at treacle.ucs.ed.ac.uk with MIMEDefang 2.60, Sophie, Sophos Anti-Virus, Clam AntiVirus Content-Disposition: inline X-Scanned-By: MIMEDefang 2.60 on 129.215.16.102 Subject: [isabelle] VSTTE 2012: Extended deadline for paper submission: September 10 X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Aug 2011 08:02:55 -0000 Status: O X-Status: X-Keywords: X-UID: 5895 VSTTE 2012 Verified Software: Theories, Tools and Experiments January 28-29, 2012 Philadelphia, USA (co-located with POPL and VMCAI) https://sites.google.com/site/vstte2012/ (*** NEW SUBMISSION DEADLINE: September 10, 2011 ***) The Fourth International Conference on Verified Software: Theories, Tools, and Experiments will take place on January 28-29, 2012. The focus of the conference is the development of systematic methods for specifying, building, and verifying software. The goal of this conference is to advance the state of the art through the interaction of theory development, tool evolution, and experimental validation. Historically, the conference came out of the Verified Software Initiative (VSI), a cooperative, international initiative directed at the scientific challenges of large-scale software verification. An informal verification competition will be held in paralle= l=20 to the conference. More information will be available from the=20 website. Topics of interest include: * Specification and verification techniques * Tool support for specification languages * Tool for various design methodologies * Tool integration and plug-ins * Automation in formal verification * Tool comparisons and benchmark repositories * Combination of tools and techniques (e.g. formal vs. semiformal, software specification vs. engineering techniques) * Customizing tools for particular applications * Challenge problems * Refinement methodologies * Requirements modeling * Specification languages * Specification/verification case-studies * Software design methods * Program logic SUBMISSIONS Submitted research papers and system descriptions must be original and not submitted for publication elsewhere. Research paper submissions are limited to 15 proceedings pages in LNCS format and must include a cogent and self-contained description of the ideas, methods and results, together with a comparison to existing work. System descriptions are also limited to 15 proceedings pages in LNCS format. Authors are encouraged to submit work in progress, particularly if = the work involves collaboration, theory unification, and tool integration. Papers can be submitted at https://www.easychair.org/conferences/?conf=3Dvstte2012 Submissions that arrive late, are not in the proper format, or are too long will not be considered. The proceedings of VSTTE 2012 will be published by Springer-Verlag in the LNCS series. Authors of accepted papers will be requested to sign a form transferring copyright of their contribution to Springer-Verlag. IMPORTANT DATES September 10, 2011: Conference Paper Submission Deadline October 20, 2011: Notification of acceptance November 15, 2011: Final conference paper versions due January 28-29, 2012: Main conference KEYNOTE SPEAKERS Rupak Majumdar, Max Planck Institute for Software Systems Wolfgang Paul, Saarland University TUTORIALS Francesco Logozzo, Microsoft Research Rustan Leino, Microsoft Research CONFERENCE CHAIR Ernie Cohen, European Microsoft Innovation Center=20 PROGRAM CHAIRS Rajeev Joshi, NASA Jet Propulsion Laboratory Peter M=FCller, ETH Zurich Andreas Podelski, University of Freiburg PROGRAM COMMITTEE Clark Barrett, New York University Lars Birkedal, IT University of Copenhagen Patrick Cousot, Ecole normale Sup=E9rieure, Paris and New York University Leonardo De Moura, Microsoft Research Jean-Christophe Filliatre, CNRS Universit=E9 Paris Sud John Hatcliff, Kansas State University Bart Jacobs, Katholieke Universiteit Leuven=20 Ranjit Jhala, University of California, San Diego Rajeev Joshi, NASA JPL Gerwin Klein, NICTA=20 Viktor Kuncak, EPF Lausanne=20 Gary T. Leavens, University of Central Florida=20 Rustan Leino, Microsoft Research Panagiotis Manolios, Northeastern University Peter M=FCller, ETH Zurich Tobias Nipkow, Technische Universit=E4t M=FCnchen=20 Matthew Parkinson, Microsoft Research Corina Pasareanu, NASA Ames Wolfgang Paul, Saarland University Andreas Podelski, University of Freiburg Natasha Sharygina, University of Lugano=20 Willem Visser, University of Stellenbosch Thomas Wies, IST Austria PUBLICITY CHAIR Gudmund Grov, University of Edinburgh VERIFICATION COMPETITION ORGANISER=20 Jean-Christophe Filliatre, CNRS Universit=E9 Paris Sud STEERING COMMITTEE Tony Hoare, Microsoft Research Andrew Ireland, Heriot-Watt University Jay Misra, UT Austin Natarajan Shankar, SRI International Jim Woodcock, University of York --=20 The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. From mark at proof-technologies.com Mon Aug 29 13:11:12 2011 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1Qy0gK-0003Cs-2x (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Mon, 29 Aug 2011 13:11:12 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1162027 * -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no * trust * [85.233.160.25 listed in list.dnswl.dnsbl.ja.net] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta1.cl.cam.ac.uk ([128.232.25.21]:41695) by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25) with esmtp id 1Qy0gJ-0002jk-Yo (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Mon, 29 Aug 2011 13:11:12 +0100 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by mta1.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1Qy0gJ-0004D5-Ne for isabelle-users at cl.cam.ac.uk; Mon, 29 Aug 2011 13:11:11 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1162027 * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no * trust * [85.233.160.25 listed in list.dnswl.dnsbl.ja.net] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from outgoing-smtp.namesco.net ([85.233.160.25]:57893) by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25) with esmtp (csa=unknown) id 1Qy0gG-0002iv-Xe (Exim 4.72) (return-path ); Mon, 29 Aug 2011 13:11:08 +0100 Received: from [192.168.0.7] (helo=artemis.hosts.co.uk) by outgoing-smtp.namesco.net with esmtp (Exim 4.67) (envelope-from ) id 1Qy0gB-00081D-I9; Mon, 29 Aug 2011 13:11:04 +0100 Received: from root by artemis.hosts.co.uk with local (Exim 4.69) (envelope-from ) id 1Qy0gC-0004rB-FT; Mon, 29 Aug 2011 13:11:04 +0100 To: , From: =?utf-8?q?=22Mark=22?= MIME-Version: 1.0 X-Mailer: Namesco Webmail v3.0 Message-ID: <1314619864277 at names.co.uk> Date: Mon, 29 Aug 2011 13:11:04 +0100 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-namescosender: 0 2002 X-namesco: 192.168.0.171 X-Spam-Score: -1.0 (-) Subject: Re: [isabelle] =?utf-8?q?Type_unification_failed?= X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list Reply-To: =?utf-8?q?=22Mark=22?= List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Aug 2011 12:11:12 -0000 Status: O X-Status: X-Keywords: X-UID: 5896 It should be said that types explicitly provided in type annotations in term quotations are not unified by the type checker, they are simply left as they are, whereas implicit types in term quotations are unified. on 29/8/11 8:07 AM, Ramana Kumar wrote: > Because 'a is not equal to nat and in the first case you are asking for them > to be the same. > > In the second case, f is first specified to be polymorphic then the use, in > "f a", is instantiated appropriately by type inference, that is, you really > have "(f::nat =3D> nat) a", which is allowed because "nat =3D> nat" refines "'a > =3D> nat". > > On Aug 29, 2011 7:42 AM, "John Munroe" wrote: >> >> Hi, >> >> Does anyone know why there's a type error in >> >> ML {* >> val trm =3D @{term "(f::'a=3D>nat) (a::nat)"}; >> *} >> >> but not in >> >> consts >> f:: "'a =3D> nat" >> a :: nat >> >> ML {* @{term "f a" *} >> >> Why are the two cases treated differently? >> >> Thanks >> >> John > > > From makarius at sketis.net Mon Aug 29 13:20:40 2011 Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141]) by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1Qy0pU-0003IR-8n (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Mon, 29 Aug 2011 13:20:40 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1162027 * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta0.cl.cam.ac.uk ([128.232.25.20]:57698) by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25) with esmtp id 1Qy0pT-00041s-Sf (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Mon, 29 Aug 2011 13:20:40 +0100 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by mta0.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1Qy0pT-00034p-Ng for isabelle-users at cl.cam.ac.uk; Mon, 29 Aug 2011 13:20:39 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1162027 * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-out1.informatik.tu-muenchen.de ([131.159.0.8]:64832) by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25) with esmtp (csa=unknown) id 1Qy0pT-0005AL-XK (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Mon, 29 Aug 2011 13:20:39 +0100 Received: from localhost (scanbroy [10.46.146.16]) by mailbroy.informatik.tu-muenchen.de (Postfix) with ESMTP id 6247F896A3986 for ; Mon, 29 Aug 2011 14:20:38 +0200 (CEST) X-Virus-Scanned: by amavisd-new using ClamAV at mailbroy.informatik.tu-muenchen.de Received: from mailbroy.informatik.tu-muenchen.de ([10.46.146.15]) by localhost (mailbroy.informatik.tu-muenchen.de [10.46.146.16]) (amavisd-new, port 10024) with ESMTP id korQpUNXEoj4 for ; Mon, 29 Aug 2011 14:20:38 +0200 (CEST) Received: from atbroy100.informatik.tu-muenchen.de (atbroy100.informatik.tu-muenchen.de [131.159.47.193]) by mailbroy.informatik.tu-muenchen.de (Postfix) with ESMTPS id 38EC9822520E0 for ; Mon, 29 Aug 2011 14:20:38 +0200 (CEST) Date: Mon, 29 Aug 2011 14:20:25 +0200 (CEST) From: Makarius X-X-Sender: wenzelm at atbroy100.informatik.tu-muenchen.de To: isabelle-users at cl.cam.ac.uk In-Reply-To: <1314619864277 at names.co.uk> Message-ID: References: <1314619864277 at names.co.uk> User-Agent: Alpine 1.10 (LNX 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Subject: Re: [isabelle] Type unification failed X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Aug 2011 12:20:40 -0000 Status: O X-Status: X-Keywords: X-UID: 5897 One more aspect: the language of type constraints admits nameless dummies that *are* unified. For example term "(f :: _ => nat) (a::nat)" Sort constraints may be also added here: term "(f :: _::plus => nat) (a::nat)" The ML interfaces of the "term check" phase also admits named unification parameters (via Type_Infer.param), but this is an advanced concept without notation for end-users (as in ML/Haskell). Makarius On Mon, 29 Aug 2011, "Mark" wrote: > It should be said that types explicitly provided in type annotations in term > quotations are not unified by the type checker, they are simply left as they > are, whereas implicit types in term quotations are unified. > > on 29/8/11 8:07 AM, Ramana Kumar wrote: > >> Because 'a is not equal to nat and in the first case you are asking for > them >> to be the same. >> >> In the second case, f is first specified to be polymorphic then the use, > in >> "f a", is instantiated appropriately by type inference, that is, you > really >> have "(f::nat => nat) a", which is allowed because "nat => nat" refines > "'a >> => nat". >> >> On Aug 29, 2011 7:42 AM, "John Munroe" wrote: >>> >>> Hi, >>> >>> Does anyone know why there's a type error in >>> >>> ML {* >>> val trm = @{term "(f::'a=>nat) (a::nat)"}; >>> *} >>> >>> but not in >>> >>> consts >>> f:: "'a => nat" >>> a :: nat >>> >>> ML {* @{term "f a" *} >>> >>> Why are the two cases treated differently? >>> >>> Thanks >>> >>> John >> >> >> > From makarius at sketis.net Mon Aug 29 13:32:28 2011 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1Qy10u-0003RC-4v (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Mon, 29 Aug 2011 13:32:28 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1162027 * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta0.cl.cam.ac.uk ([128.232.25.20]:52348) by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25) with esmtp id 1Qy10t-0007jW-Yn (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Mon, 29 Aug 2011 13:32:28 +0100 Received: from ppsw-50.csi.cam.ac.uk ([131.111.8.150]) by mta0.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1Qy10t-0003HP-Nr for isabelle-users at cl.cam.ac.uk; Mon, 29 Aug 2011 13:32:27 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1162027 * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-out1.informatik.tu-muenchen.de ([131.159.0.8]:33228) by ppsw-50.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.147]:25) with esmtp (csa=unknown) id 1Qy10t-000823-qk (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Mon, 29 Aug 2011 13:32:27 +0100 Received: from localhost (scanbroy [10.46.146.16]) by mailbroy.informatik.tu-muenchen.de (Postfix) with ESMTP id 8E0F1896A23A9; Mon, 29 Aug 2011 14:32:26 +0200 (CEST) X-Virus-Scanned: by amavisd-new using ClamAV at mailbroy.informatik.tu-muenchen.de Received: from mailbroy.informatik.tu-muenchen.de ([10.46.146.15]) by localhost (mailbroy.informatik.tu-muenchen.de [10.46.146.16]) (amavisd-new, port 10024) with ESMTP id Q5t0HUmmFDcj; Mon, 29 Aug 2011 14:32:26 +0200 (CEST) Received: from atbroy100.informatik.tu-muenchen.de (atbroy100.informatik.tu-muenchen.de [131.159.47.193]) by mailbroy.informatik.tu-muenchen.de (Postfix) with ESMTPS id 5A21C896A117A; Mon, 29 Aug 2011 14:32:26 +0200 (CEST) Date: Mon, 29 Aug 2011 14:32:13 +0200 (CEST) From: Makarius X-X-Sender: wenzelm at atbroy100.informatik.tu-muenchen.de To: Steve Wong In-Reply-To: Message-ID: References: User-Agent: Alpine 1.10 (LNX 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: isabelle-users Subject: Re: [isabelle] Better way to beta apply two terms X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Aug 2011 12:32:28 -0000 Status: O X-Status: X-Keywords: X-UID: 5898 On Fri, 26 Aug 2011, Steve Wong wrote: > What is a better way to beta-apply two terms without using betapply, which > can cause a type mismatch. For example: > > consts > a :: nat > F :: "'a => nat" > ML {* > val ftrm = @{term "F"}; > val atrm = @{term "a"}; > val res = betapply((ftrm,atrm)); > type_of res > *} > > The application succeeds, but the resulting term isn't well-typed (thus > type_of fails). betapply doesn't seem to change the input type of F from > a variable to "Nat.nat". Is there a better way of beta applying such > that the input type can automatically be updated? Term.betapply is not used that often, although there is nothing wrong with it. Other term constructions (even plain Abs and $) are used more frequently. The experiment above has failed for other reasons: the example terms are internalized independently, i.e. the system did not know they are correlated. Normally you use something like Syntax.read_terms, Syntax.check_terms or even Specification.read_specification / check_specification for simultaneous processing of formal input in an shared syntactic context. An alternative is to compose untyped preterms (using dummyT) in some places and then let Syntax.check_term(s) work out the details. (It also requires some care because many basic term operations assume fully typed terms.) Another note concerning readability of ML sources: "ftrm" and "atrm" are rather long and unwieldy names for plain formal entities that could be just called "f" and "a", or "t" and "u". Makarius From makarius at sketis.net Mon Aug 29 13:36:13 2011 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1Qy14X-0003U3-IE (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Mon, 29 Aug 2011 13:36:13 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1162027 * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta0.cl.cam.ac.uk ([128.232.25.20]:45576) by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25) with esmtp id 1Qy14X-0001VO-Wt (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Mon, 29 Aug 2011 13:36:13 +0100 Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152]) by mta0.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1Qy14X-0003LA-5L for isabelle-users at cl.cam.ac.uk; Mon, 29 Aug 2011 13:36:13 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1162027 * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-out1.informatik.tu-muenchen.de ([131.159.0.8]:33596) by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25) with esmtp (csa=unknown) id 1Qy14W-0004C3-FM (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Mon, 29 Aug 2011 13:36:13 +0100 Received: from localhost (scanbroy [10.46.146.16]) by mailbroy.informatik.tu-muenchen.de (Postfix) with ESMTP id 04E3D896A2880; Mon, 29 Aug 2011 14:36:12 +0200 (CEST) X-Virus-Scanned: by amavisd-new using ClamAV at mailbroy.informatik.tu-muenchen.de Received: from mailbroy.informatik.tu-muenchen.de ([10.46.146.15]) by localhost (mailbroy.informatik.tu-muenchen.de [10.46.146.16]) (amavisd-new, port 10024) with ESMTP id uqX0tM1ztQHR; Mon, 29 Aug 2011 14:36:11 +0200 (CEST) Received: from atbroy100.informatik.tu-muenchen.de (atbroy100.informatik.tu-muenchen.de [131.159.47.193]) by mailbroy.informatik.tu-muenchen.de (Postfix) with ESMTPS id CBCED8133B86E; Mon, 29 Aug 2011 14:36:11 +0200 (CEST) Date: Mon, 29 Aug 2011 14:35:59 +0200 (CEST) From: Makarius X-X-Sender: wenzelm at atbroy100.informatik.tu-muenchen.de To: Steve Wong In-Reply-To: Message-ID: References: User-Agent: Alpine 1.10 (LNX 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: isabelle-users at cl.cam.ac.uk Subject: Re: [isabelle] [isabelle-dev] Malformed YXML encoding X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Aug 2011 12:36:13 -0000 Status: O X-Status: X-Keywords: X-UID: 5899 On Fri, 26 Aug 2011, Steve Wong wrote: > On Fri, Aug 26, 2011 at 12:26 PM, Makarius wrote: > >> On Fri, 26 Aug 2011, Steve Wong wrote: >> >> >> Working with string interfaces for formal entities was never robust, even >> 20 years ago, but now the fragility has become immediately apparent. When >> "generating" things, you should always use the regular non-text versions of >> tools and packages. > So, which are the tools recommended for constructing new terms (based on > some existing terms)? Are you referring to functions like dest_Free in > term.ML, i.e. destruct a term into parts and then create a new term from > ground up? Either using directly the datype constructors of typ/term (e.g. in pattern matching) or some derived functions from src/Pure/term.ML, src/Pure/logic.ML, src/HOL/Tools/hologic.ML. The "tools and packages" that I mentioned above are more complex things like Function_Fun.add_fun (the regular ML version) instead of the add_fun_cmd as string version for end-users. Makarius From jd at cococo.de Mon Aug 29 15:03:29 2011 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1Qy2Qz-0004VL-A8 (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Mon, 29 Aug 2011 15:03:29 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -0.9 from SpamAssassin-3.3.2-1162027 * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 1.0 RDNS_DYNAMIC Delivered to internal network by host with * dynamic-looking rDNS X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta1.cl.cam.ac.uk ([128.232.25.21]:39490) by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25) with esmtp id 1Qy2Qz-0004Tp-WJ (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Mon, 29 Aug 2011 15:03:29 +0100 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by mta1.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1Qy2Qy-0005JJ-V8 for isabelle-users at cl.cam.ac.uk; Mon, 29 Aug 2011 15:03:28 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -0.9 from SpamAssassin-3.3.2-1162027 * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 1.0 RDNS_DYNAMIC Delivered to internal network by host with * dynamic-looking rDNS X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from lvps83-169-33-18.dedicated.hosteurope.de ([83.169.33.18]:53884 helo=cococo.de) by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25) with esmtp (csa=unknown) id 1Qy2Qv-0004Oy-YL (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Mon, 29 Aug 2011 15:03:25 +0100 Received: from cococo.de (localhost.localdomain [127.0.0.1]) by cococo.de (Postfix) with ESMTP id 304211B47236E for ; Mon, 29 Aug 2011 16:03:22 +0200 (CEST) Received: from [164.128.64.2] (p54A6E535.dip.t-dialin.net [84.166.229.53]) by cococo.de (Postfix) with ESMTP for ; Mon, 29 Aug 2011 16:03:22 +0200 (CEST) Message-ID: <4E5B9C74.9030301 at cococo.de> Date: Mon, 29 Aug 2011 16:04:36 +0200 From: Jens Doll User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.18) Gecko/20110616 Lightning/1.0b2 Thunderbird/3.1.11 MIME-Version: 1.0 To: isabelle-users at cl.cam.ac.uk Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: [isabelle] Gaussian Elimination X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Aug 2011 14:03:29 -0000 Status: O X-Status: X-Keywords: X-UID: 5900 Thank you Tobias for the theory file about the Gauss-Seidel algorithm. I'll try to build on this result in my project. My aim is to have an automatically transformed PL(1) formula from the algorithm, although I do not know when and how the goal can be reached. Regards, Jens Doll From Thomas.Genet at irisa.fr Mon Aug 29 16:01:03 2011 Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152]) by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1Qy3Kh-0005Mf-5W (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Mon, 29 Aug 2011 16:01:03 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -6.9 from SpamAssassin-3.3.2-1162027 * -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high * trust * [192.134.164.82 listed in list.dnswl.dnsbl.ja.net] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 LOTS_OF_MONEY Huge... sums of money X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta0.cl.cam.ac.uk ([128.232.25.20]:45110) by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25) with esmtp id 1Qy3Kg-00063P-Ec (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Mon, 29 Aug 2011 16:01:03 +0100 Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141]) by mta0.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1Qy3Kg-0006Az-Fl for isabelle-users at cl.cam.ac.uk; Mon, 29 Aug 2011 16:01:02 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -6.9 from SpamAssassin-3.3.2-1162027 * -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high * trust * [192.134.164.82 listed in list.dnswl.dnsbl.ja.net] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 LOTS_OF_MONEY Huge... sums of money X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail1-relais-roc.national.inria.fr ([192.134.164.82]:32324) by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25) with esmtp (csa=unknown) id 1Qy3Ke-00047i-R1 (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Mon, 29 Aug 2011 16:01:02 +0100 X-IronPort-AV: E=Sophos;i="4.68,297,1312149600"; d="scan'208";a="117559934" Received: from melba.irisa.fr ([131.254.12.38]) by mail1-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-CAMELLIA256-SHA; 29 Aug 2011 17:00:56 +0200 Message-ID: <4E5BA9AA.3010201 at irisa.fr> Date: Mon, 29 Aug 2011 17:00:58 +0200 From: Thomas Genet User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:6.0) Gecko/20110812 Thunderbird/6.0 MIME-Version: 1.0 To: isabelle-users Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Subject: [isabelle] Open Post-doc position at INRIA Rennes, France X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Aug 2011 15:01:03 -0000 Status: O X-Status: X-Keywords: X-UID: 5901 Dear all Isabelle users, here is a Postdoc position available at INRIA Rennes, France -------------------------------------------------------------------------------------------------- A postdoc position for 1 year is available at INRIA Rennes - Bretagne Atlantique. The research will take place in the Celtique team (http://www.irisa.fr/celtique/). The task will consist in developing certificates of software which makes it possible for a user to check a downloaded code, in an automatic manner and extremely quickly. A program producer can hence verify the security of his program with a large amount of computation resource before distributing it with a certificate that helps the consumer to replay the verification program but with very far fewer resources. Candidates should have a background in program verification. Additional knowledge in one or more of the following topics will be appreciated: - static analysis, - theory of abstract interpretation, - language-based security, - deductive verification, - decision procedures, - probabilistic verification Knowledge of the French language is not required. Start of contract: ideally, the candidate will start working in september or october, but we can accomodate a later date. Salaries: usual INRIA postdoc salary (2,357.30 euros gross/month, i.e. 1923,26 euros net/month). Social security benefits: - Entitled to unemployment benefit at the end of the contract; - Affiliated to the French social security system. Candidates should submit to david.pichardie[at]irisa.fr, thomas.genet[at]irisa.fr and thomas.jensen[at]irisa.fr - A CV including a list of publications - A one-page research statement - Referee reports for the PhD thesis if any - Contact information for two references (including the PhD supervisor) -- Thomas Genet ISTIC/IRISA Campus de Beaulieu, 35042 Rennes cedex, France Tél: +33 (0) 2 99 84 73 44 E-mail: genet at irisa.fr http://www.irisa.fr/celtique/genet From munddr at gmail.com Mon Aug 29 22:06:54 2011 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1Qy92k-0003ir-Iz (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Mon, 29 Aug 2011 22:06:54 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1162027 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.220.174 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (munddr[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from * author's domain * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature * 0.0 T_TO_NO_BRKTS_FREEMAIL To: misformatted and free email service X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta1.cl.cam.ac.uk ([128.232.25.21]:59050) by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25) with esmtp id 1Qy92k-0008Bq-X0 (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Mon, 29 Aug 2011 22:06:54 +0100 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by mta1.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1Qy92k-00011Y-5m for isabelle-users at cl.cam.ac.uk; Mon, 29 Aug 2011 22:06:54 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1162027 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.220.174 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (munddr[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from * author's domain * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature * 0.0 T_TO_NO_BRKTS_FREEMAIL To: misformatted and free email service X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-vx0-f174.google.com ([209.85.220.174]:52526) by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25) with esmtp (csa=unknown) id 1Qy92g-0008BU-Y8 (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Mon, 29 Aug 2011 22:06:51 +0100 Received: by vxi9 with SMTP id 9so6125229vxi.5 for ; Mon, 29 Aug 2011 14:06:49 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.71.145 with SMTP id v17mr860608vdu.322.1314652009902; Mon, 29 Aug 2011 14:06:49 -0700 (PDT) Received: by 10.52.115.5 with HTTP; Mon, 29 Aug 2011 14:06:49 -0700 (PDT) Date: Mon, 29 Aug 2011 22:06:49 +0100 Message-ID: From: John Munroe To: isabelle-users at cl.cam.ac.uk Content-Type: text/plain; charset=ISO-8859-1 Subject: [isabelle] Unify.matchers and term representation X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Aug 2011 21:06:54 -0000 Status: O X-Status: X-Keywords: X-UID: 5902 Hello, I see that the instantiations Unify.matchers finds may not necessarily have the simplest internal representation. For example: ML {* val trm = @{term "(bar::nat set) = bar"}; val pat = @{cpat "(?foo::(?'a => ?'b) => ?'c) (bar::(?'a => ?'b))"} |> term_of; val mtchsq = Unify.matchers @{theory} [(pat,trm)]; val mtchs = Seq.list_of mtchsq; *} The first match gives this instantiation for ?foo: [?foo::(nat => bool) => ?'c := %a::nat => bool. a = a] Now, if we look at the internal representation of the term, it actually is: Abs ("", "Nat.nat => HOL.bool", Const ("HOL.eq", "(Nat.nat => HOL.bool) => (Nat.nat => HOL.bool) => HOL.bool") $ Abs ("", "Nat.nat", Bound 1 $ Bound 0) $ Abs ("", "Nat.nat", Bound 1 $ Bound 0)) It is unnecessarily large. A simpler representation would be: Abs ("", "Nat.nat => HOL.bool", Const ("HOL.eq", "(Nat.nat => HOL.bool) => (Nat.nat => HOL.bool) => HOL.bool") $ Bound 0 $ Bound 0) My question is: Is there a way to reduce the internal representation of a term from one that contains "reducible" lambda expressions (like in the first) to one that is leaner (like in the second) in general? Or, is there a simple way to make the matcher algorithm spit out leaner internal representations? Thank you for the help in advance. John From lp15 at cam.ac.uk Tue Aug 30 10:33:49 2011 Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141]) by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QyKhZ-0006ku-0W (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Tue, 30 Aug 2011 10:33:49 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -3.4 from SpamAssassin-3.3.2-1162027 * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * -0.5 RP_MATCHES_RCVD Envelope sender domain matches handover relay * domain * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta1.cl.cam.ac.uk ([128.232.25.21]:42401) by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25) with esmtp id 1QyKhY-0008PN-Ry (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Tue, 30 Aug 2011 10:33:48 +0100 Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152]) by mta1.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1QyKhY-0000VI-Js for isabelle-users at cl.cam.ac.uk; Tue, 30 Aug 2011 10:33:48 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: not scanned X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from epicure.cl.cam.ac.uk ([128.232.1.188]:49584) by ppsw-52.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.159]:587) with esmtpsa (PLAIN:lp15) (TLSv1:AES128-SHA:128) id 1QyKhV-0003NQ-El (Exim 4.72) (return-path ); Tue, 30 Aug 2011 10:33:45 +0100 Mime-Version: 1.0 (Apple Message framework v1244.3) Content-Type: text/plain; charset=iso-8859-1 From: Lawrence Paulson In-Reply-To: Date: Tue, 30 Aug 2011 10:33:45 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: To: John Munroe X-Mailer: Apple Mail (2.1244.3) Cc: isabelle-users at cl.cam.ac.uk Subject: Re: [isabelle] Unify.matchers and term representation X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Aug 2011 09:33:49 -0000 Status: O X-Status: X-Keywords: X-UID: 5903 The unification algorithm operates on eta-expanded terms. Is there any = compelling reason why you need them to be eta-contracted? Larry Paulson On 29 Aug 2011, at 22:06, John Munroe wrote: > Hello, >=20 > I see that the instantiations Unify.matchers finds may not necessarily > have the simplest internal representation. For example: >=20 > ML {* > val trm =3D @{term "(bar::nat set) =3D bar"}; > val pat =3D @{cpat "(?foo::(?'a =3D> ?'b) =3D> ?'c) (bar::(?'a =3D> = ?'b))"} > |> term_of; > val mtchsq =3D Unify.matchers @{theory} [(pat,trm)]; > val mtchs =3D Seq.list_of mtchsq; > *} >=20 > The first match gives this instantiation for ?foo: >=20 > [?foo::(nat =3D> bool) =3D> ?'c :=3D %a::nat =3D> bool. a =3D a] >=20 > Now, if we look at the internal representation of the term, it = actually is: >=20 > Abs ("", "Nat.nat =3D> HOL.bool", > Const ("HOL.eq", "(Nat.nat =3D> HOL.bool) =3D> (Nat.nat =3D> = HOL.bool) > =3D> HOL.bool") $ > Abs ("", "Nat.nat", Bound 1 $ Bound 0) $ Abs ("", "Nat.nat", > Bound 1 $ Bound 0)) >=20 > It is unnecessarily large. A simpler representation would be: >=20 > Abs ("", "Nat.nat =3D> HOL.bool", > Const ("HOL.eq", "(Nat.nat =3D> HOL.bool) =3D> (Nat.nat =3D> = HOL.bool) > =3D> HOL.bool") $ Bound 0 $ > Bound 0) >=20 > My question is: Is there a way to reduce the internal representation > of a term from one that contains "reducible" lambda expressions (like > in the first) to one that is leaner (like in the second) in general? > Or, is there a simple way to make the matcher algorithm spit out > leaner internal representations? >=20 > Thank you for the help in advance. >=20 > John >=20 From rene.thiemann at uibk.ac.at Tue Aug 30 10:45:25 2011 Received: from ppsw-50.csi.cam.ac.uk ([131.111.8.150]) by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QyKsn-000732-Fq (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Tue, 30 Aug 2011 10:45:25 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -3.1 from SpamAssassin-3.3.2-1162027 * -0.5 RP_MATCHES_RCVD Envelope sender domain matches handover relay * domain * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [138.232.1.142 listed in list.dnswl.dnsbl.ja.net] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta0.cl.cam.ac.uk ([128.232.25.20]:43513) by ppsw-50.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.147]:25) with esmtp id 1QyKsm-0003pp-sO (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Tue, 30 Aug 2011 10:45:25 +0100 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by mta0.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1QyKsm-00038q-QM for isabelle-users at cl.cam.ac.uk; Tue, 30 Aug 2011 10:45:24 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -3.1 from SpamAssassin-3.3.2-1162027 * -0.5 RP_MATCHES_RCVD Envelope sender domain matches handover relay * domain * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [138.232.1.142 listed in list.dnswl.dnsbl.ja.net] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from lmr1.uibk.ac.at ([138.232.1.142]:47055 helo=smtp.uibk.ac.at) by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25) with esmtp (csa=unknown) id 1QyKsg-0004Lx-Yl (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Tue, 30 Aug 2011 10:45:24 +0100 Received: from pc6145-c703.uibk.ac.at (pc6145-c703.uibk.ac.at [138.232.66.145]) (authenticated bits=0) by smtp.uibk.ac.at (8.13.8/8.13.8/F1) with ESMTP id p7U9ishs027224 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Tue, 30 Aug 2011 11:44:54 +0200 From: =?iso-8859-1?Q?Ren=E9_Thiemann?= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Date: Tue, 30 Aug 2011 11:44:54 +0200 To: USR Isabelle Mailinglist Message-Id: <3E566A88-3CA1-4CED-B7E1-92367E18649A at uibk.ac.at> Mime-Version: 1.0 (Apple Message framework v1244.3) X-Mailer: Apple Mail (2.1244.3) X-Spam-Score: () -15.0 ALL_TRUSTED, RCV_SMTP_AUTH, RCV_SMTP_UIBK, T_RP_MATCHES_RCVD X-Scanned-By: MIMEDefang 2.61 at uibk.ac.at on 138.232.1.140 Subject: [isabelle] list_size_pointwise X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Aug 2011 09:45:25 -0000 Status: O X-Status: X-Keywords: X-UID: 5904 Dear all, when looking at the thm in Libary List lemma list_size_pointwise: assumes "!! x. x : set xs =3D=3D> f x < g x" shows "list_size f xs <=3D list_size g xs" I was wondering why the strict inequality is used in the assumption. = Indeed, the lemma also holds in its stronger version where only <=3D is used in = the assumption. lemma list_size_pointwise': assumes "\ x. x \ set xs = \ f x \ g x" shows "list_size f xs \ list_size g xs" using assms=20 proof (induct xs) case Nil thus ?case by auto next case (Cons x xs) have "list_size f xs \ list_size g xs"=20 by (rule Cons(1), insert Cons(2), auto) with Cons(2)[of x] show ?case by auto qed So, one might consider to replace the current lemma list_size_pointwise by the stronger version list_size_pointwise'. Cheers, Ren=E9 --=20 Ren=E9 Thiemann mailto:rene.thiemann at uibk.ac.at Computational Logic Group = http://cl-informatik.uibk.ac.at/~thiemann/ Institute of Computer Science phone: +43 512 507-6434 University of Innsbruck From lp15 at cam.ac.uk Tue Aug 30 10:52:21 2011 Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152]) by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QyKzV-0000vb-Mw (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Tue, 30 Aug 2011 10:52:21 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -3.4 from SpamAssassin-3.3.2-1162027 * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * -0.5 RP_MATCHES_RCVD Envelope sender domain matches handover relay * domain * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta0.cl.cam.ac.uk ([128.232.25.20]:55826) by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25) with esmtp id 1QyKzV-0002FT-DU (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Tue, 30 Aug 2011 10:52:21 +0100 Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141]) by mta0.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1QyKzV-0003HD-4Z for isabelle-users at cl.cam.ac.uk; Tue, 30 Aug 2011 10:52:21 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: not scanned X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from epicure.cl.cam.ac.uk ([128.232.1.188]:50556) by ppsw-41.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.156]:587) with esmtpsa (PLAIN:lp15) (TLSv1:AES128-SHA:128) id 1QyKzV-00071c-Q2 (Exim 4.72) (return-path ); Tue, 30 Aug 2011 10:52:21 +0100 Mime-Version: 1.0 (Apple Message framework v1244.3) Content-Type: text/plain; charset=iso-8859-1 From: Lawrence Paulson In-Reply-To: <3E566A88-3CA1-4CED-B7E1-92367E18649A at uibk.ac.at> Date: Tue, 30 Aug 2011 10:52:20 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <22D7FB73-B73F-42A3-B0FD-F5A5A3E0B578 at cam.ac.uk> References: <3E566A88-3CA1-4CED-B7E1-92367E18649A at uibk.ac.at> To: =?iso-8859-1?Q?Ren=E9_Thiemann?= X-Mailer: Apple Mail (2.1244.3) Cc: USR Isabelle Mailinglist Subject: Re: [isabelle] list_size_pointwise X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Aug 2011 09:52:21 -0000 Status: O X-Status: X-Keywords: X-UID: 5905 I agree. The current version is unnecessarily week. Larry Paulson On 30 Aug 2011, at 10:44, Ren=E9 Thiemann wrote: > Dear all, >=20 > when looking at the thm in Libary List >=20 > lemma list_size_pointwise: assumes "!! x. x : set xs =3D=3D> f x < g = x" > shows "list_size f xs <=3D list_size g xs" >=20 > I was wondering why the strict inequality is used in the assumption. = Indeed, > the lemma also holds in its stronger version where only <=3D is used = in the assumption. >=20 > lemma list_size_pointwise': assumes "\ x. x \ set xs = \ f x \ g x" > shows "list_size f xs \ list_size g xs" > using assms=20 > proof (induct xs) > case Nil thus ?case by auto > next > case (Cons x xs) > have "list_size f xs \ list_size g xs"=20 > by (rule Cons(1), insert Cons(2), auto) > with Cons(2)[of x] > show ?case by auto > qed >=20 > So, one might consider to replace the current lemma = list_size_pointwise > by the stronger version list_size_pointwise'. >=20 > Cheers, > Ren=E9 > --=20 > Ren=E9 Thiemann mailto:rene.thiemann at uibk.ac.at > Computational Logic Group = http://cl-informatik.uibk.ac.at/~thiemann/ > Institute of Computer Science phone: +43 512 507-6434 > University of Innsbruck >=20 >=20 From makarius at sketis.net Tue Aug 30 13:12:50 2011 Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141]) by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QyNBS-00055B-TR (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Tue, 30 Aug 2011 13:12:50 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1162027 * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta0.cl.cam.ac.uk ([128.232.25.20]:58840) by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25) with esmtp id 1QyNBS-0006SK-Ri (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Tue, 30 Aug 2011 13:12:50 +0100 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by mta0.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1QyNBS-0006m6-Ee for isabelle-users at cl.cam.ac.uk; Tue, 30 Aug 2011 13:12:50 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1162027 * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-out1.informatik.tu-muenchen.de ([131.159.0.8]:38740) by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25) with esmtp (csa=unknown) id 1QyNBR-00051m-ZC (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Tue, 30 Aug 2011 13:12:50 +0100 Received: from localhost (scanbroy [10.46.146.16]) by mailbroy.informatik.tu-muenchen.de (Postfix) with ESMTP id 3F9EC8054F2A3 for ; Tue, 30 Aug 2011 14:12:49 +0200 (CEST) X-Virus-Scanned: by amavisd-new using ClamAV at mailbroy.informatik.tu-muenchen.de Received: from mailbroy.informatik.tu-muenchen.de ([10.46.146.15]) by localhost (mailbroy.informatik.tu-muenchen.de [10.46.146.16]) (amavisd-new, port 10024) with ESMTP id nxKvornmriOT for ; Tue, 30 Aug 2011 14:12:49 +0200 (CEST) Received: from atbroy100.informatik.tu-muenchen.de (atbroy100.informatik.tu-muenchen.de [131.159.47.193]) by mailbroy.informatik.tu-muenchen.de (Postfix) with ESMTPS id 1708C8054F2A6 for ; Tue, 30 Aug 2011 14:12:49 +0200 (CEST) Date: Tue, 30 Aug 2011 14:12:36 +0200 (CEST) From: Makarius X-X-Sender: wenzelm at atbroy100.informatik.tu-muenchen.de To: isabelle-users at cl.cam.ac.uk In-Reply-To: Message-ID: References: User-Agent: Alpine 1.10 (LNX 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Subject: Re: [isabelle] Unify.matchers and term representation X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Aug 2011 12:12:51 -0000 Status: O X-Status: X-Keywords: X-UID: 5906 On Tue, 30 Aug 2011, Lawrence Paulson wrote: > The unification algorithm operates on eta-expanded terms. Is there any > compelling reason why you need them to be eta-contracted? Larry is right that according to the natural order of things it is better to leave things as they are produced, and work conceptually with arbitrary representatives of the alpha/beta/eta equivalence classes. In some boundary cases this might fails, because certain tools do not observe this equivalence. Here you can contract or expand manually to achieve a certain standard form, e.g. via Envir.eta_contract, Envir.beta_eta_contract, Patter.eta_long. The Thm module also provides some variants for actual theorems. Makarius From alfio.martini at gmail.com Tue Aug 30 15:07:51 2011 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QyOyl-0000YJ-MT (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Tue, 30 Aug 2011 15:07:51 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.6 from SpamAssassin-3.3.2-1162027 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [74.125.82.54 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (alfio.martini[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 HTML_MESSAGE BODY: HTML included in message * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature * 0.0 T_TO_NO_BRKTS_FREEMAIL To: misformatted and free email service X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta0.cl.cam.ac.uk ([128.232.25.20]:53113) by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25) with esmtp id 1QyOyl-000876-WR (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Tue, 30 Aug 2011 15:07:51 +0100 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by mta0.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1QyOyl-0001Sf-0T for isabelle-users at cl.cam.ac.uk; Tue, 30 Aug 2011 15:07:51 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.6 from SpamAssassin-3.3.2-1162027 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [74.125.82.54 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (alfio.martini[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 HTML_MESSAGE BODY: HTML included in message * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature * 0.0 T_TO_NO_BRKTS_FREEMAIL To: misformatted and free email service X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-ww0-f54.google.com ([74.125.82.54]:42918) by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25) with esmtp (csa=unknown) id 1QyOyk-00085y-X8 (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Tue, 30 Aug 2011 15:07:50 +0100 Received: by wwg11 with SMTP id 11so6386058wwg.23 for ; Tue, 30 Aug 2011 07:07:49 -0700 (PDT) MIME-Version: 1.0 Received: by 10.227.145.75 with SMTP id c11mr943178wbv.109.1314713269804; Tue, 30 Aug 2011 07:07:49 -0700 (PDT) Sender: alfio.martini at gmail.com Received: by 10.227.205.141 with HTTP; Tue, 30 Aug 2011 07:07:49 -0700 (PDT) Date: Tue, 30 Aug 2011 11:07:49 -0300 X-Google-Sender-Auth: ttbQPgxaARw-LPvr2WrCA3Zw33w Message-ID: From: Alfio Martini To: isabelle-users at cl.cam.ac.uk Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.8 Subject: [isabelle] Struggling with type unification X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Aug 2011 14:07:51 -0000 Status: O X-Status: X-Keywords: X-UID: 5907 Dear Isabelle Users, In the following simple script, the Isar proof only works if I fix the types of both subtrees, like I did. If I let their types unspecified (like in: fix x0 and lt0 and rt0) it gives a type unification error. From the proof state, one can see that it happens because the two induction hypothesis are assigned different type variables. Could anyone elaborate a bit more on that for me? Many Thanks! --------------------------------------------------------------------------------------------------------------- theory newbies_tree_demo imports Main begin datatype 'a Tree = Leaf | Br 'a "'a Tree" "'a Tree" primrec reflect::"'a Tree => 'a Tree" where ref01:"reflect Leaf = Leaf" | rev02:"reflect (Br label lt rt) = Br label (reflect rt) (reflect lt)" theorem th_refl01isA: "reflect (reflect t) = t" proof (induct t) show "reflect (reflect Leaf) = Leaf" by simp next fix x0 and lt0::"'a Tree" and rt0::"'a Tree" assume IH1: "reflect (reflect lt0) = lt0" assume IH2: "reflect (reflect rt0) = rt0" show "reflect (reflect (Br x0 lt0 rt0)) = Br x0 lt0 rt0" by (simp add:IH1 IH2) qed -- Alfio Ricardo Martini PhD in Computer Science (TU Berlin) Associate Professor at Faculty of Informatics (PUCRS) Porto Alegre - RS - Brasil From lp15 at cam.ac.uk Tue Aug 30 15:17:08 2011 Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141]) by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QyP7k-00012E-Do (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Tue, 30 Aug 2011 15:17:08 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -3.4 from SpamAssassin-3.3.2-1162027 * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * -0.5 RP_MATCHES_RCVD Envelope sender domain matches handover relay * domain * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta0.cl.cam.ac.uk ([128.232.25.20]:47266) by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25) with esmtp id 1QyP7k-0004SP-Pt (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Tue, 30 Aug 2011 15:17:08 +0100 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by mta0.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1QyP7j-0001eF-VY for isabelle-users at cl.cam.ac.uk; Tue, 30 Aug 2011 15:17:07 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: not scanned X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from epicure.cl.cam.ac.uk ([128.232.1.188]:52226) by ppsw-51.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.158]:587) with esmtpsa (PLAIN:lp15) (TLSv1:AES128-SHA:128) id 1QyP7j-0007dd-ZH (Exim 4.72) (return-path ); Tue, 30 Aug 2011 15:17:07 +0100 Mime-Version: 1.0 (Apple Message framework v1244.3) Content-Type: text/plain; charset=iso-8859-1 From: Lawrence Paulson In-Reply-To: Date: Tue, 30 Aug 2011 15:17:06 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Alfio Martini X-Mailer: Apple Mail (2.1244.3) Cc: isabelle-users at cl.cam.ac.uk Subject: Re: [isabelle] Struggling with type unification X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Aug 2011 14:17:08 -0000 Status: O X-Status: X-Keywords: X-UID: 5908 The problem is that the function reflect is polymorphic, and when you = simply state the induction hypotheses as you do, there is no reason to = assume that the variables have the same types. To eliminate this = difficulty, the Isar language includes abbreviations letting you refer = to the various inductive cases. Then types are assigned correctly. I = suggest writing your proof as follows: theorem th_refl01isA: "reflect (reflect t) =3D t" proof (induct t) case Leaf show ?case by simp next case (Br x0 lt0 rt0) thus ?case by simp qed Larry Paulson On 30 Aug 2011, at 15:07, Alfio Martini wrote: > Dear Isabelle Users, >=20 > In the following simple script, the Isar proof only works if I fix the = types > of > both subtrees, like I did. If I let their types unspecified (like in: = fix > x0 and lt0 and rt0) it > gives a type unification error. =46rom the proof state, one can see = that it > happens > because the two induction hypothesis are assigned different type = variables. >=20 > Could anyone elaborate a bit more on that for me? >=20 > Many Thanks! > = --------------------------------------------------------------------------= ------------------------------------- > theory newbies_tree_demo >=20 > imports Main >=20 > begin > datatype 'a Tree =3D Leaf | Br 'a "'a Tree" "'a Tree" >=20 > primrec reflect::"'a Tree =3D> 'a Tree" > where > ref01:"reflect Leaf =3D Leaf" | > rev02:"reflect (Br label lt rt) =3D Br label (reflect rt) (reflect = lt)" >=20 > theorem th_refl01isA: "reflect (reflect t) =3D t" > proof (induct t) > show "reflect (reflect Leaf) =3D Leaf" by simp > next > fix x0 and lt0::"'a Tree" and rt0::"'a Tree" > assume IH1: "reflect (reflect lt0) =3D lt0" > assume IH2: "reflect (reflect rt0) =3D rt0" > show "reflect (reflect (Br x0 lt0 rt0)) =3D Br x0 lt0 rt0" by = (simp > add:IH1 IH2) > qed >=20 >=20 > --=20 > Alfio Ricardo Martini > PhD in Computer Science (TU Berlin) > Associate Professor at Faculty of Informatics (PUCRS) > Porto Alegre - RS - Brasil From alfio.martini at gmail.com Tue Aug 30 15:21:10 2011 Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152]) by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QyPBe-0001KC-13 (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Tue, 30 Aug 2011 15:21:10 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.6 from SpamAssassin-3.3.2-1162027 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [74.125.82.54 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (alfio.martini[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 HTML_MESSAGE BODY: HTML included in message * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta1.cl.cam.ac.uk ([128.232.25.21]:56172) by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25) with esmtp id 1QyPBd-0005t5-Ep (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Tue, 30 Aug 2011 15:21:10 +0100 Received: from ppsw-50.csi.cam.ac.uk ([131.111.8.150]) by mta1.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1QyPBd-0005hC-Hj for isabelle-users at cl.cam.ac.uk; Tue, 30 Aug 2011 15:21:09 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.6 from SpamAssassin-3.3.2-1162027 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [74.125.82.54 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (alfio.martini[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 HTML_MESSAGE BODY: HTML included in message * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-ww0-f54.google.com ([74.125.82.54]:48294) by ppsw-50.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.147]:25) with esmtp (csa=unknown) id 1QyPBZ-0005VW-sh (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Tue, 30 Aug 2011 15:21:06 +0100 Received: by wwg11 with SMTP id 11so6401218wwg.23 for ; Tue, 30 Aug 2011 07:21:02 -0700 (PDT) MIME-Version: 1.0 Received: by 10.227.145.75 with SMTP id c11mr957399wbv.109.1314714062451; Tue, 30 Aug 2011 07:21:02 -0700 (PDT) Sender: alfio.martini at gmail.com Received: by 10.227.205.141 with HTTP; Tue, 30 Aug 2011 07:21:02 -0700 (PDT) In-Reply-To: References: Date: Tue, 30 Aug 2011 11:21:02 -0300 X-Google-Sender-Auth: SRsEj9N2TDETfSvY3dp1HRAODKs Message-ID: From: Alfio Martini To: Lawrence Paulson Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.8 Cc: isabelle-users at cl.cam.ac.uk Subject: Re: [isabelle] Struggling with type unification X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Aug 2011 14:21:10 -0000 Status: O X-Status: X-Keywords: X-UID: 5909 Dear Lawrence, Many thanks for the quick and helpful reply! Best! On Tue, Aug 30, 2011 at 11:17 AM, Lawrence Paulson wrote: > The problem is that the function reflect is polymorphic, and when you > simply state the induction hypotheses as you do, there is no reason to > assume that the variables have the same types. To eliminate this difficulty, > the Isar language includes abbreviations letting you refer to the various > inductive cases. Then types are assigned correctly. I suggest writing your > proof as follows: > > theorem th_refl01isA: "reflect (reflect t) = t" > proof (induct t) > case Leaf > show ?case by simp > next > case (Br x0 lt0 rt0) > thus ?case by simp > qed > > Larry Paulson > > > On 30 Aug 2011, at 15:07, Alfio Martini wrote: > > > Dear Isabelle Users, > > > > In the following simple script, the Isar proof only works if I fix the > types > > of > > both subtrees, like I did. If I let their types unspecified (like in: > fix > > x0 and lt0 and rt0) it > > gives a type unification error. From the proof state, one can see that it > > happens > > because the two induction hypothesis are assigned different type > variables. > > > > Could anyone elaborate a bit more on that for me? > > > > Many Thanks! > > > --------------------------------------------------------------------------------------------------------------- > > theory newbies_tree_demo > > > > imports Main > > > > begin > > datatype 'a Tree = Leaf | Br 'a "'a Tree" "'a Tree" > > > > primrec reflect::"'a Tree => 'a Tree" > > where > > ref01:"reflect Leaf = Leaf" | > > rev02:"reflect (Br label lt rt) = Br label (reflect rt) (reflect lt)" > > > > theorem th_refl01isA: "reflect (reflect t) = t" > > proof (induct t) > > show "reflect (reflect Leaf) = Leaf" by simp > > next > > fix x0 and lt0::"'a Tree" and rt0::"'a Tree" > > assume IH1: "reflect (reflect lt0) = lt0" > > assume IH2: "reflect (reflect rt0) = rt0" > > show "reflect (reflect (Br x0 lt0 rt0)) = Br x0 lt0 rt0" by (simp > > add:IH1 IH2) > > qed > > > > > > -- > > Alfio Ricardo Martini > > PhD in Computer Science (TU Berlin) > > Associate Professor at Faculty of Informatics (PUCRS) > > Porto Alegre - RS - Brasil > > -- Alfio Ricardo Martini PhD in Computer Science (TU Berlin) Associate Professor at Faculty of Informatics (PUCRS) Porto Alegre - RS - Brasil From bulwahn at in.tum.de Tue Aug 30 15:57:17 2011 Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141]) by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QyPkb-00023z-F7 (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Tue, 30 Aug 2011 15:57:17 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1162027 * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta1.cl.cam.ac.uk ([128.232.25.21]:35588) by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25) with esmtp id 1QyPka-00070k-Sr (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Tue, 30 Aug 2011 15:57:17 +0100 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by mta1.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1QyPka-0006AH-TO for isabelle-users at cl.cam.ac.uk; Tue, 30 Aug 2011 15:57:16 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1162027 * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-out1.informatik.tu-muenchen.de ([131.159.0.8]:56541) by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25) with esmtp (csa=unknown) id 1QyPkX-0001dC-X8 (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Tue, 30 Aug 2011 15:57:13 +0100 Received: from [131.159.47.188] (lapbroy39.informatik.tu-muenchen.de [131.159.47.188]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.in.tum.de (Postfix) with ESMTP id A5F2BE75C; Tue, 30 Aug 2011 16:57:12 +0200 (CEST) Message-ID: <4E5CFA47.3060505 at in.tum.de> Date: Tue, 30 Aug 2011 16:57:11 +0200 From: Lukas Bulwahn User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.18) Gecko/20110617 Thunderbird/3.1.11 MIME-Version: 1.0 To: Lawrence Paulson References: <3E566A88-3CA1-4CED-B7E1-92367E18649A at uibk.ac.at> <22D7FB73-B73F-42A3-B0FD-F5A5A3E0B578 at cam.ac.uk> In-Reply-To: <22D7FB73-B73F-42A3-B0FD-F5A5A3E0B578 at cam.ac.uk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Cc: USR Isabelle Mailinglist , =?ISO-8859-1?Q?Ren=E9_Thiemann?= Subject: Re: [isabelle] list_size_pointwise X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Aug 2011 14:57:17 -0000 Status: O X-Status: X-Keywords: X-UID: 5910 Is anyone already changing this to the stronger version right now? Otherwise I would tackle this change this evening, in two hours from now. Lukas On 08/30/2011 11:52 AM, Lawrence Paulson wrote: > I agree. The current version is unnecessarily week. > Larry Paulson > > > On 30 Aug 2011, at 10:44, Ren=E9 Thiemann wrote: > >> Dear all, >> >> when looking at the thm in Libary List >> >> lemma list_size_pointwise: assumes "!! x. x : set xs =3D=3D> f x< g = x" >> shows "list_size f xs<=3D list_size g xs" >> >> I was wondering why the strict inequality is used in the assumption. I= ndeed, >> the lemma also holds in its stronger version where only<=3D is used in= the assumption. >> >> lemma list_size_pointwise': assumes "\ x. x \ set xs \ f x \ g x" >> shows "list_size f xs \ list_size g xs" >> using assms >> proof (induct xs) >> case Nil thus ?case by auto >> next >> case (Cons x xs) >> have "list_size f xs \ list_size g xs" >> by (rule Cons(1), insert Cons(2), auto) >> with Cons(2)[of x] >> show ?case by auto >> qed >> >> So, one might consider to replace the current lemma list_size_pointwis= e >> by the stronger version list_size_pointwise'. >> >> Cheers, >> Ren=E9 >> --=20 >> Ren=E9 Thiemann mailto:rene.thiemann at uibk.ac.at >> Computational Logic Group http://cl-informatik.uibk.ac.at/~thie= mann/ >> Institute of Computer Science phone: +43 512 507-6434 >> University of Innsbruck >> >> > From huffman.brian.c at gmail.com Tue Aug 30 17:47:14 2011 Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141]) by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QyRT0-0004qb-60 (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Tue, 30 Aug 2011 17:47:14 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.6 from SpamAssassin-3.3.2-1162027 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.216.174 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (huffman.brian.c[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta1.cl.cam.ac.uk ([128.232.25.21]:36674) by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25) with esmtp id 1QyRSy-0003Fy-RD (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Tue, 30 Aug 2011 17:47:14 +0100 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by mta1.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1QyRSy-00087H-CG for isabelle-users at cl.cam.ac.uk; Tue, 30 Aug 2011 17:47:12 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.6 from SpamAssassin-3.3.2-1162027 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.216.174 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (huffman.brian.c[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-qy0-f174.google.com ([209.85.216.174]:43220) by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25) with esmtp (csa=unknown) id 1QyRSu-0004vn-WS (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Tue, 30 Aug 2011 17:47:09 +0100 Received: by qyk15 with SMTP id 15so1739347qyk.5 for ; Tue, 30 Aug 2011 09:47:04 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.67.143 with SMTP id r15mr7085460qci.11.1314722824348; Tue, 30 Aug 2011 09:47:04 -0700 (PDT) Sender: huffman.brian.c at gmail.com Received: by 10.229.192.132 with HTTP; Tue, 30 Aug 2011 09:47:04 -0700 (PDT) In-Reply-To: References: Date: Tue, 30 Aug 2011 09:47:04 -0700 X-Google-Sender-Auth: k5ceh-65eCGaujxhNjGmBvyntqY Message-ID: From: Brian Huffman To: isabelle-users Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [isabelle] Unify.matchers and term representation X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Aug 2011 16:47:14 -0000 Status: O X-Status: X-Keywords: X-UID: 5911 On Tue, Aug 30, 2011 at 5:12 AM, Makarius wrote: > > Larry is right that according to the natural order of things it is better to > leave things as they are produced, and work conceptually with arbitrary > representatives of the alpha/beta/eta equivalence classes. > > In some boundary cases this might fails, because certain tools do not > observe this equivalence. I want to point out that the *simplifier* is one of those "certain tools" whose behavior depends on whether or not terms are eta-expanded. (This includes not only the "simp" method, but also "unfold", "auto", "fastsimp", etc.) Many simplification rules, such as "id x = x" or "(f o g) x = f (g x)", are intended to unfold a definition of a constant *only* when it is applied to an argument. Eta expansion can cause the simplifier to apply these rules in unexpected situations. (When users have the "eta contract" pretty printing option enabled, as is the default, replacements like "f o g" -> "%x. f (g x)" can appear to happen at random.) Eta-expansion can cause some confusion with congruence rules in the simplifier, since a congruence rule only applies when the given constant is applied to a sufficient number of arguments. https://lists.cam.ac.uk/pipermail/cl-isabelle-users/2010-May/msg00032.html https://lists.cam.ac.uk/pipermail/cl-isabelle-users/2010-May/msg00046.html Eta expansion also interferes with the feature of the "rule" tactic where it tries to preserve bound variable names: https://mailmanbroy.informatik.tu-muenchen.de/pipermail/isabelle-dev/2011-August/001803.html With type "'a set" being an abbreviation for "'a => bool", eta-expansion can happen to set expressions, which causes other problems. For example, "A \ B" might get expanded to "%a. (A \ B) a". Because of this, the otherwise-entirely-reasonable simp rule "inf f g x = inf (f x) (g x)" would cause "%a. (A \ B) a" (which pretty-prints as "A \ B") to simplify to "%x. A x & B x", violating the set/predicate discipline and messing up a lot of proofs. https://mailmanbroy.informatik.tu-muenchen.de/pipermail/isabelle-dev/2011-August/001687.html https://mailmanbroy.informatik.tu-muenchen.de/pipermail/isabelle-dev/2011-August/001733.html > On Tue, 30 Aug 2011, Lawrence Paulson wrote: > >> The unification algorithm operates on eta-expanded terms. Is there any >> compelling reason why you need them to be eta-contracted? For reasons including (but not limited to) the ones listed above, I would greatly prefer to have a unification algorithm that preserves terms as much as possible, performing NO unnecessary eta-expansions OR eta-contractions. (Implementation idea: When eta-expanding, mark all of the newly-introduced bound variables in some way; then do an eta-contraction at the end, contracting *only* newly-introduced variables.) A unification algorithm with this property would allow us to simplify Isabelle's pretty printer quite a bit: The ridiculous "eta contract" pretty-printing option would no longer be needed, and we could also get rid of a lot of ML code used for preventing or reversing eta-contraction with binders (e.g. the print translations for "split" in Product_Type.thy). - Brian From bulwahn at in.tum.de Tue Aug 30 19:13:36 2011 Received: from ppsw-50.csi.cam.ac.uk ([131.111.8.150]) by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QySoa-00066i-9i (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Tue, 30 Aug 2011 19:13:36 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1162027 * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta1.cl.cam.ac.uk ([128.232.25.21]:42473) by ppsw-50.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.147]:25) with esmtp id 1QySoZ-00019X-rx (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Tue, 30 Aug 2011 19:13:36 +0100 Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151]) by mta1.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1QySoZ-0000uL-Lr for isabelle-users at cl.cam.ac.uk; Tue, 30 Aug 2011 19:13:35 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1162027 * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-out1.informatik.tu-muenchen.de ([131.159.0.8]:40560) by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25) with esmtp (csa=unknown) id 1QySoV-0003vD-Yx (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Tue, 30 Aug 2011 19:13:32 +0100 Received: from [10.49.225.142] (unknown [82.113.99.14]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.in.tum.de (Postfix) with ESMTP id BABB187BE; Tue, 30 Aug 2011 20:13:30 +0200 (CEST) Message-ID: <4E5D2846.9040103 at in.tum.de> Date: Tue, 30 Aug 2011 20:13:26 +0200 From: Lukas Bulwahn User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.18) Gecko/20110617 Thunderbird/3.1.11 MIME-Version: 1.0 To: Lawrence Paulson References: <3E566A88-3CA1-4CED-B7E1-92367E18649A at uibk.ac.at> <22D7FB73-B73F-42A3-B0FD-F5A5A3E0B578 at cam.ac.uk> <4E5CFA47.3060505 at in.tum.de> In-Reply-To: <4E5CFA47.3060505 at in.tum.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Cc: USR Isabelle Mailinglist , =?ISO-8859-1?Q?Ren=E9_Thiemann?= Subject: Re: [isabelle] list_size_pointwise X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Aug 2011 18:13:36 -0000 Status: O X-Status: X-Keywords: X-UID: 5912 changesets f3635643a376 and fd520fa2fb09 are the result of this thread. Lukas On 08/30/2011 04:57 PM, Lukas Bulwahn wrote: > Is anyone already changing this to the stronger version right now? > > Otherwise I would tackle this change this evening, in two hours from no= w. > > Lukas > > > On 08/30/2011 11:52 AM, Lawrence Paulson wrote: >> I agree. The current version is unnecessarily week. >> Larry Paulson >> >> >> On 30 Aug 2011, at 10:44, Ren=E9 Thiemann wrote: >> >>> Dear all, >>> >>> when looking at the thm in Libary List >>> >>> lemma list_size_pointwise: assumes "!! x. x : set xs =3D=3D> f x< g= x" >>> shows "list_size f xs<=3D list_size g xs" >>> >>> I was wondering why the strict inequality is used in the assumption.=20 >>> Indeed, >>> the lemma also holds in its stronger version where only<=3D is used i= n=20 >>> the assumption. >>> >>> lemma list_size_pointwise': assumes "\ x. x \ set xs=20 >>> \ f x \ g x" >>> shows "list_size f xs \ list_size g xs" >>> using assms >>> proof (induct xs) >>> case Nil thus ?case by auto >>> next >>> case (Cons x xs) >>> have "list_size f xs \ list_size g xs" >>> by (rule Cons(1), insert Cons(2), auto) >>> with Cons(2)[of x] >>> show ?case by auto >>> qed >>> >>> So, one might consider to replace the current lemma list_size_pointwi= se >>> by the stronger version list_size_pointwise'. >>> >>> Cheers, >>> Ren=E9 >>> --=20 >>> Ren=E9 Thiemann mailto:rene.thiemann at uibk.ac.at >>> Computational Logic Group =20 >>> http://cl-informatik.uibk.ac.at/~thiemann/ >>> Institute of Computer Science phone: +43 512 507-6434 >>> University of Innsbruck >>> >>> >> > > From florian.haftmann at informatik.tu-muenchen.de Wed Aug 31 19:53:43 2011 Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141]) by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1Qypux-0002la-HM (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Wed, 31 Aug 2011 19:53:43 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.4 from SpamAssassin-3.3.2-1162027 * -0.5 RP_MATCHES_RCVD Envelope sender domain matches handover relay * domain * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta0.cl.cam.ac.uk ([128.232.25.20]:57670) by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25) with esmtp id 1Qypuw-0002dR-SO (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Wed, 31 Aug 2011 19:53:43 +0100 Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152]) by mta0.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1Qypuw-00057s-MM for isabelle-users at cl.cam.ac.uk; Wed, 31 Aug 2011 19:53:42 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.4 from SpamAssassin-3.3.2-1162027 * -0.5 RP_MATCHES_RCVD Envelope sender domain matches handover relay * domain * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-out1.informatik.tu-muenchen.de ([131.159.0.8]:46322) by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25) with esmtp (csa=unknown) id 1Qypuv-0003Ce-Dn (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Wed, 31 Aug 2011 19:53:42 +0100 Received: from localhost (scanbroy [10.46.146.16]) by mailbroy.informatik.tu-muenchen.de (Postfix) with ESMTP id BE1E68052D4E8; Wed, 31 Aug 2011 20:53:37 +0200 (CEST) X-Virus-Scanned: by amavisd-new using ClamAV at mailbroy.informatik.tu-muenchen.de Received: from mailbroy.informatik.tu-muenchen.de ([10.46.146.15]) by localhost (mailbroy.informatik.tu-muenchen.de [10.46.146.16]) (amavisd-new, port 10024) with ESMTP id 9IW4mUOaFqPU; Wed, 31 Aug 2011 20:53:37 +0200 (CEST) Received: from [192.168.2.24] (p57A359B6.dip.t-dialin.net [87.163.89.182]) by mailbroy.informatik.tu-muenchen.de (Postfix) with ESMTPSA id 0D6928052D1DA; Wed, 31 Aug 2011 20:53:36 +0200 (CEST) Message-ID: <4E5E832B.9060902 at informatik.tu-muenchen.de> Date: Wed, 31 Aug 2011 20:53:31 +0200 From: Florian Haftmann Organization: TU =?ISO-8859-1?Q?M=FCnchen=2C_Lehrstuhl_Software_and?= =?ISO-8859-1?Q?_Systems_Engineering?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.20) Gecko/20110805 Lightning/1.0b2 Thunderbird/3.1.12 MIME-Version: 1.0 To: Viorel Preoteasa References: <4E5644D5.2020205 at in.tum.de> <4E5745D1.9020600 at abo.fi> <4E582373.80901 at in.tum.de> <4E5B5646.1080408 at abo.fi> <4E5CC512.2010403 at in.tum.de> <4E5CC902.6030007 at abo.fi> In-Reply-To: <4E5CC902.6030007 at abo.fi> X-Enigmail-Version: 1.1.2 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig6DA56D4AC59A85541D524BD0" Cc: USR Isabelle Mailinglist Subject: Re: [isabelle] Lattices and syntactic classes X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Aug 2011 18:53:43 -0000 Status: O X-Status: X-Keywords: X-UID: 5913 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig6DA56D4AC59A85541D524BD0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Viorel, >>> There are some aspects of the lattice theories which creates problems= >>> for my developments. The fact that inf and sup constants are part >>> of the lattice itself, rather than being defined just as classes with= >>> only inf and sup constants. All other constants (*, +, ...) are defin= ed >>> in separate classes and their reuse is much easier. >>> Do you know if the same technique is going to be used for inf and sup= ? > Ultimately the structure is a (semi-) lattice, but the axioms are > different. > Imagine an algebraic structure with some operations *, left_imp which > satisfies > some properties and in which inf can be defined >=20 > class left_inf =3D inf + times + left_imp + order + > assumes some axioms for times and left_imp > and inf_l_def: "(inf a b) =3D (left_imp a b) * a" > and definition of order >=20 > begin >=20 > in this setting the fact that inf is a semi-lattice operation can be > proved from the axioms of times and left_imp. >=20 > in the context of left_inf I would state >=20 > subclass semilattice_inf >=20 > If I assume that left_inf is a semilattice_inf, then I would need to > prove this fact for every instantiation of it. > One more comment. Now in the Isabelle/HOL library the operations > Inf and Sup of complete lattices are defined in their own classes. > If the same is done for inf and sup, their use via semilattice will > be the same, but it would be easier to reuse them in contexts > where one does not want to assume the semilattice structure.=20 the answer to your issue has many facets. Historically, syntactic classes where necessary since the class + operations & instantiation infrastructure has not yet emerged. With the class package my first thought was to avoid syntactic classes entirely, since they allow to write down things for which one might expect certain properties to hold, which, in fact, do not, only with more specific sort constraints: (a + b) + c =3D a + (b + c) 2 + 2 =3D 4 -- an Isabelle classic! (an aside: there is a similar issue with min/max which are defined purely syntactical, not only on linear orders) I kept the then existing syntactic classes a) for backward compatibility and b) since they carry syntax by default. The case for inf and sup then was different. Nowadays I have to admit that in situations like yours syntactic classes for inf and sup would allow a more liberal building of the class hierarchy. Indeed, I recently had some thoughts how you could achieve something like =BBimport class parameters, but with different specification from which the original specification follows=AB, in essenc= e a class with simultaneous subclass. But it looked rather complicated. I have no strong opinion whether to turn inf and sup into syntactic classes. But note that to simplify your instantiation proofs you can prove a specific introduction rule for P =3D=3D> OFCLASS('a, left_inf) wh= ere P is the body of your left_inf class. Hope this helps, Florian --=20 Home: http://www.in.tum.de/~haftmann PGP available: http://home.informatik.tu-muenchen.de/haftmann/pgp/florian_haftmann_at_in= formatik_tu_muenchen_de --------------enig6DA56D4AC59A85541D524BD0 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk5egzAACgkQZEASYmKQGuEEKQCfQtDQdddivMzt4gsH9KOUl5X+ jeAAoLPcLZr1XzswLxlyf/8iBOQhBsps =10h7 -----END PGP SIGNATURE----- --------------enig6DA56D4AC59A85541D524BD0-- From huffman.brian.c at gmail.com Wed Aug 31 20:58:24 2011 Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141]) by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25) with esmtp id 1QyqvY-0003XB-7Y (Exim 4.70) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Wed, 31 Aug 2011 20:58:24 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.6 from SpamAssassin-3.3.2-1162027 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [74.125.82.174 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (huffman.brian.c[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mta0.cl.cam.ac.uk ([128.232.25.20]:52173) by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25) with esmtp id 1QyqvX-0001Nr-Qc (Exim 4.72) for cl-isabelle-users at lists.cam.ac.uk (return-path ); Wed, 31 Aug 2011 20:58:24 +0100 Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152]) by mta0.cl.cam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1QyqvX-0006UB-6S for isabelle-users at cl.cam.ac.uk; Wed, 31 Aug 2011 20:58:23 +0100 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: score -2.6 from SpamAssassin-3.3.2-1162027 * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [74.125.82.174 listed in list.dnswl.dnsbl.ja.net] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (huffman.brian.c[at]gmail.com) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail-wy0-f174.google.com ([74.125.82.174]:40544) by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25) with esmtp (csa=unknown) id 1QyqvW-0001xt-D4 (Exim 4.72) for isabelle-users at cl.cam.ac.uk (return-path ); Wed, 31 Aug 2011 20:58:23 +0100 Received: by wyh22 with SMTP id 22so533176wyh.5 for ; Wed, 31 Aug 2011 12:58:18 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.145.1 with SMTP id o1mr704412wej.68.1314820698606; Wed, 31 Aug 2011 12:58:18 -0700 (PDT) Sender: huffman.brian.c at gmail.com Received: by 10.216.156.145 with HTTP; Wed, 31 Aug 2011 12:58:18 -0700 (PDT) In-Reply-To: <4E5E832B.9060902 at informatik.tu-muenchen.de> References: <4E5644D5.2020205 at in.tum.de> <4E5745D1.9020600 at abo.fi> <4E582373.80901 at in.tum.de> <4E5B5646.1080408 at abo.fi> <4E5CC512.2010403 at in.tum.de> <4E5CC902.6030007 at abo.fi> <4E5E832B.9060902 at informatik.tu-muenchen.de> Date: Wed, 31 Aug 2011 12:58:18 -0700 X-Google-Sender-Auth: qWmIxrxuP2e0DaT4mUMRv3YxKoQ Message-ID: From: Brian Huffman To: Florian Haftmann Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: USR Isabelle Mailinglist , Viorel Preoteasa Subject: Re: [isabelle] Lattices and syntactic classes X-BeenThere: cl-isabelle-users at lists.cam.ac.uk X-Mailman-Version: 2.1.8 Precedence: list List-Id: Isabelle Users List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Aug 2011 19:58:24 -0000 Status: O X-Status: X-Keywords: X-UID: 5914 On Wed, Aug 31, 2011 at 11:53 AM, Florian Haftmann wrote: > Hi Viorel, > >> Ultimately the structure is a (semi-) lattice, but the axioms are >> different. >> Imagine an algebraic structure with some operations *, left_imp which >> satisfies >> some properties and in which inf can be defined >> >> class left_inf =3D inf + times + left_imp + order + >> =A0 assumes some axioms for times and left_imp >> =A0 and inf_l_def: "(inf a b) =3D (left_imp a b) * a" >> =A0 and definition of order >> >> begin >> >> in this setting the fact that inf is a semi-lattice operation can be >> proved from the axioms of times and left_imp. There are several similar situations that arise in Isabelle's real analysis class hierarchy. For example, RealVector.thy introduces type classes topological_space and metric_space. Every metric space is also a topological space, so we definitely want a subclass relationship topological_space < metric_space. The naive way to formalize these classes is shown below. class topological_space =3D fixes "open" :: "'a set =3D> bool" assumes open_UNIV: "open UNIV" assumes open_Int: "open S =3D=3D> open T =3D=3D> open (S \ T)" assumes open_Union:: "ALL S:K. open S =3D=3D> open (Union K)" class metric_space =3D topological_space + fixes dist :: "'a =3D> 'a =3D> real" assumes dist_eq_0_iff: "(dist x y =3D 0) =3D (x =3D y)" assumes dist_triangle2: "dist x y \ dist x z + dist y z" assumes open_dist: "open S =3D (ALL x:S. EX e>0. ALL y. dist y x < e --> = y : S)" Of course, the problem here is that whenever we want to prove an instance of the metric_space class, Isabelle expects us to re-prove all the topological_space axioms as well, even though they are implied by the metric_space axioms! To avoid this, I broke up the class definitions using some syntactic classes: class "open" =3D fixes "open" :: "'a set =3D> bool" class topological_space =3D "open" + assumes open_UNIV: "open UNIV" assumes open_Int: "open S =3D=3D> open T =3D=3D> open (S \ T)" assumes open_Union:: "ALL S:K. open S =3D=3D> open (Union K)" class dist =3D fixes dist :: "'a =3D> 'a =3D> real" class open_dist =3D "open" + dist + assumes open_dist: "open S =3D (ALL x:S. EX e>0. ALL y. dist y x < e --> = y : S)" class metric_space =3D open_dist + assumes dist_eq_0_iff: "(dist x y =3D 0) =3D (x =3D y)" assumes dist_triangle2: "dist x y \ dist x z + dist y z" Then we can prove a subclass relationship: instance topological_space < metric_space proof ... Now instance proofs for metric_space give us exactly the proof obligations we want. Similar relationships exist among a whole sequence of classes, and they are set up in a similar manner: topological_space < metric_space < real_normed_vector < real_inner > Historically, syntactic classes where necessary since the class + > operations & instantiation infrastructure has not yet emerged. With the > class package my first thought was to avoid syntactic classes entirely, > since they allow to write down things for which one might expect certain > properties to hold, which, in fact, do not, only with more specific sort > constraints: > > (a + b) + c =3D a + (b + c) > 2 + 2 =3D 4 -- an Isabelle classic! The redefined class hierarchy as I presented it above still has this same kind of problem: If you write something like "dist x y =3D dist y x", the inferred sort for x and y is "dist", and not "metric_space" as you would like. I solve this problem with the following ML command: setup {* Sign.add_const_constraint (@{const_name dist}, SOME @{typ "'a::metric_space =3D> 'a =3D> real"}) *} This tells Isabelle's parser/typechecker to automatically infer a metric_space class constraint whenever the "dist" constant is used. This works great most of the time, but there are rare occasions when I need to temporarily turn off the extra constraints (see Library/Inner_Product.thy) which is a pain. > Nowadays I have to admit that in situations like yours syntactic classes > for inf and sup would allow a more liberal building of the class > hierarchy. Indeed, I recently had some thoughts how you could achieve > something like =BBimport class parameters, but with different > specification from which the original specification follows=AB, in essenc= e > a class with simultaneous subclass. But it looked rather complicated. Such a feature might be worthwhile; after all, my workaround for the problem is rather complicated too! This feature would let us radically simplify the class hierarchy in the real analysis theories. It would also let us simplify the group/ring class hierarchy a bit. But perhaps most importantly, it would let users define classes like Viorel's "left_inf" class in the most natural way. - Brian