non-termination Questions
1
So far, I have always taken steadfastness in Prolog programs to mean:
If, for a query Q, there is a subterm S, such that there is a term T that makes ?- S=T, Q. succeed although ?- Q, S=T. fails...
Lacteal asked 28/8, 2016 at 12:17
1
Solved
The third chapter of CPDT briefly discusses why negative inductive types are forbidden in Coq. If we had
Inductive term : Set :=
| App : term -> term -> term
| Abs : (term -> term) -> ...
Thayne asked 5/7, 2015 at 1:17
2
Solved
I can't figure out where this is going wrong. Please note that I am very new to Prolog and I'm sure I'm missing something - just no idea what that might be. Could anyone help me out please?
Thanks...
Earthworm asked 3/6, 2012 at 12:7
2
Solved
I start to learn Prolog and first learnt about the successor notation.
And this is where I find out about writing Peano axioms in Prolog.
See page 12 of the PDF:
sum(0, M, M).
sum(s(N), M, s(K))...
Portemonnaie asked 13/4, 2012 at 11:3
2
Solved
I need to create a Prolog predicate for power of 2, with the natural numbers.
Natural numbers are: 0, s(0), s(s(0)) ans so on..
For example:
?- pow2(s(0),P).
P = s(s(0));
false.
?- pow2(P,s(s(0))...
Nutrition asked 16/3, 2012 at 15:40
1
© 2022 - 2024 — McMap. All rights reserved.