10 ms·
Many-valued logic
- th3iedkid 7y agoTruth has many versions!
- leoc 7y agoIf this caught your interest, run out and buy Graham Priest's Introduction to Non-Classical Logic. https://www.cambridge.org/ie/academic/subjects/philosophy/philosophy-science/introduction-non-classical-logic-if-2nd-edition?format=PB&isbn=9780521670265 https://www.cambridge.org/ie/academic/subjects/philosophy/ph... It's so good. It's just a pity that there doesn't seem to be video of Graham Priest teaching this material in person anywhere.
- tempguy9999 7y agoOooh, dat interesting! I wasn't strongly aware of non-classical logics (other than modal and classical). Meeting intuitionistic logic... bloody hell that was very weird for someone brought up on classical logic. I will certainly take a look, thanks.
- tempguy9999 7y agoFAAAAARK THIIIIS Right, rage hat on, I'm not buying this. It's an absolute fucking classic on how not to write a maths book. From the PDFs, some crap examples then. "It is also standard to define two notions of validity. The first is semantic. A valid inference is one that preserves truth, in a certain sense. Specifically, every interpretation (that is, crudely, a way of assign-ing truth values) that makes all the premises true makes the conclu-sion true. We use the metalinguistic symbol ‘|=’ for this. What distin-guishes different logics is the different notions of interpretation they employ." Wut the utter fuck does that mean? What could "preserves truth, in a certain sense" possibly mean? What the fuck is a metalinguistic symbol anyway? He goes on: "The second notion of validity is proof-theoretic. Validity is defined in terms of some purely formal procedure (that is, one that makes reference only to the symbols of the inference). We use the metalinguistic symbol ‘|-’ for this notion of validity" I think he's saying ‘|=’ is the human version of 'therefore' or 'we can deduce', and the formal version is ‘|-’, which corresponds to my understanding but if I didn't have a background in this I'd be fucked. This stuff is not complicated and it's mainly not hard, but it is fucking impossible if you write like this. Later on we have " ⊃ " which is "material conditional" - da fuq? This is logical implication I think, it is standard in classical logic as an arrow '->' but he neither uses that nor relates it to the arrow symbol, nor even gives it the standard name - I have never ever seen it called a Material Conditional. And he doesn't give its definition so I can't tell. Later he gives a tree form of this I've never seen before but can sort-of understand so I guess it is logical implication. And how does material equivalence '≡' differ from equality '='? Explain this shit please. "An interpretation of the language is a function, ν, which assigns to each propositional parameter either 1 (true), or 0 (false). Thus, we write things such as ν(p) = 1 and ν(q) = 0." If I didn't know what this meant I'd be lost. "A branch is closed iff there are formulas of the form A and ¬A on two of its nodes; otherwise it is open." I'm not sure what he's saying although I know it's actually very simple. It's something like 'if you get x on one branch and ¬x on another then you have a contradiction, which means that branch is junk because it's claiming something is true while the other is claiming exactly the same thing is false; they can't both be true. Except that's a bit wordy and more importantly I'd need to sit down and consider the scope; what a branch actually is and how far back up the contradiction goes. This is a lesson on how not to do it. I'm getting lost and the 'branch is closed' example is on page 8! I would love to understand the stuff in this but the medium of conveyance, to wit this book, is a car crash. At best it's lecture notes but you'd better have the lecturer around.
- foobar_ 7y agoIt pains me every time someone uses the word logic but have never heard of Jan Łukasiewicz.
- gauravphoenix 7y agoFascinating read. I have often found myself using an enum in Java to present truth output as true, false and null where null means unknown. Not ideal but keeps things simple.
- timClicks 7y agoHow is that not ideal? Isn't that a perfectly valid mechanism to implement a 3-valued logic? Perhaps some people would prefer to wrap a standard bool. In Rust, a type of Option(bool) would work. An equivalent in Go would be *bool. But I don't know how the CPU would distinguish between a null pointer and falsehood in that case.
- gauravphoenix 7y agoI said not ideal because of null. I wish there was a better way. Null is way too overloaded in Java.
- AnimalMuppet 7y agoThen don't use null. Use { false, true, 2 } or { false, true, SomeNewEnumerationLabel }.
- gauravphoenix 7y agoyeah, I just wish there was a first class citizen support to represent this. I think Optional<Boolean> should suffice.
- pvg 7y agoIt's odd the page doesn't mention SQL which uses a 3-valued logic. The 3VL page itself does: https://en.wikipedia.org/wiki/Three-valued_logic#SQL https://en.wikipedia.org/wiki/Three-valued_logic#SQL
- leoc 7y agoHm. Most of the limited amount I ever knew about this I've forgotten atm, but in the face of general misunderstanding I'm going to chance my arm on the theory that I have a >50% chance of making things better rather than worse. Here goes. Usually, in philosophical logic, you don't use 3VL or any multi-valued logic to deal with something being unknown. If you don't know whether the proposition P is true or false, and so you don't want to assert either that it is true or that it is false, then you do this simply by not asserting or implying P while also not asserting or implying ~P. If you want a logic in which you can actually make the statement "it is unknown whether P or ~P" (or more precisely, a logic in which you can capture the structure of that statement: you could always just define the proposition Q to mean "it is unknown whether P or ~P", but that probably doesn't get you anything useful) then you'd probably use some variation on modal logic https://en.wikipedia.org/wiki/Epistemic_modal_logic https://en.wikipedia.org/wiki/Epistemic_modal_logic , not a 3VL. What logicians actually normally use 3VLs for is to (try to) deal with truth value gaps or gluts. In a logic with truth-value gluts P can be both true and false at the same time. In a logic with truth-value gaps P can be neither true nor false, at the same time. I know right? (Intuitionistic logic is something a bit different again.) The reason that computer systems like SQL use a third truth-value which sometimes(!) means 'unknown', is, to summarise, because the way those systems handle truth and implication is a garbage fire.
- pvg 7y agoOh, you'd be in good company, if for (likely) somewhat different reasons. Google up 'C.J. Date' and '3VL' for some expert ranting on the topic.
- harekaze 7y agoFor recent years I've been using a kind of four-valued logic in my daily thinking: TRUE, FALSE, an UNKNOWN of limited contagiousness, and an INVALID of full contagiousness. I feel estranged somewhat after learning there is no such logic in the most commonly used ones.
- timClicks 7y agoI'm unsure how UNKNOWN could not propagate into other decisions that depend on the value. Could you provide an example or two?
- cgrand-net 7y agoUNKNOWN or TRUE is TRUE
- harekaze 7y agoExactly. Thank you.
- deleted 7y ago[deleted]
- stakhanov 7y ago...that would be more of a belief theory (like Dempster-Shafer) than a logic. Or maybe what you are thinking of is simply the situation wherein a logical expression is neither valid nor unsatisfiable. Valid would mean it's true in all models (all possible worlds), and therefore provable. Unsatisfiable would mean it's false in all models (all possible worlds), so that its negation would be provable. so "p or (not p)" would be valid "p and (not p)" would be unsatisfiable "p" is neither valid nor unsatisfiable. it may be true, or it may be false. it's a contingency. Maybe that's what you have in mind by "unknown". There are various mathematical theories for navigating the space between unsatisfiable and valid. If you start thinking about the proportion of possible worlds wherein p is true, you are thinking of frequentist probability theory. If you start reasoning about whether p is satisfiable whereas not p is also satisfiable and distinguishing that from the case where p is either unsatisfiable or valid, then you are thinking of possibility theory.
- mikorym 7y agoMany valued logic arises quite naturally in category theory. If you take usual set theory and change the sets to fibred sets you can easily get a subobject classifier with, e.g., four truth values. However, these don't tell us much about "truth" in the social sense. Actually, my impression of what category theory has brought to mathematics is that structure itself seems more fundamental than logic; it is as though logic arises because of structure too (and not just the converse of logic leading to structure).
- jlg23 7y ago> However, these don't tell us much about "truth" in the social sense. Which truth? Yours, mine, what we agree upon or what really happened? (Paraphrasing Rousseau)
- mikorym 7y agoI mean that it does not supercede the usual logic that we use to argue about everyday things.
- phaedrus 7y agoI like this way of looking at things. I've been (as a studied amateur) reading and thinking about this topic for a long time. In some implementations of logic programming, disjunction is analogous to iteration or sequence (do A then do B) and conjunction is analogous to nested loops or map (map all A with all B). If structure is more fundamental than logic, it's not mysterious why the procedural interpretation of logic programs comes out the way it does - it follows from the structure underpinning the logic.
- mikorym 7y agoMac Lane started out in logic before category theory was invented and I think this had a positive influence on his pedagogical style in writing, for example, textbooks. Does what you say have anything to do with probability theory (e.g.: the set space B given that A is true)? There are of course the basic adjunctions that apply to quantifiers and connectives (e.g.: the adjoints to the preimage). Is iteration and nesting as you mention similar to this?
- strictfp 7y agoMade me think of "don't care" in digital logic: https://en.m.wikipedia.org/wiki/Don%27t-care_term https://en.m.wikipedia.org/wiki/Don%27t-care_term
- prvc 7y agoI don't understand what the benefit of overloading truth values is compared to using functions and modal operators, except as a vector for introducing back-door obscurantism.
- TomAnthony 7y agoThis article links to an article on Aristotle's "paradox of the sea battle" [1]. However, I'm having trouble following it: Aristotle: if a sea-battle will not be fought tomorrow, then it was also true yesterday that it will not be fought. But all past truths are necessary truths. Therefore, it is not possible that the battle will be fought. Can anyone explain it more clearly? [1] https://en.wikipedia.org/wiki/Problem_of_future_contingents https://en.wikipedia.org/wiki/Problem_of_future_contingents
- deleted 7y ago[deleted]
- ernst_klim 7y agoIn classic logic the statement could be either true or false. But the statement "a sea-battle will be fought tomorrow" is neither. You can't say that this statement is true or false in advance, it's a prediction, it has only a sort of probability of being true or false. The interesting outcome of the rejection of the excluded middle is a constructive logic (and math), where the proof that "statement is false is false" doesn't mean that statement is true (hence only the evidence of truthfulness could be considered a proof).
- ahelwer 7y agoOne solution to this is modal logic, where you have the modifiers "necessary" (written "[]" or as a box) and "possible" (written "<>" or as a diamond). So instead of "a sea-battle will be fought tomorrow", which is neither true nor false, you can only express "it is necessary that a sea battle be fought tomorrow" (which is false, you cannot know the future) or "it is possible that a sea battle be fought tomorrow" (which is true, unless it is impossible, in which case it is false).
- tasuki 7y ago> In classic logic the statement could be either true or false. But the statement "a sea-battle will be fought tomorrow" is neither. I'm not buying it. The statement "a sea-battle will be fought tomorrow" is either true or false. Either it will be fought or it won't. You just don't know which one. It won't "maybe be fought". Similarly, you don't know whether "a sea-battle was fought 3000 * 365 days ago". You don't have enough information to evaluate the truthfulness of either statement, and can only say what confidence you have the sea battle was/will be fought on the given day.
- qazpot 7y agoJaina philosophers have 7 valued logic - https://en.wikipedia.org/wiki/Jaina_seven-valued_logic https://en.wikipedia.org/wiki/Jaina_seven-valued_logic
- ernst_klim 7y agohttps://en.wikipedia.org/wiki/Mu_(negative) https://en.wikipedia.org/wiki/Mu_(negative)
- aduitsis 7y agotypedef enum { false, true, file_not_found } bool;
- chx 7y agoWe stumbled upon them, sort of, with Drupal. Consider the using the visitor pattern for access where each visitor needs to return a value. (Drupal is old so yes return values is what you had) You may want to allow access, deny access or tell the system you have no opinion at all.
- AnimalMuppet 7y agoI played with the idea of "complex booleans", but it didn't work very well. The idea was, just as in a complex number you have a + i b, let a "boolean" be a + i b, where a and be are either true or false. But the problem is, if you set true = 1 and false = 0, and then use multiplication for "and", then (true + i true) and (true + i true) = (1 + i) * (1 + i) = (1 + i + i - 1) = (0 + 2 i), which is not a valid answer. So this "logic" didn't have as many nice algebraic properties as boolean logic.
- tempguy9999 7y agoin {1, 0} representing true/false respectively, * is often used for 'and', and + for 'or'. So there may be a good interpretation if you can sort out what the plus sign in x+iy means - is it an 'or', or something else? Good luck!
- abecedarius 7y agoBoole himself used '+' for 'or', but restricted himself as to when he was allowed to do it (i.e. there was no "true or true = true"; iirc it was Peirce and maybe others who came up with that).
- deleted 7y ago[deleted]
- obastani 7y agoOne idea would be to let {0, 1} be the integers mod 2. Then, AND is multiplication (i.e., a AND b = a b, since a b = 1 iff a = b = 1), NOT is inversion (i.e., NOT a = 1 - a), and OR follows from the previous two definitions (i.e., a OR b = 1 - (1 - a) (1 - b) = a + b - a b). To get complex values, we can consider the Gaussian integers [1] mod 2. Then, we have (1 + i) (1 + i) = (1 + i + i - 1) = 0 + 2 i = 0. So these integers are a ring where there are nonzero elements that multiply to 0. [1] https://en.wikipedia.org/wiki/Gaussian_integer https://en.wikipedia.org/wiki/Gaussian_integer
- carapace 7y agoGeorge Spencer Brown talks about imaginary Boolean values in "Laws of Form".
- jdblair 7y agoWhen I was 18, I "discovered" three-value Boolean logic by thinking about what it would mean to have three signs in arithmetic. I called them positive, negative and urgative and had a symbol for urgative so I could write expressions. I worked out truth tables and had a lot of fun. Later I brought this up with one of my math professors and he encouraged me to study methods of proof so I could understand my results better. To his credit, he didn't say "this is already already all worked out," he sparked an interest that led to me studying a lot more mathematics (like abstract algebra and non-euclidean geometry) than I had planned when I started college.
- oarabbus_ 7y agoI'm not sure I follow. What is negative 1 plus positive 5 plus urgative 3?
- knodi123 7y agoit's boolean logic, not integer math. think "true/false/interesting", instead of using numbers
- jdblair 7y agoI replied to the commenter. I started thinking not about boolean logic, but about a third arithmetic sign. I was thinking, if there are conceptual dimensions we can't perceive, maybe there are directions in those dimensions we also can't perceive.
- jdblair 7y agoWhen I started thinking about it I made a number "line" that had an origin (0) with positive in one direction, negative in another, and urgative in a third. The reasoning is that a different sign takes you towards the origin, then in the direction of the new sign. The answer to your question is: -1 + +5 = +4 +4 + urg3 = +1 to illustrate some other examples: +5 + urg10 = urg5 -5 + urg10 = urg5 urg5 + -10 = -5 urg5 + +10 = +5 I never actually proved that the arithmetic was consistent, or even useful in any way. Multiplication was much easier to reason about because setting the sign was just the result of a truth table. This is when I figured out the true/false truth tables extended the 3 symbols pretty trivially. I worked through boolean logic and then got bored with it and forgot about it until that time talking to my Calc 3 teacher during office hours.
- oarabbus_ 7y agoTrue, False, and Null are legitimate. >3-valued logic systems tend to be invalid/can be condensed into 3-values.