No permission to redefine imported_procedure error

I’m using: SWI-Prolog version 8.2.1

I had to do a project for university and my professor gave me a list of predicates to recreate. Some of those already exist and so, when i’m compiling, the listener give me this No permission to redefine imported_procedure for each predicate. I have problems with vertices/2 and heap_size/2.
The listener says that i’m importing some library that probably he’s loading without my will (library ugraph and library heap).

My code looks like this:

:- dynamic graph/1.
:- dynamic vertex/2.
:- dynamic arc/4.

:- dynamic heap/2.
:- dynamic heap_entry/4.


vertices(G, Vs) :-
    findall(V, vertex(G, V), Vs),


heap_size(H, S) :-
    heap(H, S).

I had the same problem with the predicate neighbors/3 in previous days, but now nothing happens.

neighbors(G, V, Ns) :-
    vertex(G, V),
    findall(arc(G, V, N, W), arc(G, V, N, W), Ns1),
    findall(arc(G, N, V, W), arc(G, N, V, W), Ns2),
    append(Ns1, Ns2, Ns).

library(ugraphs): Unweighted Graphs

defines vertices/2 so you will have to either qualify the use of your predicate by creating it in a module then using the Module_name:Predicate_name syntax, (see: Modules), or pick a different name for your predicate like my_verticies.

I can not find a library(heap) so my guess is that your professor created it.

Again same options as before, put your predicate in a module and reference it with a module name qualifier or rename the predicate.