isprime(p,1) calls Pocklington-Lehmer only at the first recursion level and then
falls back to the check_prime rountine which may call APRCL.
Looking at the code I assume this is intentional but I find it misleading.
I would prefer if the flag were kept recursively, or suggest having a stronger flag ensuring to use only the PL test -- in particular the returned certificate would never contain '2'.
(use case: just for teaching)
--
Pascal