diff options
author | Marvin Borner | 2024-05-17 13:33:53 +0200 |
---|---|---|
committer | Marvin Borner | 2024-05-17 13:33:53 +0200 |
commit | 8044eb95639d96512c8891b0c4dca11a4e9e162a (patch) | |
tree | 7f8ed69f92babf4cd9903b2dcac4ed68a8f6a3f6 /samples/fun/goldbach.bruijn | |
parent | 99ec17a582ce40c35e9be76415b3a4a6dcff65ae (diff) |
Minor additions :)
Diffstat (limited to 'samples/fun/goldbach.bruijn')
-rw-r--r-- | samples/fun/goldbach.bruijn | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/samples/fun/goldbach.bruijn b/samples/fun/goldbach.bruijn new file mode 100644 index 0000000..2592a40 --- /dev/null +++ b/samples/fun/goldbach.bruijn @@ -0,0 +1,20 @@ +# Tromp's version, will reduce to [0] iff Goldbach conjecture is false +:import std/Combinator . + +zero [[1]] + +one [[0]] + +sieve y [[[0 one (2 sn1 f)]]] + f y [sn2 0] + sn2 [[0 (0 4 1)] [[[[0 2 (1 3)]]]]] + sn1 [[0 (0 3 1)] [[[[0 2 (1 3)]]]]] + +zeroS [[[[0 zero (1 3)]]]] + +primes sieve zeroS + +check y [[[[[primes 0 (1 (4 0))] testp1]]]] + testp1 [0 0 2 [0 4] 0] + +main primes (check [[[[0]]]]) |