From 8044eb95639d96512c8891b0c4dca11a4e9e162a Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Fri, 17 May 2024 13:33:53 +0200 Subject: Minor additions :) --- samples/fun/goldbach.bruijn | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 samples/fun/goldbach.bruijn (limited to 'samples/fun/goldbach.bruijn') 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]]]]) -- cgit v1.2.3