Arguments#
TDS understands arguments as premise-conclusion structures. This means that any
argument has a set of premises \(\left\{ a_1, a_2, ... a_n \right\}\), a rule
of inference \(r\) and a conclusion \(c\). taupy
does not
implement the rule of inference since it assumes logical validity for any argument.
Then, the logical structure of an argument is that of an implication:
\(\left\{ a_1, a_2, ... a_n \right\} \to c\).
taupy
implements arguments as implication relations from sympy
,
a package for symbolic computing in Python. taupy
entirely relies on
sympy
for symbolic manipulation and some Boolean algebra. In other
words, the taupy.Argument
class is a sub-class of
sympy.Implies
.
For the creation of Argument
instances, sentence variables need to
be present. In the interactive mode, it is recommended to create such objects as
sympy.Symbol
objects via the sympy.symbols()
function.
It is impossible to use sentence variables without declaring them first. This
is due to a core principle in Python: every variable needs to be declared before
it can be used.
from taupy import Argument
from sympy import symbols
a, b, c = symbols("a b c")
# Alternatively, but for limited amount of variables only:
# from sympy.abc import a, b, c, d, e, ...
Now that we have three sentence variables, we can construct a simple argument
a1
with two premises and one conclusion:
a1 = Argument(a&b, ~c)
The premises a&b
are conntected by the operator &, not by
a comma. Premises and conclusion make up two parameters for the instance of an
Argument
, and these are separated by a ,. We have taken the
negation of c
as a premise here by using the sympy
operator
~. Alternatively, we could have used sympy.Not()
. We could have done the same for any of the premises. And we could have
entered further premises by adding them with a &.