# a-conjecture-of-mine

An exercise on polyglossy: the same problem solved on multiple languages

```commit 6fe7de90c68b2d3cedeb26ccb03c10c60fbc1a87
Author: Pablo Emilio Escobar Gaviria <pablo-escobar@riseup.net>
Date:   Sat, 23 Jan 2021 04:34:25 +1000

Diffstat:
MMakefile | 3+--
Ascript.apl | 24++++++++++++++++++++++++

2 files changed, 25 insertions(+), 2 deletions(-)
```
```diff --git a/Makefile b/Makefile
@@ -2,7 +2,7 @@ c-bin:
gcc -O2 -o bin/c ./c/main.c

cpp-bin:
-	g++ -O2 -o ./bin/cpp -std=c++11 -pthread ./c++/main.cpp
+	g++ -O2 -o ./bin/cpp -std=c++11 ./c++/main.cpp

elixir-bin:
elixirc -o bin/elixir ./elixir/main.ex
@@ -11,7 +11,6 @@ go-bin:
cd ./go/
go build
mv ./go ../bin/go
-	cd ..

diff --git a/script.apl b/script.apl
@@ -0,0 +1,24 @@
+â This script is a simple test for the following conjecture:
+
+â Let S: N -> N be the sum of the digits of a positive integer.
+â For all A and B in N, S(A + B) = S(A) + S(B) - 9k, where k is an interger.
+
+â Computes the sum of the digits of a positive integer N
+â SUMâSUMDIGITS N
+  SUMâ+/10|âNĂˇ10â(âłâ(10âN)+1)-1
+â
+
+â Given a positive integer A, returns 1 if the conjecture holds for all pairs
+â (A, B) with B=1, ..., A and 0 otherwise
+â RESâTEST A
+  BSââłA
+  SUMSBâSUMDIGITSÂ¨BS
+  SUMSAPLUSBâSUMDIGITSÂ¨(BS+A)
+  RESââ§/0=9|(SUMSAPLUSB-SUMSB+A)
+â
+
+â Checks if the conjecture holds for all pairs (A, B) with A, B = 1, ..., MAX
+â RESâCONJECTUREHOLDSUPTO MAX
+  RESââ§/TESTÂ¨âłMAX
+â
+
```