Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The algebraic analysis of logic

  1. Jul 23, 2014 #1
    Boolean Algebra is a well known field of study in mathematical logic. In Boolean Algebra (BA), a statement can be represented by a variable; usually p, q, r, etc. Under BA each variable can have the value of either 1 or 0; i.e. the domain is the field of integers mod 2. There are many well-known properties of this field. How can I handle logic of more than two states?
     
  2. jcsd
  3. Jul 24, 2014 #2

    Stephen Tashi

    User Avatar
    Science Advisor

    Why do you say "the" logic of more than two states? Do you have a particular application in mind where there can be only be one kind of multi-state logic?

    Boolean logic can be applied to real life problems where more than two states must be represented. You merely represent a state as a vector of boolean variables.
     
  4. Jul 24, 2014 #3
    I don't believe that I ever specified a particular type of logic; I merely implied a generality of logic for multi-state treatment. I have spent the past three years researching the algebraic duality of logic, and I have come up with an algorithm to map logic to algebra and vice versa. At this point, I can only apply this algorithm for prime states. However, this algorithm has more applications than just logic. For example, I can compute the expansions of powers and products of polynomials. One extension of my algorithm I have yet to explore is to express powers and products of infinite polynomials.

    Can you tell me how I could express a 6-state logic structure algebraically?
     
    Last edited: Jul 24, 2014
  5. Jul 24, 2014 #4

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    Not unless you tell us exactly how your "6 state logic structure" works. How are the six states to be interpreted? How do they combine, logically?
     
  6. Jul 26, 2014 #5
    Unfortunately, I do not have a method for 6 state logic, but there is one for both 5 and 7 state logic. Also, I have a theorem that between every pair of consecutive squares there exist at least two primes. can anyone prove this?
     
  7. Jul 26, 2014 #6

    WWGD

    User Avatar
    Science Advisor
    Gold Member

    Bertrand's postulate : http://www.cuil.pt/r.php?cx=0028257...:10&ie=UTF-8&q=Bertrand's+postulate&sa=Search

    says there is at least one prime between n and 2n . But I don't know of results about the existence of two primes in the range you describe, which would be an improvement on Bertrand's .
     
    Last edited: Jul 26, 2014
  8. Jul 26, 2014 #7
    another part of the theorem is that there exist primes p and q such that n^2 < p <= n(n+1) < q < (n+1)^2 where n is an integer greater than or equal to 1.
     
  9. Jul 26, 2014 #8
    My theory of algebraic logic is that a logical vector can be transformed into an algebraic vector by multiplying the logical vector by the inverse of a transformation matrix. this theory only works for structures with a prime number of states
     
  10. Jul 26, 2014 #9

    WWGD

    User Avatar
    Science Advisor
    Gold Member

    Then you're done. Maybe if you explain to us what these algebraic and logic states are, we can give you some well-informed comments.
     
  11. Jul 26, 2014 #10
    Unfortunately, I am not done with the proof, as I now have two sub-cases to prove.

    Logical states are basically a numeric mapping between predicates and statements. In this case I am using a more general definition of "predicate" than is typically used in predicate logic; they (predicates) are the set of attributes, results, implications, etc. of a statement. The mapping is arbitrary.

    For example, I made a labyrinth game that has two types of predicates, namely pickups and motions. Pickups are defined as items that can be found in the maze, and motions are the directions that you can leave a square. There are, at this time, 4 types of pickups: missiles, bombs, maps, and teleporters. In addition, there are 4 cardinal directions (up, down, left, and right). The maze is denoted by two matrices (pickups and motions). The cells of each matrix denote the values of each type of predicate at that location in the maze. The possible values run from 0 to 4(mod 5) for pickups and from 0000 to 1111(mod 2) for motions.

    The assignment of values for pickups is arbitrary, but 0 should be reserved for cells with no item. As for motions, each digit will represent a different direction, and the values will be 1 if the motion is allowed, or 0 otherwise. since each block of 4 motions can be represented by a single hexadecimal digit (0000 = 0 and 1111 = F), I can denote each cell of each matrix with a single character.

    I will let 1000 = up, 0100 = right, 0010 = left, and 0001 = down; combinations of directions are denoted by the sum of each allowed direction. Therefore, 1011 = up, left, down.
    I will denote no item by 0, missiles by 1, bombs by 2, teleporters by 3, and maps by 4.

    Maps are just a visual representation of the maze, and teleporters let you move from the current cell to any other in the same maze. Missiles and bombs are operators on the entire maze; missiles eliminate walls in any one direction (vertically up, vertically down, horizontally left, or horizontally right) from the current cell, and bombs eliminate all walls in all cells adjacent to the current cell (including diagonally and the current cell itself)

    An example cell can be denoted by B(1011) for motions and 2 for pickups, and this would have interpretations as above.
     
  12. Jul 27, 2014 #11

    Stephen Tashi

    User Avatar
    Science Advisor

    Your example talks about attributes of a cell, not attributes of a "statement". A logical function of a variable like "you can leave cell x in the direction 'up'" is a predicate of the kind typically used in predicate logic. .
     
  13. Jul 27, 2014 #12
    well it is a kind of obscure example, but I am using more general definitions of statements and predicates. a statement is any quantity, whether it is defined or not, and what I called predicates are more like outcomes, so I will use the latter term to describe them

    in my example, each cell is a statement, and the value at each cell is the cell's outcome. an outcome is a special type of statement that describes some other statement (similar to a predicate, but more general).
     
  14. Jul 27, 2014 #13
    also, I would still like to know if anyone can prove the two primes theorem...
     
  15. Jul 27, 2014 #14

    Stephen Tashi

    User Avatar
    Science Advisor

    To talk about the mathematics of the situation, you need to define any new type of statement or predicate in terms of mathematical concepts. If you can't do that, you can try giving enough practical examples so someone can attempt it for you.

    What I gather from your examples is that you have a set ( e.g. the set of cells in a labyrinth). You have a list of predicates that take the elements of the set as a variable (e.g. cell x allows upward movement out if). For each element of the set, you define a vector of integers that specifies whether each predicate is true or false. None of this requires any new kind of logic or new type of predicate.
     
  16. Jul 27, 2014 #15
    I agree, but I wanted to begin with a basic example that defines the concept of logical states. A more involved example is the algebraic extension of prime-state logic; however, it is still useful to restrict my range to 2 states. I can define an operator on the domain of statements as a transformation matrix.

    It is convenient that there are 16 combinations of directions and 16 logical vectors for 2 statements under 2 outcomes and 2 states. An operation on any particular cell could be to eliminate specific motions (i.e. P & 1011b will eliminate the right motion out of cell P),
    or you can add motions (i.e. P | 0100b will add the right motion out of cell P),
    or you can toggle motions (i.e. P ^ 0100b will change the value of the right motion out of cell P)

    also an operator for pickups would be to take an item (P * 0 will remove the item P from the maze; recall the 0 was reserved for an empty cell), here * is just regular multiplication

    The operators &, |, and ^ are the same as in C (bitwise and, or, xor respectively) and a number with the suffix 'b' is written in binary
     
  17. Jul 28, 2014 #16

    gill1109

    User Avatar
    Gold Member

    You mean how to deal with multivalued logic? There already exist several different 3-valued logic systems. For instance the 3 values could stand for "true", "false", "unknown". Then naturally we would have the axioms "true" OR "unknown" = "true", "true" AND "unknown" = "unknown" etc.. But other people developed a 3-valued logic where the three values are "true", "false" and "stupid question" (you know the saying: ask a stupid question, get a stupid answer). If this is the kind of logic you want to use, you have to figure out what the sensible rules would be for AND, OR, NOT (ie the so-called truth tables).
     
  18. Jul 28, 2014 #17

    WWGD

    User Avatar
    Science Advisor
    Gold Member

    I hope this is not too far-off: is there a meaningful way of arguing that probability theory is (countably-) infinite-valued logic?

    Correction: that should have been uncountably-infinite, sorry.
     
    Last edited: Jul 28, 2014
  19. Jul 28, 2014 #18

    gill1109

    User Avatar
    Gold Member

    Well if we think of classical logic applied to a finite set of propositions and classical probability theory with a finite sample space then we could argue that probability theory is a generalization of logic. Because a "classical logic space" is just a classical probabilty space in which every probability is zero or one. In other words, a deterministic probability space.

    I don't think this mathematical triviality is useful.
     
  20. Jul 28, 2014 #19
    probability generally deals with a continuous distribution, but logic is typically discrete. Furthermore, probability has as its range all real numbers between 0 and 1, and logic is at its most complex form countably infinite.

    however my research deals with any prime number of states (i.e. 5 or 7, but not 6)

    I have yet to prove that between every 2 squares there exist at least 2 primes, and if I can prove this, then I can theoretically extend my research to a countably infinite range.
     
  21. Aug 1, 2014 #20
    One way I can prove the two primes theorem is:
    let p be the greatest prime
    p | p^2 and p | p(p+1)

    p(p+1) - p^2 = p, therefore there are p integers greater than p^2 and less than or equal to p(p+1)
    however, p^2 is an additional data point, so there are actually p+1 integers between p^2 and p(p+1) inclusive.

    for each integer t less than or equal to p, there exists an integer k such that
    p^2 <= k <= p(p+1) and t|k

    since p divides both endpoints of the data, there exists at least one integer in the range [p^2, p(p+1)] that has no divisors less than or equal to p. If q was that integer, either it is prime or a prime greater than p divides q.
    However, p was defined to be the greatest prime number, therefore q must be prime
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: The algebraic analysis of logic
  1. Algebraic logic. (Replies: 3)

Loading...