logic.spad line 3219 [edit on github]
Infinite Lattice which is distributive. Representation held as meet of joins.
returns true
(boolean true
) if intuitionisticLogic values are the same. Translates from Intuitionistic Logic to Boolean Logic
returns true
if this is an atom, that is a leaf node otherwise return false
if this is a compound term
assumes ln
contains a list of factors which must be true
for the whole to be true
(such as the list produced by factor). From this deductions attempts to produce a list of other proposition that must also be true
by using modus ponens. This is used to determine the returned type when converting ILogic to types by using the Curry-Howard isomorphism.
true
if empty
construct an empty lattice
splits n
into a list of factors which must be true
for the whole to be true
. This assumes that the top level is already a set of factors separated by /\
otherwise the result will just be a list with one entry: 'n'
. This is used when converting ILogic to types by using the Curry-Howard isomorphism.
returns child nodes if this is a compound term otherwise returns []
join of
set of elements
construct a lattice with one element
construct false
(contradiction): a logical constant.
construct true: a logical constant.
meet of
set of elements
if this is a compound op then opType returns the type of that op: "IMPLY"::Symbol =implies "AND"::Symbol=/\ "OR"::Symbol=\/
"NOT"::Symbol=~ "OTHER"::Symbol=not compound op
attempt to simplify terms
creates a string representation of this term and its sub-terms
similar to 'toString' but does not put outer compound terms in brackets
returns: "T"::Symbol = T
"F"::Symbol = _|_
"E"::Symbol = error "P"::Symbol = proposition "C"::Symbol = compound Constructs lambda term and bind any variables with the name provided
construct a variable