#shorts ⚡TML Proof of Concept: Negation, Deletion, and Decidability in 6 lines of codes in 60 sec 🛰️

2 years ago
27

⚡Showcase TML capabilities: Negation, Deletion, and Decidability in 6 lines of codes in 60 seconds!

👨‍💻TML codes:
bird(Duck). bird(Hawk). bird(Crow).
#canFly(?x):-bird(?x),~wounded(?x).
#wounded(Crow).
#~wounded(?x):-healer(vet).
#healer(vet). # Only healer(vet) can make canFly(Crow).
#~canFly(?x):-canFly(?x).

🧙Storyline:
There are 3 birds; Duck, Hawk, and Crow.
All of them can fly.
The Crow got wounded so it cannot fly. (Negation)
The vet came to heal the Crow so it can fly again. (Deletion)
We make the "True Statement" false, so it's a contradiction. (Tester)
TML decides what to do (Decidability)
stops the commotion
and gives an error statement, unsat(infinite loop).
Written by Tauist Andrew.
Instructions: Uncomment and click RUN as seen in the YouTube video.

📌TML syntax
head :- body

💡Key Pointers:
✔️ Negation
'~' is placed on the body or ~body.
is like a NOT logic gate, gives the opposite of your input.
"refers to all substitutions of variables that do not satisfy the relation."
-according to the whitepaper Tau-chain and Agoras, P-DATALOG Language.

✔️ Deletion
'~' is placed on the head or ~head.
deletes your input.

✔️ Decidability
"shouldn’t take infinite time in order to answer whether something is legal or not."
-according to the whitepaper Tau-chain and Agoras, 2.5.1 The Laws of Laws

💯Many thanks to
💎Ohad & the team for making this technology possible.
💎Tomas who created this wonderful TML Playground.
💎Photo by Skitterphoto from Pexels

👨‍🏫Subscribe to more of my tml tutorial videos at
🔗https://rb.gy/9ahenx

🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀

🧀Test it.
🔗 tml.idni.org
📄Tau-chain & Agoras Whitepaper: Draft for Community Review
🔗https://rb.gy/6ga4rt
😼Published codes
🔗 github.com/IDNI/TML
🌐Website of tml
🔗 tau.net/
✈️Telegram community
🔗t.me/tauchain

🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀

💎Download the tml codes.
🔗https://rb.gy/oh3zpj

This is a simple Proof of Concept that Negation, Deletion, and Decidability work in TML.
The example below is written by Tauist Andrew.
Instructions: Uncomment and click RUN as seen in the YouTube video.
Note: Input healer(vet) as ruled, otherwise, Crow cannot fly.

Input - There are 3 kinds of birds.
#bird(Duck). bird(Hawk). bird(Crow).

Negation: bird canFly if bird and "NOT"wounded are both True.
#canFly(?x):-bird(?x),~wounded(?x).

As ruled, no result of canFly(Crow) since Crow is wounded.
#wounded(Crow).

Deletion: wounded is deleted if we input a healer(vet).
#~wounded(?x):-healer(vet).

As ruled, no result of wounded since wounded is deleted.
#healer(vet).

Decidability: If canFly is True, then canFly is False.
This is contradiction. Not stopping will cause infinite loop.
#~canFly(?x):-canFly(?x).

# Many thanks to Ohad and the team for making this technology possible.
# Also special thanks to Tomas who created this wonderful TML Playground.

Loading comments...