Interval arithmetic in groups – pass 2

March 1, 2009 by slawekk

This is a continuation of the Interval arithmetics in groups: Pass 1 post.

Let f: \mathcal{V}\times\mathcal{V} \rightarrow \mathcal{V} be a binary operation on a set \mathcal{V}. We will write this operation additively as f\langle x,y \rangle = x + y. Such operation defines another binary operation f^\mathcal{P} on on the powerset \mathcal{P}(\mathcal{V}) (set of subsets) of \mathcal{V} in a natural way: f^\mathcal{P} \langle X, Y \rangle = \{ x + y | x\in X, y\in Y\} for X,Y \subseteq \mathcal{V}.  The nice thing about f^\mathcal{P} is that it inherits interesting properties of f: if f is commutative, then so is f^\mathcal{P}, if ( \mathcal{V},f) is a semigroup, then (\mathcal{P}( \mathcal{V}), f^\mathcal{P}) is also a semigroup, if ( \mathcal{V},f) is a monoid, then (\mathcal{P}( \mathcal{V}), f^\mathcal{P}) is also a monoid, if ( \mathcal{V},f) is a group. then … well, never mind, we don’t need that anyway.

This means that all theorems about adding finite (indexed) collections of semigroup elements (and there are quite a couple in the Semigroup_ZF theory) can be reused for the operation on subsets of \mathcal{V} at little additional cost.

The setup for adding group subsets in the Gyula Lakos’s paper is different in that it assumes the existence of neutral element and defines how to add an infinite number of subsets of \mathcal{V}.

b.) More generally, suppose \{ A_\lambda \}_{\lambda \in \Lambda} is a countable indexed family of subsets of \mathcal{V}. Assume that 0 \in A_\lambda for all \lambda \in  \Lambda except for finitely many. Only in that case we define the algebraic sum \sum_{\lambda \in \Lambda } A_\lambda as \{ \sum_{\lambda \in \Lambda } a_\lambda : a_\lambda \in A_\lambda , a_\lambda = 0 \text{ for all } \lambda  \in \Lambda except for finitely many \}.

We can do something in that spirit for f^\mathcal{P} as well. Namely suppose that
(\mathcal{V}, f) is a monoid and A: \Lambda \rightarrow  \mathcal{P}(\mathcal{V}) is a an indexed collection of subsets of \mathcal{V} such that all but finitely many contain the neutral element (denoted 0). We can split the index set  \Lambda into two subsets, one called \Lambda_0 consisting of those \lambda\in \Lambda for which A_\lambda contains the neutral element, and the rest. Then we can define the sum of the family \lambda \mapsto A_\lambda of subsets of \mathcal (V) as follows:

\sum_{\lambda \in \Lambda} A_\lambda := \left(\sum_{\lambda \in \Lambda \setminus \Lambda_0} A_\lambda\right) + \left(\bigcup_{F \in Fin\mathcal{P}(\Lambda_0)} \sum_{\lambda \in F} A_\lambda\right),

where  Fin\mathcal{P}(\Lambda_0) is the set of finite nonempty subsets of \Lambda_0 and +, \sum are interpreted as the additive notation for f^\mathcal{P}. So what we do is we add all sets that do not contain 0, but for sets that do contain 0 we sum every finite subcollection and take the union of all sums obtained this way.

This nicely generalizes the concept of adding finite collections of sets of semigroups (where the \Lambda_0 is empty and there is only the first component of the sum above) and (in contrast to the Lakos’ approach) does not require selecting monoid elements from infinite collections of subsets of \mathcal{V}, i.e. does not require the axiom of choice.

IsarMathLib version 1.6.7 released

February 18, 2009 by slawekk

This release includes the new HTML rendering tool that replaces tiddlyisar (which still compiles and works ). I updated all IsarMathLib theories that were not fully updated for Isabelle 2008 removing legacy keywords like constdefs and prems and added missing comments. As a result all IsarMathLib theories except those translated from Metamath are now presented at the FormalMath.org site.

There is no new formalized mathematics in this release.

Goodbye ProofGeneral

January 15, 2009 by slawekk

Some recent messages on the Isabelle mailing list bring the information that the Isabelle team is working on a new interface for Isabelle and possibly other provers that will replace Emacs based ProofGeneral. The new interface will be written in Scala. Scala is an multiparadigm language (OO and functional) that runs on JVM. This is an interesting choice of technology that suggests something about the design goals (I am speculating again). Applications writen in Scala can run on any platform that has JVM. In particular, one can write applets in Scala that can be run in a browser. Scala is a general purpose language, but seems to be particularly good for web programming. There are a couple of web programming frameworks written in Scala, Lift being the most popular, competing with Rails. So the new interface will be multiplatform and easy to integrate with web applications (wiki?). Hopefully this will make Isabelle proving environment closer to being network transparent – a user interface, possibly running in a browser and sending formalized text for verification to an Isabelle server located (possibly) on a different host with dependencies scattered all over the internet.

Read the rest of this entry »

Formalmath.org

