Fixed #41 : Implement concept 'and'

This commit is contained in:
2021-03-06 19:12:22 +01:00
parent 05577012f3
commit bd8e027827
6 changed files with 153 additions and 98 deletions
+9
View File
@@ -27,6 +27,15 @@ def concept x has a y as hasa(x,y) pre is_question()
def concept x has an y as hasa(x,y) pre is_question()
# no need to auto eval as it's a question
def concept x and y as x and y pre is_question()
set_is_lesser(__PRECEDENCE, c:x and y:, 'Sya')
set_is_less_than(__PRECEDENCE, c:q:, c:x and y:, 'Sya')
def concept x or y as x or y pre is_question()
set_is_lesser(__PRECEDENCE, c:x or y:, 'Sya')
set_is_greater_than(__PRECEDENCE, c:x and y:, c:x or y:, 'Sya')
set_is_less_than(__PRECEDENCE, c:q:, c:x or y:, 'Sya')
# default
def concept male
def concept female