import java.util.ArrayList;

public class PreDefinition {
    public static String[] all() {
        ArrayList<String> definitions = new ArrayList<String>();
        definitions.add("define true = %x y.x");
        definitions.add("define false = %x y.y");
        definitions.add("define if = %p x y. p x y");

        return definitions.toArray(new String[definitions.size()]);
    }
}

@@ -150,16 +150,36 @@
 ring%3E();
+%0A%0A        // boolean
 %0A       
@@ -321,24 +321,2040 @@
 . p x y%22);%0A%0A
+        // pairs%0A        definitions.add(%22define pair = %25x y f.f x y%22);%0A        definitions.add(%22define fst = %25p.p true%22);%0A        definitions.add(%22define snd = %25p.p false%22);%0A%0A        // number%0A        definitions.add(%22define suc = %25n f x.n f (f x)%22);%0A        definitions.add(%22define iszero = %25n.n (%25x.false) true%22);%0A        definitions.add(%22define 0 = %25f x. x%22);%0A        definitions.add(%22define 1 = suc 0%22);%0A        definitions.add(%22define 2 = suc 1%22);%0A        definitions.add(%22define 3 = suc 2%22);%0A        definitions.add(%22define 4 = suc 3%22);%0A        definitions.add(%22define 5 = suc 4%22);%0A        definitions.add(%22define 6 = suc 5%22);%0A        definitions.add(%22define 7 = suc 6%22);%0A        definitions.add(%22define 8 = suc 7%22);%0A        definitions.add(%22define 9 = suc 8%22);%0A        definitions.add(%22define add = %25m n f x.m f (n f x)%22);%0A        definitions.add(%22define mult = %25m n f.m f (n f)%22);%0A        definitions.add(%22define expt = %25m n f x.n m f x%22);%0A        definitions.add(%22define prefn = %25f p.pair (f (fst p)) (fst p)%22);%0A        definitions.add(%22define pre = %25n f x.snd (n (prefn f) (pair x x))%22);%0A        definitions.add(%22define sub = %25m n.n pre m%22);%0A%0A        // table%0A        definitions.add(%22define nil = %25z.z%22);%0A        definitions.add(%22define cons = %25x y.pair false (pair x y)%22);%0A        definitions.add(%22define null = fst%22);%0A        definitions.add(%22define hd = %25z.fst (snd z)%22);%0A        definitions.add(%22define tl = %25z.snd (snd z)%22);%0A%0A        // recursion of CALL BY NAME%0A        definitions.add(%22define Y = %25f.(%25x.f (x x)) (%25x.f (x x))%22);%0A        definitions.add(%22define fact = Y (%25g n. if (iszero n) 1 (mult n (g (pre n))))%22);%0A        definitions.add(%22define append = Y(%25g z w.if (null z) w (cons (hd z) (g (tl z) w)))%22);%0A        definitions.add(%22define inflist = Y(%25z.cons MORE z)%22);%0A%0A        // recursion of CALL BY VALUE%0A        definitions.add(%22define YV = %25f.(%25x.f (%25y.x x y)) (%25x.f (%25y.x x y))%22);%0A        definitions.add(%22define factV = YV (%25g n.(if (iszero n) (%25y.1) (%25y.mult n (g (pre n)))) y)%22);%0A%0A
         retu

add more pre definitions