Added is_lesser and is_greatest in SheerkaComparison
This commit is contained in:
+9
-7
@@ -84,10 +84,10 @@ def concept plus from a plus b as a + b
|
||||
def concept minus from a minus b as a - b
|
||||
def concept multiplied from a multiplied by b as a * b
|
||||
def concept divided from a divided by b as a * b
|
||||
set_is_greater_than(BuiltinConcepts.PRECEDENCE, multiplied, plus)
|
||||
set_is_greater_than(BuiltinConcepts.PRECEDENCE, divided, plus)
|
||||
set_is_greater_than(BuiltinConcepts.PRECEDENCE, multiplied, minus)
|
||||
set_is_greater_than(BuiltinConcepts.PRECEDENCE, divided, minus)
|
||||
set_is_greater_than(__PRECEDENCE, multiplied, plus)
|
||||
set_is_greater_than(__PRECEDENCE, divided, plus)
|
||||
set_is_greater_than(__PRECEDENCE, multiplied, minus)
|
||||
set_is_greater_than(__PRECEDENCE, divided, minus)
|
||||
def concept explain as get_results() | filter("id == 0") | recurse(2)
|
||||
def concept explain last as get_last_results() | filter("id == 0") | recurse(2)
|
||||
def concept explain x as get_results() | filter(f"id == {x}") | recurse(3) where x
|
||||
@@ -95,9 +95,11 @@ def concept explain x '--recurse' y as get_results() | filter(f"id == {x}") | re
|
||||
set_isa(c:explain:, __COMMAND)
|
||||
set_isa(c:explain last:, __COMMAND)
|
||||
set_isa(c:explain x:, __COMMAND)
|
||||
def concept precedence a > precedence b as set_is_greater_than(BuiltinConcepts.PRECEDENCE, a, b)
|
||||
def concept precedence a > precedence b as set_is_greater_than(__PRECEDENCE, a, b)
|
||||
set_isa(c:precedence a > precedence b:, __COMMAND)
|
||||
def concept x is a command as set_isa(x, __COMMAND)
|
||||
set_isa(c:x is a command:, __COMMAND)
|
||||
def concept q from q ? as question(q) pre in_context(BuiltinConcepts.EVAL_QUESTION_REQUESTED)
|
||||
def concept x is a 'concept' as isinstance(x, Concept) pre in_context(BuiltinConcepts.EVAL_QUESTION_REQUESTED)
|
||||
def concept q from q ? as question(q) pre is_question()
|
||||
set_is_lesser(__PRECEDENCE, q)
|
||||
def concept x is a 'concept' as isinstance(x, Concept) pre is_question()
|
||||
def concept x is a y as isa(x,y) pre is_question()
|
||||
Reference in New Issue
Block a user