I'm trying to figure out how to reduce integers. Here's a simple program
pred check-refl i:int i:int.
check-refl X X.
check-refl X Y :- coq.say "bad " X Y.
main [trm Arg] :-
check-refl 1 (1 + 0).
This prints bad 1 1 + 0
rather than nothing (which is what I would expect). What am I missing? I should say that I have not read everything in the manual.
I'm missing a calc
!
Gregory Malecha has marked this topic as resolved.
Yup, this is a "surprising" thing from Prolog (or Lisp)... There is a section about "common pitfalls", suggestions welcome.
Last updated: Oct 13 2024 at 01:02 UTC