Recent posts
#11
Tau Language / Prime numbers demo
Last post by pk - Jan 17, 2025, 07:10 PMI implemented a simple prime numbers sieve within a 4 bits arithmetic in Tau. Feel free to post any improvements or modifications here.
And now for the code, it has two sections - I called them modules.
First is the implementation of the arithmetic with binary addition and multiplication, followed by the prime numbers generator section. See below:
And now for the code, it has two sections - I called them modules.
First is the implementation of the arithmetic with binary addition and multiplication, followed by the prime numbers generator section. See below:
Code Select
#### 4-bit arithmetic module ####
succb(u[15]()) := overflow(1)
succb(overflow(1)) := overflow(1)
succb(bin(b,c,d,e)) := bin(b+(cde),c+(de),d+e,e')
overflow(0) := 0
ovf0(overflow(1)) := 0
ovf0(bin(b,c,d,e)) := 1
cmp(x,overflow(1)) := 0
cmp(bin(b,c,d,e),bin(b,c,d,e)) := 1
cmp(bin(b,c,d,e),bin(n,o,p,q)) := 0
u[0]() := bin(0,0,0,0)
u[t]() := succb(u[t-1]())
addb(overflow(1),x) := overflow(1)
predb(bin(b,c,d,e)) := bin(b+(c|d|e)',c+(d|e)',d+e',e')
addb(bin(0,0,0,0),x) := x
addb(x,bin(0,0,0,0)) := x
addb(bin(b,c,d,e),bin(1,1,1,1)) := overflow(1)
addb(bin(b,c,d,e),bin(n,o,p,q)) := addb(predb(bin(b,c,d,e)),succb(bin(n,o,p,q)))
mulb(bin(0,0,0,0),x) := bin(0,0,0,0)
mulb(x,bin(0,0,0,0)) := bin(0,0,0,0)
mulb(bin(b,c,d,e),bin(n,o,p,q)) := addb(mulb(predb(bin(b,c,d,e)),bin(n,o,p,q)),bin(n,o,p,q))
#### ENDof 4-bit arithmetic module ####
#### prime numbers module ####
oksq(x) := succb(x) & ovf0(mulb(succb(x),succb(x)))
okmul(x,y) := succb(y) & ovf0(mulb(x,succb(y)))
notpr1(u,0) := 0
notpr1(u,bin(b,c,d,e)) := notpr2(u,bin(b,c,d,e),bin(b,c,d,e)) | notpr1(u,oksq(bin(b,c,d,e)))
notpr2(u,x,0) := 0
notpr2(u,x,bin(b,c,d,e)) := cmp(u,mulb(x,bin(b,c,d,e))) | notpr2(u,x,okmul(x,bin(b,c,d,e)))
fndprm(x,prm[1]()) := 0
fndprm(x,prm[t]()) := (notpr1(x,u[2]()))'&prm[t]() | fndprm(predb(x),prm[t-1]())
primes(max[t]()) := fndprm(u[t](),prm[t]())
#### ENDof prime numbers module ####
#### prime numbers demo ####
n primes(max[15]())
#12
Tau Language / Re: Tau Language demos
Last post by pk - Jan 01, 2025, 10:14 PMI added gt and lt functions to my previous demo (note that a predecessor relation is also required for these, added as well - it's called "pred" here).
So now we can also check whether a shape has more/less sides than the other:
Code Select
cmp(int[x](1),int[x](1)):=T
cmp(int[x](1),int[y](1)):=F
pred(int[t](1)):=int[t-1](1)
gt(int[0](1),int[x](1)):=F
gt(int[x](1),int[x](1)):=F
gt(x,y):=cmp(pred(x),y) || gt(pred(x),y)
lt(int[x](1),int[x](1)):=F
lt(int[x](1),int[y](1)):=gt(int[y](1),int[x](1))
So now we can also check whether a shape has more/less sides than the other:
Code Select
sides(sqr()):=int[4](1)
sides(tri()):=int[3](1)
sides(rect()):=int[4](1)
greater(x,y):=gt(sides(x),sides(y))
less(x,y):=lt(sides(x),sides(y))
n greater(tri(),sqr())
n greater(sqr(),tri())
n greater(tri(),tri())
n greater(sqr(),sqr())
n greater(tri(),rect())
n greater(rect(),tri())
n greater(rect(),sqr())
n less(tri(),sqr())
n less(sqr(),tri())
n less(tri(),tri())
n less(sqr(),sqr())
n less(tri(),rect())
n less(rect(),tri())
n less(rect(),sqr())
#13
Tau Language / Re: Tau Language demos
Last post by pk - Jan 01, 2025, 08:21 AMThanks to S1r_4zdr3w for pointing out an unhandled edge case in the multiplication recurrence relation (while multiplying by zero). Please see the fixed code below.
Code Select
# This is an example implementation of addition and multiplication arithmetic in Tau (defined here between 0 and 20).
# Range can be easily extended by adding more entries to the input successor relation.
version
# input
succ(int[0](1)) := int[1](1)
succ(int[1](1)) := int[2](1)
succ(int[2](1)) := int[3](1)
succ(int[3](1)) := int[4](1)
succ(int[4](1)) := int[5](1)
succ(int[5](1)) := int[6](1)
succ(int[6](1)) := int[7](1)
succ(int[7](1)) := int[8](1)
succ(int[8](1)) := int[9](1)
succ(int[9](1)) := int[10](1)
succ(int[10](1)) := int[11](1)
succ(int[11](1)) := int[12](1)
succ(int[12](1)) := int[13](1)
succ(int[13](1)) := int[14](1)
succ(int[14](1)) := int[15](1)
succ(int[15](1)) := int[16](1)
succ(int[16](1)) := int[17](1)
succ(int[17](1)) := int[18](1)
succ(int[18](1)) := int[19](1)
succ(int[19](1)) := int[20](1)
pred(int[t](1)) := int[t-1](1)
add(x, int[0](1)) := x
add(int[0](1), x) := x
add(x, y) := add(pred(x), succ(y))
mul(x, int[0](1)) := int[0](1)
mul(int[0](1), x) := int[0](1)
mul(x, int[1](1)) := x
mul(int[1](1), x) := x
mul(x, y) := add(y, mul(pred(x), y))
# addition and multiplication examples
n add(int[7](1),int[10](1))
n mul(int[5](1),int[3](1))
# overflow examples
n add(int[22](1),int[3](1))
n mul(int[3](1),int[8](1))
# done
quit
#14
Tau Language / Re: Tau Language demos
Last post by pk - Dec 29, 2024, 11:28 AMOne more example:

Code Select
cmp(int[x](1),int[x](1)):=T
cmp(int[x](1),int[y](1)):=F
sides(sqr()):=int[4](1)
sides(tri()):=int[3](1)
sides(rect()):=int[4](1)
same(x,y):=cmp(sides(x),sides(y))
n same(tri(),sqr())
n same(sqr(),tri())
n same(tri(),tri())
n same(sqr(),sqr())
n same(tri(),rect())
n same(rect(),sqr())
quit

#15
Tau Language / Tau Language demos
Last post by pk - Dec 26, 2024, 06:47 PMPlease feel free to add your Tau demos to this post.
I'll start with a simple implementation of integer arithmetic with addition and multiplication.
I'm attaching the .tau demo file and screenshots of its output.
https://pastebin.com/raw/vYW7dEwt


I'll start with a simple implementation of integer arithmetic with addition and multiplication.
I'm attaching the .tau demo file and screenshots of its output.
https://pastebin.com/raw/vYW7dEwt


#16
Governance and Consensus Mechanisms / AI REVOLUTION
Last post by Captainfeci - Dec 21, 2024, 02:51 PMTau Net is a user-driven layer 1 logical AI blockchain, evolving alongside the collective intelligence of all of its users.
Ready to join this adventurous journey with Tau to revolutionize the AI world.
Ready to join this adventurous journey with Tau to revolutionize the AI world.
#17
Educational Resources / Zero Coding with Tau: Specifyi...
Last post by S1r_4zdr3w - Dec 21, 2024, 02:03 PMhttps://youtu.be/DW0Fm-YfBzs
This video demonstrates how to use the Tau Language REPL to create correct-by-construction software through AI program synthesis.
The video will showcase the Tau language's ability to automatically generate a program that meets given specifications.
o1[t]=0 states that the output o1 at all time points (t) has to be 0.
The video will highlight:
● The simplicity of specifying software behavior in the Tau language.
● Tau's use of logical AI for program synthesis.
● The guarantee of correctness provided by Tau's approach.
In my next video, I will go deeper into the topic. Thank you!
Questions, How big do you think is the effect of being able to do zero coding to just write our specifications and a very powerful logical AI will automatically generate a program that 100% meets our specifications?
This video demonstrates how to use the Tau Language REPL to create correct-by-construction software through AI program synthesis.
The video will showcase the Tau language's ability to automatically generate a program that meets given specifications.
o1[t]=0 states that the output o1 at all time points (t) has to be 0.
The video will highlight:
● The simplicity of specifying software behavior in the Tau language.
● Tau's use of logical AI for program synthesis.
● The guarantee of correctness provided by Tau's approach.
In my next video, I will go deeper into the topic. Thank you!
Questions, How big do you think is the effect of being able to do zero coding to just write our specifications and a very powerful logical AI will automatically generate a program that 100% meets our specifications?
#19
Educational Resources / Re: How to write in Tau Langua...
Last post by S1r_4zdr3w - Dec 18, 2024, 01:42 AMBasic Tutorial Series - Tau Lang REPL : Practice using Logical Connectives Complementation and Exclusive OR and its possible real life applications
https://www.youtube.com/watch?v=dvmy6LT3Idw
In this video, I will show you how to
1. Opening the demo for Tau Language Syntax
2. Practice: Logical Connective (Complementation: ' )
3. Practice: Logical Connective (Exclusive OR: + )
4. Real World Possible Application: Two Layer Safety Mechanism
https://www.youtube.com/watch?v=dvmy6LT3Idw
In this video, I will show you how to
1. Opening the demo for Tau Language Syntax
2. Practice: Logical Connective (Complementation: ' )
3. Practice: Logical Connective (Exclusive OR: + )
4. Real World Possible Application: Two Layer Safety Mechanism
#20
Tau Language / Re: Tau Language REPL Syntax
Last post by S1r_4zdr3w - Dec 15, 2024, 05:32 AMThanks pk!
I tried to compare windows OS Tau executable and Ubuntu Linux OS Tau build-Release.
Without declaring my input,
1. In the Tau executable, it ask me how many steps do I want to perform the program. Then it will run depending on the number of steps I gave.
2. In the Tau build-Release, it will run the program step by step. And it will only stop when I type q for quit.
What I think I learned:
1. In Tau executable, it will ask how many times I want to run the program. It's like more into execution. It will run the program in one go from start to finish.
2. In build-Release, it will not ask how many times I want to run the program. So I may test it by providing different scenarios to see the program's reaction. The program will run step-by-step and that's why I can just write "q" to quit the program.
I also tried your code recommendation of storing the results. Since I was running the code on the folder build-Release, that's where the .txt was saved. And yes, I can find all the results there. Thanks for the great info!
Here is my comparison of the two. In the build-Release, we need to save the output at .txt to see the result

http://youtube.com/post/UgkxkSJ6fL25NdUUwTqJOzJkRpDz-fCjReTf?si=mKQl5Qv0AWMpa-G3
I tried to compare windows OS Tau executable and Ubuntu Linux OS Tau build-Release.
Without declaring my input,
1. In the Tau executable, it ask me how many steps do I want to perform the program. Then it will run depending on the number of steps I gave.
2. In the Tau build-Release, it will run the program step by step. And it will only stop when I type q for quit.
What I think I learned:
1. In Tau executable, it will ask how many times I want to run the program. It's like more into execution. It will run the program in one go from start to finish.
2. In build-Release, it will not ask how many times I want to run the program. So I may test it by providing different scenarios to see the program's reaction. The program will run step-by-step and that's why I can just write "q" to quit the program.
I also tried your code recommendation of storing the results. Since I was running the code on the folder build-Release, that's where the .txt was saved. And yes, I can find all the results there. Thanks for the great info!
Here is my comparison of the two. In the build-Release, we need to save the output at .txt to see the result
http://youtube.com/post/UgkxkSJ6fL25NdUUwTqJOzJkRpDz-fCjReTf?si=mKQl5Qv0AWMpa-G3