A sets library that provides notations of set theory (discrete math)
You can write set expression following (Assuming A, B are sets, R is a relation):
A ∩ BA ∪ BA ⊕ BA × Bran A,dom A,fld AP(A)R[A]A/Rcard A
Assuming you're in this current directory and ` is a source file written in math-like syntax (see below), you can run the interpreter with:
- Unix:
tools/interpreter.nims <setsStmtFile>(maybe afterchmod +x tools/interpreter.nims) - Windows:
tools\nimr <setsStmtFile>
in fact you can call it a rewriter or preprocessor instead of a interpreter
examples/simple_ex.nim.txt is a simple example for <setsStmtFile>.
In short,
- write as you do in mathematics: no need to write declaration via
letorvar - don't forget to freely use Nim syntax: e.g.
echo A