# HG changeset patch
# User Christian Urban
-
-
-to the file $HOME/isabelle/etc/settings.
-
-You can also be on the bleeding edge by downloading the
-sources from this Mercurial
-Repository.
-
-
-
-
-
-
-
-Let us explain one of our results with a simple proof about the lambda calculus.
-An informal "pencil-and-paper" proof there looks typically as follows (this one is taken from Barendregt's classic book
-on the lambda calculus):
-
- We want to make it as easy as possible to formalise such informal proofs (and
-more complicated ones). Inspired by the PoplMark Challenge, we want that masses use theorem
-assistants to do their formal proofs.
-
-Since the kind of informal reasoning illustrated by Barendregt's proof is very
-common in the literature on programming languages, it might be surprising that
-implementing his proof
-in a theorem assistant is not a trivial task. This is because he relies
-implicitly on some assumptions and conventions. For example he states in his
-book:
-
-The first convention is crucial for the proof above as it allows one to deal
-with the variable case by using equational reasoning - one can just calculate
-what the results of the substitutions are. If one uses un-equated, or raw, lambda-terms,
-the same kind of reasoning cannot be performed (the reasoning then has to be
-modulo α-equivalence, which causes a lot of headaches in
-the lambda-case.) But if the data-structure over which the proof is
-formulated is α-equivalence classes of lambda-terms, then what is the
-principle "by induction over the structure of M"? There is an
-induction principle "over the structure" for (un-equated) lambda-terms. But
-quotening lambda-terms by α-equivalence does not automatically lead to
-such a principle for α-equivalence classes. This seems to be a point
-that is nearly always ignored in the literature. In fact it takes, as we have
-shown in [1] and [2], some serious work to provide such an induction principle
-for α-equivalence classes.
-
-The second problem for an implementation of Barendregt's proof is his use of
-the variable convention: there is just no proof-principle "by convention" in a
-theorem assistant. Taking a closer look at Barendregt's reasoning, it turns
-out that for a proof obligation of the form "for all α-equated
-lambda-terms λz.M1...", he does not establish this
-proof obligation for all λz.M1, but only for some
-carefully chosen α-equated lambda-terms, namely the ones for which
-z is not free in x,y,N and L. This style of reasoning
-clearly needs some justification and in fact depends on some assumptions of
-the "context" of the induction. By "context" of the induction we mean the
-variables x,y,N and L. When employing the variable convention in
-a formal proof, one always implicitly assumes that one can choose a fresh name
-for this context. This might, however, not always be possible, for example
-when the context already mentions all names. Also we found out recently that the
-use of the variable convention in proofs by rule-induction can lead to
-faulty reasoning [5]. So our work introduces safeguards that ensure that the
-use of the variable convention is always safe.
-
-One might conclude from our comments about Barendregt's proof that it is no
-proof at all. This is, however, not the case! With Nominal Isabelle
-and its infrastructure one can easily formalise his reasoning. One first
-has to declare the structure of α-equated
-lambda-terms as a nominal datatype:
-
-Note though, that nominal datatypes are not datatypes in the traditional
-sense, but stand for α-equivalence classes. Indeed we have for terms of
-type
-which does not hold for traditional datatypes (note that we write
-lambda-abstractions as
-where the assumption "x is fresh for L", written
-The lemma
-In this proof
-Although the latter lemma does not appear explicitly in Barendregt's reasoning, it is required
-in the last step of the lambda-case (Case 2) where he pulls the substitution from under
-the binder z (the interesting step is marked with a •):
-After these 22 lines one has a completely formalised proof of the substitution
-lemma. This proof does not rely on any axioms, apart from the ones on which
-HOL is built.
-
-
-Last modified: Mon May 9 05:35:17 BST 2011
-
-[Validate this page.]
-
-
-
diff -r f1be8028a4a9 -r 75df587e1bcd Nominal/ijcar-08.html--
--- a/Nominal/ijcar-08.html-- Wed Mar 30 17:27:34 2016 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-
-
-
-
-
-
-
-
-To root out bugs, every programming language should be designed with the help
-of a theorem prover, and every compiler should be verified. With our work we
-aim to provide all proving technologies necessary for reasoning
-conveniently about programming languages (for example the lambda
-calculus) and compilers. For us, formal proofs should be as easy to perform as informal
-"pencil-and-paper" proofs - at least the overhead of formal proofs should not
-prevent any formalisation. Many ideas for our work come from the nominal
-logic work by Andrew
-Pitts. Our theoretical results about nominal theories enabled us to
-implement Nominal Isabelle on top of Isabelle/HOL.
-
-If you want to see a simple example illustrating our results on Nominal Isabelle click
-here. For more interesting results, we already
-completed formalisations of Church-Rosser and strong-normalisation proofs as
-well as the first part of the PoplMark
-Challenge. We also formalised some typical proofs from SOS, Karl Crary's chapter on
-logical relations from Advanced Topics in Types and Programming Languages, and also
-a paper on LF by Harper and
-Pfenning. In the latter paper we found a gap in
-the soundness proof and corrected it (we actually gave three solutions to the problem [6]). Urban
-formalised and also corrected the main result of his PhD, a logical relation argument for
-establishing strong normalisation of cut-elimination in classical logic. Other
-people have used Nominal Isabelle too:
-
-Our Old Activities
-
-Past
-
-2013
-
-
-
-2013
-
-
-
-2012
-
-
-
-2011
-
-
-
-2010
-
-
-
-2009
-
-
-
-2008
-
-
-
-
-2007
-
-
-
-
-
-
-
-
diff -r f1be8028a4a9 -r 75df587e1bcd Nominal/activities.html~
--- a/Nominal/activities.html~ Wed Mar 30 17:27:34 2016 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,181 +0,0 @@
-
-
-
-
- Our Old Activities
-
-
-2013
-
-
-
-Past
-
-2013
-
-
-
-2012
-
-
-
-2011
-
-
-
-2010
-
-
-
-2009
-
-
-
-2008
-
-
-
-
-2007
-
-
-
-
-
-
-
-
diff -r f1be8028a4a9 -r 75df587e1bcd Nominal/cookie.html--
--- a/Nominal/cookie.html-- Wed Mar 30 17:27:34 2016 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-
diff -r f1be8028a4a9 -r 75df587e1bcd Nominal/documentation.html--
--- a/Nominal/documentation.html-- Wed Mar 30 17:27:34 2016 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-
-
-
-
-
- Documentation
-
-Some rudimentary notes are available in
-postscript and
-in pdf. We are
-working on better documentation - hassle us to speed up this
-process.
-
-A somewhat highlevel description of the formalisation in the example file SOS.thy.
-[pdf]
-
-Nominal Bibliography
-
-CiteULike
-collection about nominal techniques compiled by Dominic Mulligan (supersedes
-the collection below).
-
-
-
-Here
-is a bibliography of publications related to the nominal logic work.
-
-
-
diff -r f1be8028a4a9 -r 75df587e1bcd Nominal/download-old.html--
--- a/Nominal/download-old.html-- Wed Mar 30 17:27:34 2016 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-
-
-
-
- Download
-
-Download the Nominal Isabelle snapshot provided below and
-follow the instructions in INSTALL.
-
-
-Isabelle Snapshot from 7. January 2008 (includes version 0.14 of the nominal datatype package)
-
-
-
-
-INSTALL
-
-
-
-Beginning from version 0.13, the nominal package can be started by using
-just the command "Isabelle" and enabling the option "HOL-Nominal" in the
-ProofGeneral menu "Isabelle -> Logics". If you want that HOL-Nominal is
-your default logic, then you can add
-
-
-
-
-
-
-
-
-
diff -r f1be8028a4a9 -r 75df587e1bcd Nominal/download.html--
--- a/Nominal/download.html-- Wed Mar 30 17:27:34 2016 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-
-
-
-
-
-At the moment, Nominal2 is still alpha-ware and not part of the standard
-Isabelle distribution. But assuming you have a working Isabelle 2016 distribution,
-it can be easily installed. The necessary theory files for Nominal2 can be downloaded
-from:
-
-Nominal2 and Isabelle 2016
-
-
-Unpack the tgz-file. This will create a directory Nominal and also
-Nominal/Ex. If you change into the latter directory and load, for example,
-Lambda.thy, then you are already up and running. You can proceed
-with this theory as if it was a "normal" theory based on Main.
-
-
-Nominal1 and Isabelle 2016
-
-Nominal1 is part of the current distribution and can be installed
-as explained here.
-
-
-(Obsolete) Nominal2 and older Isabelle
-
-Nominal2-2011-1.tgz (17 Feb. 2012)
-Nominal2-2012.tgz (15 May 2012)
-Nominal2-2013.tgz (19 February 2013)
-Nominal2-2013-1.tgz (18 October 2013)
-Nominal2-2013-2.tgz (15 December 2013)
-Nominal2-2014.tgz (9 September 2014)
-Nominal2-2015.tgz (9 July 2015)
-
-
-
-
-
diff -r f1be8028a4a9 -r 75df587e1bcd Nominal/example.html--
--- a/Nominal/example.html-- Wed Mar 30 17:27:34 2016 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,384 +0,0 @@
-
-
-
-
- Barendregt's Substitution Lemma
-
-
-
-
-
-
- 2.1.16. Substitution Lemma: If x≠y and x not free in L,
- then
-
-
-
-
-
-
-
-
-Proof: By induction on the structure of M.
-
-
-
-
-
-
-
-
-(λz.M1)[x:=N][y:=L]
- =
- λz.M1[x:=N][y:=L]
-
-
- =
- λz.M1[y:=L][x:=N[y:=L]]
-
-
- =
- (λz.M1)[y:=L][x:=N[y:=L]].
-
-
-
-
-
-2.1.12. Convention. Terms that are α-congruent are identified. So now we
-write λx.x=λy.y, etcetera.
-
-
-
-
-
-
-2.1.13. Variable Convention. If M1,...,Mn occur
-in a certain mathematical context (e.g. definition, proof), then in these terms all
-bound variables are chosen to be different from the free variables.
-
-term
the equation(!)
-Lam [a].t
). The proof of the substitution
-lemma can then be formalised as follows:
-x#L
,
-encodes the usual relation of "x not free in L". The method
-nominal_induct
takes as arguments the variable over which the
-induction is
-performed (here M), and the context of the induction, which consists of
-the variables mentioned in the variable convention (that is the part in
-Barendregt's proof where he writes "...we may assume that z≠x,y and
-z is not free in N,L"). The last argument of nominal_induct
-specifies which induction rule should be applied - in this case induction over
-α-equated lambda-terms, an induction-principle Nominal Isabelle provides
-automatically when the nominal datatype term
is defined. The
-implemented proof of the substitution lemma proceeds then completely
-automatically, except for the need of having to mention the facts forget
and
-fresh_fact
, which are proved separately (also by induction over
-α-equated lambda-terms).forget
shows that if x is not
-free in L, then L[x:=...]=L (Barendregt's Case 1.2). Its formalised proof
-is as follows:
-abs_fresh
is an automatically generated lemma that
-establishes when x is fresh for a lambda-abstraction, namely x#Lam
-[z].P' if and only if x=z or (x≠z and x#P');
-fresh_atm
states that x#y if and only if x≠y. The lemma
-fresh_fact
proves the property that if z does not occur
-freely in N and L then it also does not occur freely in
-N[y:=L]. This fact can be formalised as follows:
-
-
- λz.(M1[y:=L][x:=N[y:=L]])
-= (λz.M1[y:=L])[x:=N[y:=L]] •
-= (λz.M1)[y:=L][x:=N[y:=L]]
-
-References
-
-
-
-[1]
-
- Nominal Reasoning Techniques in Isabelle/HOL. In
- Journal of Automatic Reasoning, 2008, Vol. 40(4), 327-356.
- [ps].
-
-
-[2]
-
- A Formal Treatment of the Barendregt Variable Convention in Rule Inductions
- (Christian Urban and Michael Norrish)
- Proceedings of the ACM Workshop on Mechanized Reasoning about Languages with Variable
- Binding and Names (MERLIN 2005). Tallinn, Estonia. September 2005. Pages 25-32. © ACM, Inc.
- [ps]
- [pdf]
-
-
-
-[3]
-
- A Recursion Combinator for Nominal Datatypes Implemented in Isabelle/HOL
- (Christian Urban and Stefan Berghofer)
- Proceedings of the 3rd
- International Joint Conference on Automated Deduction (IJCAR 2006). In volume 4130 of
- Lecture Notes in Artificial Intelligence. Seattle, USA. August 2006. Pages 498-512.
- © Springer Verlag
- [ps]
-
-
-
-[4]
-
- A Head-to-Head Comparison of de Bruijn Indices and Names.
- (Stefan Berghofer and Christian Urban)
- Proceedings of the International Workshop on Logical Frameworks and
- Meta-Languages: Theory and Practice (LFMTP 2006). Seattle, USA. ENTCS. Pages 53-67.
- [ps]
-
-
-
-[5]
-
- Barendregt's Variable Convention in Rule Inductions. (Christian
- Urban, Stefan Berghofer and Michael Norrish) Proceedings of the 21th
- Conference on Automated Deduction (CADE 2007). In volume 4603 of Lecture
- Notes in Artificial Intelligence. Bremen, Germany. July 2007. Pages 35-50.
- © Springer Verlag
- [ps]
-
-
-[6]
-
- Mechanising the Metatheory of LF.
- (Christian Urban, James Cheney and Stefan Berghofer)
- In Proc. of the 23rd IEEE Symposium on Logic in Computer Science (LICS 2008), IEEE Computer Society,
- June 2008. Pages 45-56.
- [pdf] More
- information elsewhere.
-
-
-
-[7]
-
- Proof Pearl: A New Foundation for Nominal Isabelle.
- (Brian Huffman and Christian Urban)
- In Proc. of the 1st Conference on Interactive Theorem Proving (ITP 2010). In volume 6172 in
- Lecture Notes in Computer Science, Pages 35-50, 2010.
- [pdf]
-
-
-
-[8]
-
- General Bindings and Alpha-Equivalence in Nominal Isabelle.
- (Christian Urban and Cezary Kaliszyk)
- In Proc. of the 20th European Symposium on Programming (ESOP 2011).
- In Volume 6602 of Lecture Notes in Computer Science, Pages 480-500, 2011.
- [pdf]
-
-Our Vision
-
-
-We are working on a major overhaul of Nominal Isabelle. The
-latest bundles of Nominal2 are
-here.
-
-
-
-Note, however, that Nominal Isabelle is still an ongoing research -project, which needs both theoretical and implementation work. You are -encouraged to subscribe to the (moderated) - -mailing list to hear about our progress and to give -us feedback.
- --We have recently re-implemented the underlying nominal theory [7] and also have -a good proposal for how to deal with general binding structures in Nominal Isabelle [8]. -
[1] | -- Nominal Reasoning Techniques in Isabelle/HOL. In - Journal of Automatic Reasoning, Vol. 40(4), 327-356, 2008. - [ps]. - The predecessor paper, which appeaerd at CADE in 2005, received the - Thoralf Skolem Award. - | -
[2] | -- A Formal Treatment of the Barendregt Variable Convention in Rule Inductions - (Christian Urban and Michael Norrish) - Proceedings of the ACM Workshop on Mechanized Reasoning about Languages with Variable - Binding and Names (MERLIN 2005), Pages 25-32, 2005. © ACM, Inc. - [ps] - [pdf] - | -
[3] | -- A Recursion Combinator for Nominal Datatypes Implemented in Isabelle/HOL - (Christian Urban and Stefan Berghofer) - Proceedings of the 3rd - International Joint Conference on Automated Deduction (IJCAR 2006). In volume 4130 of - Lecture Notes in Artificial Intelligence, Pages 498-512, 2006. - © Springer Verlag - [ps] - | -
[4] | -- A Head-to-Head Comparison of de Bruijn Indices and Names. - (Stefan Berghofer and Christian Urban) - Proceedings of the International Workshop on Logical Frameworks and - Meta-Languages: Theory and Practice (LFMTP 2006), ENTCS, Pages 53-67, 2006. - [ps] - | -
[5] | -- Barendregt's Variable Convention in Rule Inductions. (Christian - Urban, Stefan Berghofer and Michael Norrish) Proceedings of the 21th - Conference on Automated Deduction (CADE 2007). In volume 4603 of Lecture - Notes in Artificial Intelligence, Pages 35-50, 2007. - © Springer Verlag - [ps] - | -
[6] | -- Mechanising the Metatheory of LF. - (Christian Urban, James Cheney and Stefan Berghofer) - In Proc. of the 23rd IEEE Symposium on Logic in Computer Science (LICS 2008), IEEE Computer Society, - Pages 45-56, 2008. - [pdf] More - information elsewhere. - | -
[7] | -- Proof Pearl: A New Foundation for Nominal Isabelle. - (Brian Huffman and Christian Urban) - In Proc. of the 1st Conference on Interactive Theorem Proving (ITP 2010). In volume 6172 in - Lecture Notes in Computer Science, Pages 35-50, 2010. - [pdf] - | -
[8] | -- General Bindings and Alpha-Equivalence in Nominal Isabelle. - (Christian Urban and Cezary Kaliszyk) - In Proc. of the 20th European Symposium on Programming (ESOP 2011). - In Volume 6602 of Lecture Notes in Computer Science, Pages 480-500, 2011. - [pdf] (and a - longer version appeared in the Journal of Logical Methods in Computer - Science, Volume 8 (2:14), 2012 - [pdf]) - | - -
-[Validate this page.] - - - diff -r f1be8028a4a9 -r 75df587e1bcd Nominal/main.html~ --- a/Nominal/main.html~ Wed Mar 30 17:27:34 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,283 +0,0 @@ - - - -
-- - - -
-
-
-We are working on a major overhaul of Nominal Isabelle. The
-latest bundles of Nominal2 are
-here.
-
-To root out bugs, every programming language should be designed with the help -of a theorem prover, and every compiler should be verified. With our work we -aim to provide all proving technologies necessary for reasoning -conveniently about programming languages (for example the lambda -calculus) and compilers. For us, formal proofs should be as easy to perform as informal -"pencil-and-paper" proofs - at least the overhead of formal proofs should not -prevent any formalisation. Many ideas for our work come from the nominal -logic work by Andrew -Pitts. Our theoretical results about nominal theories enabled us to -implement Nominal Isabelle on top of Isabelle/HOL. -
- --If you want to see a simple example illustrating our results on Nominal Isabelle click -here. For more interesting results, we already -completed formalisations of Church-Rosser and strong-normalisation proofs as -well as the first part of the PoplMark -Challenge. We also formalised some typical proofs from SOS, Karl Crary's chapter on -logical relations from Advanced Topics in Types and Programming Languages, and also -a paper on LF by Harper and -Pfenning. In the latter paper we found a gap in -the soundness proof and corrected it (we actually gave three solutions to the problem [6]). Urban -formalised and also corrected the main result of his PhD, a logical relation argument for -establishing strong normalisation of cut-elimination in classical logic. Other -people have used Nominal Isabelle too: - -
-Note, however, that Nominal Isabelle is still an ongoing research -project, which needs both theoretical and implementation work. You are -encouraged to subscribe to the (moderated) - -mailing list to hear about our progress and to give -us feedback.
- --We have recently re-implemented the underlying nominal theory [7] and also have -a good proposal for how to deal with general binding structures in Nominal Isabelle [8]. -
[1] | -- Nominal Reasoning Techniques in Isabelle/HOL. In - Journal of Automatic Reasoning, Vol. 40(4), 327-356, 2008. - [ps]. - The predecessor paper, which appeaerd at CADE in 2005, received the - Thoralf Skolem Award. - | -
[2] | -- A Formal Treatment of the Barendregt Variable Convention in Rule Inductions - (Christian Urban and Michael Norrish) - Proceedings of the ACM Workshop on Mechanized Reasoning about Languages with Variable - Binding and Names (MERLIN 2005), Pages 25-32, 2005. © ACM, Inc. - [ps] - [pdf] - | -
[3] | -- A Recursion Combinator for Nominal Datatypes Implemented in Isabelle/HOL - (Christian Urban and Stefan Berghofer) - Proceedings of the 3rd - International Joint Conference on Automated Deduction (IJCAR 2006). In volume 4130 of - Lecture Notes in Artificial Intelligence, Pages 498-512, 2006. - © Springer Verlag - [ps] - | -
[4] | -- A Head-to-Head Comparison of de Bruijn Indices and Names. - (Stefan Berghofer and Christian Urban) - Proceedings of the International Workshop on Logical Frameworks and - Meta-Languages: Theory and Practice (LFMTP 2006), ENTCS, Pages 53-67, 2006. - [ps] - | -
[5] | -- Barendregt's Variable Convention in Rule Inductions. (Christian - Urban, Stefan Berghofer and Michael Norrish) Proceedings of the 21th - Conference on Automated Deduction (CADE 2007). In volume 4603 of Lecture - Notes in Artificial Intelligence, Pages 35-50, 2007. - © Springer Verlag - [ps] - | -
[6] | -- Mechanising the Metatheory of LF. - (Christian Urban, James Cheney and Stefan Berghofer) - In Proc. of the 23rd IEEE Symposium on Logic in Computer Science (LICS 2008), IEEE Computer Society, - Pages 45-56, 2008. - [pdf] More - information elsewhere. - | -
[7] | -- Proof Pearl: A New Foundation for Nominal Isabelle. - (Brian Huffman and Christian Urban) - In Proc. of the 1st Conference on Interactive Theorem Proving (ITP 2010). In volume 6172 in - Lecture Notes in Computer Science, Pages 35-50, 2010. - [pdf] - | -
[8] | -- General Bindings and Alpha-Equivalence in Nominal Isabelle. - (Christian Urban and Cezary Kaliszyk) - In Proc. of the 20th European Symposium on Programming (ESOP 2011). - In Volume 6602 of Lecture Notes in Computer Science, Pages 480-500, 2011. - [pdf] (and a - longer version appeared in the Journal of Logical Methods in Computer - Science, Volume 8 (2:14), 2012 - [pdf]) - | - -
-[Validate this page.] - - - diff -r f1be8028a4a9 -r 75df587e1bcd Nominal/menu.html-- --- a/Nominal/menu.html-- Wed Mar 30 17:27:34 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,138 +0,0 @@ - - - -
--Navigation | -
-Overview | -
-Documentation | -
-Download | -
-Mailing List | -
-Activities | -
-Members and Local Friends | -
-Christian Urban (chair) | -
-Cezary Kaliszyk | -
Chunhan Wu | -
-International Friends | -
-Andrew Pitts | -
-Stefan Berghofer | -
-Markus Wenzel | -
-Benjamin Pierce | -
-Steve Zdancewic | -
-Michael Norrish | -
-James Cheney | -
-Jesper Bengtson | -
-Julien Narboux | -
-Randy Pollack | -
-Tjark Weber | -
-Navigation | -
-Overview | -
-Documentation | -
-Download | -
-Mailing List | -
-Activities | -
-Members and Local Friends | -
-Christian Urban (chair) | -
-Cezary Kaliszyk | -
Chunhan Wu | -
-International Friends | -
-Andrew Pitts | -
-Stefan Berghofer | -
-Markus Wenzel | -
-Benjamin Pierce | -
-Steve Zdancewic | -
-Michael Norrish | -
-James Cheney | -
-Jesper Bengtson | -
-Julien Narboux | -
-Randy Pollack | -
-Tjark Weber | -
-funded by the German Research Foundation (DFG) within the -Emmy-Noether -Programme -
- - - diff -r f1be8028a4a9 -r 75df587e1bcd cgi-bin/repos.cgi --- a/cgi-bin/repos.cgi Wed Mar 30 17:27:34 2016 +0100 +++ b/cgi-bin/repos.cgi Wed Mar 30 20:11:37 2016 +0100 @@ -7,7 +7,7 @@ sys.path.append("/usr/local/lib/python2.7/site-packages/") # enable importing on demand to reduce startup time -from mercurial import demandimport; demandimport.enable() +#from mercurial import demandimport; demandimport.enable() # Uncomment to send python tracebacks to the browser if an error occurs: import cgitb