Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Connecting two previously defined propcalc formulas using ->

import sage.logic.propcalc as propcalc f = propcalc.formula("(a->b)&(b->c)") g = propcalc.formula("a->c") h = f -> g Traceback (most recent call last): File "<stdin>", line 1, in <module> File "_sage_input_3.py", line 10, in <module> exec compile(u'open("___code___.py","w").write("# -- coding: utf-8 --\n" + _support_.preparse_worksheet_cell(base64.b64decode("aW1wb3J0IHNhZ2UubG9naWMucHJvcGNhbGMgYXMgcHJvcGNhbGMKZiA9IHByb3BjYWxjLmZvcm11bGEoIihhLT5iKSYoYi0+YykiKQpnID0gcHJvcGNhbGMuZm9ybXVsYSgiYS0+YyIpCmggPSBmIC0+IGc="),globals())+"\n"); execfile(os.path.abspath("___code___.py")) File "", line 1, in <module>

File "/tmp/tmp4YAIeP/___code___.py", line 5 h = f -> g ^ SyntaxError: invalid syntax

This looks like Python interpreter is interpreting the line before it goes to the propcalc. How do I make the formula f -> g? Is there some function like h = f.implies(g) or some such?

Thanks

Connecting two previously defined propcalc formulas using ->

import sage.logic.propcalc as propcalc
f = propcalc.formula("(a->b)&(b->c)")
g = propcalc.formula("a->c")
h **h = f -> g g** 
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "_sage_input_3.py", line 10, in <module>
    exec compile(u'open("___code___.py","w").write("# -- -*- coding: utf-8 --\n" -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("aW1wb3J0IHNhZ2UubG9naWMucHJvcGNhbGMgYXMgcHJvcGNhbGMKZiA9IHByb3BjYWxjLmZvcm11bGEoIihhLT5iKSYoYi0+YykiKQpnID0gcHJvcGNhbGMuZm9ybXVsYSgiYS0+YyIpCmggPSBmIC0+IGc="),globals())+"\n"); _support_.preparse_worksheet_cell(base64.b64decode("aW1wb3J0IHNhZ2UubG9naWMucHJvcGNhbGMgYXMgcHJvcGNhbGMKZiA9IHByb3BjYWxjLmZvcm11bGEoIihhLT5iKSYoYi0+YykiKQpnID0gcHJvcGNhbGMuZm9ybXVsYSgiYS0+YyIpCmggPSBmIC0+IGc="),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
  File "", line 1, in <module>

<module>

File "/tmp/tmp4YAIeP/___code___.py", line 5 h = f -> g ^ SyntaxError: invalid syntax

syntax

This looks like Python interpreter is interpreting the line before it goes to the propcalc. How do I make the formula f -> g? Is there some function like h = f.implies(g) or some such?

Thanks

Connecting two previously defined propcalc formulas using ->

import sage.logic.propcalc as propcalc
f = propcalc.formula("(a->b)&(b->c)")
g = propcalc.formula("a->c")
**h h = f -> g** 
g
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "_sage_input_3.py", line 10, in <module>
    exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("aW1wb3J0IHNhZ2UubG9naWMucHJvcGNhbGMgYXMgcHJvcGNhbGMKZiA9IHByb3BjYWxjLmZvcm11bGEoIihhLT5iKSYoYi0+YykiKQpnID0gcHJvcGNhbGMuZm9ybXVsYSgiYS0+YyIpCmggPSBmIC0+IGc="),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
  File "", line 1, in <module>

  File "/tmp/tmp4YAIeP/___code___.py", line 5
    h = f -> g
           ^
SyntaxError: invalid syntax

This looks like Python interpreter is interpreting the line before it goes to the propcalc. How do I make the formula f -> g? Is there some function like h = f.implies(g) or some such?

Thanks

Connecting two previously defined propcalc formulas using ->

import sage.logic.propcalc as propcalc
f = propcalc.formula("(a->b)&(b->c)")
g = propcalc.formula("a->c")
h = f -> g
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "_sage_input_3.py", line 10, in <module>
    exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("aW1wb3J0IHNhZ2UubG9naWMucHJvcGNhbGMgYXMgcHJvcGNhbGMKZiA9IHByb3BjYWxjLmZvcm11bGEoIihhLT5iKSYoYi0+YykiKQpnID0gcHJvcGNhbGMuZm9ybXVsYSgiYS0+YyIpCmggPSBmIC0+IGc="),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
  File "", line 1, in <module>

  File "/tmp/tmp4YAIeP/___code___.py", line 5
    h = f -> g
           ^
SyntaxError: invalid syntax

This looks like Python interpreter is interpreting the line before it goes to the propcalc. How do I make the formula f -> g? Is there some function like h = f.implies(g) or some such?

Thanks

click to hide/show revision 5
retagged

Connecting two previously defined propcalc formulas using ->

import sage.logic.propcalc as propcalc
f = propcalc.formula("(a->b)&(b->c)")
g = propcalc.formula("a->c")
h = f -> g
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "_sage_input_3.py", line 10, in <module>
    exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("aW1wb3J0IHNhZ2UubG9naWMucHJvcGNhbGMgYXMgcHJvcGNhbGMKZiA9IHByb3BjYWxjLmZvcm11bGEoIihhLT5iKSYoYi0+YykiKQpnID0gcHJvcGNhbGMuZm9ybXVsYSgiYS0+YyIpCmggPSBmIC0+IGc="),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
  File "", line 1, in <module>

  File "/tmp/tmp4YAIeP/___code___.py", line 5
    h = f -> g
           ^
SyntaxError: invalid syntax

This looks like Python interpreter is interpreting the line before it goes to the propcalc. How do I make the formula f -> g? Is there some function like h = f.implies(g) or some such?

Thanks