January 7, 2009 by slawekk

The new HTML rendering of IsarMathLib is ready.

Creating it was easier than I had expected. The most tricky part of the Isar to HTML translator is the Isar parser, but that was done when creating the TiddlyWiki rendering, and didn’t require any changes. Producing HTML from internal representation was just a simple rewrite of the existing TiddlyWiki markup generator. I had to learn some JavaScript and haXe to implement expanding proofs and reference hints, but not much and it was an interesting experience.The CSS layout was created with an online frameset generator with some minor tweaks.

There is one remaining serious issue that I don’t know how to resolve. Some proofs don’t expand on click. One can see an example of this problem in the proof of lemma func1_1_L12 in the func1 theory. The only subproof there does not change cursor and background color on mouse hover (implemented with CSS) and does not expand on click (haXe and JavaScript). Curiously, TiddlyWiki presentation has a very similar problem, see the proof of prod_list_of_lists in the Semigroup_ZF tiddler. This happens in Firefox 3.0.5 on Ubuntu and IE7 and Firefox on Windows XP. If you have an idea what might be causing this, please let me know.

P.S. This turned out to be a jsMath issue.

What next after Tiddly Formal Math?

December 29, 2008 by slawekk

The Tiddly Formal Math site presents 28 out of 60 IsarMathLib theories. It looks like the approach based on TiddlyWiki is close to the limits of its scalability. The page loads slowly, renders even slower and Firefox asks frequently if I really want this script to run as it appears to be hanging. In addition I noticed recently that some proofs don’t want to expand and I don’t feel up to the task of debugging the NestedSlidersPlugin internals. The TiddlyWiki approach was good as a proof of concept but putting 617 pages of IsarMathLib proof document in one HTML file is clearly not a good idea.

So what next? It seems that the next step is to render IsarMathLib theories directly to HTML, CSS and JavaScript. This will open up lots of interesting possibilities for the presentation, like highliting the assumption or labeled references when the  mouse hovers over a label. The only problem is that (I am a bit ashamed) I know next to nothing about HTML, CSS and JavaScript. Well, I guess that has to change. It seems that haXe is an interesting way to write JavaScript.

IsarMathLib 1.6.6 released

December 19, 2008 by slawekk

The release adds about 50 facts leading to a theorem named prod_list_of_sets that can be informally stated as follows:

Suppose G is a commutative semigroup, X is a linearly ordered set, \{a_x\}_{x\in X} an indexed collection of elements of G and M : n \rightarrow X a nonempty list of finite, nonempty and mutually disjoint subsets of the index set X. Then we have

\prod_{i=0}^{n-1} \prod_{x\in M_i} a_x = \prod_{x\in \bigcup_{i \in n} M_i} a_x

In words, we can multiply the elements over each index set M_i for i\in n and multiply the results, or we can multiply all elements a_x for x\in \bigcup_{i \in n} M_i and the results are the same.

Read the rest of this entry »

Interval arithmetic in groups: Pass 1

December 6, 2008 by slawekk

Gyula Lakos’s paper that I plan to formalize for IsarMathLib uses a natural generalization of interval arithmetic to abelian group setting. In this post I will go over section 2.A “Algebraic sums” in this paper, quoting it as needed and tell how I want to formalize the notions defined there.

Read the rest of this entry »

Vdash, monotone and ikiwiki

November 18, 2008 by slawekk

A lot of new stuff appeared yesterday on the Vdash home page. There is a very nice collection of links to information about formalized mathematics. The most interesting however is the roadmap page which states that Vdash will be based on ikiwiki wiki compiler and the monotone version control system. This represents a major shift in the concept.

Read the rest of this entry »

Formal Proof II

November 9, 2008 by slawekk

Imagine that a programming guru is asked by a person who wants to learn programming how to start. The guru tells the novice that he should get some nice Linux distribution like Gentoo that has all he needs – vi and gcc. He also shows the novice some Linux kernel code to demonstrate the wonderful things someone with knowledge of programming can do. The n00b is immediately enlightened. Or, more likely, runs away in horror.

Read the rest of this entry »

Formal Proof I

November 8, 2008 by slawekk

Formal Proof – Theory and Practice, by John Harrison

Among the four articles on formal proofs in the Notices this is the one I enjoyed most.

John Harrison is the creator of HOL Light, one of the systems for doing formalized mathematics. He got hired by Intel in 1998 after the famous Pentium bug to work on formal verification of algorithms used in Intel chips (AMD hired David Russinoff). Harrison was one of the first people in Western Europe working in formal verification who noticed the value of Mizar’s declarative formal proof style and the existence of Mizar itself. He is a living example that formalized mathematics is relevant now and you can even earn living doing it if you a lucky genius.

I found some paragraphs of the “theory” part a bit too basic. I think explaining that

for example as we write “x+y” to denote mathematical object “x plus y“, we can use p \wedge q to denote the proposition “p and q

is not needed for the readers of Notices of American Mathematical Society. This stuff is taught in some high schools.

Read the rest of this entry »