ISETL
Gary Levin's Interactive SETL, written at Clarkson University from 1986 so that Ed Dubinsky's mathematics students could build sets, tuples, maps and first-class functions at a prompt, and the language behind a decade of ISETL-based textbooks on discrete mathematics, calculus and abstract algebra
Created by Gary Marc Levin (Department of Mathematics and Computer Science, Clarkson University), designed with Ed Dubinsky
ISETL (Interactive SETL) is a small, interpreted, interactive descendant of Jacob Schwartz’s set-theoretic language SETL, created by Gary Marc Levin at Clarkson University. Its purpose was teaching mathematics, not building software. The mathematician Ed Dubinsky wanted students to learn about sets, functions, relations and groups by constructing them on a computer, in notation close to what they saw on the blackboard. ISETL gave them a > prompt where {x : x in {1..10} | x mod 2 = 0} is a valid expression, functions are ordinary values, and forall and exists evaluate to true or false. From 1989 to the mid-1990s it was the computing component of a series of textbooks on discrete mathematics, calculus, precalculus and abstract algebra, and of the research on how students learn mathematical concepts that grew up around them.
History & Origins
Why not just use SETL?
By the mid-1980s Dubinsky had been teaching mathematics with SETL itself. The Software Preservation Group’s SETL archive says ISETL was “based on Edward Dubinsky’s experience using SETL to teach mathematics.” In his 1995 paper on ISETL, written in honour of Jack Schwartz’s 65th birthday, Dubinsky lists what was wrong with SETL for that job:
“The main problematic features of SETL in 1985 were: SETL is very large and is not useable on the small personal computers just beginning to become popular in academia. SETL is slow. SETL is a compiled language and it was necessary to operate in batch mode. SETL has many complex features that are not essential for educational purposes. Functions are not first class objects in SETL.”
In the summer of 1985 he began talking with Gary Levin, then on the Clarkson faculty, “about the possibility of an interactive version of SETL that would eliminate these problems and be more appropriate for educational uses.” By January 1986 the two had agreed on specifications, and Levin began work on what would become, “with the agreement of Jack Schwartz”, ISETL.
A new implementation
ISETL is a reimplementation, not a port. Levin described it to the Software Preservation Group in 2020:
“ISETL is an interactive version of SETL. It was inspired by Ed’s desire to teach mathematics using manipulable objects. I stripped SETL down to the subset he needed and then added extra features (like first class functions) that I thought would be useful. The code owes nothing to the SETL implementation and is written in very basic C.”
The interpreter’s !credits command says the program “was developed while the author was a member of the Clarkson faculty, using the Z200 provided by the school”. It names Dubinsky (“whose idea it was to use SETL for teaching Discrete Mathematics. His dissatisfaction with the old implementation suggested this project”), Nancy Baxter, Don Muench, and “that mysterious bunch that we just call IWEST.” The interactive line editor came from Robert C. Pendleton’s ILE, copyright 1988 Evans & Sutherland.
Dubinsky says that “by Fall of 1988, ISETL version 1.0 was sufficiently stable that I could use it in courses on discrete mathematics and abstract algebra.” The public debut followed in 1989 with Learning Discrete Mathematics with ISETL by Nancy Baxter, Ed Dubinsky and Gary Levin (Springer-Verlag). Levin’s An Introduction to ISETL appears in it as an appendix, and the same document was sent to people who ordered ISETL disks at the time.
Design Philosophy
ISETL’s guiding idea comes from Dubinsky’s account of how mathematics is learned: a student understands a concept such as “function” or “group” by actively building it. The opening chapter of the 1989 discrete mathematics text, “Numbers, Programs, and ISETL”, reportedly argues that writing ISETL programs forces the learner to construct the concepts the syntax requires, and that because the syntax is so close to standard mathematical language, that effort goes into understanding the mathematics. Dubinsky’s 1995 abstract describes instruction “whose design is based on an emerging theory of learning”. That framework was later published as APOS Theory (Arnon, Cottrill, Dubinsky and others, Springer, 2014), a book the SETL archive lists among works using ISETL.
That idea shaped the language in four ways:
- Interactive first. “There is no compiler for ISETL,” Levin’s introduction says. Input is acted on as soon as it is complete, and the value of every expression is printed.
- Mathematical objects as values. Finite sets, tuples and maps are built in, along with the formers and quantifiers mathematicians write.
- Functions as values. A
funccan be assigned, passed, returned, stored in a tuple and changed at a single point. SETL did not have this, and Levin added it. - Small. The language is a subset of SETL that ran on the personal computers students actually had.
Levin’s 1990 ACM abstract puts it as an analogy: “Just as an introductory chemistry course uses a laboratory to provide an arena for experimenting, an introductory mathematics class could use ISETL to provide a workplace for its students.”
Key Features
Data types
Levin’s introduction lists ISETL’s simple types as integers (of arbitrary size), floating-point numbers, Booleans, strings, atoms (abstract points created with newat), files and the undefined value OM. The compound types are:
| Type | Description |
|---|---|
| Set | A finite, unordered collection of values of any types, with no duplicates. OM cannot be an element |
| Tuple | “An infinite sequence of components, of which only a finite number are defined”. Indexed from 1 by default |
| Map | A set whose elements are all ordered pairs. A single-valued map is an smap, a multi-valued one an mmap |
| Func | A function or procedure value, created by func ... end or by the shorthand :x -> expr: |
Sets, formers and quantifiers
Set and tuple formers use mathematical notation directly. The session below was run on ISETL 3.0 built from Levin’s GitHub source. Set elements print in no particular order, as the manual warns.
| |
%+ reduces a set or tuple with an operator. choose picks some element that satisfies a condition:
| |
Maps
A set of pairs is a map. F(x) returns the single image of x, OM if there is none, and an error if there are several. F{x} returns the set of all images:
| |
Tuples grow on assignment, and the gaps are OM:
| |
First-class functions
Functions use lexical scope “with retention”, so a returned function keeps its environment. The compose example below is the one in Levin’s introduction:
| |
A func can also be redefined at a single point (f(3) := 21;), just like a tuple or a map. A value declaration captures a global variable’s value when the function is created instead of when it is called.
Mathematics at the prompt
This is the kind of exercise the ISETL textbooks set. It checks that addition mod 6 is closed on Z₆ and finds each element’s inverse:
| |
ISETL 3.0’s !rational on directive switches division to exact rational arithmetic:
| |
Directives
Commands that begin with ! control the environment rather than the program. They include !quit, !include to read a file, !record to log everything typed (Levin’s supplement suggests it for homework transcripts), !watch for tracing, !system to run an operating-system command, and !clear to abandon incomplete input.
Evolution
| Version | Date | Notes |
|---|---|---|
| 1.0 | by fall 1988 | Stable enough for Dubinsky’s courses |
| 1.6 | c. 1989 | James Cottrill notes it was the last version before graphics were added |
| 2.0 | 1989 | The introduction is dated 3 October 1989. Reviewed by Donald Muench in Notices of the AMS, March 1990 |
| 3.0 | 1990 | version.h reads “ISETL 3.0”, and the RCS header in rev_info.c is dated 5 July 1990. Graphics on MS-DOS and Macintosh, exact rationals, floating-point ranges such as [a,b..c] |
| ISETLW 1.1 | 27 December 1995 | John Kirchmeyer’s Windows interface, Mount Union College |
| ISETLW 2.0 | 29 June 1996 | Adds “graphics functionality of ISETL for DOS 3.0”, nested !include, expanded online help |
The 1989 introduction refers to versions for Unix, MS-DOS, Macintosh and VMS. The 3.0 makefile has targets for VAX, Sun, MS-DOS, AT&T, VMS and Macintosh, plus a generic gcc target (an ubuntu target was added in 2021), and Don Muench’s installation note describes building ISETL 3.0 on a VAX under BSD 4.2 and 4.3. The !credits text shows the Macintosh version was compiled with Think C and the MS-DOS version with Turbo C, and that West Publishing provided a Macintosh and supported the PC and Mac graphics work. Muench’s note adds that ISETL was by then distributed by West Educational Publishing. Later, Jim Cottrill’s pages at Illinois State University hosted the DOS, Macintosh and Windows builds and the textbook packages. The Software Preservation Group mirrors those files from a 2003 Internet Archive copy.
Version 3.0 is the last release of Levin’s interpreter. The Software Preservation Group calls it the “final version”. Other people kept extending ISETL in its own terms: Aaron Montgomery and Jim Cottrill wrote linear-algebra packages, based in part on work by Don Muench, and Arnold Lebow wrote a probability package.
Derivatives
Two research languages were built directly on the ISETL interpreter:
- Proteus, from the UNC Chapel Hill, Kestrel Institute and Duke University project on specifying and prototyping parallel software. Lars Nyland recalls that he “modified the ISETL interpreter to execute Proteus programs, but they were mostly ISETL with a few additional operations for task parallel and data parallel execution.”
- ISETL-LINDA, from the University of York. It adds a bag type representing Linda tuple spaces, and templates, to ISETL. The 1995 technical report describes an implementation over a network of transputers and notes the language’s similarity to ProSet, another embedding of Linda into SETL.
Current Relevance
ISETL is historical. No new release is known after ISETLW 2.0 in 1996. The code survives, though. Levin donated ISETL source code and executables to the Computer History Museum. The Software Preservation Group’s SETL archive holds the 1.6 and 3.0 sources, the DOS, Macintosh and Windows distributions, the textbook packages and both editions of the introduction. In 2020 Levin put the 1990 source on GitHub as ISETL Resurrected (gmlevin/isetl), with test programs and samples. A commit on 9 October 2021 fixed it to compile and run under 64-bit Ubuntu. The README says it targets only Linux, and that the command-line editor does not work with modern curses and graphics are not supported.
The examples on this page were run on a build of that repository (ISETL 3.0, 90/07/05). In that build, the multi-precision arithmetic code still writes internal debugging lines to standard error. They appear alongside the correct result for ** on integers and for exact rational arithmetic. The examples avoid **, and the !rational session above is shown with standard error suppressed.
Why It Matters
ISETL is an unusual case of a programming language designed as an instrument of mathematics education research. It was not built to teach programming or to write applications. Its significance is in how it was used:
- It made SETL’s notation interactive. SETL’s set formers and quantifiers moved from a batch compiler on large machines to an interpreter on student PCs and Macintoshes.
- It added first-class functions to the SETL family. This was Levin’s own addition, and it is what let students treat functions as objects to compose, store and modify, which were central exercises in the textbooks.
- It carried a teaching method. At least five textbooks and a user’s manual, published by Springer-Verlag, West and McGraw-Hill from 1989 to 1996, were built around ISETL, and the research program that produced APOS Theory came out of the same work.
- It seeded further research languages. Proteus and ISETL-LINDA both reused Levin’s interpreter as a base for parallel-programming experiments.
ISETL’s direct legacy is small. It still shows something that SETL, ABC and Python’s comprehensions also show: notation taken directly from set theory works as code, and for students it can also make the mathematics easier to learn.
Timeline
Notable Uses & Legacy
Learning Discrete Mathematics with ISETL (Springer, 1989)
Nancy Baxter, Ed Dubinsky and Gary Levin's textbook was built around ISETL. Students write short ISETL programs to construct the mathematical objects they are studying, and Levin's language introduction appears as an appendix
Calculus, Concepts, and Computers
Ed Dubinsky and Keith Schwingendorf's calculus course (West, 1992; second edition with David M. Matthews, McGraw-Hill, 1994) shipped with ISETL software
Learning Abstract Algebra with ISETL (Springer, 1994)
Ed Dubinsky and Uri Leron's algebra text, whose main activities are small ISETL programs that construct algebraic objects, with teamwork as the main tool for reflection
Precalculus and discrete mathematics texts (1996)
Precalculus, Concepts & Computers (Reynolds, Przybylski, Kiaie, Schwingendorf and Dubinsky, McGraw-Hill) and Introduction to Discrete Mathematics with ISETL (Fenton and Dubinsky, Springer) each came with Windows and Macintosh ISETL packages
Proteus project (UNC Chapel Hill, Kestrel Institute, Duke University)
Lars Nyland modified the ISETL interpreter to run Proteus, a language for prototyping parallel software, adding task-parallel and data-parallel operations. Levin and Nyland co-wrote An Introduction to Proteus Version 0.9 (July 1995)
ISETL-LINDA (University of York)
Andrew Douglas, Alan Wood and Antony Rowstron added bags (tuple spaces) and templates to ISETL to embed the Linda coordination primitives, and implemented it over a network of transputers