Min and max relations in the numerical sort
I attach an executable compiled under AMD64 (aka. x86_64) and Linux 3.11. The manual can also be found in the doc
directory.
Changes:
- Several bug fixes.
- So-called "opti" relations:
k=min(m,n)
andk=max(m,n)
in thenum
sort, with general form in concrete syntaxmin|max(m-k,n-k)
, resp.min|max(k-m,k-n)
. - So-called "subopti" relations
k<=max(m,n)
andmin(m,n)<=k
in thenum
sort, with general form in concrete syntaxmin||max(m-k,n-k)
, resp.min||max(k-m,k-n)
. - Less confusing syntax:
datatype
anddatacons
keywords, existential types. - Pattern-matching guards
when e1 <= e2
, wheree1
ande2
are expressions of typeNum
. - Positive
assert
clauses,assert num e1 <= e2; ...
andassert type e1 = e2; ...
. - Flagship example: AVL trees with imbalance of 2 (based on the implementation from OCaml standard library).