Intuitionistic assumei/1 adds temporarily a clause usable in later proofs. Such a clause can be used an indefinite number of times, mostly like asserted clauses, except that it vanishes on backtracking. Its scoped version
Clause=>Goal or [File]=>Goalmakes Clause or the set of clauses found in File available only during the proof of Goal. Both vanish on backtracking. Clauses are usable an indefinite number of times in the proof, i.e. for instance
?-assumei(a(13)),a(X),a(Y)will succeed.
Linear assumel/1 adds temporarily a clause usable at most once in later proofs. This assumption also vanishes on backtracking. Its scoped version
Clause-:Goal or [File]-:Goalmakes Clause or the set of clauses found in File available only during the proof of Goal. Both vanish on backtracking. Each clause is usable at most once in the proof, i.e. for instance
?-assumel(a(13)),a(X),a(Y).fails.
You can freely mix linear and intuitionistic clauses and implications for the same predicate. Try out something like
?-a(10)-:a(11)=>a(12)-:a(13)=>(a(X),a(X)). X=11; X=13; no
This shows that a(10) and a(12) are consumed after their first use while a(11) and a(13) are reusable indefinitely.
See the relatively straightforward implementation of these predicates in the file extra.pl.
Note that BinProlog's linear implication succeeds even if not all the assumptions are consumed while in systems like Lolli this is a strong requirement. Quantifiers and other linear operators are not implemented at this time, but can be added in the future if there's enough demand for them.
BinProlog 5.75 adds some control over the order in which clauses are assumed.
(=>>)/2 intuitionistic implication - stack (asserta) ordering (=>)/2 intuitionistic implication - assertz ordering (-::)/2 linear implication - stack (asserta) ordering (-:)/2 linear implication - assertz ordering (=::)/2 linear implication - asserta ordering (=:)/2 linear implication - assertz ordering