Lukasiewicz logic 1
Advertisement
So instead of doing modal logic I decided to go ahead and skip that since it will prove to be too difficult and since it will not be useful in the context that this program is meant for.
Instead I went and built a 3 Valued Logic module. The logic system is Lukasiewiczian. So the type system has been made richer. By allowing ranging over one more value. Mu. The logic is still decidable and so one can still prove and verify and sentences in the language. The truth table is below. Interestingly when I was testing the language I was able to find an error in the reference text that I had never noticed before. The text stated a proposition evaluated to True when it in fact did to Mu.
The next act of business is to extend the system to allow full multivalued logic. This will require a fuller type system with floats required. I may then as well go ahead and add booleans back in, allow some basic flow control (loops, if then statements, input) and get a turing complete language in the package.
I will post my version of the PI calculator soon =).
So what use is this? The main use of this is for pedagogical reasons. New students struggle alot with logic since it is often their first meet with anything so abstract. The idea is to have a friendly interactive online environment to hone your understanding and get used to the whole concept of why False Implies False needs to be true.
Instead I went and built a 3 Valued Logic module. The logic system is Lukasiewiczian. So the type system has been made richer. By allowing ranging over one more value. Mu. The logic is still decidable and so one can still prove and verify and sentences in the language. The truth table is below. Interestingly when I was testing the language I was able to find an error in the reference text that I had never noticed before. The text stated a proposition evaluated to True when it in fact did to Mu.
The next act of business is to extend the system to allow full multivalued logic. This will require a fuller type system with floats required. I may then as well go ahead and add booleans back in, allow some basic flow control (loops, if then statements, input) and get a turing complete language in the package.
I will post my version of the PI calculator soon =).
let (===>) a b = match (a, b) with (True ,x) -> x | (False , _) -> True | (Mu , False) -> Mu | (Mu, x) -> True let (|||) a b = match (a, b) with (True , _ ) -> True | (False , x) -> x | (Mu , True) -> True | (Mu , _ ) -> Mulet (&&&) a b = match (a, b) with (True , x) -> x | (False , _) -> False | (Mu , False) -> False | (Mu , _) -> MuInput: Raining := true ; Shining := mu; Cloudy := true; dry := false; print Raining ^ Cloudy <=> Not ShiningMuInput: print Raining ^ Cloudy => Not Shining Or CloudyTrueInput:So what use is this? The main use of this is for pedagogical reasons. New students struggle alot with logic since it is often their first meet with anything so abstract. The idea is to have a friendly interactive online environment to hone your understanding and get used to the whole concept of why False Implies False needs to be true.
Advertisement
Advertisement
Advertisement
Discussion