/*  Generated by CHR bootstrap compiler
    From: D:/temp/2026_07_28_01_50_00_10315/Rtmp4gNQnq/R.INSTALL1804838833a70/rswipl/src/swipl-devel/packages/chr/guard_entailment.chr
    Date: Tue Jul 28 05:10:09 2026

    DO NOT EDIT.  EDIT THE CHR FILE INSTEAD
*/

:- module(guard_entailment,
          [ entails_guard/2,
            simplify_guards/5
          ]).
:- use_module(chr(chr_runtime)).
:- style_check(- (discontiguous)).
:- style_check(-singleton).
:- style_check(-no_effect).
:- include(chr(chr_op)).
:- use_module(library(dialect/hprolog)).
:- use_module(library(lists)).
:- use_module(chr(builtins)).
:- use_module(chr(chr_compiler_errors)).
entails_guard(A, B) :-
    copy_term_nat((A, B), (C, D)),
    term_variables(C, E),
    variables(E),
    sort(C, F),
    entails_guard2(F),
    !,
    test(D),
    !,
    cleanup.
entails_guard2([]).
entails_guard2([A|B]) :-
    known(A),
    entails_guard2(B).
simplify_guards(A, B, C, D, E) :-
    copy_term_nat((A, C), (F, G)),
    term_variables(F, H),
    variables(H),
    sort(F, I),
    entails_guard2(I),
    !,
    simplify(G, J),
    simplified(C, J, D, B, E),
    !,
    cleanup.
simplified([], [], [], A, A).
simplified([A|B], [keep|C], [A|D], E, F) :-
    simplified(B, C, D, E, F).
simplified([_|_], [fail|_], fail, A, A).
simplified([A|B], [true|C], [D|E], F, G) :-
    builtins:binds_b(A, H),
    term_variables(B, I),
    intersect_eq(H, I, J),
    !,
    (   J=[]
    ->  term_variables(F, K),
        intersect_eq(H, K, L),
        !,
        (   L=[]
        ->  D=true,
            G=M
        ;   D=true,
            G=(A, M)
        )
    ;   D=A,
        G=M
    ),
    simplified(B, C, E, F, M).
simplify([], []).
simplify([A|B], [C|D]) :-
    (   \+ try(true, A)
    ->  C=true
    ;   builtins:negate_b(A, E),
        (   \+ try(true, E)
        ->  C=fail
        ;   C=keep
        )
    ),
    known(A),
    simplify(B, D).
try(A, B) :-
    (   known(A)
    ->  true
    ;   chr_error(internal, 'Entailment Checker: try/2.\n', [])
    ),
    (   test(B)
    ->  fail
    ;   true
    ).
add_args_unif([], [], true).
add_args_unif([A|B], [C|D], (A=C, E)) :-
    add_args_unif(B, D, E).
add_args_nunif([], [], fail).
add_args_nunif([A|B], [C|D], (A\=C;E)) :-
    add_args_nunif(B, D, E).
add_args_nmatch([], [], fail).
add_args_nmatch([A|B], [C|D], (A\==C;E)) :-
    add_args_nmatch(B, D, E).
all_unique_vars(A, B) :-
    all_unique_vars(A, B, []).
all_unique_vars([], _, _).
all_unique_vars([A|B], C, D) :-
    var(A),
    \+ memberchk_eq(A, C),
    \+ memberchk_eq(A, D),
    all_unique_vars(B, [A|D]).
:- use_module(chr(chr_runtime)).
attach_variables___1([], _).
attach_variables___1([A|B], C) :-
    (   get_attr(A, guard_entailment, D)
    ->  D=v(E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z),
        (   E/\1=:=1
        ->  A1=v(E, [C|F], G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z)
        ;   B1 is E\/1,
            A1=v(B1, [C], G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z)
        ),
        put_attr(A, guard_entailment, A1)
    ;   put_attr(A,
                 guard_entailment,
                 v(1,
                   [C],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   []))
    ),
    attach_variables___1(B, C).
detach_variables___1([], _).
detach_variables___1([A|B], C) :-
    (   get_attr(A, guard_entailment, D)
    ->  D=v(E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z),
        (   E/\1=:=1
        ->  'chr sbag_del_element'(F, C, A1),
            (   A1==[]
            ->  B1 is E/\ -2,
                (   B1==0
                ->  del_attr(A, guard_entailment)
                ;   put_attr(A,
                             guard_entailment,
                             v(B1,
                               [],
                               G,
                               H,
                               I,
                               J,
                               K,
                               L,
                               M,
                               N,
                               O,
                               P,
                               Q,
                               R,
                               S,
                               T,
                               U,
                               V,
                               W,
                               X,
                               Y,
                               Z))
                )
            ;   put_attr(A,
                         guard_entailment,
                         v(E,
                           A1,
                           G,
                           H,
                           I,
                           J,
                           K,
                           L,
                           M,
                           N,
                           O,
                           P,
                           Q,
                           R,
                           S,
                           T,
                           U,
                           V,
                           W,
                           X,
                           Y,
                           Z))
            )
        ;   true
        )
    ;   true
    ),
    detach_variables___1(B, C).
'attach_known/1_1_$default___1'([], _).
'attach_known/1_1_$default___1'([A|B], C) :-
    (   get_attr(A, guard_entailment, D)
    ->  D=v(E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z),
        (   E/\2=:=2
        ->  A1=v(E, F, [C|G], H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z)
        ;   B1 is E\/2,
            A1=v(B1, F, [C], H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z)
        ),
        put_attr(A, guard_entailment, A1)
    ;   put_attr(A,
                 guard_entailment,
                 v(2,
                   [],
                   [C],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   []))
    ),
    'attach_known/1_1_$default___1'(B, C).
'detach_known/1_1_$default___1'([], _).
'detach_known/1_1_$default___1'([A|B], C) :-
    (   get_attr(A, guard_entailment, D)
    ->  D=v(E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z),
        (   E/\2=:=2
        ->  'chr sbag_del_element'(G, C, A1),
            (   A1==[]
            ->  B1 is E/\ -3,
                (   B1==0
                ->  del_attr(A, guard_entailment)
                ;   put_attr(A,
                             guard_entailment,
                             v(B1,
                               F,
                               [],
                               H,
                               I,
                               J,
                               K,
                               L,
                               M,
                               N,
                               O,
                               P,
                               Q,
                               R,
                               S,
                               T,
                               U,
                               V,
                               W,
                               X,
                               Y,
                               Z))
                )
            ;   put_attr(A,
                         guard_entailment,
                         v(E,
                           F,
                           A1,
                           H,
                           I,
                           J,
                           K,
                           L,
                           M,
                           N,
                           O,
                           P,
                           Q,
                           R,
                           S,
                           T,
                           U,
                           V,
                           W,
                           X,
                           Y,
                           Z))
            )
        ;   true
        )
    ;   true
    ),
    'detach_known/1_1_$default___1'(B, C).
'attach_known/1_1_$special_;/2___2'([], _).
'attach_known/1_1_$special_;/2___2'([A|B], C) :-
    (   get_attr(A, guard_entailment, D)
    ->  D=v(E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z),
        (   E/\4=:=4
        ->  A1=v(E, F, G, [C|H], I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z)
        ;   B1 is E\/4,
            A1=v(B1, F, G, [C], I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z)
        ),
        put_attr(A, guard_entailment, A1)
    ;   put_attr(A,
                 guard_entailment,
                 v(4,
                   [],
                   [],
                   [C],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   []))
    ),
    'attach_known/1_1_$special_;/2___2'(B, C).
'detach_known/1_1_$special_;/2___2'([], _).
'detach_known/1_1_$special_;/2___2'([A|B], C) :-
    (   get_attr(A, guard_entailment, D)
    ->  D=v(E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z),
        (   E/\4=:=4
        ->  'chr sbag_del_element'(H, C, A1),
            (   A1==[]
            ->  B1 is E/\ -5,
                (   B1==0
                ->  del_attr(A, guard_entailment)
                ;   put_attr(A,
                             guard_entailment,
                             v(B1,
                               F,
                               G,
                               [],
                               I,
                               J,
                               K,
                               L,
                               M,
                               N,
                               O,
                               P,
                               Q,
                               R,
                               S,
                               T,
                               U,
                               V,
                               W,
                               X,
                               Y,
                               Z))
                )
            ;   put_attr(A,
                         guard_entailment,
                         v(E,
                           F,
                           G,
                           A1,
                           I,
                           J,
                           K,
                           L,
                           M,
                           N,
                           O,
                           P,
                           Q,
                           R,
                           S,
                           T,
                           U,
                           V,
                           W,
                           X,
                           Y,
                           Z))
            )
        ;   true
        )
    ;   true
    ),
    'detach_known/1_1_$special_;/2___2'(B, C).
'attach_known/1_1_$special_nonvar/1___1'([], _).
'attach_known/1_1_$special_nonvar/1___1'([A|B], C) :-
    (   get_attr(A, guard_entailment, D)
    ->  D=v(E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z),
        (   E/\8=:=8
        ->  A1=v(E, F, G, H, [C|I], J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z)
        ;   B1 is E\/8,
            A1=v(B1, F, G, H, [C], J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z)
        ),
        put_attr(A, guard_entailment, A1)
    ;   put_attr(A,
                 guard_entailment,
                 v(8,
                   [],
                   [],
                   [],
                   [C],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   []))
    ),
    'attach_known/1_1_$special_nonvar/1___1'(B, C).
'detach_known/1_1_$special_nonvar/1___1'([], _).
'detach_known/1_1_$special_nonvar/1___1'([A|B], C) :-
    (   get_attr(A, guard_entailment, D)
    ->  D=v(E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z),
        (   E/\8=:=8
        ->  'chr sbag_del_element'(I, C, A1),
            (   A1==[]
            ->  B1 is E/\ -9,
                (   B1==0
                ->  del_attr(A, guard_entailment)
                ;   put_attr(A,
                             guard_entailment,
                             v(B1,
                               F,
                               G,
                               H,
                               [],
                               J,
                               K,
                               L,
                               M,
                               N,
                               O,
                               P,
                               Q,
                               R,
                               S,
                               T,
                               U,
                               V,
                               W,
                               X,
                               Y,
                               Z))
                )
            ;   put_attr(A,
                         guard_entailment,
                         v(E,
                           F,
                           G,
                           H,
                           A1,
                           J,
                           K,
                           L,
                           M,
                           N,
                           O,
                           P,
                           Q,
                           R,
                           S,
                           T,
                           U,
                           V,
                           W,
                           X,
                           Y,
                           Z))
            )
        ;   true
        )
    ;   true
    ),
    'detach_known/1_1_$special_nonvar/1___1'(B, C).
'attach_known/1_1_$special_var/1___1'([], _).
'attach_known/1_1_$special_var/1___1'([A|B], C) :-
    (   get_attr(A, guard_entailment, D)
    ->  D=v(E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z),
        (   E/\16=:=16
        ->  A1=v(E, F, G, H, I, [C|J], K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z)
        ;   B1 is E\/16,
            A1=v(B1, F, G, H, I, [C], K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z)
        ),
        put_attr(A, guard_entailment, A1)
    ;   put_attr(A,
                 guard_entailment,
                 v(16,
                   [],
                   [],
                   [],
                   [],
                   [C],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   []))
    ),
    'attach_known/1_1_$special_var/1___1'(B, C).
'detach_known/1_1_$special_var/1___1'([], _).
'detach_known/1_1_$special_var/1___1'([A|B], C) :-
    (   get_attr(A, guard_entailment, D)
    ->  D=v(E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z),
        (   E/\16=:=16
        ->  'chr sbag_del_element'(J, C, A1),
            (   A1==[]
            ->  B1 is E/\ -17,
                (   B1==0
                ->  del_attr(A, guard_entailment)
                ;   put_attr(A,
                             guard_entailment,
                             v(B1,
                               F,
                               G,
                               H,
                               I,
                               [],
                               K,
                               L,
                               M,
                               N,
                               O,
                               P,
                               Q,
                               R,
                               S,
                               T,
                               U,
                               V,
                               W,
                               X,
                               Y,
                               Z))
                )
            ;   put_attr(A,
                         guard_entailment,
                         v(E,
                           F,
                           G,
                           H,
                           I,
                           A1,
                           K,
                           L,
                           M,
                           N,
                           O,
                           P,
                           Q,
                           R,
                           S,
                           T,
                           U,
                           V,
                           W,
                           X,
                           Y,
                           Z))
            )
        ;   true
        )
    ;   true
    ),
    'detach_known/1_1_$special_var/1___1'(B, C).
'attach_known/1_1_$special_atom/1___1'([], _).
'attach_known/1_1_$special_atom/1___1'([A|B], C) :-
    (   get_attr(A, guard_entailment, D)
    ->  D=v(E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z),
        (   E/\32=:=32
        ->  A1=v(E, F, G, H, I, J, [C|K], L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z)
        ;   B1 is E\/32,
            A1=v(B1, F, G, H, I, J, [C], L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z)
        ),
        put_attr(A, guard_entailment, A1)
    ;   put_attr(A,
                 guard_entailment,
                 v(32,
                   [],
                   [],
                   [],
                   [],
                   [],
                   [C],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   []))
    ),
    'attach_known/1_1_$special_atom/1___1'(B, C).
'detach_known/1_1_$special_atom/1___1'([], _).
'detach_known/1_1_$special_atom/1___1'([A|B], C) :-
    (   get_attr(A, guard_entailment, D)
    ->  D=v(E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z),
        (   E/\32=:=32
        ->  'chr sbag_del_element'(K, C, A1),
            (   A1==[]
            ->  B1 is E/\ -33,
                (   B1==0
                ->  del_attr(A, guard_entailment)
                ;   put_attr(A,
                             guard_entailment,
                             v(B1,
                               F,
                               G,
                               H,
                               I,
                               J,
                               [],
                               L,
                               M,
                               N,
                               O,
                               P,
                               Q,
                               R,
                               S,
                               T,
                               U,
                               V,
                               W,
                               X,
                               Y,
                               Z))
                )
            ;   put_attr(A,
                         guard_entailment,
                         v(E,
                           F,
                           G,
                           H,
                           I,
                           J,
                           A1,
                           L,
                           M,
                           N,
                           O,
                           P,
                           Q,
                           R,
                           S,
                           T,
                           U,
                           V,
                           W,
                           X,
                           Y,
                           Z))
            )
        ;   true
        )
    ;   true
    ),
    'detach_known/1_1_$special_atom/1___1'(B, C).
'attach_known/1_1_$special_atomic/1___1'([], _).
'attach_known/1_1_$special_atomic/1___1'([A|B], C) :-
    (   get_attr(A, guard_entailment, D)
    ->  D=v(E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z),
        (   E/\64=:=64
        ->  A1=v(E, F, G, H, I, J, K, [C|L], M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z)
        ;   B1 is E\/64,
            A1=v(B1, F, G, H, I, J, K, [C], M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z)
        ),
        put_attr(A, guard_entailment, A1)
    ;   put_attr(A,
                 guard_entailment,
                 v(64,
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [C],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   []))
    ),
    'attach_known/1_1_$special_atomic/1___1'(B, C).
'detach_known/1_1_$special_atomic/1___1'([], _).
'detach_known/1_1_$special_atomic/1___1'([A|B], C) :-
    (   get_attr(A, guard_entailment, D)
    ->  D=v(E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z),
        (   E/\64=:=64
        ->  'chr sbag_del_element'(L, C, A1),
            (   A1==[]
            ->  B1 is E/\ -65,
                (   B1==0
                ->  del_attr(A, guard_entailment)
                ;   put_attr(A,
                             guard_entailment,
                             v(B1,
                               F,
                               G,
                               H,
                               I,
                               J,
                               K,
                               [],
                               M,
                               N,
                               O,
                               P,
                               Q,
                               R,
                               S,
                               T,
                               U,
                               V,
                               W,
                               X,
                               Y,
                               Z))
                )
            ;   put_attr(A,
                         guard_entailment,
                         v(E,
                           F,
                           G,
                           H,
                           I,
                           J,
                           K,
                           A1,
                           M,
                           N,
                           O,
                           P,
                           Q,
                           R,
                           S,
                           T,
                           U,
                           V,
                           W,
                           X,
                           Y,
                           Z))
            )
        ;   true
        )
    ;   true
    ),
    'detach_known/1_1_$special_atomic/1___1'(B, C).
'attach_known/1_1_$special_compound/1___1'([], _).
'attach_known/1_1_$special_compound/1___1'([A|B], C) :-
    (   get_attr(A, guard_entailment, D)
    ->  D=v(E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z),
        (   E/\128=:=128
        ->  A1=v(E, F, G, H, I, J, K, L, [C|M], N, O, P, Q, R, S, T, U, V, W, X, Y, Z)
        ;   B1 is E\/128,
            A1=v(B1, F, G, H, I, J, K, L, [C], N, O, P, Q, R, S, T, U, V, W, X, Y, Z)
        ),
        put_attr(A, guard_entailment, A1)
    ;   put_attr(A,
                 guard_entailment,
                 v(128,
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [C],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   []))
    ),
    'attach_known/1_1_$special_compound/1___1'(B, C).
'detach_known/1_1_$special_compound/1___1'([], _).
'detach_known/1_1_$special_compound/1___1'([A|B], C) :-
    (   get_attr(A, guard_entailment, D)
    ->  D=v(E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z),
        (   E/\128=:=128
        ->  'chr sbag_del_element'(M, C, A1),
            (   A1==[]
            ->  B1 is E/\ -129,
                (   B1==0
                ->  del_attr(A, guard_entailment)
                ;   put_attr(A,
                             guard_entailment,
                             v(B1,
                               F,
                               G,
                               H,
                               I,
                               J,
                               K,
                               L,
                               [],
                               N,
                               O,
                               P,
                               Q,
                               R,
                               S,
                               T,
                               U,
                               V,
                               W,
                               X,
                               Y,
                               Z))
                )
            ;   put_attr(A,
                         guard_entailment,
                         v(E,
                           F,
                           G,
                           H,
                           I,
                           J,
                           K,
                           L,
                           A1,
                           N,
                           O,
                           P,
                           Q,
                           R,
                           S,
                           T,
                           U,
                           V,
                           W,
                           X,
                           Y,
                           Z))
            )
        ;   true
        )
    ;   true
    ),
    'detach_known/1_1_$special_compound/1___1'(B, C).
'attach_known/1_1_$special_ground/1___1'([], _).
'attach_known/1_1_$special_ground/1___1'([A|B], C) :-
    (   get_attr(A, guard_entailment, D)
    ->  D=v(E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z),
        (   E/\256=:=256
        ->  A1=v(E, F, G, H, I, J, K, L, M, [C|N], O, P, Q, R, S, T, U, V, W, X, Y, Z)
        ;   B1 is E\/256,
            A1=v(B1, F, G, H, I, J, K, L, M, [C], O, P, Q, R, S, T, U, V, W, X, Y, Z)
        ),
        put_attr(A, guard_entailment, A1)
    ;   put_attr(A,
                 guard_entailment,
                 v(256,
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [C],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   []))
    ),
    'attach_known/1_1_$special_ground/1___1'(B, C).
'detach_known/1_1_$special_ground/1___1'([], _).
'detach_known/1_1_$special_ground/1___1'([A|B], C) :-
    (   get_attr(A, guard_entailment, D)
    ->  D=v(E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z),
        (   E/\256=:=256
        ->  'chr sbag_del_element'(N, C, A1),
            (   A1==[]
            ->  B1 is E/\ -257,
                (   B1==0
                ->  del_attr(A, guard_entailment)
                ;   put_attr(A,
                             guard_entailment,
                             v(B1,
                               F,
                               G,
                               H,
                               I,
                               J,
                               K,
                               L,
                               M,
                               [],
                               O,
                               P,
                               Q,
                               R,
                               S,
                               T,
                               U,
                               V,
                               W,
                               X,
                               Y,
                               Z))
                )
            ;   put_attr(A,
                         guard_entailment,
                         v(E,
                           F,
                           G,
                           H,
                           I,
                           J,
                           K,
                           L,
                           M,
                           A1,
                           O,
                           P,
                           Q,
                           R,
                           S,
                           T,
                           U,
                           V,
                           W,
                           X,
                           Y,
                           Z))
            )
        ;   true
        )
    ;   true
    ),
    'detach_known/1_1_$special_ground/1___1'(B, C).
'attach_known/1_1_$special_integer/1___1'([], _).
'attach_known/1_1_$special_integer/1___1'([A|B], C) :-
    (   get_attr(A, guard_entailment, D)
    ->  D=v(E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z),
        (   E/\512=:=512
        ->  A1=v(E, F, G, H, I, J, K, L, M, N, [C|O], P, Q, R, S, T, U, V, W, X, Y, Z)
        ;   B1 is E\/512,
            A1=v(B1, F, G, H, I, J, K, L, M, N, [C], P, Q, R, S, T, U, V, W, X, Y, Z)
        ),
        put_attr(A, guard_entailment, A1)
    ;   put_attr(A,
                 guard_entailment,
                 v(512,
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [C],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   []))
    ),
    'attach_known/1_1_$special_integer/1___1'(B, C).
'detach_known/1_1_$special_integer/1___1'([], _).
'detach_known/1_1_$special_integer/1___1'([A|B], C) :-
    (   get_attr(A, guard_entailment, D)
    ->  D=v(E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z),
        (   E/\512=:=512
        ->  'chr sbag_del_element'(O, C, A1),
            (   A1==[]
            ->  B1 is E/\ -513,
                (   B1==0
                ->  del_attr(A, guard_entailment)
                ;   put_attr(A,
                             guard_entailment,
                             v(B1,
                               F,
                               G,
                               H,
                               I,
                               J,
                               K,
                               L,
                               M,
                               N,
                               [],
                               P,
                               Q,
                               R,
                               S,
                               T,
                               U,
                               V,
                               W,
                               X,
                               Y,
                               Z))
                )
            ;   put_attr(A,
                         guard_entailment,
                         v(E,
                           F,
                           G,
                           H,
                           I,
                           J,
                           K,
                           L,
                           M,
                           N,
                           A1,
                           P,
                           Q,
                           R,
                           S,
                           T,
                           U,
                           V,
                           W,
                           X,
                           Y,
                           Z))
            )
        ;   true
        )
    ;   true
    ),
    'detach_known/1_1_$special_integer/1___1'(B, C).
'attach_known/1_1_$special_float/1___1'([], _).
'attach_known/1_1_$special_float/1___1'([A|B], C) :-
    (   get_attr(A, guard_entailment, D)
    ->  D=v(E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z),
        (   E/\1024=:=1024
        ->  A1=v(E, F, G, H, I, J, K, L, M, N, O, [C|P], Q, R, S, T, U, V, W, X, Y, Z)
        ;   B1 is E\/1024,
            A1=v(B1, F, G, H, I, J, K, L, M, N, O, [C], Q, R, S, T, U, V, W, X, Y, Z)
        ),
        put_attr(A, guard_entailment, A1)
    ;   put_attr(A,
                 guard_entailment,
                 v(1024,
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [C],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   []))
    ),
    'attach_known/1_1_$special_float/1___1'(B, C).
'detach_known/1_1_$special_float/1___1'([], _).
'detach_known/1_1_$special_float/1___1'([A|B], C) :-
    (   get_attr(A, guard_entailment, D)
    ->  D=v(E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z),
        (   E/\1024=:=1024
        ->  'chr sbag_del_element'(P, C, A1),
            (   A1==[]
            ->  B1 is E/\ -1025,
                (   B1==0
                ->  del_attr(A, guard_entailment)
                ;   put_attr(A,
                             guard_entailment,
                             v(B1,
                               F,
                               G,
                               H,
                               I,
                               J,
                               K,
                               L,
                               M,
                               N,
                               O,
                               [],
                               Q,
                               R,
                               S,
                               T,
                               U,
                               V,
                               W,
                               X,
                               Y,
                               Z))
                )
            ;   put_attr(A,
                         guard_entailment,
                         v(E,
                           F,
                           G,
                           H,
                           I,
                           J,
                           K,
                           L,
                           M,
                           N,
                           O,
                           A1,
                           Q,
                           R,
                           S,
                           T,
                           U,
                           V,
                           W,
                           X,
                           Y,
                           Z))
            )
        ;   true
        )
    ;   true
    ),
    'detach_known/1_1_$special_float/1___1'(B, C).
'attach_known/1_1_$special_number/1___1'([], _).
'attach_known/1_1_$special_number/1___1'([A|B], C) :-
    (   get_attr(A, guard_entailment, D)
    ->  D=v(E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z),
        (   E/\2048=:=2048
        ->  A1=v(E, F, G, H, I, J, K, L, M, N, O, P, [C|Q], R, S, T, U, V, W, X, Y, Z)
        ;   B1 is E\/2048,
            A1=v(B1, F, G, H, I, J, K, L, M, N, O, P, [C], R, S, T, U, V, W, X, Y, Z)
        ),
        put_attr(A, guard_entailment, A1)
    ;   put_attr(A,
                 guard_entailment,
                 v(2048,
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [C],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   []))
    ),
    'attach_known/1_1_$special_number/1___1'(B, C).
'detach_known/1_1_$special_number/1___1'([], _).
'detach_known/1_1_$special_number/1___1'([A|B], C) :-
    (   get_attr(A, guard_entailment, D)
    ->  D=v(E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z),
        (   E/\2048=:=2048
        ->  'chr sbag_del_element'(Q, C, A1),
            (   A1==[]
            ->  B1 is E/\ -2049,
                (   B1==0
                ->  del_attr(A, guard_entailment)
                ;   put_attr(A,
                             guard_entailment,
                             v(B1,
                               F,
                               G,
                               H,
                               I,
                               J,
                               K,
                               L,
                               M,
                               N,
                               O,
                               P,
                               [],
                               R,
                               S,
                               T,
                               U,
                               V,
                               W,
                               X,
                               Y,
                               Z))
                )
            ;   put_attr(A,
                         guard_entailment,
                         v(E,
                           F,
                           G,
                           H,
                           I,
                           J,
                           K,
                           L,
                           M,
                           N,
                           O,
                           P,
                           A1,
                           R,
                           S,
                           T,
                           U,
                           V,
                           W,
                           X,
                           Y,
                           Z))
            )
        ;   true
        )
    ;   true
    ),
    'detach_known/1_1_$special_number/1___1'(B, C).
'attach_known/1_1_$special_=\\=/2___2'([], _).
'attach_known/1_1_$special_=\\=/2___2'([A|B], C) :-
    (   get_attr(A, guard_entailment, D)
    ->  D=v(E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z),
        (   E/\4096=:=4096
        ->  A1=v(E, F, G, H, I, J, K, L, M, N, O, P, Q, [C|R], S, T, U, V, W, X, Y, Z)
        ;   B1 is E\/4096,
            A1=v(B1, F, G, H, I, J, K, L, M, N, O, P, Q, [C], S, T, U, V, W, X, Y, Z)
        ),
        put_attr(A, guard_entailment, A1)
    ;   put_attr(A,
                 guard_entailment,
                 v(4096,
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [C],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   []))
    ),
    'attach_known/1_1_$special_=\\=/2___2'(B, C).
'detach_known/1_1_$special_=\\=/2___2'([], _).
'detach_known/1_1_$special_=\\=/2___2'([A|B], C) :-
    (   get_attr(A, guard_entailment, D)
    ->  D=v(E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z),
        (   E/\4096=:=4096
        ->  'chr sbag_del_element'(R, C, A1),
            (   A1==[]
            ->  B1 is E/\ -4097,
                (   B1==0
                ->  del_attr(A, guard_entailment)
                ;   put_attr(A,
                             guard_entailment,
                             v(B1,
                               F,
                               G,
                               H,
                               I,
                               J,
                               K,
                               L,
                               M,
                               N,
                               O,
                               P,
                               Q,
                               [],
                               S,
                               T,
                               U,
                               V,
                               W,
                               X,
                               Y,
                               Z))
                )
            ;   put_attr(A,
                         guard_entailment,
                         v(E,
                           F,
                           G,
                           H,
                           I,
                           J,
                           K,
                           L,
                           M,
                           N,
                           O,
                           P,
                           Q,
                           A1,
                           S,
                           T,
                           U,
                           V,
                           W,
                           X,
                           Y,
                           Z))
            )
        ;   true
        )
    ;   true
    ),
    'detach_known/1_1_$special_=\\=/2___2'(B, C).
'attach_known/1_1_$special_\\+/1___1'([], _).
'attach_known/1_1_$special_\\+/1___1'([A|B], C) :-
    (   get_attr(A, guard_entailment, D)
    ->  D=v(E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z),
        (   E/\8192=:=8192
        ->  A1=v(E, F, G, H, I, J, K, L, M, N, O, P, Q, R, [C|S], T, U, V, W, X, Y, Z)
        ;   B1 is E\/8192,
            A1=v(B1, F, G, H, I, J, K, L, M, N, O, P, Q, R, [C], T, U, V, W, X, Y, Z)
        ),
        put_attr(A, guard_entailment, A1)
    ;   put_attr(A,
                 guard_entailment,
                 v(8192,
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [C],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   []))
    ),
    'attach_known/1_1_$special_\\+/1___1'(B, C).
'detach_known/1_1_$special_\\+/1___1'([], _).
'detach_known/1_1_$special_\\+/1___1'([A|B], C) :-
    (   get_attr(A, guard_entailment, D)
    ->  D=v(E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z),
        (   E/\8192=:=8192
        ->  'chr sbag_del_element'(S, C, A1),
            (   A1==[]
            ->  B1 is E/\ -8193,
                (   B1==0
                ->  del_attr(A, guard_entailment)
                ;   put_attr(A,
                             guard_entailment,
                             v(B1,
                               F,
                               G,
                               H,
                               I,
                               J,
                               K,
                               L,
                               M,
                               N,
                               O,
                               P,
                               Q,
                               R,
                               [],
                               T,
                               U,
                               V,
                               W,
                               X,
                               Y,
                               Z))
                )
            ;   put_attr(A,
                         guard_entailment,
                         v(E,
                           F,
                           G,
                           H,
                           I,
                           J,
                           K,
                           L,
                           M,
                           N,
                           O,
                           P,
                           Q,
                           R,
                           A1,
                           T,
                           U,
                           V,
                           W,
                           X,
                           Y,
                           Z))
            )
        ;   true
        )
    ;   true
    ),
    'detach_known/1_1_$special_\\+/1___1'(B, C).
'attach_known/1_1_$special_functor/3___3'([], _).
'attach_known/1_1_$special_functor/3___3'([A|B], C) :-
    (   get_attr(A, guard_entailment, D)
    ->  D=v(E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z),
        (   E/\16384=:=16384
        ->  A1=v(E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, [C|T], U, V, W, X, Y, Z)
        ;   B1 is E\/16384,
            A1=v(B1, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, [C], U, V, W, X, Y, Z)
        ),
        put_attr(A, guard_entailment, A1)
    ;   put_attr(A,
                 guard_entailment,
                 v(16384,
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [C],
                   [],
                   [],
                   [],
                   [],
                   [],
                   []))
    ),
    'attach_known/1_1_$special_functor/3___3'(B, C).
'detach_known/1_1_$special_functor/3___3'([], _).
'detach_known/1_1_$special_functor/3___3'([A|B], C) :-
    (   get_attr(A, guard_entailment, D)
    ->  D=v(E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z),
        (   E/\16384=:=16384
        ->  'chr sbag_del_element'(T, C, A1),
            (   A1==[]
            ->  B1 is E/\ -16385,
                (   B1==0
                ->  del_attr(A, guard_entailment)
                ;   put_attr(A,
                             guard_entailment,
                             v(B1,
                               F,
                               G,
                               H,
                               I,
                               J,
                               K,
                               L,
                               M,
                               N,
                               O,
                               P,
                               Q,
                               R,
                               S,
                               [],
                               U,
                               V,
                               W,
                               X,
                               Y,
                               Z))
                )
            ;   put_attr(A,
                         guard_entailment,
                         v(E,
                           F,
                           G,
                           H,
                           I,
                           J,
                           K,
                           L,
                           M,
                           N,
                           O,
                           P,
                           Q,
                           R,
                           S,
                           A1,
                           U,
                           V,
                           W,
                           X,
                           Y,
                           Z))
            )
        ;   true
        )
    ;   true
    ),
    'detach_known/1_1_$special_functor/3___3'(B, C).
'attach_known/1_1_$special_\\=/2___2'([], _).
'attach_known/1_1_$special_\\=/2___2'([A|B], C) :-
    (   get_attr(A, guard_entailment, D)
    ->  D=v(E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z),
        (   E/\32768=:=32768
        ->  A1=v(E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, [C|U], V, W, X, Y, Z)
        ;   B1 is E\/32768,
            A1=v(B1, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, [C], V, W, X, Y, Z)
        ),
        put_attr(A, guard_entailment, A1)
    ;   put_attr(A,
                 guard_entailment,
                 v(32768,
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [C],
                   [],
                   [],
                   [],
                   [],
                   []))
    ),
    'attach_known/1_1_$special_\\=/2___2'(B, C).
'detach_known/1_1_$special_\\=/2___2'([], _).
'detach_known/1_1_$special_\\=/2___2'([A|B], C) :-
    (   get_attr(A, guard_entailment, D)
    ->  D=v(E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z),
        (   E/\32768=:=32768
        ->  'chr sbag_del_element'(U, C, A1),
            (   A1==[]
            ->  B1 is E/\ -32769,
                (   B1==0
                ->  del_attr(A, guard_entailment)
                ;   put_attr(A,
                             guard_entailment,
                             v(B1,
                               F,
                               G,
                               H,
                               I,
                               J,
                               K,
                               L,
                               M,
                               N,
                               O,
                               P,
                               Q,
                               R,
                               S,
                               T,
                               [],
                               V,
                               W,
                               X,
                               Y,
                               Z))
                )
            ;   put_attr(A,
                         guard_entailment,
                         v(E,
                           F,
                           G,
                           H,
                           I,
                           J,
                           K,
                           L,
                           M,
                           N,
                           O,
                           P,
                           Q,
                           R,
                           S,
                           T,
                           A1,
                           V,
                           W,
                           X,
                           Y,
                           Z))
            )
        ;   true
        )
    ;   true
    ),
    'detach_known/1_1_$special_\\=/2___2'(B, C).
'attach_known/1_1_$special_=/2___2'([], _).
'attach_known/1_1_$special_=/2___2'([A|B], C) :-
    (   get_attr(A, guard_entailment, D)
    ->  D=v(E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z),
        (   E/\65536=:=65536
        ->  A1=v(E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, [C|V], W, X, Y, Z)
        ;   B1 is E\/65536,
            A1=v(B1, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, [C], W, X, Y, Z)
        ),
        put_attr(A, guard_entailment, A1)
    ;   put_attr(A,
                 guard_entailment,
                 v(65536,
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [C],
                   [],
                   [],
                   [],
                   []))
    ),
    'attach_known/1_1_$special_=/2___2'(B, C).
'detach_known/1_1_$special_=/2___2'([], _).
'detach_known/1_1_$special_=/2___2'([A|B], C) :-
    (   get_attr(A, guard_entailment, D)
    ->  D=v(E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z),
        (   E/\65536=:=65536
        ->  'chr sbag_del_element'(V, C, A1),
            (   A1==[]
            ->  B1 is E/\ -65537,
                (   B1==0
                ->  del_attr(A, guard_entailment)
                ;   put_attr(A,
                             guard_entailment,
                             v(B1,
                               F,
                               G,
                               H,
                               I,
                               J,
                               K,
                               L,
                               M,
                               N,
                               O,
                               P,
                               Q,
                               R,
                               S,
                               T,
                               U,
                               [],
                               W,
                               X,
                               Y,
                               Z))
                )
            ;   put_attr(A,
                         guard_entailment,
                         v(E,
                           F,
                           G,
                           H,
                           I,
                           J,
                           K,
                           L,
                           M,
                           N,
                           O,
                           P,
                           Q,
                           R,
                           S,
                           T,
                           U,
                           A1,
                           W,
                           X,
                           Y,
                           Z))
            )
        ;   true
        )
    ;   true
    ),
    'detach_known/1_1_$special_=/2___2'(B, C).
'attach_known/1_1_$special_\\==/2___2'([], _).
'attach_known/1_1_$special_\\==/2___2'([A|B], C) :-
    (   get_attr(A, guard_entailment, D)
    ->  D=v(E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z),
        (   E/\131072=:=131072
        ->  A1=v(E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, [C|W], X, Y, Z)
        ;   B1 is E\/131072,
            A1=v(B1, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, [C], X, Y, Z)
        ),
        put_attr(A, guard_entailment, A1)
    ;   put_attr(A,
                 guard_entailment,
                 v(131072,
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [C],
                   [],
                   [],
                   []))
    ),
    'attach_known/1_1_$special_\\==/2___2'(B, C).
'detach_known/1_1_$special_\\==/2___2'([], _).
'detach_known/1_1_$special_\\==/2___2'([A|B], C) :-
    (   get_attr(A, guard_entailment, D)
    ->  D=v(E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z),
        (   E/\131072=:=131072
        ->  'chr sbag_del_element'(W, C, A1),
            (   A1==[]
            ->  B1 is E/\ -131073,
                (   B1==0
                ->  del_attr(A, guard_entailment)
                ;   put_attr(A,
                             guard_entailment,
                             v(B1,
                               F,
                               G,
                               H,
                               I,
                               J,
                               K,
                               L,
                               M,
                               N,
                               O,
                               P,
                               Q,
                               R,
                               S,
                               T,
                               U,
                               V,
                               [],
                               X,
                               Y,
                               Z))
                )
            ;   put_attr(A,
                         guard_entailment,
                         v(E,
                           F,
                           G,
                           H,
                           I,
                           J,
                           K,
                           L,
                           M,
                           N,
                           O,
                           P,
                           Q,
                           R,
                           S,
                           T,
                           U,
                           V,
                           A1,
                           X,
                           Y,
                           Z))
            )
        ;   true
        )
    ;   true
    ),
    'detach_known/1_1_$special_\\==/2___2'(B, C).
'attach_known/1_1_$special_==/2___2'([], _).
'attach_known/1_1_$special_==/2___2'([A|B], C) :-
    (   get_attr(A, guard_entailment, D)
    ->  D=v(E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z),
        (   E/\262144=:=262144
        ->  A1=v(E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, [C|X], Y, Z)
        ;   B1 is E\/262144,
            A1=v(B1, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, [C], Y, Z)
        ),
        put_attr(A, guard_entailment, A1)
    ;   put_attr(A,
                 guard_entailment,
                 v(262144,
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [C],
                   [],
                   []))
    ),
    'attach_known/1_1_$special_==/2___2'(B, C).
'detach_known/1_1_$special_==/2___2'([], _).
'detach_known/1_1_$special_==/2___2'([A|B], C) :-
    (   get_attr(A, guard_entailment, D)
    ->  D=v(E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z),
        (   E/\262144=:=262144
        ->  'chr sbag_del_element'(X, C, A1),
            (   A1==[]
            ->  B1 is E/\ -262145,
                (   B1==0
                ->  del_attr(A, guard_entailment)
                ;   put_attr(A,
                             guard_entailment,
                             v(B1,
                               F,
                               G,
                               H,
                               I,
                               J,
                               K,
                               L,
                               M,
                               N,
                               O,
                               P,
                               Q,
                               R,
                               S,
                               T,
                               U,
                               V,
                               W,
                               [],
                               Y,
                               Z))
                )
            ;   put_attr(A,
                         guard_entailment,
                         v(E,
                           F,
                           G,
                           H,
                           I,
                           J,
                           K,
                           L,
                           M,
                           N,
                           O,
                           P,
                           Q,
                           R,
                           S,
                           T,
                           U,
                           V,
                           W,
                           A1,
                           Y,
                           Z))
            )
        ;   true
        )
    ;   true
    ),
    'detach_known/1_1_$special_==/2___2'(B, C).
'attach_known/1_1_$special_=</2___2'([], _).
'attach_known/1_1_$special_=</2___2'([A|B], C) :-
    (   get_attr(A, guard_entailment, D)
    ->  D=v(E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z),
        (   E/\524288=:=524288
        ->  A1=v(E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, [C|Y], Z)
        ;   B1 is E\/524288,
            A1=v(B1, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, [C], Z)
        ),
        put_attr(A, guard_entailment, A1)
    ;   put_attr(A,
                 guard_entailment,
                 v(524288,
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [C],
                   []))
    ),
    'attach_known/1_1_$special_=</2___2'(B, C).
'detach_known/1_1_$special_=</2___2'([], _).
'detach_known/1_1_$special_=</2___2'([A|B], C) :-
    (   get_attr(A, guard_entailment, D)
    ->  D=v(E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z),
        (   E/\524288=:=524288
        ->  'chr sbag_del_element'(Y, C, A1),
            (   A1==[]
            ->  B1 is E/\ -524289,
                (   B1==0
                ->  del_attr(A, guard_entailment)
                ;   put_attr(A,
                             guard_entailment,
                             v(B1,
                               F,
                               G,
                               H,
                               I,
                               J,
                               K,
                               L,
                               M,
                               N,
                               O,
                               P,
                               Q,
                               R,
                               S,
                               T,
                               U,
                               V,
                               W,
                               X,
                               [],
                               Z))
                )
            ;   put_attr(A,
                         guard_entailment,
                         v(E,
                           F,
                           G,
                           H,
                           I,
                           J,
                           K,
                           L,
                           M,
                           N,
                           O,
                           P,
                           Q,
                           R,
                           S,
                           T,
                           U,
                           V,
                           W,
                           X,
                           A1,
                           Z))
            )
        ;   true
        )
    ;   true
    ),
    'detach_known/1_1_$special_=</2___2'(B, C).
'attach_known/1_1_$special_=:=/2___2'([], _).
'attach_known/1_1_$special_=:=/2___2'([A|B], C) :-
    (   get_attr(A, guard_entailment, D)
    ->  D=v(E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z),
        (   E/\1048576=:=1048576
        ->  A1=v(E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, [C|Z])
        ;   B1 is E\/1048576,
            A1=v(B1, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, [C])
        ),
        put_attr(A, guard_entailment, A1)
    ;   put_attr(A,
                 guard_entailment,
                 v(1048576,
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [],
                   [C]))
    ),
    'attach_known/1_1_$special_=:=/2___2'(B, C).
'detach_known/1_1_$special_=:=/2___2'([], _).
'detach_known/1_1_$special_=:=/2___2'([A|B], C) :-
    (   get_attr(A, guard_entailment, D)
    ->  D=v(E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z),
        (   E/\1048576=:=1048576
        ->  'chr sbag_del_element'(Z, C, A1),
            (   A1==[]
            ->  B1 is E/\ -1048577,
                (   B1==0
                ->  del_attr(A, guard_entailment)
                ;   put_attr(A,
                             guard_entailment,
                             v(B1,
                               F,
                               G,
                               H,
                               I,
                               J,
                               K,
                               L,
                               M,
                               N,
                               O,
                               P,
                               Q,
                               R,
                               S,
                               T,
                               U,
                               V,
                               W,
                               X,
                               Y,
                               []))
                )
            ;   put_attr(A,
                         guard_entailment,
                         v(E,
                           F,
                           G,
                           H,
                           I,
                           J,
                           K,
                           L,
                           M,
                           N,
                           O,
                           P,
                           Q,
                           R,
                           S,
                           T,
                           U,
                           V,
                           W,
                           X,
                           Y,
                           A1))
            )
        ;   true
        )
    ;   true
    ),
    'detach_known/1_1_$special_=:=/2___2'(B, C).
attach_increment([], _).
attach_increment([A|B], C) :-
    'chr not_locked'(A),
    (   get_attr(A, guard_entailment, D)
    ->  C=v(E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z),
        D=v(A1, B1, C1, D1, E1, F1, G1, H1, I1, J1, K1, L1, M1, N1, O1, P1, Q1, R1, S1, T1, U1, V1),
        ( sort(B1, W1),
          'chr merge_attributes'(F, W1, X1),
          sort(C1, Y1),
          'chr merge_attributes'(G, Y1, Z1),
          sort(D1, A2),
          'chr merge_attributes'(H, A2, B2),
          sort(E1, C2),
          'chr merge_attributes'(I, C2, D2),
          sort(F1, E2),
          'chr merge_attributes'(J, E2, F2),
          sort(G1, G2),
          'chr merge_attributes'(K, G2, H2),
          sort(H1, I2),
          'chr merge_attributes'(L, I2, J2),
          sort(I1, K2),
          'chr merge_attributes'(M, K2, L2),
          sort(J1, M2),
          'chr merge_attributes'(N, M2, N2),
          sort(K1, O2),
          'chr merge_attributes'(O, O2, P2),
          sort(L1, Q2),
          'chr merge_attributes'(P, Q2, R2),
          sort(M1, S2),
          'chr merge_attributes'(Q, S2, T2),
          sort(N1, U2),
          'chr merge_attributes'(R, U2, V2),
          sort(O1, W2),
          'chr merge_attributes'(S, W2, X2),
          sort(P1, Y2),
          'chr merge_attributes'(T, Y2, Z2),
          sort(Q1, A3),
          'chr merge_attributes'(U, A3, B3),
          sort(R1, C3),
          'chr merge_attributes'(V, C3, D3),
          sort(S1, E3),
          'chr merge_attributes'(W, E3, F3),
          sort(T1, G3),
          'chr merge_attributes'(X, G3, H3),
          sort(U1, I3),
          'chr merge_attributes'(Y, I3, J3),
          sort(V1, K3),
          'chr merge_attributes'(Z, K3, L3)
        ),
        M3 is E\/A1,
        put_attr(A,
                 guard_entailment,
                 v(M3,
                   X1,
                   Z1,
                   B2,
                   D2,
                   F2,
                   H2,
                   J2,
                   L2,
                   N2,
                   P2,
                   R2,
                   T2,
                   V2,
                   X2,
                   Z2,
                   B3,
                   D3,
                   F3,
                   H3,
                   J3,
                   L3))
    ;   put_attr(A, guard_entailment, C)
    ),
    attach_increment(B, C).
attribute_goals(_, A, A).
attr_unify_hook(v(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V), W) :-
    sort(B, X),
    sort(C, Y),
    sort(D, Z),
    sort(E, A1),
    sort(F, B1),
    sort(G, C1),
    sort(H, D1),
    sort(I, E1),
    sort(J, F1),
    sort(K, G1),
    sort(L, H1),
    sort(M, I1),
    sort(N, J1),
    sort(O, K1),
    sort(P, L1),
    sort(Q, M1),
    sort(R, N1),
    sort(S, O1),
    sort(T, P1),
    sort(U, Q1),
    sort(V, R1),
    (   var(W)
    ->  (   get_attr(W, guard_entailment, S1)
        ->  S1=v(T1, U1, V1, W1, X1, Y1, Z1, A2, B2, C2, D2, E2, F2, G2, H2, I2, J2, K2, L2, M2, N2, O2),
            ( sort(U1, P2),
              'chr merge_attributes'(X, P2, Q2),
              sort(V1, R2),
              'chr merge_attributes'(Y, R2, S2),
              sort(W1, T2),
              'chr merge_attributes'(Z, T2, U2),
              sort(X1, V2),
              'chr merge_attributes'(A1, V2, W2),
              sort(Y1, X2),
              'chr merge_attributes'(B1, X2, Y2),
              sort(Z1, Z2),
              'chr merge_attributes'(C1, Z2, A3),
              sort(A2, B3),
              'chr merge_attributes'(D1, B3, C3),
              sort(B2, D3),
              'chr merge_attributes'(E1, D3, E3),
              sort(C2, F3),
              'chr merge_attributes'(F1, F3, G3),
              sort(D2, H3),
              'chr merge_attributes'(G1, H3, I3),
              sort(E2, J3),
              'chr merge_attributes'(H1, J3, K3),
              sort(F2, L3),
              'chr merge_attributes'(I1, L3, M3),
              sort(G2, N3),
              'chr merge_attributes'(J1, N3, O3),
              sort(H2, P3),
              'chr merge_attributes'(K1, P3, Q3),
              sort(I2, R3),
              'chr merge_attributes'(L1, R3, S3),
              sort(J2, T3),
              'chr merge_attributes'(M1, T3, U3),
              sort(K2, V3),
              'chr merge_attributes'(N1, V3, W3),
              sort(L2, X3),
              'chr merge_attributes'(O1, X3, Y3),
              sort(M2, Z3),
              'chr merge_attributes'(P1, Z3, A4),
              sort(N2, B4),
              'chr merge_attributes'(Q1, B4, C4),
              sort(O2, D4),
              'chr merge_attributes'(R1, D4, E4)
            ),
            F4 is A\/T1,
            put_attr(W,
                     guard_entailment,
                     v(F4,
                       Q2,
                       S2,
                       U2,
                       W2,
                       Y2,
                       A3,
                       C3,
                       E3,
                       G3,
                       I3,
                       K3,
                       M3,
                       O3,
                       Q3,
                       S3,
                       U3,
                       W3,
                       Y3,
                       A4,
                       C4,
                       E4)),
            '$run_suspensions_variables___1'(X),
            '$run_suspensions_known/1_1_$default___1'(Y),
            '$run_suspensions_known/1_1_$special_;/2___2'(U2),
            '$run_suspensions_known/1_1_$special_nonvar/1___1'(A1),
            '$run_suspensions_known/1_1_$special_var/1___1'(B1),
            '$run_suspensions_known/1_1_$special_atom/1___1'(C1),
            '$run_suspensions_known/1_1_$special_atomic/1___1'(D1),
            '$run_suspensions_known/1_1_$special_compound/1___1'(E1),
            '$run_suspensions_known/1_1_$special_ground/1___1'(F1),
            '$run_suspensions_known/1_1_$special_integer/1___1'(I3),
            '$run_suspensions_known/1_1_$special_float/1___1'(K3),
            '$run_suspensions_known/1_1_$special_number/1___1'(M3),
            '$run_suspensions_known/1_1_$special_=\\=/2___2'(O3),
            '$run_suspensions_known/1_1_$special_\\+/1___1'(Q3),
            '$run_suspensions_known/1_1_$special_functor/3___3'(S3),
            '$run_suspensions_known/1_1_$special_\\=/2___2'(U3),
            '$run_suspensions_known/1_1_$special_=/2___2'(W3),
            '$run_suspensions_known/1_1_$special_\\==/2___2'(Y3),
            '$run_suspensions_known/1_1_$special_==/2___2'(A4),
            '$run_suspensions_known/1_1_$special_=</2___2'(C4),
            '$run_suspensions_known/1_1_$special_=:=/2___2'(E4)
        ;   put_attr(W,
                     guard_entailment,
                     v(A,
                       X,
                       Y,
                       Z,
                       A1,
                       B1,
                       C1,
                       D1,
                       E1,
                       F1,
                       G1,
                       H1,
                       I1,
                       J1,
                       K1,
                       L1,
                       M1,
                       N1,
                       O1,
                       P1,
                       Q1,
                       R1)),
            '$run_suspensions_variables___1'(X),
            '$run_suspensions_known/1_1_$default___1'(Y),
            '$run_suspensions_known/1_1_$special_;/2___2'(Z),
            '$run_suspensions_known/1_1_$special_nonvar/1___1'(A1),
            '$run_suspensions_known/1_1_$special_var/1___1'(B1),
            '$run_suspensions_known/1_1_$special_atom/1___1'(C1),
            '$run_suspensions_known/1_1_$special_atomic/1___1'(D1),
            '$run_suspensions_known/1_1_$special_compound/1___1'(E1),
            '$run_suspensions_known/1_1_$special_ground/1___1'(F1),
            '$run_suspensions_known/1_1_$special_integer/1___1'(G1),
            '$run_suspensions_known/1_1_$special_float/1___1'(H1),
            '$run_suspensions_known/1_1_$special_number/1___1'(I1),
            '$run_suspensions_known/1_1_$special_=\\=/2___2'(J1),
            '$run_suspensions_known/1_1_$special_\\+/1___1'(K1),
            '$run_suspensions_known/1_1_$special_functor/3___3'(L1),
            '$run_suspensions_known/1_1_$special_\\=/2___2'(M1),
            '$run_suspensions_known/1_1_$special_=/2___2'(N1),
            '$run_suspensions_known/1_1_$special_\\==/2___2'(O1),
            '$run_suspensions_known/1_1_$special_==/2___2'(P1),
            '$run_suspensions_known/1_1_$special_=</2___2'(Q1),
            '$run_suspensions_known/1_1_$special_=:=/2___2'(R1)
        )
    ;   (   compound(W)
        ->  term_variables(W, G4),
            attach_increment(G4,
                             v(A,
                               X,
                               Y,
                               Z,
                               A1,
                               B1,
                               C1,
                               D1,
                               E1,
                               F1,
                               G1,
                               H1,
                               I1,
                               J1,
                               K1,
                               L1,
                               M1,
                               N1,
                               O1,
                               P1,
                               Q1,
                               R1))
        ;   true
        ),
        '$run_suspensions_variables___1'(X),
        '$run_suspensions_known/1_1_$default___1'(Y),
        '$run_suspensions_known/1_1_$special_;/2___2'(Z),
        '$run_suspensions_known/1_1_$special_nonvar/1___1'(A1),
        '$run_suspensions_known/1_1_$special_var/1___1'(B1),
        '$run_suspensions_known/1_1_$special_atom/1___1'(C1),
        '$run_suspensions_known/1_1_$special_atomic/1___1'(D1),
        '$run_suspensions_known/1_1_$special_compound/1___1'(E1),
        '$run_suspensions_known/1_1_$special_ground/1___1'(F1),
        '$run_suspensions_known/1_1_$special_integer/1___1'(G1),
        '$run_suspensions_known/1_1_$special_float/1___1'(H1),
        '$run_suspensions_known/1_1_$special_number/1___1'(I1),
        '$run_suspensions_known/1_1_$special_=\\=/2___2'(J1),
        '$run_suspensions_known/1_1_$special_\\+/1___1'(K1),
        '$run_suspensions_known/1_1_$special_functor/3___3'(L1),
        '$run_suspensions_known/1_1_$special_\\=/2___2'(M1),
        '$run_suspensions_known/1_1_$special_=/2___2'(N1),
        '$run_suspensions_known/1_1_$special_\\==/2___2'(O1),
        '$run_suspensions_known/1_1_$special_==/2___2'(P1),
        '$run_suspensions_known/1_1_$special_=</2___2'(Q1),
        '$run_suspensions_known/1_1_$special_=:=/2___2'(R1)
    ).
'$novel_production'(A, B) :-
    arg(3, A, C),
    (   hprolog:get_ds(B, C, _)
    ->  fail
    ;   true
    ).
'$extend_history'(A, B) :-
    arg(3, A, C),
    hprolog:put_ds(B, C, x, D),
    setarg(3, A, D).
'$run_suspensions_variables___1'([]).
'$run_suspensions_variables___1'([A|B]) :-
    A=suspension(_, C, _, D),
    (   C==active
    ->  setarg(2, A, triggered),
        variables___1__0(D, A),
        (   C==triggered
        ->  setarg(2, A, active)
        ;   true
        )
    ;   true
    ),
    '$run_suspensions_variables___1'(B).
'$run_suspensions_known/1_1_$default___1'([]).
'$run_suspensions_known/1_1_$default___1'([A|B]) :-
    A=suspension(_, C, D, _, E),
    (   C==active
    ->  setarg(2, A, triggered),
        F is D+1,
        setarg(3, A, F),
        'known/1_1_$default___1__0'(E, A),
        (   C==triggered
        ->  setarg(2, A, active)
        ;   true
        )
    ;   true
    ),
    '$run_suspensions_known/1_1_$default___1'(B).
'$run_suspensions_known/1_1_$special_;/2___2'([]).
'$run_suspensions_known/1_1_$special_;/2___2'([A|B]) :-
    A=suspension(_, C, D, _, E, F),
    (   C==active
    ->  setarg(2, A, triggered),
        G is D+1,
        setarg(3, A, G),
        'known/1_1_$special_;/2___2__0'(E, F, A),
        (   C==triggered
        ->  setarg(2, A, active)
        ;   true
        )
    ;   true
    ),
    '$run_suspensions_known/1_1_$special_;/2___2'(B).
'$run_suspensions_known/1_1_$special_nonvar/1___1'([]).
'$run_suspensions_known/1_1_$special_nonvar/1___1'([A|B]) :-
    A=suspension(_, C, D, _, E),
    (   C==active
    ->  setarg(2, A, triggered),
        F is D+1,
        setarg(3, A, F),
        'known/1_1_$special_nonvar/1___1__0'(E, A),
        (   C==triggered
        ->  setarg(2, A, active)
        ;   true
        )
    ;   true
    ),
    '$run_suspensions_known/1_1_$special_nonvar/1___1'(B).
'$run_suspensions_known/1_1_$special_var/1___1'([]).
'$run_suspensions_known/1_1_$special_var/1___1'([A|B]) :-
    A=suspension(_, C, D, _, E),
    (   C==active
    ->  setarg(2, A, triggered),
        F is D+1,
        setarg(3, A, F),
        'known/1_1_$special_var/1___1__0'(E, A),
        (   C==triggered
        ->  setarg(2, A, active)
        ;   true
        )
    ;   true
    ),
    '$run_suspensions_known/1_1_$special_var/1___1'(B).
'$run_suspensions_known/1_1_$special_atom/1___1'([]).
'$run_suspensions_known/1_1_$special_atom/1___1'([A|B]) :-
    A=suspension(_, C, _, D, _, E),
    (   C==active
    ->  setarg(2, A, triggered),
        F is D+1,
        setarg(4, A, F),
        'known/1_1_$special_atom/1___1__0'(E, A),
        (   C==triggered
        ->  setarg(2, A, active)
        ;   true
        )
    ;   true
    ),
    '$run_suspensions_known/1_1_$special_atom/1___1'(B).
'$run_suspensions_known/1_1_$special_atomic/1___1'([]).
'$run_suspensions_known/1_1_$special_atomic/1___1'([A|B]) :-
    A=suspension(_, C, _, D, _, E),
    (   C==active
    ->  setarg(2, A, triggered),
        F is D+1,
        setarg(4, A, F),
        'known/1_1_$special_atomic/1___1__0'(E, A),
        (   C==triggered
        ->  setarg(2, A, active)
        ;   true
        )
    ;   true
    ),
    '$run_suspensions_known/1_1_$special_atomic/1___1'(B).
'$run_suspensions_known/1_1_$special_compound/1___1'([]).
'$run_suspensions_known/1_1_$special_compound/1___1'([A|B]) :-
    A=suspension(_, C, _, D, _, E),
    (   C==active
    ->  setarg(2, A, triggered),
        F is D+1,
        setarg(4, A, F),
        'known/1_1_$special_compound/1___1__0'(E, A),
        (   C==triggered
        ->  setarg(2, A, active)
        ;   true
        )
    ;   true
    ),
    '$run_suspensions_known/1_1_$special_compound/1___1'(B).
'$run_suspensions_known/1_1_$special_ground/1___1'([]).
'$run_suspensions_known/1_1_$special_ground/1___1'([A|B]) :-
    A=suspension(_, C, _, D, _, E),
    (   C==active
    ->  setarg(2, A, triggered),
        F is D+1,
        setarg(4, A, F),
        'known/1_1_$special_ground/1___1__0'(E, A),
        (   C==triggered
        ->  setarg(2, A, active)
        ;   true
        )
    ;   true
    ),
    '$run_suspensions_known/1_1_$special_ground/1___1'(B).
'$run_suspensions_known/1_1_$special_integer/1___1'([]).
'$run_suspensions_known/1_1_$special_integer/1___1'([A|B]) :-
    A=suspension(_, C, _, D, _, E),
    (   C==active
    ->  setarg(2, A, triggered),
        F is D+1,
        setarg(4, A, F),
        'known/1_1_$special_integer/1___1__0'(E, A),
        (   C==triggered
        ->  setarg(2, A, active)
        ;   true
        )
    ;   true
    ),
    '$run_suspensions_known/1_1_$special_integer/1___1'(B).
'$run_suspensions_known/1_1_$special_float/1___1'([]).
'$run_suspensions_known/1_1_$special_float/1___1'([A|B]) :-
    A=suspension(_, C, _, D, _, E),
    (   C==active
    ->  setarg(2, A, triggered),
        F is D+1,
        setarg(4, A, F),
        'known/1_1_$special_float/1___1__0'(E, A),
        (   C==triggered
        ->  setarg(2, A, active)
        ;   true
        )
    ;   true
    ),
    '$run_suspensions_known/1_1_$special_float/1___1'(B).
'$run_suspensions_known/1_1_$special_number/1___1'([]).
'$run_suspensions_known/1_1_$special_number/1___1'([A|B]) :-
    A=suspension(_, C, _, D, _, E),
    (   C==active
    ->  setarg(2, A, triggered),
        F is D+1,
        setarg(4, A, F),
        'known/1_1_$special_number/1___1__0'(E, A),
        (   C==triggered
        ->  setarg(2, A, active)
        ;   true
        )
    ;   true
    ),
    '$run_suspensions_known/1_1_$special_number/1___1'(B).
'$run_suspensions_known/1_1_$special_=\\=/2___2'([]).
'$run_suspensions_known/1_1_$special_=\\=/2___2'([A|B]) :-
    A=suspension(_, C, _, D, _, E, F),
    (   C==active
    ->  setarg(2, A, triggered),
        G is D+1,
        setarg(4, A, G),
        'known/1_1_$special_=\\=/2___2__0'(E, F, A),
        (   C==triggered
        ->  setarg(2, A, active)
        ;   true
        )
    ;   true
    ),
    '$run_suspensions_known/1_1_$special_=\\=/2___2'(B).
'$run_suspensions_known/1_1_$special_\\+/1___1'([]).
'$run_suspensions_known/1_1_$special_\\+/1___1'([A|B]) :-
    A=suspension(_, C, D, _, E),
    (   C==active
    ->  setarg(2, A, triggered),
        F is D+1,
        setarg(3, A, F),
        'known/1_1_$special_\\+/1___1__0'(E, A),
        (   C==triggered
        ->  setarg(2, A, active)
        ;   true
        )
    ;   true
    ),
    '$run_suspensions_known/1_1_$special_\\+/1___1'(B).
'$run_suspensions_known/1_1_$special_functor/3___3'([]).
'$run_suspensions_known/1_1_$special_functor/3___3'([A|B]) :-
    A=suspension(_, C, D, _, E, F, G),
    (   C==active
    ->  setarg(2, A, triggered),
        H is D+1,
        setarg(3, A, H),
        'known/1_1_$special_functor/3___3__0'(E, F, G, A),
        (   C==triggered
        ->  setarg(2, A, active)
        ;   true
        )
    ;   true
    ),
    '$run_suspensions_known/1_1_$special_functor/3___3'(B).
'$run_suspensions_known/1_1_$special_\\=/2___2'([]).
'$run_suspensions_known/1_1_$special_\\=/2___2'([A|B]) :-
    A=suspension(_, C, _, D, _, E, F),
    (   C==active
    ->  setarg(2, A, triggered),
        G is D+1,
        setarg(4, A, G),
        'known/1_1_$special_\\=/2___2__0'(E, F, A),
        (   C==triggered
        ->  setarg(2, A, active)
        ;   true
        )
    ;   true
    ),
    '$run_suspensions_known/1_1_$special_\\=/2___2'(B).
'$run_suspensions_known/1_1_$special_=/2___2'([]).
'$run_suspensions_known/1_1_$special_=/2___2'([A|B]) :-
    A=suspension(_, C, D, _, E, F),
    (   C==active
    ->  setarg(2, A, triggered),
        G is D+1,
        setarg(3, A, G),
        'known/1_1_$special_=/2___2__0'(E, F, A),
        (   C==triggered
        ->  setarg(2, A, active)
        ;   true
        )
    ;   true
    ),
    '$run_suspensions_known/1_1_$special_=/2___2'(B).
'$run_suspensions_known/1_1_$special_\\==/2___2'([]).
'$run_suspensions_known/1_1_$special_\\==/2___2'([A|B]) :-
    A=suspension(_, C, _, D, _, E, F),
    (   C==active
    ->  setarg(2, A, triggered),
        G is D+1,
        setarg(4, A, G),
        'known/1_1_$special_\\==/2___2__0'(E, F, A),
        (   C==triggered
        ->  setarg(2, A, active)
        ;   true
        )
    ;   true
    ),
    '$run_suspensions_known/1_1_$special_\\==/2___2'(B).
'$run_suspensions_known/1_1_$special_==/2___2'([]).
'$run_suspensions_known/1_1_$special_==/2___2'([A|B]) :-
    A=suspension(_, C, _, D, _, E, F),
    (   C==active
    ->  setarg(2, A, triggered),
        G is D+1,
        setarg(4, A, G),
        'known/1_1_$special_==/2___2__0'(E, F, A),
        (   C==triggered
        ->  setarg(2, A, active)
        ;   true
        )
    ;   true
    ),
    '$run_suspensions_known/1_1_$special_==/2___2'(B).
'$run_suspensions_known/1_1_$special_=</2___2'([]).
'$run_suspensions_known/1_1_$special_=</2___2'([A|B]) :-
    A=suspension(_, C, _, D, _, E, F),
    (   C==active
    ->  setarg(2, A, triggered),
        G is D+1,
        setarg(4, A, G),
        'known/1_1_$special_=</2___2__0'(E, F, A),
        (   C==triggered
        ->  setarg(2, A, active)
        ;   true
        )
    ;   true
    ),
    '$run_suspensions_known/1_1_$special_=</2___2'(B).
'$run_suspensions_known/1_1_$special_=:=/2___2'([]).
'$run_suspensions_known/1_1_$special_=:=/2___2'([A|B]) :-
    A=suspension(_, C, _, D, _, E, F),
    (   C==active
    ->  setarg(2, A, triggered),
        G is D+1,
        setarg(4, A, G),
        'known/1_1_$special_=:=/2___2__0'(E, F, A),
        (   C==triggered
        ->  setarg(2, A, active)
        ;   true
        )
    ;   true
    ),
    '$run_suspensions_known/1_1_$special_=:=/2___2'(B).
'$enumerate_constraints'(A) :-
    (   nonvar(A)
    ->  functor(A, B, _),
        '$enumerate_constraints'(B, A)
    ;   '$enumerate_constraints'(_, A)
    ).
'$enumerate_constraints'(variables, A) :-
    nb_current('$chr_store_global_list_guard_entailment____variables___1',
               B),
    member(C, B),
    C=suspension(_, _, _, D),
    A=variables(D).
'$enumerate_constraints'('known/1_1_$default', A) :-
    nb_current('$chr_store_global_list_guard_entailment____known/1_1_$default___1',
               B),
    member(C, B),
    C=suspension(_, _, _, _, D),
    A='known/1_1_$default'(D).
'$enumerate_constraints'('known/1_1_$special_;/2', A) :-
    nb_current('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
               B),
    member(C, B),
    C=suspension(_, _, _, _, D, E),
    A='known/1_1_$special_;/2'(D, E).
'$enumerate_constraints'('known/1_1_$special_nonvar/1', A) :-
    nb_current('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',
               B),
    member(C, B),
    C=suspension(_, _, _, _, D),
    A='known/1_1_$special_nonvar/1'(D).
'$enumerate_constraints'('known/1_1_$special_var/1', A) :-
    nb_current('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',
               B),
    member(C, B),
    C=suspension(_, _, _, _, D),
    A='known/1_1_$special_var/1'(D).
'$enumerate_constraints'('known/1_1_$special_atom/1', A) :-
    nb_current('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',
               B),
    member(C, B),
    C=suspension(_, _, _, _, _, D),
    A='known/1_1_$special_atom/1'(D).
'$enumerate_constraints'('known/1_1_$special_atomic/1', A) :-
    nb_current('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',
               B),
    member(C, B),
    C=suspension(_, _, _, _, _, D),
    A='known/1_1_$special_atomic/1'(D).
'$enumerate_constraints'('known/1_1_$special_compound/1', A) :-
    nb_current('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',
               B),
    member(C, B),
    C=suspension(_, _, _, _, _, D),
    A='known/1_1_$special_compound/1'(D).
'$enumerate_constraints'('known/1_1_$special_ground/1', A) :-
    nb_current('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',
               B),
    member(C, B),
    C=suspension(_, _, _, _, _, D),
    A='known/1_1_$special_ground/1'(D).
'$enumerate_constraints'('known/1_1_$special_integer/1', A) :-
    nb_current('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',
               B),
    member(C, B),
    C=suspension(_, _, _, _, _, D),
    A='known/1_1_$special_integer/1'(D).
'$enumerate_constraints'('known/1_1_$special_float/1', A) :-
    nb_current('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',
               B),
    member(C, B),
    C=suspension(_, _, _, _, _, D),
    A='known/1_1_$special_float/1'(D).
'$enumerate_constraints'('known/1_1_$special_number/1', A) :-
    nb_current('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',
               B),
    member(C, B),
    C=suspension(_, _, _, _, _, D),
    A='known/1_1_$special_number/1'(D).
'$enumerate_constraints'('known/1_1_$special_=\\=/2', A) :-
    nb_current('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',
               B),
    member(C, B),
    C=suspension(_, _, _, _, _, D, E),
    A='known/1_1_$special_=\\=/2'(D, E).
'$enumerate_constraints'('known/1_1_$special_\\+/1', A) :-
    nb_current('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
               B),
    member(C, B),
    C=suspension(_, _, _, _, D),
    A='known/1_1_$special_\\+/1'(D).
'$enumerate_constraints'('known/1_1_$special_functor/3', A) :-
    nb_current('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',
               B),
    member(C, B),
    C=suspension(_, _, _, _, D, E, F),
    A='known/1_1_$special_functor/3'(D, E, F).
'$enumerate_constraints'('known/1_1_$special_\\=/2', A) :-
    nb_current('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',
               B),
    member(C, B),
    C=suspension(_, _, _, _, _, D, E),
    A='known/1_1_$special_\\=/2'(D, E).
'$enumerate_constraints'('known/1_1_$special_=/2', A) :-
    nb_current('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',
               B),
    member(C, B),
    C=suspension(_, _, _, _, D, E),
    A='known/1_1_$special_=/2'(D, E).
'$enumerate_constraints'('known/1_1_$special_\\==/2', A) :-
    nb_current('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',
               B),
    member(C, B),
    C=suspension(_, _, _, _, _, D, E),
    A='known/1_1_$special_\\==/2'(D, E).
'$enumerate_constraints'('known/1_1_$special_==/2', A) :-
    nb_current('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',
               B),
    member(C, B),
    C=suspension(_, _, _, _, _, D, E),
    A='known/1_1_$special_==/2'(D, E).
'$enumerate_constraints'('known/1_1_$special_=</2', A) :-
    nb_current('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
               B),
    member(C, B),
    C=suspension(_, _, _, _, _, D, E),
    A='known/1_1_$special_=</2'(D, E).
'$enumerate_constraints'('known/1_1_$special_=:=/2', A) :-
    nb_current('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',
               B),
    member(C, B),
    C=suspension(_, _, _, _, _, D, E),
    A='known/1_1_$special_=:=/2'(D, E).
'$enumerate_constraints'('known/1_1_$special_fail/0', A) :-
    nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',
              B),
    member(C, B),
    C=suspension(_, _, _),
    A='known/1_1_$special_fail/0'.
'$chr_initialization' :-
    nb_setval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',
              []),
    nb_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',
              []),
    nb_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
              []),
    nb_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',
              []),
    nb_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',
              []),
    nb_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',
              []),
    nb_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',
              []),
    nb_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',
              []),
    nb_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
              []),
    nb_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',
              []),
    nb_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',
              []),
    nb_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',
              []),
    nb_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',
              []),
    nb_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',
              []),
    nb_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',
              []),
    nb_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',
              []),
    nb_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',
              []),
    nb_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',
              []),
    nb_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',
              []),
    nb_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
              []),
    nb_setval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',
              []),
    nb_setval('$chr_store_global_list_guard_entailment____variables___1', []).
:- (initialization'$chr_initialization').
:- (dynamic user:exception/3).
:- (multifile user:exception/3).
user:exception(undefined_global_variable, A, retry) :-
    '$chr_prolog_global_variable'(A),
    '$chr_initialization'.
'$chr_prolog_global_variable'('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0').
'$chr_prolog_global_variable'('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2').
'$chr_prolog_global_variable'('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2').
'$chr_prolog_global_variable'('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2').
'$chr_prolog_global_variable'('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2').
'$chr_prolog_global_variable'('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2').
'$chr_prolog_global_variable'('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2').
'$chr_prolog_global_variable'('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3').
'$chr_prolog_global_variable'('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1').
'$chr_prolog_global_variable'('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2').
'$chr_prolog_global_variable'('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1').
'$chr_prolog_global_variable'('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1').
'$chr_prolog_global_variable'('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1').
'$chr_prolog_global_variable'('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1').
'$chr_prolog_global_variable'('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1').
'$chr_prolog_global_variable'('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1').
'$chr_prolog_global_variable'('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1').
'$chr_prolog_global_variable'('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1').
'$chr_prolog_global_variable'('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1').
'$chr_prolog_global_variable'('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2').
'$chr_prolog_global_variable'('$chr_store_global_list_guard_entailment____known/1_1_$default___1').
'$chr_prolog_global_variable'('$chr_store_global_list_guard_entailment____variables___1').
known(A) :-
    nonvar(A),
    (   (   (   (   (   (   (   (   (   (   (   (   (   (   (   (   (   (   (   (   (   (   (   A=(B;C),
                                                                                                !,
                                                                                                'known/1_1_$special_;/2'(B,
                                                                                                                         C)
                                                                                            ;   A=nonvar(D),
                                                                                                !,
                                                                                                'known/1_1_$special_nonvar/1'(D)
                                                                                            )
                                                                                        ;   A=var(E),
                                                                                            !,
                                                                                            'known/1_1_$special_var/1'(E)
                                                                                        )
                                                                                    ;   A=atom(F),
                                                                                        !,
                                                                                        'known/1_1_$special_atom/1'(F)
                                                                                    )
                                                                                ;   A=atomic(G),
                                                                                    !,
                                                                                    'known/1_1_$special_atomic/1'(G)
                                                                                )
                                                                            ;   A=compound(H),
                                                                                !,
                                                                                'known/1_1_$special_compound/1'(H)
                                                                            )
                                                                        ;   A=ground(I),
                                                                            !,
                                                                            'known/1_1_$special_ground/1'(I)
                                                                        )
                                                                    ;   A=integer(J),
                                                                        !,
                                                                        'known/1_1_$special_integer/1'(J)
                                                                    )
                                                                ;   A=float(K),
                                                                    !,
                                                                    'known/1_1_$special_float/1'(K)
                                                                )
                                                            ;   A=number(L),
                                                                !,
                                                                'known/1_1_$special_number/1'(L)
                                                            )
                                                        ;   A=(M=\=N),
                                                            !,
                                                            'known/1_1_$special_=\\=/2'(M,
                                                                                        N)
                                                        )
                                                    ;   A=(\+O),
                                                        !,
                                                        'known/1_1_$special_\\+/1'(O)
                                                    )
                                                ;   A=functor(P, Q, R),
                                                    !,
                                                    'known/1_1_$special_functor/3'(P,
                                                                                   Q,
                                                                                   R)
                                                )
                                            ;   A=(S\=T),
                                                !,
                                                'known/1_1_$special_\\=/2'(S,
                                                                           T)
                                            )
                                        ;   A=(U=V),
                                            !,
                                            'known/1_1_$special_=/2'(U,
                                                                     V)
                                        )
                                    ;   A=(W, X),
                                        !,
                                        'known/1_1_$special_,/2'(W,
                                                                 X)
                                    )
                                ;   A=(Y\==Z),
                                    !,
                                    'known/1_1_$special_\\==/2'(Y,
                                                                Z)
                                )
                            ;   A=(A1==B1),
                                !,
                                'known/1_1_$special_==/2'(A1, B1)
                            )
                        ;   A=(C1 is D1),
                            !,
                            'known/1_1_$special_is/2'(C1, D1)
                        )
                    ;   A=(E1<F1),
                        !,
                        'known/1_1_$special_</2'(E1, F1)
                    )
                ;   A=(G1>=H1),
                    !,
                    'known/1_1_$special_>=/2'(G1, H1)
                )
            ;   A=(I1>J1),
                !,
                'known/1_1_$special_>/2'(I1, J1)
            )
        ;   A=(K1=<L1),
            !,
            'known/1_1_$special_=</2'(K1, L1)
        )
    ;   A=(M1=:=N1),
        !,
        'known/1_1_$special_=:=/2'(M1, N1)
    ).
known(A) :-
    A==fail,
    !,
    'known/1_1_$special_fail/0'.
known(A) :-
    'known/1_1_$default'(A).
test(A) :-
    nonvar(A),
    (   (   (   (   (   (   (   A=(B, C),
                                !,
                                'test/1_1_$special_,/2'(B, C)
                            ;   A=(\+D),
                                !,
                                'test/1_1_$special_\\+/1'(D)
                            )
                        ;   A=integer(E),
                            !,
                            'test/1_1_$special_integer/1'(E)
                        )
                    ;   A=float(F),
                        !,
                        'test/1_1_$special_float/1'(F)
                    )
                ;   A=number(G),
                    !,
                    'test/1_1_$special_number/1'(G)
                )
            ;   A=ground(H),
                !,
                'test/1_1_$special_ground/1'(H)
            )
        ;   A=(I=:=J),
            !,
            'test/1_1_$special_=:=/2'(I, J)
        )
    ;   A=(K==L),
        !,
        'test/1_1_$special_==/2'(K, L)
    ).
test(A) :-
    A==true,
    !,
    'test/1_1_$special_true/0'.
test(A) :-
    nonvar(A),
    (   (   (   (   (   (   (   (   (   A=functor(B, C, D),
                                        !,
                                        'test/1_1_$special_functor/3'(B,
                                                                      C,
                                                                      D)
                                    ;   A=(E=F),
                                        !,
                                        'test/1_1_$special_=/2'(E, F)
                                    )
                                ;   A=(G;H),
                                    !,
                                    'test/1_1_$special_;/2'(G, H)
                                )
                            ;   A=(I is J),
                                !,
                                'test/1_1_$special_is/2'(I, J)
                            )
                        ;   A=(K<L),
                            !,
                            'test/1_1_$special_</2'(K, L)
                        )
                    ;   A=(M>=N),
                        !,
                        'test/1_1_$special_>=/2'(M, N)
                    )
                ;   A=(O>P),
                    !,
                    'test/1_1_$special_>/2'(O, P)
                )
            ;   A=(Q=\=R),
                !,
                'test/1_1_$special_=\\=/2'(Q, R)
            )
        ;   A=(S=<T),
            !,
            'test/1_1_$special_=</2'(S, T)
        )
    ;   A=(U\==V),
        !,
        'test/1_1_$special_\\==/2'(U, V)
    ).
test(A) :-
    'test/1_1_$default'(A).
cleanup :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
              A),
    !,
    cleanup___0__0__0__1(A).
cleanup___0__0__0__1([]) :-
    cleanup___0__1.
cleanup___0__0__0__1([A|B]) :-
    (   A=suspension(_, active, _, _, _, _)
    ->  A=suspension(_, _, _, _, C, D),
        setarg(2, A, removed),
        term_variables(term(C, D), E),
        ( arg(4, A, F),
          (   var(F)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                        G),
              G=[_|H],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                       H),
              (   H=[I|_]
              ->  setarg(4, I, _)
              ;   true
              )
          ;   F=[_, _|H],
              setarg(2, F, H),
              (   H=[I|_]
              ->  setarg(4, I, F)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_;/2___2'(E, A),
        cleanup___0__0__0__1(B)
    ;   cleanup___0__0__0__1(B)
    ).
cleanup :-
    cleanup___0__1.
cleanup___0__1 :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',
              A),
    !,
    cleanup___0__1__0__2(A).
cleanup___0__1__0__2([]) :-
    cleanup___0__2.
cleanup___0__1__0__2([A|B]) :-
    (   A=suspension(_, active, _, _, _)
    ->  A=suspension(_, _, _, _, C),
        setarg(2, A, removed),
        term_variables(C, D),
        ( arg(4, A, E),
          (   var(E)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',
                        F),
              F=[_|G],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',
                       G),
              (   G=[H|_]
              ->  setarg(4, H, _)
              ;   true
              )
          ;   E=[_, _|G],
              setarg(2, E, G),
              (   G=[H|_]
              ->  setarg(4, H, E)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_nonvar/1___1'(D, A),
        cleanup___0__1__0__2(B)
    ;   cleanup___0__1__0__2(B)
    ).
cleanup___0__1 :-
    cleanup___0__2.
cleanup___0__2 :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',
              A),
    !,
    cleanup___0__2__0__3(A).
cleanup___0__2__0__3([]) :-
    cleanup___0__3.
cleanup___0__2__0__3([A|B]) :-
    (   A=suspension(_, active, _, _, _)
    ->  A=suspension(_, _, _, _, C),
        setarg(2, A, removed),
        term_variables(C, D),
        ( arg(4, A, E),
          (   var(E)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',
                        F),
              F=[_|G],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',
                       G),
              (   G=[H|_]
              ->  setarg(4, H, _)
              ;   true
              )
          ;   E=[_, _|G],
              setarg(2, E, G),
              (   G=[H|_]
              ->  setarg(4, H, E)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_var/1___1'(D, A),
        cleanup___0__2__0__3(B)
    ;   cleanup___0__2__0__3(B)
    ).
cleanup___0__2 :-
    cleanup___0__3.
cleanup___0__3 :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',
              A),
    !,
    cleanup___0__3__0__4(A).
cleanup___0__3__0__4([]) :-
    cleanup___0__4.
cleanup___0__3__0__4([A|B]) :-
    (   A=suspension(_, active, _, _, _, _)
    ->  A=suspension(_, _, _, _, _, C),
        setarg(2, A, removed),
        term_variables(C, D),
        ( arg(5, A, E),
          (   var(E)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',
                        F),
              F=[_|G],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',
                       G),
              (   G=[H|_]
              ->  setarg(5, H, _)
              ;   true
              )
          ;   E=[_, _|G],
              setarg(2, E, G),
              (   G=[H|_]
              ->  setarg(5, H, E)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_atom/1___1'(D, A),
        cleanup___0__3__0__4(B)
    ;   cleanup___0__3__0__4(B)
    ).
cleanup___0__3 :-
    cleanup___0__4.
cleanup___0__4 :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',
              A),
    !,
    cleanup___0__4__0__5(A).
cleanup___0__4__0__5([]) :-
    cleanup___0__5.
cleanup___0__4__0__5([A|B]) :-
    (   A=suspension(_, active, _, _, _, _)
    ->  A=suspension(_, _, _, _, _, C),
        setarg(2, A, removed),
        term_variables(C, D),
        ( arg(5, A, E),
          (   var(E)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',
                        F),
              F=[_|G],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',
                       G),
              (   G=[H|_]
              ->  setarg(5, H, _)
              ;   true
              )
          ;   E=[_, _|G],
              setarg(2, E, G),
              (   G=[H|_]
              ->  setarg(5, H, E)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_atomic/1___1'(D, A),
        cleanup___0__4__0__5(B)
    ;   cleanup___0__4__0__5(B)
    ).
cleanup___0__4 :-
    cleanup___0__5.
cleanup___0__5 :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',
              A),
    !,
    cleanup___0__5__0__6(A).
cleanup___0__5__0__6([]) :-
    cleanup___0__6.
cleanup___0__5__0__6([A|B]) :-
    (   A=suspension(_, active, _, _, _, _)
    ->  A=suspension(_, _, _, _, _, C),
        setarg(2, A, removed),
        term_variables(C, D),
        ( arg(5, A, E),
          (   var(E)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',
                        F),
              F=[_|G],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',
                       G),
              (   G=[H|_]
              ->  setarg(5, H, _)
              ;   true
              )
          ;   E=[_, _|G],
              setarg(2, E, G),
              (   G=[H|_]
              ->  setarg(5, H, E)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_compound/1___1'(D, A),
        cleanup___0__5__0__6(B)
    ;   cleanup___0__5__0__6(B)
    ).
cleanup___0__5 :-
    cleanup___0__6.
cleanup___0__6 :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',
              A),
    !,
    cleanup___0__6__0__7(A).
cleanup___0__6__0__7([]) :-
    cleanup___0__7.
cleanup___0__6__0__7([A|B]) :-
    (   A=suspension(_, active, _, _, _, _)
    ->  A=suspension(_, _, _, _, _, C),
        setarg(2, A, removed),
        term_variables(C, D),
        ( arg(5, A, E),
          (   var(E)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',
                        F),
              F=[_|G],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',
                       G),
              (   G=[H|_]
              ->  setarg(5, H, _)
              ;   true
              )
          ;   E=[_, _|G],
              setarg(2, E, G),
              (   G=[H|_]
              ->  setarg(5, H, E)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_ground/1___1'(D, A),
        cleanup___0__6__0__7(B)
    ;   cleanup___0__6__0__7(B)
    ).
cleanup___0__6 :-
    cleanup___0__7.
cleanup___0__7 :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',
              A),
    !,
    cleanup___0__7__0__8(A).
cleanup___0__7__0__8([]) :-
    cleanup___0__8.
cleanup___0__7__0__8([A|B]) :-
    (   A=suspension(_, active, _, _, _, _)
    ->  A=suspension(_, _, _, _, _, C),
        setarg(2, A, removed),
        term_variables(C, D),
        ( arg(5, A, E),
          (   var(E)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',
                        F),
              F=[_|G],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',
                       G),
              (   G=[H|_]
              ->  setarg(5, H, _)
              ;   true
              )
          ;   E=[_, _|G],
              setarg(2, E, G),
              (   G=[H|_]
              ->  setarg(5, H, E)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_integer/1___1'(D, A),
        cleanup___0__7__0__8(B)
    ;   cleanup___0__7__0__8(B)
    ).
cleanup___0__7 :-
    cleanup___0__8.
cleanup___0__8 :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',
              A),
    !,
    cleanup___0__8__0__9(A).
cleanup___0__8__0__9([]) :-
    cleanup___0__9.
cleanup___0__8__0__9([A|B]) :-
    (   A=suspension(_, active, _, _, _, _)
    ->  A=suspension(_, _, _, _, _, C),
        setarg(2, A, removed),
        term_variables(C, D),
        ( arg(5, A, E),
          (   var(E)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',
                        F),
              F=[_|G],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',
                       G),
              (   G=[H|_]
              ->  setarg(5, H, _)
              ;   true
              )
          ;   E=[_, _|G],
              setarg(2, E, G),
              (   G=[H|_]
              ->  setarg(5, H, E)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_float/1___1'(D, A),
        cleanup___0__8__0__9(B)
    ;   cleanup___0__8__0__9(B)
    ).
cleanup___0__8 :-
    cleanup___0__9.
cleanup___0__9 :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',
              A),
    !,
    cleanup___0__9__0__10(A).
cleanup___0__9__0__10([]) :-
    cleanup___0__10.
cleanup___0__9__0__10([A|B]) :-
    (   A=suspension(_, active, _, _, _, _)
    ->  A=suspension(_, _, _, _, _, C),
        setarg(2, A, removed),
        term_variables(C, D),
        ( arg(5, A, E),
          (   var(E)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',
                        F),
              F=[_|G],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',
                       G),
              (   G=[H|_]
              ->  setarg(5, H, _)
              ;   true
              )
          ;   E=[_, _|G],
              setarg(2, E, G),
              (   G=[H|_]
              ->  setarg(5, H, E)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_number/1___1'(D, A),
        cleanup___0__9__0__10(B)
    ;   cleanup___0__9__0__10(B)
    ).
cleanup___0__9 :-
    cleanup___0__10.
cleanup___0__10 :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',
              A),
    !,
    cleanup___0__10__0__11(A).
cleanup___0__10__0__11([]) :-
    cleanup___0__11.
cleanup___0__10__0__11([A|B]) :-
    (   A=suspension(_, active, _, _, _, _, _)
    ->  A=suspension(_, _, _, _, _, C, D),
        setarg(2, A, removed),
        term_variables(term(C, D), E),
        ( arg(5, A, F),
          (   var(F)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',
                        G),
              G=[_|H],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',
                       H),
              (   H=[I|_]
              ->  setarg(5, I, _)
              ;   true
              )
          ;   F=[_, _|H],
              setarg(2, F, H),
              (   H=[I|_]
              ->  setarg(5, I, F)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_=\\=/2___2'(E, A),
        cleanup___0__10__0__11(B)
    ;   cleanup___0__10__0__11(B)
    ).
cleanup___0__10 :-
    cleanup___0__11.
cleanup___0__11 :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
              A),
    !,
    cleanup___0__11__0__12(A).
cleanup___0__11__0__12([]) :-
    cleanup___0__12.
cleanup___0__11__0__12([A|B]) :-
    (   A=suspension(_, active, _, _, _)
    ->  A=suspension(_, _, _, _, C),
        setarg(2, A, removed),
        term_variables(C, D),
        ( arg(4, A, E),
          (   var(E)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                        F),
              F=[_|G],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                       G),
              (   G=[H|_]
              ->  setarg(4, H, _)
              ;   true
              )
          ;   E=[_, _|G],
              setarg(2, E, G),
              (   G=[H|_]
              ->  setarg(4, H, E)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_\\+/1___1'(D, A),
        cleanup___0__11__0__12(B)
    ;   cleanup___0__11__0__12(B)
    ).
cleanup___0__11 :-
    cleanup___0__12.
cleanup___0__12 :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',
              A),
    !,
    cleanup___0__12__0__13(A).
cleanup___0__12__0__13([]) :-
    cleanup___0__13.
cleanup___0__12__0__13([A|B]) :-
    (   A=suspension(_, active, _, _, _, _, _)
    ->  A=suspension(_, _, _, _, C, D, E),
        setarg(2, A, removed),
        term_variables(term(C, D, E), F),
        ( arg(4, A, G),
          (   var(G)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',
                        H),
              H=[_|I],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',
                       I),
              (   I=[J|_]
              ->  setarg(4, J, _)
              ;   true
              )
          ;   G=[_, _|I],
              setarg(2, G, I),
              (   I=[J|_]
              ->  setarg(4, J, G)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_functor/3___3'(F, A),
        cleanup___0__12__0__13(B)
    ;   cleanup___0__12__0__13(B)
    ).
cleanup___0__12 :-
    cleanup___0__13.
cleanup___0__13 :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',
              A),
    !,
    cleanup___0__13__0__14(A).
cleanup___0__13__0__14([]) :-
    cleanup___0__14.
cleanup___0__13__0__14([A|B]) :-
    (   A=suspension(_, active, _, _, _, _, _)
    ->  A=suspension(_, _, _, _, _, C, D),
        setarg(2, A, removed),
        term_variables(term(C, D), E),
        ( arg(5, A, F),
          (   var(F)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',
                        G),
              G=[_|H],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',
                       H),
              (   H=[I|_]
              ->  setarg(5, I, _)
              ;   true
              )
          ;   F=[_, _|H],
              setarg(2, F, H),
              (   H=[I|_]
              ->  setarg(5, I, F)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_\\=/2___2'(E, A),
        cleanup___0__13__0__14(B)
    ;   cleanup___0__13__0__14(B)
    ).
cleanup___0__13 :-
    cleanup___0__14.
cleanup___0__14 :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',
              A),
    !,
    cleanup___0__14__0__15(A).
cleanup___0__14__0__15([]) :-
    cleanup___0__15.
cleanup___0__14__0__15([A|B]) :-
    (   A=suspension(_, active, _, _, _, _)
    ->  A=suspension(_, _, _, _, C, D),
        setarg(2, A, removed),
        term_variables(term(C, D), E),
        ( arg(4, A, F),
          (   var(F)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',
                        G),
              G=[_|H],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',
                       H),
              (   H=[I|_]
              ->  setarg(4, I, _)
              ;   true
              )
          ;   F=[_, _|H],
              setarg(2, F, H),
              (   H=[I|_]
              ->  setarg(4, I, F)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_=/2___2'(E, A),
        cleanup___0__14__0__15(B)
    ;   cleanup___0__14__0__15(B)
    ).
cleanup___0__14 :-
    cleanup___0__15.
cleanup___0__15 :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',
              A),
    !,
    cleanup___0__15__0__17(A).
cleanup___0__15__0__17([]) :-
    cleanup___0__16.
cleanup___0__15__0__17([A|B]) :-
    (   A=suspension(_, active, _, _, _, _, _)
    ->  A=suspension(_, _, _, _, _, C, D),
        setarg(2, A, removed),
        term_variables(term(C, D), E),
        ( arg(5, A, F),
          (   var(F)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',
                        G),
              G=[_|H],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',
                       H),
              (   H=[I|_]
              ->  setarg(5, I, _)
              ;   true
              )
          ;   F=[_, _|H],
              setarg(2, F, H),
              (   H=[I|_]
              ->  setarg(5, I, F)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_\\==/2___2'(E, A),
        cleanup___0__15__0__17(B)
    ;   cleanup___0__15__0__17(B)
    ).
cleanup___0__15 :-
    cleanup___0__16.
cleanup___0__16 :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',
              A),
    !,
    cleanup___0__16__0__18(A).
cleanup___0__16__0__18([]) :-
    cleanup___0__17.
cleanup___0__16__0__18([A|B]) :-
    (   A=suspension(_, active, _, _, _, _, _)
    ->  A=suspension(_, _, _, _, _, C, D),
        setarg(2, A, removed),
        term_variables(term(C, D), E),
        ( arg(5, A, F),
          (   var(F)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',
                        G),
              G=[_|H],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',
                       H),
              (   H=[I|_]
              ->  setarg(5, I, _)
              ;   true
              )
          ;   F=[_, _|H],
              setarg(2, F, H),
              (   H=[I|_]
              ->  setarg(5, I, F)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_==/2___2'(E, A),
        cleanup___0__16__0__18(B)
    ;   cleanup___0__16__0__18(B)
    ).
cleanup___0__16 :-
    cleanup___0__17.
cleanup___0__17 :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
              A),
    !,
    cleanup___0__17__0__23(A).
cleanup___0__17__0__23([]) :-
    cleanup___0__18.
cleanup___0__17__0__23([A|B]) :-
    (   A=suspension(_, active, _, _, _, _, _)
    ->  A=suspension(_, _, _, _, _, C, D),
        setarg(2, A, removed),
        term_variables(term(C, D), E),
        ( arg(5, A, F),
          (   var(F)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                        G),
              G=[_|H],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                       H),
              (   H=[I|_]
              ->  setarg(5, I, _)
              ;   true
              )
          ;   F=[_, _|H],
              setarg(2, F, H),
              (   H=[I|_]
              ->  setarg(5, I, F)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_=</2___2'(E, A),
        cleanup___0__17__0__23(B)
    ;   cleanup___0__17__0__23(B)
    ).
cleanup___0__17 :-
    cleanup___0__18.
cleanup___0__18 :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',
              A),
    !,
    cleanup___0__18__0__24(A).
cleanup___0__18__0__24([]) :-
    cleanup___0__19.
cleanup___0__18__0__24([A|B]) :-
    (   A=suspension(_, active, _, _, _, _, _)
    ->  A=suspension(_, _, _, _, _, C, D),
        setarg(2, A, removed),
        term_variables(term(C, D), E),
        ( arg(5, A, F),
          (   var(F)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',
                        G),
              G=[_|H],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',
                       H),
              (   H=[I|_]
              ->  setarg(5, I, _)
              ;   true
              )
          ;   F=[_, _|H],
              setarg(2, F, H),
              (   H=[I|_]
              ->  setarg(5, I, F)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_=:=/2___2'(E, A),
        cleanup___0__18__0__24(B)
    ;   cleanup___0__18__0__24(B)
    ).
cleanup___0__18 :-
    cleanup___0__19.
cleanup___0__19 :-
    nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',
              A),
    !,
    cleanup___0__19__0__25(A).
cleanup___0__19__0__25([]) :-
    cleanup___0__20.
cleanup___0__19__0__25([A|B]) :-
    (   A=suspension(_, active, _)
    ->  setarg(2, A, removed),
        arg(3, A, C),
        (   var(C)
        ->  nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',
                      D),
            D=[_|E],
            b_setval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',
                     E),
            (   E=[F|_]
            ->  setarg(3, F, _)
            ;   true
            )
        ;   C=[_, _|E],
            setarg(2, C, E),
            (   E=[F|_]
            ->  setarg(3, F, C)
            ;   true
            )
        ),
        cleanup___0__19__0__25(B)
    ;   cleanup___0__19__0__25(B)
    ).
cleanup___0__19 :-
    cleanup___0__20.
cleanup___0__20 :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',
              A),
    !,
    cleanup___0__20__0__26(A).
cleanup___0__20__0__26([]) :-
    cleanup___0__21.
cleanup___0__20__0__26([A|B]) :-
    (   A=suspension(_, active, _, _, _)
    ->  A=suspension(_, _, _, _, C),
        setarg(2, A, removed),
        term_variables(C, D),
        ( arg(4, A, E),
          (   var(E)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',
                        F),
              F=[_|G],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',
                       G),
              (   G=[H|_]
              ->  setarg(4, H, _)
              ;   true
              )
          ;   E=[_, _|G],
              setarg(2, E, G),
              (   G=[H|_]
              ->  setarg(4, H, E)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$default___1'(D, A),
        cleanup___0__20__0__26(B)
    ;   cleanup___0__20__0__26(B)
    ).
cleanup___0__20 :-
    cleanup___0__21.
cleanup___0__21 :-
    nb_getval('$chr_store_global_list_guard_entailment____variables___1',
              A),
    !,
    cleanup___0__21__0__27(A).
cleanup___0__21__0__27([]) :-
    cleanup___0__22.
cleanup___0__21__0__27([A|B]) :-
    (   A=suspension(_, active, _, _)
    ->  A=suspension(_, _, _, C),
        setarg(2, A, removed),
        term_variables(C, D),
        ( arg(3, A, E),
          (   var(E)
          ->  nb_getval('$chr_store_global_list_guard_entailment____variables___1',
                        F),
              F=[_|G],
              b_setval('$chr_store_global_list_guard_entailment____variables___1',
                       G),
              (   G=[H|_]
              ->  setarg(3, H, _)
              ;   true
              )
          ;   E=[_, _|G],
              setarg(2, E, G),
              (   G=[H|_]
              ->  setarg(3, H, E)
              ;   true
              )
          )
        ),
        detach_variables___1(D, A),
        cleanup___0__21__0__27(B)
    ;   cleanup___0__21__0__27(B)
    ).
cleanup___0__21 :-
    cleanup___0__22.
cleanup___0__22.
variables(A) :-
    variables___1__0(A, _).
variables___1__0(A, B) :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',
              C),
    member(D, C),
    D=suspension(_, active, _, _, E, F, G),
    ground(G),
    ground(F),
    var(E),
    !,
    D=suspension(_, _, _, _, H, I, J),
    setarg(2, D, removed),
    term_variables(term(H, I, J), K),
    arg(4, D, L),
    (   var(L)
    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',
                  M),
        M=[_|N],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',
                 N),
        (   N=[O|_]
        ->  setarg(4, O, _)
        ;   true
        )
    ;   L=[_, _|N],
        setarg(2, L, N),
        (   N=[O|_]
        ->  setarg(4, O, L)
        ;   true
        )
    ),
    'detach_known/1_1_$special_functor/3___3'(K, D),
    (   var(B)
    ->  true
    ;   B=suspension(_, _, _, P),
        setarg(2, B, removed),
        term_variables(P, Q),
        arg(3, B, R),
        (   var(R)
        ->  nb_getval('$chr_store_global_list_guard_entailment____variables___1',
                      S),
            S=[_|T],
            b_setval('$chr_store_global_list_guard_entailment____variables___1',
                     T),
            (   T=[U|_]
            ->  setarg(3, U, _)
            ;   true
            )
        ;   R=[_, _|T],
            setarg(2, R, T),
            (   T=[U|_]
            ->  setarg(3, U, R)
            ;   true
            )
        ),
        detach_variables___1(Q, B)
    ),
    functor(E, F, G),
    E=..[_|V],
    append(V, A, W),
    variables(W).
variables___1__0(A, B) :-
    (   var(B)
    ->  B=suspension(C, active, _, A),
        term_variables(A, D),
        'chr none_locked'(D),
        'chr gen_id'(C),
        nb_getval('$chr_store_global_list_guard_entailment____variables___1',
                  E),
        F=[B|E],
        b_setval('$chr_store_global_list_guard_entailment____variables___1',
                 F),
        (   E=[G|_]
        ->  setarg(3, G, F)
        ;   true
        ),
        attach_variables___1(D, B)
    ;   setarg(2, B, active)
    ).
'test/1_1_$default'(_) :-
    nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',
              A),
    member(B, A),
    B=suspension(_, active, _),
    !.
'test/1_1_$default'(A) :-
    nonvar(A),
    (   (   (   (   (   A=nonvar(B),
                        (   'chr newvia_1'(B, C)
                        ->  get_attr(C, guard_entailment, D),
                            D=v(_, _, _, _, E, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
                        ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',
                                      E)
                        ),
                        member(F, E),
                        F=suspension(_, active, _, _, G),
                        G==B,
                        !
                    ;   A=var(H),
                        (   'chr newvia_1'(H, I)
                        ->  get_attr(I, guard_entailment, J),
                            J=v(_, _, _, _, _, K, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
                        ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',
                                      K)
                        ),
                        member(L, K),
                        L=suspension(_, active, _, _, M),
                        M==H,
                        !
                    )
                ;   A=atom(N),
                    (   'chr newvia_1'(N, O)
                    ->  get_attr(O, guard_entailment, P),
                        P=v(_, _, _, _, _, _, Q, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
                    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',
                                  Q)
                    ),
                    member(R, Q),
                    R=suspension(_, active, _, _, _, S),
                    S==N,
                    !
                )
            ;   A=atomic(T),
                (   'chr newvia_1'(T, U)
                ->  get_attr(U, guard_entailment, V),
                    V=v(_, _, _, _, _, _, _, W, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
                ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',
                              W)
                ),
                member(X, W),
                X=suspension(_, active, _, _, _, Y),
                Y==T,
                !
            )
        ;   A=compound(Z),
            (   'chr newvia_1'(Z, A1)
            ->  get_attr(A1, guard_entailment, B1),
                B1=v(_, _, _, _, _, _, _, _, C1, _, _, _, _, _, _, _, _, _, _, _, _, _)
            ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',
                          C1)
            ),
            member(D1, C1),
            D1=suspension(_, active, _, _, _, E1),
            E1==Z,
            !
        )
    ;   A=(F1\=G1),
        (   'chr newvia_2'(F1, G1, H1)
        ->  get_attr(H1, guard_entailment, I1),
            I1=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, J1, _, _, _, _, _)
        ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',
                      J1)
        ),
        member(K1, J1),
        K1=suspension(_, active, _, _, _, L1, M1),
        L1==F1,
        M1==G1,
        !
    ).
'test/1_1_$default'(A) :-
    (   'chr newvia_1'(A, B)
    ->  get_attr(B, guard_entailment, C),
        C=v(_, _, D, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',
                  D)
    ),
    member(E, D),
    E=suspension(_, active, _, _, F),
    F==A,
    !.
'test/1_1_$default'(A) :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
              B),
    member(C, B),
    C=suspension(_, active, _, _, D, E),
    !,
    C=suspension(_, _, _, _, F, G),
    setarg(2, C, removed),
    term_variables(term(F, G), H),
    arg(4, C, I),
    (   var(I)
    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  J),
        J=[_|K],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                 K),
        (   K=[L|_]
        ->  setarg(4, L, _)
        ;   true
        )
    ;   I=[_, _|K],
        setarg(2, I, K),
        (   K=[L|_]
        ->  setarg(4, L, I)
        ;   true
        )
    ),
    'detach_known/1_1_$special_;/2___2'(H, C),
    \+ try(D, A),
    !,
    negate_b(D, M),
    known(M),
    \+ try(E, A).
'test/1_1_$default'(_) :-
    fail.
'test/1_1_$special_,/2'(_, _) :-
    nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',
              A),
    member(B, A),
    B=suspension(_, active, _),
    !.
'test/1_1_$special_,/2'(A, B) :-
    test(A),
    known(A),
    test(B).
'test/1_1_$special_\\+/1'(_) :-
    nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',
              A),
    member(B, A),
    B=suspension(_, active, _),
    !.
'test/1_1_$special_\\+/1'(A) :-
    (   'chr newvia_1'(A, B)
    ->  get_attr(B, guard_entailment, C),
        C=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, D, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                  D)
    ),
    member(E, D),
    E=suspension(_, active, _, _, F),
    F==A,
    !.
'test/1_1_$special_\\+/1'(A) :-
    nonvar(A),
    (   (   (   (   (   (   (   A=functor(B, C, D),
                                nonvar(B),
                                (   'chr lock'(B),
                                    'chr lock'(C),
                                    'chr lock'(D),
                                    functor(B, C, D),
                                    'chr unlock'(B),
                                    'chr unlock'(C),
                                    'chr unlock'(D),
                                    !,
                                    fail
                                ;   !
                                )
                            ;   A=ground(E),
                                ground(E),
                                !,
                                fail
                            )
                        ;   A=number(F),
                            number(F),
                            !,
                            fail
                        )
                    ;   A=float(G),
                        float(G),
                        !,
                        fail
                    )
                ;   A=integer(H),
                    integer(H),
                    !,
                    fail
                )
            ;   A=number(I),
                nonvar(I),
                !
            )
        ;   A=float(J),
            nonvar(J),
            !
        )
    ;   A=integer(K),
        nonvar(K),
        !
    ).
'test/1_1_$special_\\+/1'(A) :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
              B),
    member(C, B),
    C=suspension(_, active, _, _, D, E),
    !,
    C=suspension(_, _, _, _, F, G),
    setarg(2, C, removed),
    term_variables(term(F, G), H),
    arg(4, C, I),
    (   var(I)
    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  J),
        J=[_|K],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                 K),
        (   K=[L|_]
        ->  setarg(4, L, _)
        ;   true
        )
    ;   I=[_, _|K],
        setarg(2, I, K),
        (   K=[L|_]
        ->  setarg(4, L, I)
        ;   true
        )
    ),
    'detach_known/1_1_$special_;/2___2'(H, C),
    \+ try(D, \+A),
    !,
    negate_b(D, M),
    known(M),
    \+ try(E, \+A).
'test/1_1_$special_\\+/1'(_) :-
    fail.
'test/1_1_$special_integer/1'(_) :-
    nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',
              A),
    member(B, A),
    B=suspension(_, active, _),
    !.
'test/1_1_$special_integer/1'(A) :-
    (   'chr newvia_1'(A, B)
    ->  get_attr(B, guard_entailment, C),
        C=v(_, _, _, _, _, _, _, _, _, _, D, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',
                  D)
    ),
    member(E, D),
    E=suspension(_, active, _, _, _, F),
    F==A,
    !.
'test/1_1_$special_integer/1'(A) :-
    integer(A),
    !.
'test/1_1_$special_integer/1'(A) :-
    nonvar(A),
    !,
    fail.
'test/1_1_$special_integer/1'(A) :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
              B),
    member(C, B),
    C=suspension(_, active, _, _, D, E),
    !,
    C=suspension(_, _, _, _, F, G),
    setarg(2, C, removed),
    term_variables(term(F, G), H),
    arg(4, C, I),
    (   var(I)
    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  J),
        J=[_|K],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                 K),
        (   K=[L|_]
        ->  setarg(4, L, _)
        ;   true
        )
    ;   I=[_, _|K],
        setarg(2, I, K),
        (   K=[L|_]
        ->  setarg(4, L, I)
        ;   true
        )
    ),
    'detach_known/1_1_$special_;/2___2'(H, C),
    \+ try(D, integer(A)),
    !,
    negate_b(D, M),
    known(M),
    \+ try(E, integer(A)).
'test/1_1_$special_integer/1'(_) :-
    fail.
'test/1_1_$special_float/1'(_) :-
    nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',
              A),
    member(B, A),
    B=suspension(_, active, _),
    !.
'test/1_1_$special_float/1'(A) :-
    (   'chr newvia_1'(A, B)
    ->  get_attr(B, guard_entailment, C),
        C=v(_, _, _, _, _, _, _, _, _, _, _, D, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',
                  D)
    ),
    member(E, D),
    E=suspension(_, active, _, _, _, F),
    F==A,
    !.
'test/1_1_$special_float/1'(A) :-
    float(A),
    !.
'test/1_1_$special_float/1'(A) :-
    nonvar(A),
    !,
    fail.
'test/1_1_$special_float/1'(A) :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
              B),
    member(C, B),
    C=suspension(_, active, _, _, D, E),
    !,
    C=suspension(_, _, _, _, F, G),
    setarg(2, C, removed),
    term_variables(term(F, G), H),
    arg(4, C, I),
    (   var(I)
    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  J),
        J=[_|K],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                 K),
        (   K=[L|_]
        ->  setarg(4, L, _)
        ;   true
        )
    ;   I=[_, _|K],
        setarg(2, I, K),
        (   K=[L|_]
        ->  setarg(4, L, I)
        ;   true
        )
    ),
    'detach_known/1_1_$special_;/2___2'(H, C),
    \+ try(D, float(A)),
    !,
    negate_b(D, M),
    known(M),
    \+ try(E, float(A)).
'test/1_1_$special_float/1'(_) :-
    fail.
'test/1_1_$special_number/1'(_) :-
    nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',
              A),
    member(B, A),
    B=suspension(_, active, _),
    !.
'test/1_1_$special_number/1'(A) :-
    (   'chr newvia_1'(A, B)
    ->  get_attr(B, guard_entailment, C),
        C=v(_, _, _, _, _, _, _, _, _, _, _, _, D, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',
                  D)
    ),
    member(E, D),
    E=suspension(_, active, _, _, _, F),
    F==A,
    !.
'test/1_1_$special_number/1'(A) :-
    number(A),
    !.
'test/1_1_$special_number/1'(A) :-
    nonvar(A),
    !,
    fail.
'test/1_1_$special_number/1'(A) :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
              B),
    member(C, B),
    C=suspension(_, active, _, _, D, E),
    !,
    C=suspension(_, _, _, _, F, G),
    setarg(2, C, removed),
    term_variables(term(F, G), H),
    arg(4, C, I),
    (   var(I)
    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  J),
        J=[_|K],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                 K),
        (   K=[L|_]
        ->  setarg(4, L, _)
        ;   true
        )
    ;   I=[_, _|K],
        setarg(2, I, K),
        (   K=[L|_]
        ->  setarg(4, L, I)
        ;   true
        )
    ),
    'detach_known/1_1_$special_;/2___2'(H, C),
    \+ try(D, number(A)),
    !,
    negate_b(D, M),
    known(M),
    \+ try(E, number(A)).
'test/1_1_$special_number/1'(_) :-
    fail.
'test/1_1_$special_ground/1'(_) :-
    nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',
              A),
    member(B, A),
    B=suspension(_, active, _),
    !.
'test/1_1_$special_ground/1'(A) :-
    (   'chr newvia_1'(A, B)
    ->  get_attr(B, guard_entailment, C),
        C=v(_, _, _, _, _, _, _, _, _, D, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',
                  D)
    ),
    member(E, D),
    E=suspension(_, active, _, _, _, F),
    F==A,
    !.
'test/1_1_$special_ground/1'(A) :-
    ground(A),
    !.
'test/1_1_$special_ground/1'(A) :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
              B),
    member(C, B),
    C=suspension(_, active, _, _, D, E),
    !,
    C=suspension(_, _, _, _, F, G),
    setarg(2, C, removed),
    term_variables(term(F, G), H),
    arg(4, C, I),
    (   var(I)
    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  J),
        J=[_|K],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                 K),
        (   K=[L|_]
        ->  setarg(4, L, _)
        ;   true
        )
    ;   I=[_, _|K],
        setarg(2, I, K),
        (   K=[L|_]
        ->  setarg(4, L, I)
        ;   true
        )
    ),
    'detach_known/1_1_$special_;/2___2'(H, C),
    \+ try(D, ground(A)),
    !,
    negate_b(D, M),
    known(M),
    \+ try(E, ground(A)).
'test/1_1_$special_ground/1'(_) :-
    fail.
'test/1_1_$special_=:=/2'(_, _) :-
    nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',
              A),
    member(B, A),
    B=suspension(_, active, _),
    !.
'test/1_1_$special_=:=/2'(A, B) :-
    (   'chr newvia_2'(A, B, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, E)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',
                  E)
    ),
    member(F, E),
    F=suspension(_, active, _, _, _, G, H),
    G==A,
    H==B,
    !.
'test/1_1_$special_=:=/2'(A, B) :-
    A==B,
    !.
'test/1_1_$special_=:=/2'(A, B) :-
    ground(B),
    ground(A),
    (   A=:=B,
        !
    ;   !,
        fail
    ).
'test/1_1_$special_=:=/2'(A, B) :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
              C),
    member(D, C),
    D=suspension(_, active, _, _, E, F),
    !,
    D=suspension(_, _, _, _, G, H),
    setarg(2, D, removed),
    term_variables(term(G, H), I),
    arg(4, D, J),
    (   var(J)
    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  K),
        K=[_|L],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                 L),
        (   L=[M|_]
        ->  setarg(4, M, _)
        ;   true
        )
    ;   J=[_, _|L],
        setarg(2, J, L),
        (   L=[M|_]
        ->  setarg(4, M, J)
        ;   true
        )
    ),
    'detach_known/1_1_$special_;/2___2'(I, D),
    \+ try(E, A=:=B),
    !,
    negate_b(E, N),
    known(N),
    \+ try(F, A=:=B).
'test/1_1_$special_=:=/2'(_, _) :-
    fail.
'test/1_1_$special_==/2'(_, _) :-
    nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',
              A),
    member(B, A),
    B=suspension(_, active, _),
    !.
'test/1_1_$special_==/2'(A, B) :-
    (   'chr newvia_2'(A, B, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, E, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',
                  E)
    ),
    member(F, E),
    F=suspension(_, active, _, _, _, G, H),
    G==A,
    H==B,
    !.
'test/1_1_$special_==/2'(A, B) :-
    A==B,
    !.
'test/1_1_$special_==/2'(A, B) :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
              C),
    member(D, C),
    D=suspension(_, active, _, _, E, F),
    !,
    D=suspension(_, _, _, _, G, H),
    setarg(2, D, removed),
    term_variables(term(G, H), I),
    arg(4, D, J),
    (   var(J)
    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  K),
        K=[_|L],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                 L),
        (   L=[M|_]
        ->  setarg(4, M, _)
        ;   true
        )
    ;   J=[_, _|L],
        setarg(2, J, L),
        (   L=[M|_]
        ->  setarg(4, M, J)
        ;   true
        )
    ),
    'detach_known/1_1_$special_;/2___2'(I, D),
    \+ try(E, A==B),
    !,
    negate_b(E, N),
    known(N),
    \+ try(F, A==B).
'test/1_1_$special_==/2'(_, _) :-
    fail.
'test/1_1_$special_true/0' :-
    nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',
              A),
    member(B, A),
    B=suspension(_, active, _),
    !.
'test/1_1_$special_true/0'.
'test/1_1_$special_functor/3'(_, _, _) :-
    nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',
              A),
    member(B, A),
    B=suspension(_, active, _),
    !.
'test/1_1_$special_functor/3'(A, B, C) :-
    (   'chr newvia'([A, B, C], D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, F, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',
                  F)
    ),
    member(G, F),
    G=suspension(_, active, _, _, H, I, J),
    H==A,
    I==B,
    J==C,
    !.
'test/1_1_$special_functor/3'(A, B, C) :-
    ground(C),
    ground(B),
    var(A),
    nb_getval('$chr_store_global_list_guard_entailment____variables___1',
              D),
    member(E, D),
    E=suspension(_, active, _, F),
    'chr lock'(A),
    'chr lock'(F),
    \+ memberchk_eq(A, F),
    'chr unlock'(A),
    'chr unlock'(F),
    !,
    functor(A, B, C).
'test/1_1_$special_functor/3'(A, B, C) :-
    nonvar(A),
    (   'chr lock'(A),
        'chr lock'(B),
        'chr lock'(C),
        functor(A, B, C),
        'chr unlock'(A),
        'chr unlock'(B),
        'chr unlock'(C),
        !
    ;   !,
        fail
    ).
'test/1_1_$special_functor/3'(A, B, C) :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
              D),
    member(E, D),
    E=suspension(_, active, _, _, F, G),
    !,
    E=suspension(_, _, _, _, H, I),
    setarg(2, E, removed),
    term_variables(term(H, I), J),
    arg(4, E, K),
    (   var(K)
    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  L),
        L=[_|M],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                 M),
        (   M=[N|_]
        ->  setarg(4, N, _)
        ;   true
        )
    ;   K=[_, _|M],
        setarg(2, K, M),
        (   M=[N|_]
        ->  setarg(4, N, K)
        ;   true
        )
    ),
    'detach_known/1_1_$special_;/2___2'(J, E),
    \+ try(F, functor(A, B, C)),
    !,
    negate_b(F, O),
    known(O),
    \+ try(G, functor(A, B, C)).
'test/1_1_$special_functor/3'(_, _, _) :-
    fail.
'test/1_1_$special_=/2'(_, _) :-
    nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',
              A),
    member(B, A),
    B=suspension(_, active, _),
    !.
'test/1_1_$special_=/2'(A, B) :-
    (   'chr newvia_2'(A, B, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, E, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',
                  E)
    ),
    member(F, E),
    F=suspension(_, active, _, _, G, H),
    G==A,
    H==B,
    !.
'test/1_1_$special_=/2'(A, B) :-
    ground(B),
    ground(A),
    !,
    A=B.
'test/1_1_$special_=/2'(A, B) :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
              C),
    member(D, C),
    D=suspension(_, active, _, _, E, F),
    !,
    D=suspension(_, _, _, _, G, H),
    setarg(2, D, removed),
    term_variables(term(G, H), I),
    arg(4, D, J),
    (   var(J)
    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  K),
        K=[_|L],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                 L),
        (   L=[M|_]
        ->  setarg(4, M, _)
        ;   true
        )
    ;   J=[_, _|L],
        setarg(2, J, L),
        (   L=[M|_]
        ->  setarg(4, M, J)
        ;   true
        )
    ),
    'detach_known/1_1_$special_;/2___2'(I, D),
    \+ try(E, A=B),
    !,
    negate_b(E, N),
    known(N),
    \+ try(F, A=B).
'test/1_1_$special_=/2'(_, _) :-
    fail.
'test/1_1_$special_;/2'(_, _) :-
    nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',
              A),
    member(B, A),
    B=suspension(_, active, _),
    !.
'test/1_1_$special_;/2'(A, B) :-
    (   'chr newvia_2'(A, B, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, E, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  E)
    ),
    member(F, E),
    F=suspension(_, active, _, _, G, H),
    G==A,
    H==B,
    !.
'test/1_1_$special_;/2'(A, B) :-
    A==fail,
    !,
    test(B).
'test/1_1_$special_;/2'(A, B) :-
    B==fail,
    !,
    test(A).
'test/1_1_$special_;/2'(A, B) :-
    negate_b(A, C),
    negate_b(B, D),
    (   known(D),
        test(A)
    ;   known(C),
        test(B)
    ).
'test/1_1_$special_is/2'(_, _) :-
    nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',
              A),
    member(B, A),
    B=suspension(_, active, _),
    !.
'test/1_1_$special_is/2'(A, B) :-
    'test/1_1_$special_=:=/2'(A, B).
'test/1_1_$special_</2'(_, _) :-
    nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',
              A),
    member(B, A),
    B=suspension(_, active, _),
    !.
'test/1_1_$special_</2'(A, B) :-
    'test/1_1_$special_,/2'(A=<B, A=\=B).
'test/1_1_$special_>=/2'(_, _) :-
    nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',
              A),
    member(B, A),
    B=suspension(_, active, _),
    !.
'test/1_1_$special_>=/2'(A, B) :-
    'test/1_1_$special_=</2'(B, A).
'test/1_1_$special_>/2'(_, _) :-
    nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',
              A),
    member(B, A),
    B=suspension(_, active, _),
    !.
'test/1_1_$special_>/2'(A, B) :-
    'test/1_1_$special_</2'(B, A).
'test/1_1_$special_=\\=/2'(_, _) :-
    nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',
              A),
    member(B, A),
    B=suspension(_, active, _),
    !.
'test/1_1_$special_=\\=/2'(A, B) :-
    (   'chr newvia_2'(A, B, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, _, _, _, _, _, _, _, _, _, _, E, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',
                  E)
    ),
    member(F, E),
    F=suspension(_, active, _, _, _, G, H),
    G==A,
    H==B,
    !.
'test/1_1_$special_=\\=/2'(A, B) :-
    number(B),
    (   'chr newvia_1'(A, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, E, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                  E)
    ),
    member(F, E),
    F=suspension(_, active, _, _, _, G, H),
    (   G==A,
        number(H),
        B>H,
        !
    ;   H==A,
        number(G),
        B<G,
        !
    ).
'test/1_1_$special_=\\=/2'(A, B) :-
    ground(B),
    ground(A),
    (   A=\=B,
        !
    ;   !,
        fail
    ).
'test/1_1_$special_=\\=/2'(A, B) :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
              C),
    member(D, C),
    D=suspension(_, active, _, _, E, F),
    !,
    D=suspension(_, _, _, _, G, H),
    setarg(2, D, removed),
    term_variables(term(G, H), I),
    arg(4, D, J),
    (   var(J)
    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  K),
        K=[_|L],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                 L),
        (   L=[M|_]
        ->  setarg(4, M, _)
        ;   true
        )
    ;   J=[_, _|L],
        setarg(2, J, L),
        (   L=[M|_]
        ->  setarg(4, M, J)
        ;   true
        )
    ),
    'detach_known/1_1_$special_;/2___2'(I, D),
    \+ try(E, A=\=B),
    !,
    negate_b(E, N),
    known(N),
    \+ try(F, A=\=B).
'test/1_1_$special_=\\=/2'(_, _) :-
    fail.
'test/1_1_$special_=</2'(_, _) :-
    nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',
              A),
    member(B, A),
    B=suspension(_, active, _),
    !.
'test/1_1_$special_=</2'(A, B) :-
    (   'chr newvia_2'(A, B, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, E, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                  E)
    ),
    member(F, E),
    F=suspension(_, active, _, _, _, G, H),
    G==A,
    H==B,
    !.
'test/1_1_$special_=</2'(A, B) :-
    (   'chr newvia_2'(A, B, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, E)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',
                  E)
    ),
    member(F, E),
    F=suspension(_, active, _, _, _, G, H),
    G==A,
    H==B,
    !.
'test/1_1_$special_=</2'(A, B) :-
    number(B),
    (   'chr newvia_1'(A, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, E)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',
                  E)
    ),
    member(F, E),
    F=suspension(_, active, _, _, _, G, H),
    G==A,
    number(H),
    H=<B,
    !.
'test/1_1_$special_=</2'(A, B) :-
    number(A),
    (   'chr newvia_1'(B, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, E)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',
                  E)
    ),
    member(F, E),
    F=suspension(_, active, _, _, _, G, H),
    G==B,
    number(H),
    A=<H,
    !.
'test/1_1_$special_=</2'(A, B) :-
    number(B),
    (   'chr newvia_1'(A, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, E, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                  E)
    ),
    member(F, E),
    F=suspension(_, active, _, _, _, G, H),
    G==A,
    number(H),
    H=<B,
    !.
'test/1_1_$special_=</2'(A, B) :-
    number(A),
    (   'chr newvia_1'(B, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, E, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                  E)
    ),
    member(F, E),
    F=suspension(_, active, _, _, _, G, H),
    H==B,
    number(G),
    A=<G,
    !.
'test/1_1_$special_=</2'(A, B) :-
    A==B,
    !.
'test/1_1_$special_=</2'(A, B) :-
    ground(B),
    ground(A),
    (   A=<B,
        !
    ;   !,
        fail
    ).
'test/1_1_$special_=</2'(A, B) :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
              C),
    member(D, C),
    D=suspension(_, active, _, _, E, F),
    !,
    D=suspension(_, _, _, _, G, H),
    setarg(2, D, removed),
    term_variables(term(G, H), I),
    arg(4, D, J),
    (   var(J)
    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  K),
        K=[_|L],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                 L),
        (   L=[M|_]
        ->  setarg(4, M, _)
        ;   true
        )
    ;   J=[_, _|L],
        setarg(2, J, L),
        (   L=[M|_]
        ->  setarg(4, M, J)
        ;   true
        )
    ),
    'detach_known/1_1_$special_;/2___2'(I, D),
    \+ try(E, A=<B),
    !,
    negate_b(E, N),
    known(N),
    \+ try(F, A=<B).
'test/1_1_$special_=</2'(_, _) :-
    fail.
'test/1_1_$special_\\==/2'(_, _) :-
    nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',
              A),
    member(B, A),
    B=suspension(_, active, _),
    !.
'test/1_1_$special_\\==/2'(A, B) :-
    (   'chr newvia_2'(A, B, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, E, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',
                  E)
    ),
    member(F, E),
    F=suspension(_, active, _, _, _, G, H),
    G==A,
    H==B,
    !.
'test/1_1_$special_\\==/2'(A, B) :-
    nonvar(B),
    'chr lock'(B),
    functor(B, C, D),
    'chr unlock'(B),
    !,
    B=..[_|E],
    length(F, D),
    G=..[C|F],
    add_args_nmatch(F, E, H),
    I=(\+functor(A, C, D);functor(A, C, D), A=G, H),
    test(I).
'test/1_1_$special_\\==/2'(A, B) :-
    nonvar(A),
    !,
    'test/1_1_$special_\\==/2'(B, A).
'test/1_1_$special_\\==/2'(A, B) :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
              C),
    member(D, C),
    D=suspension(_, active, _, _, E, F),
    !,
    D=suspension(_, _, _, _, G, H),
    setarg(2, D, removed),
    term_variables(term(G, H), I),
    arg(4, D, J),
    (   var(J)
    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  K),
        K=[_|L],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                 L),
        (   L=[M|_]
        ->  setarg(4, M, _)
        ;   true
        )
    ;   J=[_, _|L],
        setarg(2, J, L),
        (   L=[M|_]
        ->  setarg(4, M, J)
        ;   true
        )
    ),
    'detach_known/1_1_$special_;/2___2'(I, D),
    \+ try(E, A\==B),
    !,
    negate_b(E, N),
    known(N),
    \+ try(F, A\==B).
'test/1_1_$special_\\==/2'(_, _) :-
    fail.
'known/1_1_$default'(A) :-
    'known/1_1_$default___1__0'(A, _).
'known/1_1_$default___1__0'(A, B) :-
    (   'chr newvia_1'(A, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, E, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',
                  E)
    ),
    member(F, E),
    F=suspension(_, active, _, _, G),
    G==A,
    !,
    (   var(B)
    ->  true
    ;   B=suspension(_, H, _, _, I),
        setarg(2, B, removed),
        (   H==not_stored_yet
        ->  J=[]
        ;   term_variables(I, J),
            arg(4, B, K),
            (   var(K)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',
                          L),
                L=[_|M],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',
                         M),
                (   M=[N|_]
                ->  setarg(4, N, _)
                ;   true
                )
            ;   K=[_, _|M],
                setarg(2, K, M),
                (   M=[N|_]
                ->  setarg(4, N, K)
                ;   true
                )
            ),
            'detach_known/1_1_$default___1'(J, B)
        )
    ).
'known/1_1_$default___1__0'(_, A) :-
    nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',
              B),
    member(C, B),
    C=suspension(_, active, _),
    !,
    (   var(A)
    ->  true
    ;   A=suspension(_, D, _, _, E),
        setarg(2, A, removed),
        (   D==not_stored_yet
        ->  F=[]
        ;   term_variables(E, F),
            arg(4, A, G),
            (   var(G)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',
                          H),
                H=[_|I],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',
                         I),
                (   I=[J|_]
                ->  setarg(4, J, _)
                ;   true
                )
            ;   G=[_, _|I],
                setarg(2, G, I),
                (   I=[J|_]
                ->  setarg(4, J, G)
                ;   true
                )
            ),
            'detach_known/1_1_$default___1'(F, A)
        )
    ).
'known/1_1_$default___1__0'(A, B) :-
    (   'chr newvia_1'(A, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, E, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                  E)
    ),
    member(F, E),
    F=suspension(_, active, _, _, G),
    G==A,
    !,
    F=suspension(_, _, _, _, H),
    setarg(2, F, removed),
    term_variables(H, I),
    arg(4, F, J),
    (   var(J)
    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                  K),
        K=[_|L],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                 L),
        (   L=[M|_]
        ->  setarg(4, M, _)
        ;   true
        )
    ;   J=[_, _|L],
        setarg(2, J, L),
        (   L=[M|_]
        ->  setarg(4, M, J)
        ;   true
        )
    ),
    'detach_known/1_1_$special_\\+/1___1'(I, F),
    (   var(B)
    ->  true
    ;   B=suspension(_, N, _, _, O),
        setarg(2, B, removed),
        (   N==not_stored_yet
        ->  P=[]
        ;   term_variables(O, P),
            arg(4, B, Q),
            (   var(Q)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',
                          R),
                R=[_|S],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',
                         S),
                (   S=[T|_]
                ->  setarg(4, T, _)
                ;   true
                )
            ;   Q=[_, _|S],
                setarg(2, Q, S),
                (   S=[T|_]
                ->  setarg(4, T, Q)
                ;   true
                )
            ),
            'detach_known/1_1_$default___1'(P, B)
        )
    ),
    'known/1_1_$special_fail/0'.
'known/1_1_$default___1__0'(A, B) :-
    (   'chr newvia_1'(A, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, E, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  E)
    ),
    !,
    (   var(B)
    ->  B=suspension(F, not_stored_yet, 0, _, A),
        'chr gen_id'(F)
    ;   true
    ),
    'known/1_1_$default___1__0__0__6'(E, A, B).
'known/1_1_$default___1__0__0__6'([], A, B) :-
    'known/1_1_$default___1__1'(A, B).
'known/1_1_$default___1__0__0__6'([A|B], C, D) :-
    (   A=suspension(_, active, _, _, E, F),
        nonvar(E),
        E=(\+G),
        G==C
    ->  A=suspension(_, _, _, _, H, I),
        setarg(2, A, removed),
        term_variables(term(H, I), J),
        ( arg(4, A, K),
          (   var(K)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                        L),
              L=[_|M],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                       M),
              (   M=[N|_]
              ->  setarg(4, N, _)
              ;   true
              )
          ;   K=[_, _|M],
              setarg(2, K, M),
              (   M=[N|_]
              ->  setarg(4, N, K)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_;/2___2'(J, A),
        arg(2, D, O),
        setarg(2, D, active),
        ( arg(3, D, P),
          Q is P+1,
          setarg(3, D, Q)
        ),
        (   O==not_stored_yet
        ->  D=suspension(_, _, _, _, R),
            term_variables(R, S),
            'chr none_locked'(S),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',
                      T),
            U=[D|T],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',
                     U),
            (   T=[V|_]
            ->  setarg(4, V, U)
            ;   true
            ),
            'attach_known/1_1_$default___1'(S, D)
        ;   true
        ),
        known(F),
        (   D=suspension(_, active, Q, _, _)
        ->  setarg(2, D, inactive),
            'known/1_1_$default___1__0__0__6'(B, C, D)
        ;   true
        )
    ;   'known/1_1_$default___1__0__0__6'(B, C, D)
    ).
'known/1_1_$default___1__0'(A, B) :-
    (   var(B)
    ->  B=suspension(C, not_stored_yet, 0, _, A),
        'chr gen_id'(C)
    ;   true
    ),
    'known/1_1_$default___1__1'(A, B).
'known/1_1_$default___1__1'(A, B) :-
    (   'chr newvia_1'(A, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, E, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  E)
    ),
    !,
    'known/1_1_$default___1__1__0__7'(E, A, B).
'known/1_1_$default___1__1__0__7'([], A, B) :-
    'known/1_1_$default___1__2'(A, B).
'known/1_1_$default___1__1__0__7'([A|B], C, D) :-
    (   A=suspension(_, active, _, _, E, F),
        nonvar(E),
        E=(G, _),
        nonvar(G),
        G=(\+H),
        H==C
    ->  A=suspension(_, _, _, _, I, J),
        setarg(2, A, removed),
        term_variables(term(I, J), K),
        ( arg(4, A, L),
          (   var(L)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                        M),
              M=[_|N],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                       N),
              (   N=[O|_]
              ->  setarg(4, O, _)
              ;   true
              )
          ;   L=[_, _|N],
              setarg(2, L, N),
              (   N=[O|_]
              ->  setarg(4, O, L)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_;/2___2'(K, A),
        arg(2, D, P),
        setarg(2, D, active),
        ( arg(3, D, Q),
          R is Q+1,
          setarg(3, D, R)
        ),
        (   P==not_stored_yet
        ->  D=suspension(_, _, _, _, S),
            term_variables(S, T),
            'chr none_locked'(T),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',
                      U),
            V=[D|U],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',
                     V),
            (   U=[W|_]
            ->  setarg(4, W, V)
            ;   true
            ),
            'attach_known/1_1_$default___1'(T, D)
        ;   true
        ),
        known(F),
        (   D=suspension(_, active, R, _, _)
        ->  setarg(2, D, inactive),
            'known/1_1_$default___1__1__0__7'(B, C, D)
        ;   true
        )
    ;   'known/1_1_$default___1__1__0__7'(B, C, D)
    ).
'known/1_1_$default___1__1'(A, B) :-
    'known/1_1_$default___1__2'(A, B).
'known/1_1_$default___1__2'(_, A) :-
    arg(2, A, B),
    setarg(2, A, active),
    arg(3, A, C),
    D is C+1,
    setarg(3, A, D),
    (   B==not_stored_yet
    ->  A=suspension(_, _, _, _, E),
        term_variables(E, F),
        'chr none_locked'(F),
        nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',
                  G),
        H=[A|G],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',
                 H),
        (   G=[I|_]
        ->  setarg(4, I, H)
        ;   true
        ),
        'attach_known/1_1_$default___1'(F, A)
    ;   true
    ).
'known/1_1_$special_;/2'(A, B) :-
    'known/1_1_$special_;/2___2__0'(A, B, _).
'known/1_1_$special_;/2___2__0'(A, B, C) :-
    (   'chr newvia_2'(A, B, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, F, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  F)
    ),
    member(G, F),
    G=suspension(_, active, _, _, H, I),
    H==A,
    I==B,
    !,
    (   var(C)
    ->  true
    ;   C=suspension(_, J, _, _, K, L),
        setarg(2, C, removed),
        (   J==not_stored_yet
        ->  M=[]
        ;   term_variables(term(K, L), M),
            arg(4, C, N),
            (   var(N)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                          O),
                O=[_|P],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                         P),
                (   P=[Q|_]
                ->  setarg(4, Q, _)
                ;   true
                )
            ;   N=[_, _|P],
                setarg(2, N, P),
                (   P=[Q|_]
                ->  setarg(4, Q, N)
                ;   true
                )
            ),
            'detach_known/1_1_$special_;/2___2'(M, C)
        )
    ).
'known/1_1_$special_;/2___2__0'(_, _, A) :-
    nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',
              B),
    member(C, B),
    C=suspension(_, active, _),
    !,
    (   var(A)
    ->  true
    ;   A=suspension(_, D, _, _, E, F),
        setarg(2, A, removed),
        (   D==not_stored_yet
        ->  G=[]
        ;   term_variables(term(E, F), G),
            arg(4, A, H),
            (   var(H)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                          I),
                I=[_|J],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                         J),
                (   J=[K|_]
                ->  setarg(4, K, _)
                ;   true
                )
            ;   H=[_, _|J],
                setarg(2, H, J),
                (   J=[K|_]
                ->  setarg(4, K, H)
                ;   true
                )
            ),
            'detach_known/1_1_$special_;/2___2'(G, A)
        )
    ).
'known/1_1_$special_;/2___2__0'(A, B, C) :-
    (   'chr newvia_2'(A, B, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, F, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                  F)
    ),
    member(G, F),
    G=suspension(_, active, _, _, H),
    nonvar(H),
    H=(I;J),
    I==A,
    J==B,
    !,
    G=suspension(_, _, _, _, K),
    setarg(2, G, removed),
    term_variables(K, L),
    arg(4, G, M),
    (   var(M)
    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                  N),
        N=[_|O],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                 O),
        (   O=[P|_]
        ->  setarg(4, P, _)
        ;   true
        )
    ;   M=[_, _|O],
        setarg(2, M, O),
        (   O=[P|_]
        ->  setarg(4, P, M)
        ;   true
        )
    ),
    'detach_known/1_1_$special_\\+/1___1'(L, G),
    (   var(C)
    ->  true
    ;   C=suspension(_, Q, _, _, R, S),
        setarg(2, C, removed),
        (   Q==not_stored_yet
        ->  T=[]
        ;   term_variables(term(R, S), T),
            arg(4, C, U),
            (   var(U)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                          V),
                V=[_|W],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                         W),
                (   W=[X|_]
                ->  setarg(4, X, _)
                ;   true
                )
            ;   U=[_, _|W],
                setarg(2, U, W),
                (   W=[X|_]
                ->  setarg(4, X, U)
                ;   true
                )
            ),
            'detach_known/1_1_$special_;/2___2'(T, C)
        )
    ),
    'known/1_1_$special_fail/0'.
'known/1_1_$special_;/2___2__0'(A, B, C) :-
    nonvar(A),
    A=(\+D),
    nonvar(D),
    D=(E;F),
    (   'chr newvia_2'(E, F, G)
    ->  get_attr(G, guard_entailment, H),
        H=v(_, _, _, I, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  I)
    ),
    member(J, I),
    J=suspension(_, active, _, _, K, L),
    K==E,
    L==F,
    !,
    (   var(C)
    ->  true
    ;   C=suspension(_, M, _, _, N, O),
        setarg(2, C, removed),
        (   M==not_stored_yet
        ->  P=[]
        ;   term_variables(term(N, O), P),
            arg(4, C, Q),
            (   var(Q)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                          R),
                R=[_|S],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                         S),
                (   S=[T|_]
                ->  setarg(4, T, _)
                ;   true
                )
            ;   Q=[_, _|S],
                setarg(2, Q, S),
                (   S=[T|_]
                ->  setarg(4, T, Q)
                ;   true
                )
            ),
            'detach_known/1_1_$special_;/2___2'(P, C)
        )
    ),
    known(B).
'known/1_1_$special_;/2___2__0'(A, B, C) :-
    (   'chr newvia_2'(A, B, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, F, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  F)
    ),
    !,
    (   var(C)
    ->  C=suspension(G, not_stored_yet, 0, _, A, B),
        'chr gen_id'(G)
    ;   true
    ),
    'known/1_1_$special_;/2___2__0__0__7'(F, A, B, C).
'known/1_1_$special_;/2___2__0__0__7'([], A, B, C) :-
    'known/1_1_$special_;/2___2__1'(A, B, C).
'known/1_1_$special_;/2___2__0__0__7'([A|B], C, D, E) :-
    (   A=suspension(_, active, _, _, F, G),
        nonvar(F),
        F=(\+H),
        nonvar(H),
        H=(I;J),
        I==C,
        J==D
    ->  A=suspension(_, _, _, _, K, L),
        setarg(2, A, removed),
        term_variables(term(K, L), M),
        ( arg(4, A, N),
          (   var(N)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                        O),
              O=[_|P],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                       P),
              (   P=[Q|_]
              ->  setarg(4, Q, _)
              ;   true
              )
          ;   N=[_, _|P],
              setarg(2, N, P),
              (   P=[Q|_]
              ->  setarg(4, Q, N)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_;/2___2'(M, A),
        arg(2, E, R),
        setarg(2, E, active),
        ( arg(3, E, S),
          T is S+1,
          setarg(3, E, T)
        ),
        (   R==not_stored_yet
        ->  E=suspension(_, _, _, _, U, V),
            term_variables(term(U, V), W),
            'chr none_locked'(W),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                      X),
            Y=[E|X],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                     Y),
            (   X=[Z|_]
            ->  setarg(4, Z, Y)
            ;   true
            ),
            'attach_known/1_1_$special_;/2___2'(W, E)
        ;   true
        ),
        known(G),
        (   E=suspension(_, active, T, _, _, _)
        ->  setarg(2, E, inactive),
            'known/1_1_$special_;/2___2__0__0__7'(B,
                                                  C,
                                                  D,
                                                  E)
        ;   true
        )
    ;   'known/1_1_$special_;/2___2__0__0__7'(B, C, D, E)
    ).
'known/1_1_$special_;/2___2__0'(A, B, C) :-
    (   var(C)
    ->  C=suspension(D, not_stored_yet, 0, _, A, B),
        'chr gen_id'(D)
    ;   true
    ),
    'known/1_1_$special_;/2___2__1'(A, B, C).
'known/1_1_$special_;/2___2__1'(A, B, C) :-
    nonvar(A),
    (   A=(\+D),
        (   nonvar(D),
            (   (   (   (   (   (   (   (   (   (   (   (   (   (   (   (   (   D=nonvar(E),
                                                                                (   'chr newvia_1'(E,
                                                                                                   F)
                                                                                ->  get_attr(F,
                                                                                             guard_entailment,
                                                                                             G),
                                                                                    G=v(_, _, _, _, H, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
                                                                                ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',
                                                                                              H)
                                                                                ),
                                                                                member(I,
                                                                                       H),
                                                                                I=suspension(_, active, _, _, J),
                                                                                J==E,
                                                                                !,
                                                                                (   var(C)
                                                                                ->  true
                                                                                ;   C=suspension(_, K, _, _, L, M),
                                                                                    setarg(2,
                                                                                           C,
                                                                                           removed),
                                                                                    (   K==not_stored_yet
                                                                                    ->  N=[]
                                                                                    ;   term_variables(term(L,
                                                                                                            M),
                                                                                                       N),
                                                                                        arg(4,
                                                                                            C,
                                                                                            O),
                                                                                        (   var(O)
                                                                                        ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                                                                      P),
                                                                                            P=[_|Q],
                                                                                            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                                                                     Q),
                                                                                            (   Q=[R|_]
                                                                                            ->  setarg(4,
                                                                                                       R,
                                                                                                       _)
                                                                                            ;   true
                                                                                            )
                                                                                        ;   O=[_, _|Q],
                                                                                            setarg(2,
                                                                                                   O,
                                                                                                   Q),
                                                                                            (   Q=[R|_]
                                                                                            ->  setarg(4,
                                                                                                       R,
                                                                                                       O)
                                                                                            ;   true
                                                                                            )
                                                                                        ),
                                                                                        'detach_known/1_1_$special_;/2___2'(N,
                                                                                                                            C)
                                                                                    )
                                                                                ),
                                                                                known(B)
                                                                            ;   D=var(S),
                                                                                (   'chr newvia_1'(S,
                                                                                                   T)
                                                                                ->  get_attr(T,
                                                                                             guard_entailment,
                                                                                             U),
                                                                                    U=v(_, _, _, _, _, V, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
                                                                                ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',
                                                                                              V)
                                                                                ),
                                                                                member(W,
                                                                                       V),
                                                                                W=suspension(_, active, _, _, X),
                                                                                X==S,
                                                                                !,
                                                                                (   var(C)
                                                                                ->  true
                                                                                ;   C=suspension(_, Y, _, _, Z, A1),
                                                                                    setarg(2,
                                                                                           C,
                                                                                           removed),
                                                                                    (   Y==not_stored_yet
                                                                                    ->  B1=[]
                                                                                    ;   term_variables(term(Z,
                                                                                                            A1),
                                                                                                       B1),
                                                                                        arg(4,
                                                                                            C,
                                                                                            C1),
                                                                                        (   var(C1)
                                                                                        ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                                                                      D1),
                                                                                            D1=[_|E1],
                                                                                            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                                                                     E1),
                                                                                            (   E1=[F1|_]
                                                                                            ->  setarg(4,
                                                                                                       F1,
                                                                                                       _)
                                                                                            ;   true
                                                                                            )
                                                                                        ;   C1=[_, _|E1],
                                                                                            setarg(2,
                                                                                                   C1,
                                                                                                   E1),
                                                                                            (   E1=[F1|_]
                                                                                            ->  setarg(4,
                                                                                                       F1,
                                                                                                       C1)
                                                                                            ;   true
                                                                                            )
                                                                                        ),
                                                                                        'detach_known/1_1_$special_;/2___2'(B1,
                                                                                                                            C)
                                                                                    )
                                                                                ),
                                                                                known(B)
                                                                            )
                                                                        ;   D=atom(G1),
                                                                            (   'chr newvia_1'(G1,
                                                                                               H1)
                                                                            ->  get_attr(H1,
                                                                                         guard_entailment,
                                                                                         I1),
                                                                                I1=v(_, _, _, _, _, _, J1, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
                                                                            ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',
                                                                                          J1)
                                                                            ),
                                                                            member(K1,
                                                                                   J1),
                                                                            K1=suspension(_, active, _, _, _, L1),
                                                                            L1==G1,
                                                                            !,
                                                                            (   var(C)
                                                                            ->  true
                                                                            ;   C=suspension(_, M1, _, _, N1, O1),
                                                                                setarg(2,
                                                                                       C,
                                                                                       removed),
                                                                                (   M1==not_stored_yet
                                                                                ->  P1=[]
                                                                                ;   term_variables(term(N1,
                                                                                                        O1),
                                                                                                   P1),
                                                                                    arg(4,
                                                                                        C,
                                                                                        Q1),
                                                                                    (   var(Q1)
                                                                                    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                                                                  R1),
                                                                                        R1=[_|S1],
                                                                                        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                                                                 S1),
                                                                                        (   S1=[T1|_]
                                                                                        ->  setarg(4,
                                                                                                   T1,
                                                                                                   _)
                                                                                        ;   true
                                                                                        )
                                                                                    ;   Q1=[_, _|S1],
                                                                                        setarg(2,
                                                                                               Q1,
                                                                                               S1),
                                                                                        (   S1=[T1|_]
                                                                                        ->  setarg(4,
                                                                                                   T1,
                                                                                                   Q1)
                                                                                        ;   true
                                                                                        )
                                                                                    ),
                                                                                    'detach_known/1_1_$special_;/2___2'(P1,
                                                                                                                        C)
                                                                                )
                                                                            ),
                                                                            known(B)
                                                                        )
                                                                    ;   D=atomic(U1),
                                                                        (   'chr newvia_1'(U1,
                                                                                           V1)
                                                                        ->  get_attr(V1,
                                                                                     guard_entailment,
                                                                                     W1),
                                                                            W1=v(_, _, _, _, _, _, _, X1, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
                                                                        ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',
                                                                                      X1)
                                                                        ),
                                                                        member(Y1,
                                                                               X1),
                                                                        Y1=suspension(_, active, _, _, _, Z1),
                                                                        Z1==U1,
                                                                        !,
                                                                        (   var(C)
                                                                        ->  true
                                                                        ;   C=suspension(_, A2, _, _, B2, C2),
                                                                            setarg(2,
                                                                                   C,
                                                                                   removed),
                                                                            (   A2==not_stored_yet
                                                                            ->  D2=[]
                                                                            ;   term_variables(term(B2,
                                                                                                    C2),
                                                                                               D2),
                                                                                arg(4,
                                                                                    C,
                                                                                    E2),
                                                                                (   var(E2)
                                                                                ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                                                              F2),
                                                                                    F2=[_|G2],
                                                                                    b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                                                             G2),
                                                                                    (   G2=[H2|_]
                                                                                    ->  setarg(4,
                                                                                               H2,
                                                                                               _)
                                                                                    ;   true
                                                                                    )
                                                                                ;   E2=[_, _|G2],
                                                                                    setarg(2,
                                                                                           E2,
                                                                                           G2),
                                                                                    (   G2=[H2|_]
                                                                                    ->  setarg(4,
                                                                                               H2,
                                                                                               E2)
                                                                                    ;   true
                                                                                    )
                                                                                ),
                                                                                'detach_known/1_1_$special_;/2___2'(D2,
                                                                                                                    C)
                                                                            )
                                                                        ),
                                                                        known(B)
                                                                    )
                                                                ;   D=compound(I2),
                                                                    (   'chr newvia_1'(I2,
                                                                                       J2)
                                                                    ->  get_attr(J2,
                                                                                 guard_entailment,
                                                                                 K2),
                                                                        K2=v(_, _, _, _, _, _, _, _, L2, _, _, _, _, _, _, _, _, _, _, _, _, _)
                                                                    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',
                                                                                  L2)
                                                                    ),
                                                                    member(M2,
                                                                           L2),
                                                                    M2=suspension(_, active, _, _, _, N2),
                                                                    N2==I2,
                                                                    !,
                                                                    (   var(C)
                                                                    ->  true
                                                                    ;   C=suspension(_, O2, _, _, P2, Q2),
                                                                        setarg(2,
                                                                               C,
                                                                               removed),
                                                                        (   O2==not_stored_yet
                                                                        ->  R2=[]
                                                                        ;   term_variables(term(P2,
                                                                                                Q2),
                                                                                           R2),
                                                                            arg(4,
                                                                                C,
                                                                                S2),
                                                                            (   var(S2)
                                                                            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                                                          T2),
                                                                                T2=[_|U2],
                                                                                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                                                         U2),
                                                                                (   U2=[V2|_]
                                                                                ->  setarg(4,
                                                                                           V2,
                                                                                           _)
                                                                                ;   true
                                                                                )
                                                                            ;   S2=[_, _|U2],
                                                                                setarg(2,
                                                                                       S2,
                                                                                       U2),
                                                                                (   U2=[V2|_]
                                                                                ->  setarg(4,
                                                                                           V2,
                                                                                           S2)
                                                                                ;   true
                                                                                )
                                                                            ),
                                                                            'detach_known/1_1_$special_;/2___2'(R2,
                                                                                                                C)
                                                                        )
                                                                    ),
                                                                    known(B)
                                                                )
                                                            ;   D=ground(W2),
                                                                (   'chr newvia_1'(W2,
                                                                                   X2)
                                                                ->  get_attr(X2,
                                                                             guard_entailment,
                                                                             Y2),
                                                                    Y2=v(_, _, _, _, _, _, _, _, _, Z2, _, _, _, _, _, _, _, _, _, _, _, _)
                                                                ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',
                                                                              Z2)
                                                                ),
                                                                member(A3,
                                                                       Z2),
                                                                A3=suspension(_, active, _, _, _, B3),
                                                                B3==W2,
                                                                !,
                                                                (   var(C)
                                                                ->  true
                                                                ;   C=suspension(_, C3, _, _, D3, E3),
                                                                    setarg(2,
                                                                           C,
                                                                           removed),
                                                                    (   C3==not_stored_yet
                                                                    ->  F3=[]
                                                                    ;   term_variables(term(D3,
                                                                                            E3),
                                                                                       F3),
                                                                        arg(4,
                                                                            C,
                                                                            G3),
                                                                        (   var(G3)
                                                                        ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                                                      H3),
                                                                            H3=[_|I3],
                                                                            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                                                     I3),
                                                                            (   I3=[J3|_]
                                                                            ->  setarg(4,
                                                                                       J3,
                                                                                       _)
                                                                            ;   true
                                                                            )
                                                                        ;   G3=[_, _|I3],
                                                                            setarg(2,
                                                                                   G3,
                                                                                   I3),
                                                                            (   I3=[J3|_]
                                                                            ->  setarg(4,
                                                                                       J3,
                                                                                       G3)
                                                                            ;   true
                                                                            )
                                                                        ),
                                                                        'detach_known/1_1_$special_;/2___2'(F3,
                                                                                                            C)
                                                                    )
                                                                ),
                                                                known(B)
                                                            )
                                                        ;   D=integer(K3),
                                                            (   'chr newvia_1'(K3,
                                                                               L3)
                                                            ->  get_attr(L3,
                                                                         guard_entailment,
                                                                         M3),
                                                                M3=v(_, _, _, _, _, _, _, _, _, _, N3, _, _, _, _, _, _, _, _, _, _, _)
                                                            ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',
                                                                          N3)
                                                            ),
                                                            member(O3,
                                                                   N3),
                                                            O3=suspension(_, active, _, _, _, P3),
                                                            P3==K3,
                                                            !,
                                                            (   var(C)
                                                            ->  true
                                                            ;   C=suspension(_, Q3, _, _, R3, S3),
                                                                setarg(2,
                                                                       C,
                                                                       removed),
                                                                (   Q3==not_stored_yet
                                                                ->  T3=[]
                                                                ;   term_variables(term(R3,
                                                                                        S3),
                                                                                   T3),
                                                                    arg(4,
                                                                        C,
                                                                        U3),
                                                                    (   var(U3)
                                                                    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                                                  V3),
                                                                        V3=[_|W3],
                                                                        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                                                 W3),
                                                                        (   W3=[X3|_]
                                                                        ->  setarg(4,
                                                                                   X3,
                                                                                   _)
                                                                        ;   true
                                                                        )
                                                                    ;   U3=[_, _|W3],
                                                                        setarg(2,
                                                                               U3,
                                                                               W3),
                                                                        (   W3=[X3|_]
                                                                        ->  setarg(4,
                                                                                   X3,
                                                                                   U3)
                                                                        ;   true
                                                                        )
                                                                    ),
                                                                    'detach_known/1_1_$special_;/2___2'(T3,
                                                                                                        C)
                                                                )
                                                            ),
                                                            known(B)
                                                        )
                                                    ;   D=float(Y3),
                                                        (   'chr newvia_1'(Y3,
                                                                           Z3)
                                                        ->  get_attr(Z3,
                                                                     guard_entailment,
                                                                     A4),
                                                            A4=v(_, _, _, _, _, _, _, _, _, _, _, B4, _, _, _, _, _, _, _, _, _, _)
                                                        ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',
                                                                      B4)
                                                        ),
                                                        member(C4,
                                                               B4),
                                                        C4=suspension(_, active, _, _, _, D4),
                                                        D4==Y3,
                                                        !,
                                                        (   var(C)
                                                        ->  true
                                                        ;   C=suspension(_, E4, _, _, F4, G4),
                                                            setarg(2,
                                                                   C,
                                                                   removed),
                                                            (   E4==not_stored_yet
                                                            ->  H4=[]
                                                            ;   term_variables(term(F4,
                                                                                    G4),
                                                                               H4),
                                                                arg(4,
                                                                    C,
                                                                    I4),
                                                                (   var(I4)
                                                                ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                                              J4),
                                                                    J4=[_|K4],
                                                                    b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                                             K4),
                                                                    (   K4=[L4|_]
                                                                    ->  setarg(4,
                                                                               L4,
                                                                               _)
                                                                    ;   true
                                                                    )
                                                                ;   I4=[_, _|K4],
                                                                    setarg(2,
                                                                           I4,
                                                                           K4),
                                                                    (   K4=[L4|_]
                                                                    ->  setarg(4,
                                                                               L4,
                                                                               I4)
                                                                    ;   true
                                                                    )
                                                                ),
                                                                'detach_known/1_1_$special_;/2___2'(H4,
                                                                                                    C)
                                                            )
                                                        ),
                                                        known(B)
                                                    )
                                                ;   D=number(M4),
                                                    (   'chr newvia_1'(M4,
                                                                       N4)
                                                    ->  get_attr(N4,
                                                                 guard_entailment,
                                                                 O4),
                                                        O4=v(_, _, _, _, _, _, _, _, _, _, _, _, P4, _, _, _, _, _, _, _, _, _)
                                                    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',
                                                                  P4)
                                                    ),
                                                    member(Q4,
                                                           P4),
                                                    Q4=suspension(_, active, _, _, _, R4),
                                                    R4==M4,
                                                    !,
                                                    (   var(C)
                                                    ->  true
                                                    ;   C=suspension(_, S4, _, _, T4, U4),
                                                        setarg(2,
                                                               C,
                                                               removed),
                                                        (   S4==not_stored_yet
                                                        ->  V4=[]
                                                        ;   term_variables(term(T4,
                                                                                U4),
                                                                           V4),
                                                            arg(4,
                                                                C,
                                                                W4),
                                                            (   var(W4)
                                                            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                                          X4),
                                                                X4=[_|Y4],
                                                                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                                         Y4),
                                                                (   Y4=[Z4|_]
                                                                ->  setarg(4,
                                                                           Z4,
                                                                           _)
                                                                ;   true
                                                                )
                                                            ;   W4=[_, _|Y4],
                                                                setarg(2,
                                                                       W4,
                                                                       Y4),
                                                                (   Y4=[Z4|_]
                                                                ->  setarg(4,
                                                                           Z4,
                                                                           W4)
                                                                ;   true
                                                                )
                                                            ),
                                                            'detach_known/1_1_$special_;/2___2'(V4,
                                                                                                C)
                                                        )
                                                    ),
                                                    known(B)
                                                )
                                            ;   D=(A5=\=B5),
                                                (   'chr newvia_2'(A5,
                                                                   B5,
                                                                   C5)
                                                ->  get_attr(C5,
                                                             guard_entailment,
                                                             D5),
                                                    D5=v(_, _, _, _, _, _, _, _, _, _, _, _, _, E5, _, _, _, _, _, _, _, _)
                                                ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',
                                                              E5)
                                                ),
                                                member(F5, E5),
                                                F5=suspension(_, active, _, _, _, G5, H5),
                                                G5==A5,
                                                H5==B5,
                                                !,
                                                (   var(C)
                                                ->  true
                                                ;   C=suspension(_, I5, _, _, J5, K5),
                                                    setarg(2, C, removed),
                                                    (   I5==not_stored_yet
                                                    ->  L5=[]
                                                    ;   term_variables(term(J5,
                                                                            K5),
                                                                       L5),
                                                        arg(4,
                                                            C,
                                                            M5),
                                                        (   var(M5)
                                                        ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                                      N5),
                                                            N5=[_|O5],
                                                            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                                     O5),
                                                            (   O5=[P5|_]
                                                            ->  setarg(4,
                                                                       P5,
                                                                       _)
                                                            ;   true
                                                            )
                                                        ;   M5=[_, _|O5],
                                                            setarg(2,
                                                                   M5,
                                                                   O5),
                                                            (   O5=[P5|_]
                                                            ->  setarg(4,
                                                                       P5,
                                                                       M5)
                                                            ;   true
                                                            )
                                                        ),
                                                        'detach_known/1_1_$special_;/2___2'(L5,
                                                                                            C)
                                                    )
                                                ),
                                                known(B)
                                            )
                                        ;   D=(\+Q5),
                                            (   'chr newvia_1'(Q5,
                                                               R5)
                                            ->  get_attr(R5,
                                                         guard_entailment,
                                                         S5),
                                                S5=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, T5, _, _, _, _, _, _, _)
                                            ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                                                          T5)
                                            ),
                                            member(U5, T5),
                                            U5=suspension(_, active, _, _, V5),
                                            V5==Q5,
                                            !,
                                            (   var(C)
                                            ->  true
                                            ;   C=suspension(_, W5, _, _, X5, Y5),
                                                setarg(2, C, removed),
                                                (   W5==not_stored_yet
                                                ->  Z5=[]
                                                ;   term_variables(term(X5,
                                                                        Y5),
                                                                   Z5),
                                                    arg(4, C, A6),
                                                    (   var(A6)
                                                    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                                  B6),
                                                        B6=[_|C6],
                                                        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                                 C6),
                                                        (   C6=[D6|_]
                                                        ->  setarg(4,
                                                                   D6,
                                                                   _)
                                                        ;   true
                                                        )
                                                    ;   A6=[_, _|C6],
                                                        setarg(2,
                                                               A6,
                                                               C6),
                                                        (   C6=[D6|_]
                                                        ->  setarg(4,
                                                                   D6,
                                                                   A6)
                                                        ;   true
                                                        )
                                                    ),
                                                    'detach_known/1_1_$special_;/2___2'(Z5,
                                                                                        C)
                                                )
                                            ),
                                            known(B)
                                        )
                                    ;   D=functor(E6, F6, G6),
                                        (   'chr newvia'([ E6,
                                                           F6,
                                                           G6
                                                         ],
                                                         H6)
                                        ->  get_attr(H6,
                                                     guard_entailment,
                                                     I6),
                                            I6=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, J6, _, _, _, _, _, _)
                                        ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',
                                                      J6)
                                        ),
                                        member(K6, J6),
                                        K6=suspension(_, active, _, _, L6, M6, N6),
                                        L6==E6,
                                        M6==F6,
                                        N6==G6,
                                        !,
                                        (   var(C)
                                        ->  true
                                        ;   C=suspension(_, O6, _, _, P6, Q6),
                                            setarg(2, C, removed),
                                            (   O6==not_stored_yet
                                            ->  R6=[]
                                            ;   term_variables(term(P6,
                                                                    Q6),
                                                               R6),
                                                arg(4, C, S6),
                                                (   var(S6)
                                                ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                              T6),
                                                    T6=[_|U6],
                                                    b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                             U6),
                                                    (   U6=[V6|_]
                                                    ->  setarg(4,
                                                               V6,
                                                               _)
                                                    ;   true
                                                    )
                                                ;   S6=[_, _|U6],
                                                    setarg(2,
                                                           S6,
                                                           U6),
                                                    (   U6=[V6|_]
                                                    ->  setarg(4,
                                                               V6,
                                                               S6)
                                                    ;   true
                                                    )
                                                ),
                                                'detach_known/1_1_$special_;/2___2'(R6,
                                                                                    C)
                                            )
                                        ),
                                        known(B)
                                    )
                                ;   D=(W6\=X6),
                                    (   'chr newvia_2'(W6,
                                                       X6,
                                                       Y6)
                                    ->  get_attr(Y6,
                                                 guard_entailment,
                                                 Z6),
                                        Z6=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, A7, _, _, _, _, _)
                                    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',
                                                  A7)
                                    ),
                                    member(B7, A7),
                                    B7=suspension(_, active, _, _, _, C7, D7),
                                    C7==W6,
                                    D7==X6,
                                    !,
                                    (   var(C)
                                    ->  true
                                    ;   C=suspension(_, E7, _, _, F7, G7),
                                        setarg(2, C, removed),
                                        (   E7==not_stored_yet
                                        ->  H7=[]
                                        ;   term_variables(term(F7,
                                                                G7),
                                                           H7),
                                            arg(4, C, I7),
                                            (   var(I7)
                                            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                          J7),
                                                J7=[_|K7],
                                                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                         K7),
                                                (   K7=[L7|_]
                                                ->  setarg(4,
                                                           L7,
                                                           _)
                                                ;   true
                                                )
                                            ;   I7=[_, _|K7],
                                                setarg(2, I7, K7),
                                                (   K7=[L7|_]
                                                ->  setarg(4,
                                                           L7,
                                                           I7)
                                                ;   true
                                                )
                                            ),
                                            'detach_known/1_1_$special_;/2___2'(H7,
                                                                                C)
                                        )
                                    ),
                                    known(B)
                                )
                            ;   D=(M7=N7),
                                (   'chr newvia_2'(M7,
                                                   N7,
                                                   O7)
                                ->  get_attr(O7,
                                             guard_entailment,
                                             P7),
                                    P7=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, Q7, _, _, _, _)
                                ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',
                                              Q7)
                                ),
                                member(R7, Q7),
                                R7=suspension(_, active, _, _, S7, T7),
                                S7==M7,
                                T7==N7,
                                !,
                                (   var(C)
                                ->  true
                                ;   C=suspension(_, U7, _, _, V7, W7),
                                    setarg(2, C, removed),
                                    (   U7==not_stored_yet
                                    ->  X7=[]
                                    ;   term_variables(term(V7,
                                                            W7),
                                                       X7),
                                        arg(4, C, Y7),
                                        (   var(Y7)
                                        ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                      Z7),
                                            Z7=[_|A8],
                                            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                     A8),
                                            (   A8=[B8|_]
                                            ->  setarg(4, B8, _)
                                            ;   true
                                            )
                                        ;   Y7=[_, _|A8],
                                            setarg(2, Y7, A8),
                                            (   A8=[B8|_]
                                            ->  setarg(4, B8, Y7)
                                            ;   true
                                            )
                                        ),
                                        'detach_known/1_1_$special_;/2___2'(X7,
                                                                            C)
                                    )
                                ),
                                known(B)
                            )
                        ;   D=(C8\==D8),
                            (   'chr newvia_2'(C8, D8, E8)
                            ->  get_attr(E8, guard_entailment, F8),
                                F8=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, G8, _, _, _)
                            ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',
                                          G8)
                            ),
                            member(H8, G8),
                            H8=suspension(_, active, _, _, _, I8, J8),
                            I8==C8,
                            J8==D8,
                            !,
                            (   var(C)
                            ->  true
                            ;   C=suspension(_, K8, _, _, L8, M8),
                                setarg(2, C, removed),
                                (   K8==not_stored_yet
                                ->  N8=[]
                                ;   term_variables(term(L8, M8),
                                                   N8),
                                    arg(4, C, O8),
                                    (   var(O8)
                                    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                  P8),
                                        P8=[_|Q8],
                                        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                 Q8),
                                        (   Q8=[R8|_]
                                        ->  setarg(4, R8, _)
                                        ;   true
                                        )
                                    ;   O8=[_, _|Q8],
                                        setarg(2, O8, Q8),
                                        (   Q8=[R8|_]
                                        ->  setarg(4, R8, O8)
                                        ;   true
                                        )
                                    ),
                                    'detach_known/1_1_$special_;/2___2'(N8,
                                                                        C)
                                )
                            ),
                            known(B)
                        )
                    ;   D=(S8==T8),
                        (   'chr newvia_2'(S8, T8, U8)
                        ->  get_attr(U8, guard_entailment, V8),
                            V8=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, W8, _, _)
                        ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',
                                      W8)
                        ),
                        member(X8, W8),
                        X8=suspension(_, active, _, _, _, Y8, Z8),
                        Y8==S8,
                        Z8==T8,
                        !,
                        (   var(C)
                        ->  true
                        ;   C=suspension(_, A9, _, _, B9, C9),
                            setarg(2, C, removed),
                            (   A9==not_stored_yet
                            ->  D9=[]
                            ;   term_variables(term(B9, C9),
                                               D9),
                                arg(4, C, E9),
                                (   var(E9)
                                ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                              F9),
                                    F9=[_|G9],
                                    b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                             G9),
                                    (   G9=[H9|_]
                                    ->  setarg(4, H9, _)
                                    ;   true
                                    )
                                ;   E9=[_, _|G9],
                                    setarg(2, E9, G9),
                                    (   G9=[H9|_]
                                    ->  setarg(4, H9, E9)
                                    ;   true
                                    )
                                ),
                                'detach_known/1_1_$special_;/2___2'(D9,
                                                                    C)
                            )
                        ),
                        known(B)
                    )
                ;   D=(I9=<J9),
                    (   'chr newvia_2'(I9, J9, K9)
                    ->  get_attr(K9, guard_entailment, L9),
                        L9=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, M9, _)
                    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                                  M9)
                    ),
                    member(N9, M9),
                    N9=suspension(_, active, _, _, _, O9, P9),
                    O9==I9,
                    P9==J9,
                    !,
                    (   var(C)
                    ->  true
                    ;   C=suspension(_, Q9, _, _, R9, S9),
                        setarg(2, C, removed),
                        (   Q9==not_stored_yet
                        ->  T9=[]
                        ;   term_variables(term(R9, S9),
                                           T9),
                            arg(4, C, U9),
                            (   var(U9)
                            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                          V9),
                                V9=[_|W9],
                                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                         W9),
                                (   W9=[X9|_]
                                ->  setarg(4, X9, _)
                                ;   true
                                )
                            ;   U9=[_, _|W9],
                                setarg(2, U9, W9),
                                (   W9=[X9|_]
                                ->  setarg(4, X9, U9)
                                ;   true
                                )
                            ),
                            'detach_known/1_1_$special_;/2___2'(T9,
                                                                C)
                        )
                    ),
                    known(B)
                )
            ;   D=(Y9=:=Z9),
                (   'chr newvia_2'(Y9, Z9, A10)
                ->  get_attr(A10, guard_entailment, B10),
                    B10=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, C10)
                ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',
                              C10)
                ),
                member(D10, C10),
                D10=suspension(_, active, _, _, _, E10, F10),
                E10==Y9,
                F10==Z9,
                !,
                (   var(C)
                ->  true
                ;   C=suspension(_, G10, _, _, H10, I10),
                    setarg(2, C, removed),
                    (   G10==not_stored_yet
                    ->  J10=[]
                    ;   term_variables(term(H10, I10), J10),
                        arg(4, C, K10),
                        (   var(K10)
                        ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                      L10),
                            L10=[_|M10],
                            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                     M10),
                            (   M10=[N10|_]
                            ->  setarg(4, N10, _)
                            ;   true
                            )
                        ;   K10=[_, _|M10],
                            setarg(2, K10, M10),
                            (   M10=[N10|_]
                            ->  setarg(4, N10, K10)
                            ;   true
                            )
                        ),
                        'detach_known/1_1_$special_;/2___2'(J10, C)
                    )
                ),
                known(B)
            )
        ;   (   'chr newvia_1'(D, O10)
            ->  get_attr(O10, guard_entailment, P10),
                P10=v(_, _, Q10, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
            ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',
                          Q10)
            ),
            member(R10, Q10),
            R10=suspension(_, active, _, _, S10),
            S10==D,
            !,
            (   var(C)
            ->  true
            ;   C=suspension(_, T10, _, _, U10, V10),
                setarg(2, C, removed),
                (   T10==not_stored_yet
                ->  W10=[]
                ;   term_variables(term(U10, V10), W10),
                    arg(4, C, X10),
                    (   var(X10)
                    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                  Y10),
                        Y10=[_|Z10],
                        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                 Z10),
                        (   Z10=[A11|_]
                        ->  setarg(4, A11, _)
                        ;   true
                        )
                    ;   X10=[_, _|Z10],
                        setarg(2, X10, Z10),
                        (   Z10=[A11|_]
                        ->  setarg(4, A11, X10)
                        ;   true
                        )
                    ),
                    'detach_known/1_1_$special_;/2___2'(W10, C)
                )
            ),
            known(B)
        )
    ;   A=(B11, _),
        nonvar(B11),
        B11=(\+C11),
        nonvar(C11),
        C11=(D11;E11),
        (   'chr newvia_2'(D11, E11, F11)
        ->  get_attr(F11, guard_entailment, G11),
            G11=v(_, _, _, H11, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
        ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                      H11)
        ),
        member(I11, H11),
        I11=suspension(_, active, _, _, J11, K11),
        J11==D11,
        K11==E11,
        !,
        (   var(C)
        ->  true
        ;   C=suspension(_, L11, _, _, M11, N11),
            setarg(2, C, removed),
            (   L11==not_stored_yet
            ->  O11=[]
            ;   term_variables(term(M11, N11), O11),
                arg(4, C, P11),
                (   var(P11)
                ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                              Q11),
                    Q11=[_|R11],
                    b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                             R11),
                    (   R11=[S11|_]
                    ->  setarg(4, S11, _)
                    ;   true
                    )
                ;   P11=[_, _|R11],
                    setarg(2, P11, R11),
                    (   R11=[S11|_]
                    ->  setarg(4, S11, P11)
                    ;   true
                    )
                ),
                'detach_known/1_1_$special_;/2___2'(O11, C)
            )
        ),
        known(B)
    ).
'known/1_1_$special_;/2___2__1'(A, B, C) :-
    (   'chr newvia_2'(A, B, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, F, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  F)
    ),
    !,
    'known/1_1_$special_;/2___2__1__0__34'(F, A, B, C).
'known/1_1_$special_;/2___2__1__0__34'([], A, B, C) :-
    'known/1_1_$special_;/2___2__2'(A, B, C).
'known/1_1_$special_;/2___2__1__0__34'([A|B], C, D, E) :-
    (   A=suspension(_, active, _, _, F, G),
        nonvar(F),
        F=(H, _),
        nonvar(H),
        H=(\+I),
        nonvar(I),
        I=(J;K),
        J==C,
        K==D
    ->  A=suspension(_, _, _, _, L, M),
        setarg(2, A, removed),
        term_variables(term(L, M), N),
        ( arg(4, A, O),
          (   var(O)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                        P),
              P=[_|Q],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                       Q),
              (   Q=[R|_]
              ->  setarg(4, R, _)
              ;   true
              )
          ;   O=[_, _|Q],
              setarg(2, O, Q),
              (   Q=[R|_]
              ->  setarg(4, R, O)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_;/2___2'(N, A),
        arg(2, E, S),
        setarg(2, E, active),
        ( arg(3, E, T),
          U is T+1,
          setarg(3, E, U)
        ),
        (   S==not_stored_yet
        ->  E=suspension(_, _, _, _, V, W),
            term_variables(term(V, W), X),
            'chr none_locked'(X),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                      Y),
            Z=[E|Y],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                     Z),
            (   Y=[A1|_]
            ->  setarg(4, A1, Z)
            ;   true
            ),
            'attach_known/1_1_$special_;/2___2'(X, E)
        ;   true
        ),
        known(G),
        (   E=suspension(_, active, U, _, _, _)
        ->  setarg(2, E, inactive),
            'known/1_1_$special_;/2___2__1__0__34'(B,
                                                   C,
                                                   D,
                                                   E)
        ;   true
        )
    ;   'known/1_1_$special_;/2___2__1__0__34'(B, C, D, E)
    ).
'known/1_1_$special_;/2___2__1'(A, B, C) :-
    'known/1_1_$special_;/2___2__2'(A, B, C).
'known/1_1_$special_;/2___2__2'(A, B, C) :-
    nonvar(A),
    A=(D, _),
    nonvar(D),
    D=(\+E),
    (   nonvar(E),
        (   (   (   (   (   (   (   (   (   (   (   (   (   (   (   (   (   E=nonvar(F),
                                                                            (   'chr newvia_1'(F,
                                                                                               G)
                                                                            ->  get_attr(G,
                                                                                         guard_entailment,
                                                                                         H),
                                                                                H=v(_, _, _, _, I, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
                                                                            ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',
                                                                                          I)
                                                                            ),
                                                                            member(J,
                                                                                   I),
                                                                            J=suspension(_, active, _, _, K),
                                                                            K==F,
                                                                            !,
                                                                            (   var(C)
                                                                            ->  true
                                                                            ;   C=suspension(_, L, _, _, M, N),
                                                                                setarg(2,
                                                                                       C,
                                                                                       removed),
                                                                                (   L==not_stored_yet
                                                                                ->  O=[]
                                                                                ;   term_variables(term(M,
                                                                                                        N),
                                                                                                   O),
                                                                                    arg(4,
                                                                                        C,
                                                                                        P),
                                                                                    (   var(P)
                                                                                    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                                                                  Q),
                                                                                        Q=[_|R],
                                                                                        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                                                                 R),
                                                                                        (   R=[S|_]
                                                                                        ->  setarg(4,
                                                                                                   S,
                                                                                                   _)
                                                                                        ;   true
                                                                                        )
                                                                                    ;   P=[_, _|R],
                                                                                        setarg(2,
                                                                                               P,
                                                                                               R),
                                                                                        (   R=[S|_]
                                                                                        ->  setarg(4,
                                                                                                   S,
                                                                                                   P)
                                                                                        ;   true
                                                                                        )
                                                                                    ),
                                                                                    'detach_known/1_1_$special_;/2___2'(O,
                                                                                                                        C)
                                                                                )
                                                                            ),
                                                                            known(B)
                                                                        ;   E=var(T),
                                                                            (   'chr newvia_1'(T,
                                                                                               U)
                                                                            ->  get_attr(U,
                                                                                         guard_entailment,
                                                                                         V),
                                                                                V=v(_, _, _, _, _, W, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
                                                                            ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',
                                                                                          W)
                                                                            ),
                                                                            member(X,
                                                                                   W),
                                                                            X=suspension(_, active, _, _, Y),
                                                                            Y==T,
                                                                            !,
                                                                            (   var(C)
                                                                            ->  true
                                                                            ;   C=suspension(_, Z, _, _, A1, B1),
                                                                                setarg(2,
                                                                                       C,
                                                                                       removed),
                                                                                (   Z==not_stored_yet
                                                                                ->  C1=[]
                                                                                ;   term_variables(term(A1,
                                                                                                        B1),
                                                                                                   C1),
                                                                                    arg(4,
                                                                                        C,
                                                                                        D1),
                                                                                    (   var(D1)
                                                                                    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                                                                  E1),
                                                                                        E1=[_|F1],
                                                                                        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                                                                 F1),
                                                                                        (   F1=[G1|_]
                                                                                        ->  setarg(4,
                                                                                                   G1,
                                                                                                   _)
                                                                                        ;   true
                                                                                        )
                                                                                    ;   D1=[_, _|F1],
                                                                                        setarg(2,
                                                                                               D1,
                                                                                               F1),
                                                                                        (   F1=[G1|_]
                                                                                        ->  setarg(4,
                                                                                                   G1,
                                                                                                   D1)
                                                                                        ;   true
                                                                                        )
                                                                                    ),
                                                                                    'detach_known/1_1_$special_;/2___2'(C1,
                                                                                                                        C)
                                                                                )
                                                                            ),
                                                                            known(B)
                                                                        )
                                                                    ;   E=atom(H1),
                                                                        (   'chr newvia_1'(H1,
                                                                                           I1)
                                                                        ->  get_attr(I1,
                                                                                     guard_entailment,
                                                                                     J1),
                                                                            J1=v(_, _, _, _, _, _, K1, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
                                                                        ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',
                                                                                      K1)
                                                                        ),
                                                                        member(L1,
                                                                               K1),
                                                                        L1=suspension(_, active, _, _, _, M1),
                                                                        M1==H1,
                                                                        !,
                                                                        (   var(C)
                                                                        ->  true
                                                                        ;   C=suspension(_, N1, _, _, O1, P1),
                                                                            setarg(2,
                                                                                   C,
                                                                                   removed),
                                                                            (   N1==not_stored_yet
                                                                            ->  Q1=[]
                                                                            ;   term_variables(term(O1,
                                                                                                    P1),
                                                                                               Q1),
                                                                                arg(4,
                                                                                    C,
                                                                                    R1),
                                                                                (   var(R1)
                                                                                ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                                                              S1),
                                                                                    S1=[_|T1],
                                                                                    b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                                                             T1),
                                                                                    (   T1=[U1|_]
                                                                                    ->  setarg(4,
                                                                                               U1,
                                                                                               _)
                                                                                    ;   true
                                                                                    )
                                                                                ;   R1=[_, _|T1],
                                                                                    setarg(2,
                                                                                           R1,
                                                                                           T1),
                                                                                    (   T1=[U1|_]
                                                                                    ->  setarg(4,
                                                                                               U1,
                                                                                               R1)
                                                                                    ;   true
                                                                                    )
                                                                                ),
                                                                                'detach_known/1_1_$special_;/2___2'(Q1,
                                                                                                                    C)
                                                                            )
                                                                        ),
                                                                        known(B)
                                                                    )
                                                                ;   E=atomic(V1),
                                                                    (   'chr newvia_1'(V1,
                                                                                       W1)
                                                                    ->  get_attr(W1,
                                                                                 guard_entailment,
                                                                                 X1),
                                                                        X1=v(_, _, _, _, _, _, _, Y1, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
                                                                    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',
                                                                                  Y1)
                                                                    ),
                                                                    member(Z1,
                                                                           Y1),
                                                                    Z1=suspension(_, active, _, _, _, A2),
                                                                    A2==V1,
                                                                    !,
                                                                    (   var(C)
                                                                    ->  true
                                                                    ;   C=suspension(_, B2, _, _, C2, D2),
                                                                        setarg(2,
                                                                               C,
                                                                               removed),
                                                                        (   B2==not_stored_yet
                                                                        ->  E2=[]
                                                                        ;   term_variables(term(C2,
                                                                                                D2),
                                                                                           E2),
                                                                            arg(4,
                                                                                C,
                                                                                F2),
                                                                            (   var(F2)
                                                                            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                                                          G2),
                                                                                G2=[_|H2],
                                                                                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                                                         H2),
                                                                                (   H2=[I2|_]
                                                                                ->  setarg(4,
                                                                                           I2,
                                                                                           _)
                                                                                ;   true
                                                                                )
                                                                            ;   F2=[_, _|H2],
                                                                                setarg(2,
                                                                                       F2,
                                                                                       H2),
                                                                                (   H2=[I2|_]
                                                                                ->  setarg(4,
                                                                                           I2,
                                                                                           F2)
                                                                                ;   true
                                                                                )
                                                                            ),
                                                                            'detach_known/1_1_$special_;/2___2'(E2,
                                                                                                                C)
                                                                        )
                                                                    ),
                                                                    known(B)
                                                                )
                                                            ;   E=compound(J2),
                                                                (   'chr newvia_1'(J2,
                                                                                   K2)
                                                                ->  get_attr(K2,
                                                                             guard_entailment,
                                                                             L2),
                                                                    L2=v(_, _, _, _, _, _, _, _, M2, _, _, _, _, _, _, _, _, _, _, _, _, _)
                                                                ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',
                                                                              M2)
                                                                ),
                                                                member(N2,
                                                                       M2),
                                                                N2=suspension(_, active, _, _, _, O2),
                                                                O2==J2,
                                                                !,
                                                                (   var(C)
                                                                ->  true
                                                                ;   C=suspension(_, P2, _, _, Q2, R2),
                                                                    setarg(2,
                                                                           C,
                                                                           removed),
                                                                    (   P2==not_stored_yet
                                                                    ->  S2=[]
                                                                    ;   term_variables(term(Q2,
                                                                                            R2),
                                                                                       S2),
                                                                        arg(4,
                                                                            C,
                                                                            T2),
                                                                        (   var(T2)
                                                                        ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                                                      U2),
                                                                            U2=[_|V2],
                                                                            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                                                     V2),
                                                                            (   V2=[W2|_]
                                                                            ->  setarg(4,
                                                                                       W2,
                                                                                       _)
                                                                            ;   true
                                                                            )
                                                                        ;   T2=[_, _|V2],
                                                                            setarg(2,
                                                                                   T2,
                                                                                   V2),
                                                                            (   V2=[W2|_]
                                                                            ->  setarg(4,
                                                                                       W2,
                                                                                       T2)
                                                                            ;   true
                                                                            )
                                                                        ),
                                                                        'detach_known/1_1_$special_;/2___2'(S2,
                                                                                                            C)
                                                                    )
                                                                ),
                                                                known(B)
                                                            )
                                                        ;   E=ground(X2),
                                                            (   'chr newvia_1'(X2,
                                                                               Y2)
                                                            ->  get_attr(Y2,
                                                                         guard_entailment,
                                                                         Z2),
                                                                Z2=v(_, _, _, _, _, _, _, _, _, A3, _, _, _, _, _, _, _, _, _, _, _, _)
                                                            ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',
                                                                          A3)
                                                            ),
                                                            member(B3,
                                                                   A3),
                                                            B3=suspension(_, active, _, _, _, C3),
                                                            C3==X2,
                                                            !,
                                                            (   var(C)
                                                            ->  true
                                                            ;   C=suspension(_, D3, _, _, E3, F3),
                                                                setarg(2,
                                                                       C,
                                                                       removed),
                                                                (   D3==not_stored_yet
                                                                ->  G3=[]
                                                                ;   term_variables(term(E3,
                                                                                        F3),
                                                                                   G3),
                                                                    arg(4,
                                                                        C,
                                                                        H3),
                                                                    (   var(H3)
                                                                    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                                                  I3),
                                                                        I3=[_|J3],
                                                                        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                                                 J3),
                                                                        (   J3=[K3|_]
                                                                        ->  setarg(4,
                                                                                   K3,
                                                                                   _)
                                                                        ;   true
                                                                        )
                                                                    ;   H3=[_, _|J3],
                                                                        setarg(2,
                                                                               H3,
                                                                               J3),
                                                                        (   J3=[K3|_]
                                                                        ->  setarg(4,
                                                                                   K3,
                                                                                   H3)
                                                                        ;   true
                                                                        )
                                                                    ),
                                                                    'detach_known/1_1_$special_;/2___2'(G3,
                                                                                                        C)
                                                                )
                                                            ),
                                                            known(B)
                                                        )
                                                    ;   E=integer(L3),
                                                        (   'chr newvia_1'(L3,
                                                                           M3)
                                                        ->  get_attr(M3,
                                                                     guard_entailment,
                                                                     N3),
                                                            N3=v(_, _, _, _, _, _, _, _, _, _, O3, _, _, _, _, _, _, _, _, _, _, _)
                                                        ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',
                                                                      O3)
                                                        ),
                                                        member(P3,
                                                               O3),
                                                        P3=suspension(_, active, _, _, _, Q3),
                                                        Q3==L3,
                                                        !,
                                                        (   var(C)
                                                        ->  true
                                                        ;   C=suspension(_, R3, _, _, S3, T3),
                                                            setarg(2,
                                                                   C,
                                                                   removed),
                                                            (   R3==not_stored_yet
                                                            ->  U3=[]
                                                            ;   term_variables(term(S3,
                                                                                    T3),
                                                                               U3),
                                                                arg(4,
                                                                    C,
                                                                    V3),
                                                                (   var(V3)
                                                                ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                                              W3),
                                                                    W3=[_|X3],
                                                                    b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                                             X3),
                                                                    (   X3=[Y3|_]
                                                                    ->  setarg(4,
                                                                               Y3,
                                                                               _)
                                                                    ;   true
                                                                    )
                                                                ;   V3=[_, _|X3],
                                                                    setarg(2,
                                                                           V3,
                                                                           X3),
                                                                    (   X3=[Y3|_]
                                                                    ->  setarg(4,
                                                                               Y3,
                                                                               V3)
                                                                    ;   true
                                                                    )
                                                                ),
                                                                'detach_known/1_1_$special_;/2___2'(U3,
                                                                                                    C)
                                                            )
                                                        ),
                                                        known(B)
                                                    )
                                                ;   E=float(Z3),
                                                    (   'chr newvia_1'(Z3,
                                                                       A4)
                                                    ->  get_attr(A4,
                                                                 guard_entailment,
                                                                 B4),
                                                        B4=v(_, _, _, _, _, _, _, _, _, _, _, C4, _, _, _, _, _, _, _, _, _, _)
                                                    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',
                                                                  C4)
                                                    ),
                                                    member(D4,
                                                           C4),
                                                    D4=suspension(_, active, _, _, _, E4),
                                                    E4==Z3,
                                                    !,
                                                    (   var(C)
                                                    ->  true
                                                    ;   C=suspension(_, F4, _, _, G4, H4),
                                                        setarg(2,
                                                               C,
                                                               removed),
                                                        (   F4==not_stored_yet
                                                        ->  I4=[]
                                                        ;   term_variables(term(G4,
                                                                                H4),
                                                                           I4),
                                                            arg(4,
                                                                C,
                                                                J4),
                                                            (   var(J4)
                                                            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                                          K4),
                                                                K4=[_|L4],
                                                                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                                         L4),
                                                                (   L4=[M4|_]
                                                                ->  setarg(4,
                                                                           M4,
                                                                           _)
                                                                ;   true
                                                                )
                                                            ;   J4=[_, _|L4],
                                                                setarg(2,
                                                                       J4,
                                                                       L4),
                                                                (   L4=[M4|_]
                                                                ->  setarg(4,
                                                                           M4,
                                                                           J4)
                                                                ;   true
                                                                )
                                                            ),
                                                            'detach_known/1_1_$special_;/2___2'(I4,
                                                                                                C)
                                                        )
                                                    ),
                                                    known(B)
                                                )
                                            ;   E=number(N4),
                                                (   'chr newvia_1'(N4,
                                                                   O4)
                                                ->  get_attr(O4,
                                                             guard_entailment,
                                                             P4),
                                                    P4=v(_, _, _, _, _, _, _, _, _, _, _, _, Q4, _, _, _, _, _, _, _, _, _)
                                                ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',
                                                              Q4)
                                                ),
                                                member(R4, Q4),
                                                R4=suspension(_, active, _, _, _, S4),
                                                S4==N4,
                                                !,
                                                (   var(C)
                                                ->  true
                                                ;   C=suspension(_, T4, _, _, U4, V4),
                                                    setarg(2, C, removed),
                                                    (   T4==not_stored_yet
                                                    ->  W4=[]
                                                    ;   term_variables(term(U4,
                                                                            V4),
                                                                       W4),
                                                        arg(4,
                                                            C,
                                                            X4),
                                                        (   var(X4)
                                                        ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                                      Y4),
                                                            Y4=[_|Z4],
                                                            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                                     Z4),
                                                            (   Z4=[A5|_]
                                                            ->  setarg(4,
                                                                       A5,
                                                                       _)
                                                            ;   true
                                                            )
                                                        ;   X4=[_, _|Z4],
                                                            setarg(2,
                                                                   X4,
                                                                   Z4),
                                                            (   Z4=[A5|_]
                                                            ->  setarg(4,
                                                                       A5,
                                                                       X4)
                                                            ;   true
                                                            )
                                                        ),
                                                        'detach_known/1_1_$special_;/2___2'(W4,
                                                                                            C)
                                                    )
                                                ),
                                                known(B)
                                            )
                                        ;   E=(B5=\=C5),
                                            (   'chr newvia_2'(B5,
                                                               C5,
                                                               D5)
                                            ->  get_attr(D5,
                                                         guard_entailment,
                                                         E5),
                                                E5=v(_, _, _, _, _, _, _, _, _, _, _, _, _, F5, _, _, _, _, _, _, _, _)
                                            ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',
                                                          F5)
                                            ),
                                            member(G5, F5),
                                            G5=suspension(_, active, _, _, _, H5, I5),
                                            H5==B5,
                                            I5==C5,
                                            !,
                                            (   var(C)
                                            ->  true
                                            ;   C=suspension(_, J5, _, _, K5, L5),
                                                setarg(2, C, removed),
                                                (   J5==not_stored_yet
                                                ->  M5=[]
                                                ;   term_variables(term(K5,
                                                                        L5),
                                                                   M5),
                                                    arg(4, C, N5),
                                                    (   var(N5)
                                                    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                                  O5),
                                                        O5=[_|P5],
                                                        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                                 P5),
                                                        (   P5=[Q5|_]
                                                        ->  setarg(4,
                                                                   Q5,
                                                                   _)
                                                        ;   true
                                                        )
                                                    ;   N5=[_, _|P5],
                                                        setarg(2,
                                                               N5,
                                                               P5),
                                                        (   P5=[Q5|_]
                                                        ->  setarg(4,
                                                                   Q5,
                                                                   N5)
                                                        ;   true
                                                        )
                                                    ),
                                                    'detach_known/1_1_$special_;/2___2'(M5,
                                                                                        C)
                                                )
                                            ),
                                            known(B)
                                        )
                                    ;   E=(\+R5),
                                        (   'chr newvia_1'(R5, S5)
                                        ->  get_attr(S5,
                                                     guard_entailment,
                                                     T5),
                                            T5=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, U5, _, _, _, _, _, _, _)
                                        ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                                                      U5)
                                        ),
                                        member(V5, U5),
                                        V5=suspension(_, active, _, _, W5),
                                        W5==R5,
                                        !,
                                        (   var(C)
                                        ->  true
                                        ;   C=suspension(_, X5, _, _, Y5, Z5),
                                            setarg(2, C, removed),
                                            (   X5==not_stored_yet
                                            ->  A6=[]
                                            ;   term_variables(term(Y5,
                                                                    Z5),
                                                               A6),
                                                arg(4, C, B6),
                                                (   var(B6)
                                                ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                              C6),
                                                    C6=[_|D6],
                                                    b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                             D6),
                                                    (   D6=[E6|_]
                                                    ->  setarg(4,
                                                               E6,
                                                               _)
                                                    ;   true
                                                    )
                                                ;   B6=[_, _|D6],
                                                    setarg(2,
                                                           B6,
                                                           D6),
                                                    (   D6=[E6|_]
                                                    ->  setarg(4,
                                                               E6,
                                                               B6)
                                                    ;   true
                                                    )
                                                ),
                                                'detach_known/1_1_$special_;/2___2'(A6,
                                                                                    C)
                                            )
                                        ),
                                        known(B)
                                    )
                                ;   E=functor(F6, G6, H6),
                                    (   'chr newvia'([ F6,
                                                       G6,
                                                       H6
                                                     ],
                                                     I6)
                                    ->  get_attr(I6,
                                                 guard_entailment,
                                                 J6),
                                        J6=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, K6, _, _, _, _, _, _)
                                    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',
                                                  K6)
                                    ),
                                    member(L6, K6),
                                    L6=suspension(_, active, _, _, M6, N6, O6),
                                    M6==F6,
                                    N6==G6,
                                    O6==H6,
                                    !,
                                    (   var(C)
                                    ->  true
                                    ;   C=suspension(_, P6, _, _, Q6, R6),
                                        setarg(2, C, removed),
                                        (   P6==not_stored_yet
                                        ->  S6=[]
                                        ;   term_variables(term(Q6,
                                                                R6),
                                                           S6),
                                            arg(4, C, T6),
                                            (   var(T6)
                                            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                          U6),
                                                U6=[_|V6],
                                                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                         V6),
                                                (   V6=[W6|_]
                                                ->  setarg(4,
                                                           W6,
                                                           _)
                                                ;   true
                                                )
                                            ;   T6=[_, _|V6],
                                                setarg(2, T6, V6),
                                                (   V6=[W6|_]
                                                ->  setarg(4,
                                                           W6,
                                                           T6)
                                                ;   true
                                                )
                                            ),
                                            'detach_known/1_1_$special_;/2___2'(S6,
                                                                                C)
                                        )
                                    ),
                                    known(B)
                                )
                            ;   E=(X6\=Y6),
                                (   'chr newvia_2'(X6,
                                                   Y6,
                                                   Z6)
                                ->  get_attr(Z6,
                                             guard_entailment,
                                             A7),
                                    A7=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, B7, _, _, _, _, _)
                                ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',
                                              B7)
                                ),
                                member(C7, B7),
                                C7=suspension(_, active, _, _, _, D7, E7),
                                D7==X6,
                                E7==Y6,
                                !,
                                (   var(C)
                                ->  true
                                ;   C=suspension(_, F7, _, _, G7, H7),
                                    setarg(2, C, removed),
                                    (   F7==not_stored_yet
                                    ->  I7=[]
                                    ;   term_variables(term(G7,
                                                            H7),
                                                       I7),
                                        arg(4, C, J7),
                                        (   var(J7)
                                        ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                      K7),
                                            K7=[_|L7],
                                            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                     L7),
                                            (   L7=[M7|_]
                                            ->  setarg(4, M7, _)
                                            ;   true
                                            )
                                        ;   J7=[_, _|L7],
                                            setarg(2, J7, L7),
                                            (   L7=[M7|_]
                                            ->  setarg(4, M7, J7)
                                            ;   true
                                            )
                                        ),
                                        'detach_known/1_1_$special_;/2___2'(I7,
                                                                            C)
                                    )
                                ),
                                known(B)
                            )
                        ;   E=(N7=O7),
                            (   'chr newvia_2'(N7, O7, P7)
                            ->  get_attr(P7, guard_entailment, Q7),
                                Q7=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, R7, _, _, _, _)
                            ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',
                                          R7)
                            ),
                            member(S7, R7),
                            S7=suspension(_, active, _, _, T7, U7),
                            T7==N7,
                            U7==O7,
                            !,
                            (   var(C)
                            ->  true
                            ;   C=suspension(_, V7, _, _, W7, X7),
                                setarg(2, C, removed),
                                (   V7==not_stored_yet
                                ->  Y7=[]
                                ;   term_variables(term(W7, X7),
                                                   Y7),
                                    arg(4, C, Z7),
                                    (   var(Z7)
                                    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                  A8),
                                        A8=[_|B8],
                                        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                 B8),
                                        (   B8=[C8|_]
                                        ->  setarg(4, C8, _)
                                        ;   true
                                        )
                                    ;   Z7=[_, _|B8],
                                        setarg(2, Z7, B8),
                                        (   B8=[C8|_]
                                        ->  setarg(4, C8, Z7)
                                        ;   true
                                        )
                                    ),
                                    'detach_known/1_1_$special_;/2___2'(Y7,
                                                                        C)
                                )
                            ),
                            known(B)
                        )
                    ;   E=(D8\==E8),
                        (   'chr newvia_2'(D8, E8, F8)
                        ->  get_attr(F8, guard_entailment, G8),
                            G8=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, H8, _, _, _)
                        ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',
                                      H8)
                        ),
                        member(I8, H8),
                        I8=suspension(_, active, _, _, _, J8, K8),
                        J8==D8,
                        K8==E8,
                        !,
                        (   var(C)
                        ->  true
                        ;   C=suspension(_, L8, _, _, M8, N8),
                            setarg(2, C, removed),
                            (   L8==not_stored_yet
                            ->  O8=[]
                            ;   term_variables(term(M8, N8),
                                               O8),
                                arg(4, C, P8),
                                (   var(P8)
                                ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                              Q8),
                                    Q8=[_|R8],
                                    b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                             R8),
                                    (   R8=[S8|_]
                                    ->  setarg(4, S8, _)
                                    ;   true
                                    )
                                ;   P8=[_, _|R8],
                                    setarg(2, P8, R8),
                                    (   R8=[S8|_]
                                    ->  setarg(4, S8, P8)
                                    ;   true
                                    )
                                ),
                                'detach_known/1_1_$special_;/2___2'(O8,
                                                                    C)
                            )
                        ),
                        known(B)
                    )
                ;   E=(T8==U8),
                    (   'chr newvia_2'(T8, U8, V8)
                    ->  get_attr(V8, guard_entailment, W8),
                        W8=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, X8, _, _)
                    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',
                                  X8)
                    ),
                    member(Y8, X8),
                    Y8=suspension(_, active, _, _, _, Z8, A9),
                    Z8==T8,
                    A9==U8,
                    !,
                    (   var(C)
                    ->  true
                    ;   C=suspension(_, B9, _, _, C9, D9),
                        setarg(2, C, removed),
                        (   B9==not_stored_yet
                        ->  E9=[]
                        ;   term_variables(term(C9, D9),
                                           E9),
                            arg(4, C, F9),
                            (   var(F9)
                            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                          G9),
                                G9=[_|H9],
                                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                         H9),
                                (   H9=[I9|_]
                                ->  setarg(4, I9, _)
                                ;   true
                                )
                            ;   F9=[_, _|H9],
                                setarg(2, F9, H9),
                                (   H9=[I9|_]
                                ->  setarg(4, I9, F9)
                                ;   true
                                )
                            ),
                            'detach_known/1_1_$special_;/2___2'(E9,
                                                                C)
                        )
                    ),
                    known(B)
                )
            ;   E=(J9=<K9),
                (   'chr newvia_2'(J9, K9, L9)
                ->  get_attr(L9, guard_entailment, M9),
                    M9=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, N9, _)
                ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                              N9)
                ),
                member(O9, N9),
                O9=suspension(_, active, _, _, _, P9, Q9),
                P9==J9,
                Q9==K9,
                !,
                (   var(C)
                ->  true
                ;   C=suspension(_, R9, _, _, S9, T9),
                    setarg(2, C, removed),
                    (   R9==not_stored_yet
                    ->  U9=[]
                    ;   term_variables(term(S9, T9), U9),
                        arg(4, C, V9),
                        (   var(V9)
                        ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                      W9),
                            W9=[_|X9],
                            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                     X9),
                            (   X9=[Y9|_]
                            ->  setarg(4, Y9, _)
                            ;   true
                            )
                        ;   V9=[_, _|X9],
                            setarg(2, V9, X9),
                            (   X9=[Y9|_]
                            ->  setarg(4, Y9, V9)
                            ;   true
                            )
                        ),
                        'detach_known/1_1_$special_;/2___2'(U9, C)
                    )
                ),
                known(B)
            )
        ;   E=(Z9=:=A10),
            (   'chr newvia_2'(Z9, A10, B10)
            ->  get_attr(B10, guard_entailment, C10),
                C10=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, D10)
            ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',
                          D10)
            ),
            member(E10, D10),
            E10=suspension(_, active, _, _, _, F10, G10),
            F10==Z9,
            G10==A10,
            !,
            (   var(C)
            ->  true
            ;   C=suspension(_, H10, _, _, I10, J10),
                setarg(2, C, removed),
                (   H10==not_stored_yet
                ->  K10=[]
                ;   term_variables(term(I10, J10), K10),
                    arg(4, C, L10),
                    (   var(L10)
                    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                  M10),
                        M10=[_|N10],
                        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                 N10),
                        (   N10=[O10|_]
                        ->  setarg(4, O10, _)
                        ;   true
                        )
                    ;   L10=[_, _|N10],
                        setarg(2, L10, N10),
                        (   N10=[O10|_]
                        ->  setarg(4, O10, L10)
                        ;   true
                        )
                    ),
                    'detach_known/1_1_$special_;/2___2'(K10, C)
                )
            ),
            known(B)
        )
    ;   (   'chr newvia_1'(E, P10)
        ->  get_attr(P10, guard_entailment, Q10),
            Q10=v(_, _, R10, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
        ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',
                      R10)
        ),
        member(S10, R10),
        S10=suspension(_, active, _, _, T10),
        T10==E,
        !,
        (   var(C)
        ->  true
        ;   C=suspension(_, U10, _, _, V10, W10),
            setarg(2, C, removed),
            (   U10==not_stored_yet
            ->  X10=[]
            ;   term_variables(term(V10, W10), X10),
                arg(4, C, Y10),
                (   var(Y10)
                ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                              Z10),
                    Z10=[_|A11],
                    b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                             A11),
                    (   A11=[B11|_]
                    ->  setarg(4, B11, _)
                    ;   true
                    )
                ;   Y10=[_, _|A11],
                    setarg(2, Y10, A11),
                    (   A11=[B11|_]
                    ->  setarg(4, B11, Y10)
                    ;   true
                    )
                ),
                'detach_known/1_1_$special_;/2___2'(X10, C)
            )
        ),
        known(B)
    ).
'known/1_1_$special_;/2___2__2'(A, B, C) :-
    (   'chr newvia_1'(A, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, F, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                  F)
    ),
    member(G, F),
    G=suspension(_, active, _, _, H),
    H==A,
    !,
    (   var(C)
    ->  true
    ;   C=suspension(_, I, _, _, J, K),
        setarg(2, C, removed),
        (   I==not_stored_yet
        ->  L=[]
        ;   term_variables(term(J, K), L),
            arg(4, C, M),
            (   var(M)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                          N),
                N=[_|O],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                         O),
                (   O=[P|_]
                ->  setarg(4, P, _)
                ;   true
                )
            ;   M=[_, _|O],
                setarg(2, M, O),
                (   O=[P|_]
                ->  setarg(4, P, M)
                ;   true
                )
            ),
            'detach_known/1_1_$special_;/2___2'(L, C)
        )
    ),
    known(B).
'known/1_1_$special_;/2___2__2'(A, B, C) :-
    nonvar(A),
    A=(D, _),
    (   'chr newvia_1'(D, E)
    ->  get_attr(E, guard_entailment, F),
        F=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, G, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                  G)
    ),
    member(H, G),
    H=suspension(_, active, _, _, I),
    I==D,
    !,
    (   var(C)
    ->  true
    ;   C=suspension(_, J, _, _, K, L),
        setarg(2, C, removed),
        (   J==not_stored_yet
        ->  M=[]
        ;   term_variables(term(K, L), M),
            arg(4, C, N),
            (   var(N)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                          O),
                O=[_|P],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                         P),
                (   P=[Q|_]
                ->  setarg(4, Q, _)
                ;   true
                )
            ;   N=[_, _|P],
                setarg(2, N, P),
                (   P=[Q|_]
                ->  setarg(4, Q, N)
                ;   true
                )
            ),
            'detach_known/1_1_$special_;/2___2'(M, C)
        )
    ),
    known(B).
'known/1_1_$special_;/2___2__2'(A, B, C) :-
    A==fail,
    !,
    (   var(C)
    ->  true
    ;   C=suspension(_, D, _, _, E, F),
        setarg(2, C, removed),
        (   D==not_stored_yet
        ->  G=[]
        ;   term_variables(term(E, F), G),
            arg(4, C, H),
            (   var(H)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                          I),
                I=[_|J],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                         J),
                (   J=[K|_]
                ->  setarg(4, K, _)
                ;   true
                )
            ;   H=[_, _|J],
                setarg(2, H, J),
                (   J=[K|_]
                ->  setarg(4, K, H)
                ;   true
                )
            ),
            'detach_known/1_1_$special_;/2___2'(G, C)
        )
    ),
    known(B).
'known/1_1_$special_;/2___2__2'(A, B, C) :-
    B==fail,
    !,
    (   var(C)
    ->  true
    ;   C=suspension(_, D, _, _, E, F),
        setarg(2, C, removed),
        (   D==not_stored_yet
        ->  G=[]
        ;   term_variables(term(E, F), G),
            arg(4, C, H),
            (   var(H)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                          I),
                I=[_|J],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                         J),
                (   J=[K|_]
                ->  setarg(4, K, _)
                ;   true
                )
            ;   H=[_, _|J],
                setarg(2, H, J),
                (   J=[K|_]
                ->  setarg(4, K, H)
                ;   true
                )
            ),
            'detach_known/1_1_$special_;/2___2'(G, C)
        )
    ),
    known(A).
'known/1_1_$special_;/2___2__2'(A, _, B) :-
    A==true,
    !,
    (   var(B)
    ->  true
    ;   B=suspension(_, C, _, _, D, E),
        setarg(2, B, removed),
        (   C==not_stored_yet
        ->  F=[]
        ;   term_variables(term(D, E), F),
            arg(4, B, G),
            (   var(G)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                          H),
                H=[_|I],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                         I),
                (   I=[J|_]
                ->  setarg(4, J, _)
                ;   true
                )
            ;   G=[_, _|I],
                setarg(2, G, I),
                (   I=[J|_]
                ->  setarg(4, J, G)
                ;   true
                )
            ),
            'detach_known/1_1_$special_;/2___2'(F, B)
        )
    ).
'known/1_1_$special_;/2___2__2'(_, A, B) :-
    A==true,
    !,
    (   var(B)
    ->  true
    ;   B=suspension(_, C, _, _, D, E),
        setarg(2, B, removed),
        (   C==not_stored_yet
        ->  F=[]
        ;   term_variables(term(D, E), F),
            arg(4, B, G),
            (   var(G)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                          H),
                H=[_|I],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                         I),
                (   I=[J|_]
                ->  setarg(4, J, _)
                ;   true
                )
            ;   G=[_, _|I],
                setarg(2, G, I),
                (   I=[J|_]
                ->  setarg(4, J, G)
                ;   true
                )
            ),
            'detach_known/1_1_$special_;/2___2'(F, B)
        )
    ).
'known/1_1_$special_;/2___2__2'(A, B, C) :-
    nonvar(A),
    A=(\+D),
    nonvar(D),
    D=functor(E, F, G),
    (   (   (   'chr newvia_1'(E, H)
            ->  get_attr(H, guard_entailment, I),
                I=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, J, _, _, _, _, _, _)
            ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',
                          J)
            ),
            member(K, J),
            K=suspension(_, active, _, _, L, _, _),
            L==E,
            !,
            (   var(C)
            ->  true
            ;   C=suspension(_, M, _, _, N, O),
                setarg(2, C, removed),
                (   M==not_stored_yet
                ->  P=[]
                ;   term_variables(term(N, O), P),
                    arg(4, C, Q),
                    (   var(Q)
                    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                  R),
                        R=[_|S],
                        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                 S),
                        (   S=[T|_]
                        ->  setarg(4, T, _)
                        ;   true
                        )
                    ;   Q=[_, _|S],
                        setarg(2, Q, S),
                        (   S=[T|_]
                        ->  setarg(4, T, Q)
                        ;   true
                        )
                    ),
                    'detach_known/1_1_$special_;/2___2'(P, C)
                )
            )
        ;   nonvar(E),
            'chr lock'(E),
            'chr lock'(F),
            'chr lock'(G),
            functor(E, F, G),
            'chr unlock'(E),
            'chr unlock'(F),
            'chr unlock'(G),
            !,
            (   var(C)
            ->  true
            ;   C=suspension(_, U, _, _, V, W),
                setarg(2, C, removed),
                (   U==not_stored_yet
                ->  X=[]
                ;   term_variables(term(V, W), X),
                    arg(4, C, Y),
                    (   var(Y)
                    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                  Z),
                        Z=[_|A1],
                        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                 A1),
                        (   A1=[B1|_]
                        ->  setarg(4, B1, _)
                        ;   true
                        )
                    ;   Y=[_, _|A1],
                        setarg(2, Y, A1),
                        (   A1=[B1|_]
                        ->  setarg(4, B1, Y)
                        ;   true
                        )
                    ),
                    'detach_known/1_1_$special_;/2___2'(X, C)
                )
            ),
            known(B)
        )
    ;   nonvar(E),
        'chr lock'(E),
        'chr lock'(F),
        'chr lock'(G),
        \+ functor(E, F, G),
        'chr unlock'(E),
        'chr unlock'(F),
        'chr unlock'(G),
        !,
        (   var(C)
        ->  true
        ;   C=suspension(_, C1, _, _, D1, E1),
            setarg(2, C, removed),
            (   C1==not_stored_yet
            ->  F1=[]
            ;   term_variables(term(D1, E1), F1),
                arg(4, C, G1),
                (   var(G1)
                ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                              H1),
                    H1=[_|I1],
                    b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                             I1),
                    (   I1=[J1|_]
                    ->  setarg(4, J1, _)
                    ;   true
                    )
                ;   G1=[_, _|I1],
                    setarg(2, G1, I1),
                    (   I1=[J1|_]
                    ->  setarg(4, J1, G1)
                    ;   true
                    )
                ),
                'detach_known/1_1_$special_;/2___2'(F1, C)
            )
        )
    ).
'known/1_1_$special_;/2___2__2'(_, _, A) :-
    arg(2, A, B),
    setarg(2, A, active),
    arg(3, A, C),
    D is C+1,
    setarg(3, A, D),
    (   B==not_stored_yet
    ->  A=suspension(_, _, _, _, E, F),
        term_variables(term(E, F), G),
        'chr none_locked'(G),
        nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  H),
        I=[A|H],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                 I),
        (   H=[J|_]
        ->  setarg(4, J, I)
        ;   true
        ),
        'attach_known/1_1_$special_;/2___2'(G, A)
    ;   true
    ).
'known/1_1_$special_nonvar/1'(A) :-
    'known/1_1_$special_nonvar/1___1__0'(A, _).
'known/1_1_$special_nonvar/1___1__0'(A, B) :-
    (   'chr newvia_1'(A, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, _, E, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',
                  E)
    ),
    member(F, E),
    F=suspension(_, active, _, _, G),
    G==A,
    !,
    (   var(B)
    ->  true
    ;   B=suspension(_, H, _, _, I),
        setarg(2, B, removed),
        (   H==not_stored_yet
        ->  J=[]
        ;   term_variables(I, J),
            arg(4, B, K),
            (   var(K)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',
                          L),
                L=[_|M],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',
                         M),
                (   M=[N|_]
                ->  setarg(4, N, _)
                ;   true
                )
            ;   K=[_, _|M],
                setarg(2, K, M),
                (   M=[N|_]
                ->  setarg(4, N, K)
                ;   true
                )
            ),
            'detach_known/1_1_$special_nonvar/1___1'(J, B)
        )
    ).
'known/1_1_$special_nonvar/1___1__0'(_, A) :-
    nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',
              B),
    member(C, B),
    C=suspension(_, active, _),
    !,
    (   var(A)
    ->  true
    ;   A=suspension(_, D, _, _, E),
        setarg(2, A, removed),
        (   D==not_stored_yet
        ->  F=[]
        ;   term_variables(E, F),
            arg(4, A, G),
            (   var(G)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',
                          H),
                H=[_|I],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',
                         I),
                (   I=[J|_]
                ->  setarg(4, J, _)
                ;   true
                )
            ;   G=[_, _|I],
                setarg(2, G, I),
                (   I=[J|_]
                ->  setarg(4, J, G)
                ;   true
                )
            ),
            'detach_known/1_1_$special_nonvar/1___1'(F, A)
        )
    ).
'known/1_1_$special_nonvar/1___1__0'(A, B) :-
    (   'chr newvia_1'(A, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, E, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                  E)
    ),
    member(F, E),
    F=suspension(_, active, _, _, G),
    nonvar(G),
    G=nonvar(H),
    H==A,
    !,
    F=suspension(_, _, _, _, I),
    setarg(2, F, removed),
    term_variables(I, J),
    arg(4, F, K),
    (   var(K)
    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                  L),
        L=[_|M],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                 M),
        (   M=[N|_]
        ->  setarg(4, N, _)
        ;   true
        )
    ;   K=[_, _|M],
        setarg(2, K, M),
        (   M=[N|_]
        ->  setarg(4, N, K)
        ;   true
        )
    ),
    'detach_known/1_1_$special_\\+/1___1'(J, F),
    (   var(B)
    ->  true
    ;   B=suspension(_, O, _, _, P),
        setarg(2, B, removed),
        (   O==not_stored_yet
        ->  Q=[]
        ;   term_variables(P, Q),
            arg(4, B, R),
            (   var(R)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',
                          S),
                S=[_|T],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',
                         T),
                (   T=[U|_]
                ->  setarg(4, U, _)
                ;   true
                )
            ;   R=[_, _|T],
                setarg(2, R, T),
                (   T=[U|_]
                ->  setarg(4, U, R)
                ;   true
                )
            ),
            'detach_known/1_1_$special_nonvar/1___1'(Q, B)
        )
    ),
    'known/1_1_$special_fail/0'.
'known/1_1_$special_nonvar/1___1__0'(A, B) :-
    (   'chr newvia_1'(A, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, _, _, E, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',
                  E)
    ),
    member(F, E),
    F=suspension(_, active, _, _, G),
    G==A,
    !,
    F=suspension(_, _, _, _, H),
    setarg(2, F, removed),
    term_variables(H, I),
    arg(4, F, J),
    (   var(J)
    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',
                  K),
        K=[_|L],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',
                 L),
        (   L=[M|_]
        ->  setarg(4, M, _)
        ;   true
        )
    ;   J=[_, _|L],
        setarg(2, J, L),
        (   L=[M|_]
        ->  setarg(4, M, J)
        ;   true
        )
    ),
    'detach_known/1_1_$special_var/1___1'(I, F),
    (   var(B)
    ->  true
    ;   B=suspension(_, N, _, _, O),
        setarg(2, B, removed),
        (   N==not_stored_yet
        ->  P=[]
        ;   term_variables(O, P),
            arg(4, B, Q),
            (   var(Q)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',
                          R),
                R=[_|S],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',
                         S),
                (   S=[T|_]
                ->  setarg(4, T, _)
                ;   true
                )
            ;   Q=[_, _|S],
                setarg(2, Q, S),
                (   S=[T|_]
                ->  setarg(4, T, Q)
                ;   true
                )
            ),
            'detach_known/1_1_$special_nonvar/1___1'(P, B)
        )
    ),
    'known/1_1_$special_fail/0'.
'known/1_1_$special_nonvar/1___1__0'(A, B) :-
    (   'chr newvia_1'(A, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, E, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  E)
    ),
    !,
    (   var(B)
    ->  B=suspension(F, not_stored_yet, 0, _, A),
        'chr gen_id'(F)
    ;   true
    ),
    'known/1_1_$special_nonvar/1___1__0__0__7'(E, A, B).
'known/1_1_$special_nonvar/1___1__0__0__7'([], A, B) :-
    'known/1_1_$special_nonvar/1___1__1'(A, B).
'known/1_1_$special_nonvar/1___1__0__0__7'([A|B], C, D) :-
    (   A=suspension(_, active, _, _, E, F),
        nonvar(E),
        E=(\+G),
        nonvar(G),
        G=nonvar(H),
        H==C
    ->  A=suspension(_, _, _, _, I, J),
        setarg(2, A, removed),
        term_variables(term(I, J), K),
        ( arg(4, A, L),
          (   var(L)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                        M),
              M=[_|N],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                       N),
              (   N=[O|_]
              ->  setarg(4, O, _)
              ;   true
              )
          ;   L=[_, _|N],
              setarg(2, L, N),
              (   N=[O|_]
              ->  setarg(4, O, L)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_;/2___2'(K, A),
        arg(2, D, P),
        setarg(2, D, active),
        ( arg(3, D, Q),
          R is Q+1,
          setarg(3, D, R)
        ),
        (   P==not_stored_yet
        ->  D=suspension(_, _, _, _, S),
            term_variables(S, T),
            'chr none_locked'(T),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',
                      U),
            V=[D|U],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',
                     V),
            (   U=[W|_]
            ->  setarg(4, W, V)
            ;   true
            ),
            'attach_known/1_1_$special_nonvar/1___1'(T, D)
        ;   true
        ),
        known(F),
        (   D=suspension(_, active, R, _, _)
        ->  setarg(2, D, inactive),
            'known/1_1_$special_nonvar/1___1__0__0__7'(B, C, D)
        ;   true
        )
    ;   'known/1_1_$special_nonvar/1___1__0__0__7'(B, C, D)
    ).
'known/1_1_$special_nonvar/1___1__0'(A, B) :-
    (   var(B)
    ->  B=suspension(C, not_stored_yet, 0, _, A),
        'chr gen_id'(C)
    ;   true
    ),
    'known/1_1_$special_nonvar/1___1__1'(A, B).
'known/1_1_$special_nonvar/1___1__1'(A, B) :-
    (   'chr newvia_1'(A, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, E, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  E)
    ),
    !,
    'known/1_1_$special_nonvar/1___1__1__0__8'(E, A, B).
'known/1_1_$special_nonvar/1___1__1__0__8'([], A, B) :-
    'known/1_1_$special_nonvar/1___1__2'(A, B).
'known/1_1_$special_nonvar/1___1__1__0__8'([A|B], C, D) :-
    (   A=suspension(_, active, _, _, E, F),
        nonvar(E),
        E=(G, _),
        nonvar(G),
        G=(\+H),
        nonvar(H),
        H=nonvar(I),
        I==C
    ->  A=suspension(_, _, _, _, J, K),
        setarg(2, A, removed),
        term_variables(term(J, K), L),
        ( arg(4, A, M),
          (   var(M)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                        N),
              N=[_|O],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                       O),
              (   O=[P|_]
              ->  setarg(4, P, _)
              ;   true
              )
          ;   M=[_, _|O],
              setarg(2, M, O),
              (   O=[P|_]
              ->  setarg(4, P, M)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_;/2___2'(L, A),
        arg(2, D, Q),
        setarg(2, D, active),
        ( arg(3, D, R),
          S is R+1,
          setarg(3, D, S)
        ),
        (   Q==not_stored_yet
        ->  D=suspension(_, _, _, _, T),
            term_variables(T, U),
            'chr none_locked'(U),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',
                      V),
            W=[D|V],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',
                     W),
            (   V=[X|_]
            ->  setarg(4, X, W)
            ;   true
            ),
            'attach_known/1_1_$special_nonvar/1___1'(U, D)
        ;   true
        ),
        known(F),
        (   D=suspension(_, active, S, _, _)
        ->  setarg(2, D, inactive),
            'known/1_1_$special_nonvar/1___1__1__0__8'(B, C, D)
        ;   true
        )
    ;   'known/1_1_$special_nonvar/1___1__1__0__8'(B, C, D)
    ).
'known/1_1_$special_nonvar/1___1__1'(A, B) :-
    'known/1_1_$special_nonvar/1___1__2'(A, B).
'known/1_1_$special_nonvar/1___1__2'(_, A) :-
    arg(2, A, B),
    setarg(2, A, active),
    arg(3, A, C),
    D is C+1,
    setarg(3, A, D),
    (   B==not_stored_yet
    ->  A=suspension(_, _, _, _, E),
        term_variables(E, F),
        'chr none_locked'(F),
        nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',
                  G),
        H=[A|G],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',
                 H),
        (   G=[I|_]
        ->  setarg(4, I, H)
        ;   true
        ),
        'attach_known/1_1_$special_nonvar/1___1'(F, A)
    ;   true
    ).
'known/1_1_$special_var/1'(A) :-
    'known/1_1_$special_var/1___1__0'(A, _).
'known/1_1_$special_var/1___1__0'(A, B) :-
    (   'chr newvia_1'(A, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, _, _, E, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',
                  E)
    ),
    member(F, E),
    F=suspension(_, active, _, _, G),
    G==A,
    !,
    (   var(B)
    ->  true
    ;   B=suspension(_, H, _, _, I),
        setarg(2, B, removed),
        (   H==not_stored_yet
        ->  J=[]
        ;   term_variables(I, J),
            arg(4, B, K),
            (   var(K)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',
                          L),
                L=[_|M],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',
                         M),
                (   M=[N|_]
                ->  setarg(4, N, _)
                ;   true
                )
            ;   K=[_, _|M],
                setarg(2, K, M),
                (   M=[N|_]
                ->  setarg(4, N, K)
                ;   true
                )
            ),
            'detach_known/1_1_$special_var/1___1'(J, B)
        )
    ).
'known/1_1_$special_var/1___1__0'(_, A) :-
    nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',
              B),
    member(C, B),
    C=suspension(_, active, _),
    !,
    (   var(A)
    ->  true
    ;   A=suspension(_, D, _, _, E),
        setarg(2, A, removed),
        (   D==not_stored_yet
        ->  F=[]
        ;   term_variables(E, F),
            arg(4, A, G),
            (   var(G)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',
                          H),
                H=[_|I],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',
                         I),
                (   I=[J|_]
                ->  setarg(4, J, _)
                ;   true
                )
            ;   G=[_, _|I],
                setarg(2, G, I),
                (   I=[J|_]
                ->  setarg(4, J, G)
                ;   true
                )
            ),
            'detach_known/1_1_$special_var/1___1'(F, A)
        )
    ).
'known/1_1_$special_var/1___1__0'(A, B) :-
    (   'chr newvia_1'(A, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, E, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                  E)
    ),
    member(F, E),
    F=suspension(_, active, _, _, G),
    nonvar(G),
    G=var(H),
    H==A,
    !,
    F=suspension(_, _, _, _, I),
    setarg(2, F, removed),
    term_variables(I, J),
    arg(4, F, K),
    (   var(K)
    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                  L),
        L=[_|M],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                 M),
        (   M=[N|_]
        ->  setarg(4, N, _)
        ;   true
        )
    ;   K=[_, _|M],
        setarg(2, K, M),
        (   M=[N|_]
        ->  setarg(4, N, K)
        ;   true
        )
    ),
    'detach_known/1_1_$special_\\+/1___1'(J, F),
    (   var(B)
    ->  true
    ;   B=suspension(_, O, _, _, P),
        setarg(2, B, removed),
        (   O==not_stored_yet
        ->  Q=[]
        ;   term_variables(P, Q),
            arg(4, B, R),
            (   var(R)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',
                          S),
                S=[_|T],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',
                         T),
                (   T=[U|_]
                ->  setarg(4, U, _)
                ;   true
                )
            ;   R=[_, _|T],
                setarg(2, R, T),
                (   T=[U|_]
                ->  setarg(4, U, R)
                ;   true
                )
            ),
            'detach_known/1_1_$special_var/1___1'(Q, B)
        )
    ),
    'known/1_1_$special_fail/0'.
'known/1_1_$special_var/1___1__0'(A, B) :-
    (   'chr newvia_1'(A, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, _, E, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',
                  E)
    ),
    member(F, E),
    F=suspension(_, active, _, _, G),
    G==A,
    !,
    F=suspension(_, _, _, _, H),
    setarg(2, F, removed),
    term_variables(H, I),
    arg(4, F, J),
    (   var(J)
    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',
                  K),
        K=[_|L],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',
                 L),
        (   L=[M|_]
        ->  setarg(4, M, _)
        ;   true
        )
    ;   J=[_, _|L],
        setarg(2, J, L),
        (   L=[M|_]
        ->  setarg(4, M, J)
        ;   true
        )
    ),
    'detach_known/1_1_$special_nonvar/1___1'(I, F),
    (   var(B)
    ->  true
    ;   B=suspension(_, N, _, _, O),
        setarg(2, B, removed),
        (   N==not_stored_yet
        ->  P=[]
        ;   term_variables(O, P),
            arg(4, B, Q),
            (   var(Q)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',
                          R),
                R=[_|S],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',
                         S),
                (   S=[T|_]
                ->  setarg(4, T, _)
                ;   true
                )
            ;   Q=[_, _|S],
                setarg(2, Q, S),
                (   S=[T|_]
                ->  setarg(4, T, Q)
                ;   true
                )
            ),
            'detach_known/1_1_$special_var/1___1'(P, B)
        )
    ),
    'known/1_1_$special_fail/0'.
'known/1_1_$special_var/1___1__0'(A, B) :-
    (   'chr newvia_1'(A, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, E, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  E)
    ),
    !,
    (   var(B)
    ->  B=suspension(F, not_stored_yet, 0, _, A),
        'chr gen_id'(F)
    ;   true
    ),
    'known/1_1_$special_var/1___1__0__0__7'(E, A, B).
'known/1_1_$special_var/1___1__0__0__7'([], A, B) :-
    'known/1_1_$special_var/1___1__1'(A, B).
'known/1_1_$special_var/1___1__0__0__7'([A|B], C, D) :-
    (   A=suspension(_, active, _, _, E, F),
        nonvar(E),
        E=(\+G),
        nonvar(G),
        G=var(H),
        H==C
    ->  A=suspension(_, _, _, _, I, J),
        setarg(2, A, removed),
        term_variables(term(I, J), K),
        ( arg(4, A, L),
          (   var(L)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                        M),
              M=[_|N],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                       N),
              (   N=[O|_]
              ->  setarg(4, O, _)
              ;   true
              )
          ;   L=[_, _|N],
              setarg(2, L, N),
              (   N=[O|_]
              ->  setarg(4, O, L)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_;/2___2'(K, A),
        arg(2, D, P),
        setarg(2, D, active),
        ( arg(3, D, Q),
          R is Q+1,
          setarg(3, D, R)
        ),
        (   P==not_stored_yet
        ->  D=suspension(_, _, _, _, S),
            term_variables(S, T),
            'chr none_locked'(T),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',
                      U),
            V=[D|U],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',
                     V),
            (   U=[W|_]
            ->  setarg(4, W, V)
            ;   true
            ),
            'attach_known/1_1_$special_var/1___1'(T, D)
        ;   true
        ),
        known(F),
        (   D=suspension(_, active, R, _, _)
        ->  setarg(2, D, inactive),
            'known/1_1_$special_var/1___1__0__0__7'(B, C, D)
        ;   true
        )
    ;   'known/1_1_$special_var/1___1__0__0__7'(B, C, D)
    ).
'known/1_1_$special_var/1___1__0'(A, B) :-
    (   var(B)
    ->  B=suspension(C, not_stored_yet, 0, _, A),
        'chr gen_id'(C)
    ;   true
    ),
    'known/1_1_$special_var/1___1__1'(A, B).
'known/1_1_$special_var/1___1__1'(A, B) :-
    (   'chr newvia_1'(A, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, E, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  E)
    ),
    !,
    'known/1_1_$special_var/1___1__1__0__8'(E, A, B).
'known/1_1_$special_var/1___1__1__0__8'([], A, B) :-
    'known/1_1_$special_var/1___1__2'(A, B).
'known/1_1_$special_var/1___1__1__0__8'([A|B], C, D) :-
    (   A=suspension(_, active, _, _, E, F),
        nonvar(E),
        E=(G, _),
        nonvar(G),
        G=(\+H),
        nonvar(H),
        H=var(I),
        I==C
    ->  A=suspension(_, _, _, _, J, K),
        setarg(2, A, removed),
        term_variables(term(J, K), L),
        ( arg(4, A, M),
          (   var(M)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                        N),
              N=[_|O],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                       O),
              (   O=[P|_]
              ->  setarg(4, P, _)
              ;   true
              )
          ;   M=[_, _|O],
              setarg(2, M, O),
              (   O=[P|_]
              ->  setarg(4, P, M)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_;/2___2'(L, A),
        arg(2, D, Q),
        setarg(2, D, active),
        ( arg(3, D, R),
          S is R+1,
          setarg(3, D, S)
        ),
        (   Q==not_stored_yet
        ->  D=suspension(_, _, _, _, T),
            term_variables(T, U),
            'chr none_locked'(U),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',
                      V),
            W=[D|V],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',
                     W),
            (   V=[X|_]
            ->  setarg(4, X, W)
            ;   true
            ),
            'attach_known/1_1_$special_var/1___1'(U, D)
        ;   true
        ),
        known(F),
        (   D=suspension(_, active, S, _, _)
        ->  setarg(2, D, inactive),
            'known/1_1_$special_var/1___1__1__0__8'(B, C, D)
        ;   true
        )
    ;   'known/1_1_$special_var/1___1__1__0__8'(B, C, D)
    ).
'known/1_1_$special_var/1___1__1'(A, B) :-
    'known/1_1_$special_var/1___1__2'(A, B).
'known/1_1_$special_var/1___1__2'(_, A) :-
    arg(2, A, B),
    setarg(2, A, active),
    arg(3, A, C),
    D is C+1,
    setarg(3, A, D),
    (   B==not_stored_yet
    ->  A=suspension(_, _, _, _, E),
        term_variables(E, F),
        'chr none_locked'(F),
        nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',
                  G),
        H=[A|G],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',
                 H),
        (   G=[I|_]
        ->  setarg(4, I, H)
        ;   true
        ),
        'attach_known/1_1_$special_var/1___1'(F, A)
    ;   true
    ).
'known/1_1_$special_atom/1'(A) :-
    'known/1_1_$special_atom/1___1__0'(A, _).
'known/1_1_$special_atom/1___1__0'(A, B) :-
    (   'chr newvia_1'(A, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, _, _, _, E, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',
                  E)
    ),
    member(F, E),
    F=suspension(_, active, _, _, _, G),
    G==A,
    !,
    (   var(B)
    ->  true
    ;   B=suspension(_, H, _, _, _, I),
        setarg(2, B, removed),
        (   H==not_stored_yet
        ->  J=[]
        ;   term_variables(I, J),
            arg(5, B, K),
            (   var(K)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',
                          L),
                L=[_|M],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',
                         M),
                (   M=[N|_]
                ->  setarg(5, N, _)
                ;   true
                )
            ;   K=[_, _|M],
                setarg(2, K, M),
                (   M=[N|_]
                ->  setarg(5, N, K)
                ;   true
                )
            ),
            'detach_known/1_1_$special_atom/1___1'(J, B)
        )
    ).
'known/1_1_$special_atom/1___1__0'(_, A) :-
    nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',
              B),
    member(C, B),
    C=suspension(_, active, _),
    !,
    (   var(A)
    ->  true
    ;   A=suspension(_, D, _, _, _, E),
        setarg(2, A, removed),
        (   D==not_stored_yet
        ->  F=[]
        ;   term_variables(E, F),
            arg(5, A, G),
            (   var(G)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',
                          H),
                H=[_|I],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',
                         I),
                (   I=[J|_]
                ->  setarg(5, J, _)
                ;   true
                )
            ;   G=[_, _|I],
                setarg(2, G, I),
                (   I=[J|_]
                ->  setarg(5, J, G)
                ;   true
                )
            ),
            'detach_known/1_1_$special_atom/1___1'(F, A)
        )
    ).
'known/1_1_$special_atom/1___1__0'(A, B) :-
    (   'chr newvia_1'(A, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, E, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                  E)
    ),
    member(F, E),
    F=suspension(_, active, _, _, G),
    nonvar(G),
    G=atom(H),
    H==A,
    !,
    F=suspension(_, _, _, _, I),
    setarg(2, F, removed),
    term_variables(I, J),
    arg(4, F, K),
    (   var(K)
    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                  L),
        L=[_|M],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                 M),
        (   M=[N|_]
        ->  setarg(4, N, _)
        ;   true
        )
    ;   K=[_, _|M],
        setarg(2, K, M),
        (   M=[N|_]
        ->  setarg(4, N, K)
        ;   true
        )
    ),
    'detach_known/1_1_$special_\\+/1___1'(J, F),
    (   var(B)
    ->  true
    ;   B=suspension(_, O, _, _, _, P),
        setarg(2, B, removed),
        (   O==not_stored_yet
        ->  Q=[]
        ;   term_variables(P, Q),
            arg(5, B, R),
            (   var(R)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',
                          S),
                S=[_|T],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',
                         T),
                (   T=[U|_]
                ->  setarg(5, U, _)
                ;   true
                )
            ;   R=[_, _|T],
                setarg(2, R, T),
                (   T=[U|_]
                ->  setarg(5, U, R)
                ;   true
                )
            ),
            'detach_known/1_1_$special_atom/1___1'(Q, B)
        )
    ),
    'known/1_1_$special_fail/0'.
'known/1_1_$special_atom/1___1__0'(A, B) :-
    (   var(B)
    ->  B=suspension(C, not_stored_yet, t, 0, _, A),
        'chr gen_id'(C)
    ;   true
    ),
    (   '$novel_production'(B, 239),
        !,
        '$extend_history'(B, 239),
        arg(2, B, D),
        setarg(2, B, active),
        arg(4, B, E),
        F is E+1,
        setarg(4, B, F),
        (   D==not_stored_yet
        ->  B=suspension(_, _, _, _, _, G),
            term_variables(G, H),
            'chr none_locked'(H),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',
                      I),
            J=[B|I],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',
                     J),
            (   I=[K|_]
            ->  setarg(5, K, J)
            ;   true
            ),
            'attach_known/1_1_$special_atom/1___1'(H, B)
        ;   true
        ),
        'known/1_1_$special_nonvar/1'(A),
        (   B=suspension(_, active, _, F, _, _)
        ->  setarg(2, B, inactive),
            'known/1_1_$special_atom/1___1__1'(A, B)
        ;   true
        )
    ;   'known/1_1_$special_atom/1___1__1'(A, B)
    ).
'known/1_1_$special_atom/1___1__1'(A, B) :-
    (   'chr newvia_1'(A, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, E, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  E)
    ),
    !,
    'known/1_1_$special_atom/1___1__1__0__7'(E, A, B).
'known/1_1_$special_atom/1___1__1__0__7'([], A, B) :-
    'known/1_1_$special_atom/1___1__2'(A, B).
'known/1_1_$special_atom/1___1__1__0__7'([A|B], C, D) :-
    (   A=suspension(_, active, _, _, E, F),
        nonvar(E),
        E=(\+G),
        nonvar(G),
        G=atom(H),
        H==C
    ->  A=suspension(_, _, _, _, I, J),
        setarg(2, A, removed),
        term_variables(term(I, J), K),
        ( arg(4, A, L),
          (   var(L)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                        M),
              M=[_|N],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                       N),
              (   N=[O|_]
              ->  setarg(4, O, _)
              ;   true
              )
          ;   L=[_, _|N],
              setarg(2, L, N),
              (   N=[O|_]
              ->  setarg(4, O, L)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_;/2___2'(K, A),
        arg(2, D, P),
        setarg(2, D, active),
        ( arg(4, D, Q),
          R is Q+1,
          setarg(4, D, R)
        ),
        (   P==not_stored_yet
        ->  D=suspension(_, _, _, _, _, S),
            term_variables(S, T),
            'chr none_locked'(T),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',
                      U),
            V=[D|U],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',
                     V),
            (   U=[W|_]
            ->  setarg(5, W, V)
            ;   true
            ),
            'attach_known/1_1_$special_atom/1___1'(T, D)
        ;   true
        ),
        known(F),
        (   D=suspension(_, active, _, R, _, _)
        ->  setarg(2, D, inactive),
            'known/1_1_$special_atom/1___1__1__0__7'(B, C, D)
        ;   true
        )
    ;   'known/1_1_$special_atom/1___1__1__0__7'(B, C, D)
    ).
'known/1_1_$special_atom/1___1__1'(A, B) :-
    'known/1_1_$special_atom/1___1__2'(A, B).
'known/1_1_$special_atom/1___1__2'(A, B) :-
    (   'chr newvia_1'(A, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, E, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  E)
    ),
    !,
    'known/1_1_$special_atom/1___1__2__0__8'(E, A, B).
'known/1_1_$special_atom/1___1__2__0__8'([], A, B) :-
    'known/1_1_$special_atom/1___1__3'(A, B).
'known/1_1_$special_atom/1___1__2__0__8'([A|B], C, D) :-
    (   A=suspension(_, active, _, _, E, F),
        nonvar(E),
        E=(G, _),
        nonvar(G),
        G=(\+H),
        nonvar(H),
        H=atom(I),
        I==C
    ->  A=suspension(_, _, _, _, J, K),
        setarg(2, A, removed),
        term_variables(term(J, K), L),
        ( arg(4, A, M),
          (   var(M)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                        N),
              N=[_|O],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                       O),
              (   O=[P|_]
              ->  setarg(4, P, _)
              ;   true
              )
          ;   M=[_, _|O],
              setarg(2, M, O),
              (   O=[P|_]
              ->  setarg(4, P, M)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_;/2___2'(L, A),
        arg(2, D, Q),
        setarg(2, D, active),
        ( arg(4, D, R),
          S is R+1,
          setarg(4, D, S)
        ),
        (   Q==not_stored_yet
        ->  D=suspension(_, _, _, _, _, T),
            term_variables(T, U),
            'chr none_locked'(U),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',
                      V),
            W=[D|V],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',
                     W),
            (   V=[X|_]
            ->  setarg(5, X, W)
            ;   true
            ),
            'attach_known/1_1_$special_atom/1___1'(U, D)
        ;   true
        ),
        known(F),
        (   D=suspension(_, active, _, S, _, _)
        ->  setarg(2, D, inactive),
            'known/1_1_$special_atom/1___1__2__0__8'(B, C, D)
        ;   true
        )
    ;   'known/1_1_$special_atom/1___1__2__0__8'(B, C, D)
    ).
'known/1_1_$special_atom/1___1__2'(A, B) :-
    'known/1_1_$special_atom/1___1__3'(A, B).
'known/1_1_$special_atom/1___1__3'(_, A) :-
    arg(2, A, B),
    setarg(2, A, active),
    arg(4, A, C),
    D is C+1,
    setarg(4, A, D),
    (   B==not_stored_yet
    ->  A=suspension(_, _, _, _, _, E),
        term_variables(E, F),
        'chr none_locked'(F),
        nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',
                  G),
        H=[A|G],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',
                 H),
        (   G=[I|_]
        ->  setarg(5, I, H)
        ;   true
        ),
        'attach_known/1_1_$special_atom/1___1'(F, A)
    ;   true
    ).
'known/1_1_$special_atomic/1'(A) :-
    'known/1_1_$special_atomic/1___1__0'(A, _).
'known/1_1_$special_atomic/1___1__0'(A, B) :-
    (   'chr newvia_1'(A, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, _, _, _, _, E, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',
                  E)
    ),
    member(F, E),
    F=suspension(_, active, _, _, _, G),
    G==A,
    !,
    (   var(B)
    ->  true
    ;   B=suspension(_, H, _, _, _, I),
        setarg(2, B, removed),
        (   H==not_stored_yet
        ->  J=[]
        ;   term_variables(I, J),
            arg(5, B, K),
            (   var(K)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',
                          L),
                L=[_|M],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',
                         M),
                (   M=[N|_]
                ->  setarg(5, N, _)
                ;   true
                )
            ;   K=[_, _|M],
                setarg(2, K, M),
                (   M=[N|_]
                ->  setarg(5, N, K)
                ;   true
                )
            ),
            'detach_known/1_1_$special_atomic/1___1'(J, B)
        )
    ).
'known/1_1_$special_atomic/1___1__0'(_, A) :-
    nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',
              B),
    member(C, B),
    C=suspension(_, active, _),
    !,
    (   var(A)
    ->  true
    ;   A=suspension(_, D, _, _, _, E),
        setarg(2, A, removed),
        (   D==not_stored_yet
        ->  F=[]
        ;   term_variables(E, F),
            arg(5, A, G),
            (   var(G)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',
                          H),
                H=[_|I],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',
                         I),
                (   I=[J|_]
                ->  setarg(5, J, _)
                ;   true
                )
            ;   G=[_, _|I],
                setarg(2, G, I),
                (   I=[J|_]
                ->  setarg(5, J, G)
                ;   true
                )
            ),
            'detach_known/1_1_$special_atomic/1___1'(F, A)
        )
    ).
'known/1_1_$special_atomic/1___1__0'(A, B) :-
    (   'chr newvia_1'(A, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, E, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                  E)
    ),
    member(F, E),
    F=suspension(_, active, _, _, G),
    nonvar(G),
    G=atomic(H),
    H==A,
    !,
    F=suspension(_, _, _, _, I),
    setarg(2, F, removed),
    term_variables(I, J),
    arg(4, F, K),
    (   var(K)
    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                  L),
        L=[_|M],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                 M),
        (   M=[N|_]
        ->  setarg(4, N, _)
        ;   true
        )
    ;   K=[_, _|M],
        setarg(2, K, M),
        (   M=[N|_]
        ->  setarg(4, N, K)
        ;   true
        )
    ),
    'detach_known/1_1_$special_\\+/1___1'(J, F),
    (   var(B)
    ->  true
    ;   B=suspension(_, O, _, _, _, P),
        setarg(2, B, removed),
        (   O==not_stored_yet
        ->  Q=[]
        ;   term_variables(P, Q),
            arg(5, B, R),
            (   var(R)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',
                          S),
                S=[_|T],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',
                         T),
                (   T=[U|_]
                ->  setarg(5, U, _)
                ;   true
                )
            ;   R=[_, _|T],
                setarg(2, R, T),
                (   T=[U|_]
                ->  setarg(5, U, R)
                ;   true
                )
            ),
            'detach_known/1_1_$special_atomic/1___1'(Q, B)
        )
    ),
    'known/1_1_$special_fail/0'.
'known/1_1_$special_atomic/1___1__0'(A, B) :-
    (   var(B)
    ->  B=suspension(C, not_stored_yet, t, 0, _, A),
        'chr gen_id'(C)
    ;   true
    ),
    (   '$novel_production'(B, 237),
        !,
        '$extend_history'(B, 237),
        arg(2, B, D),
        setarg(2, B, active),
        arg(4, B, E),
        F is E+1,
        setarg(4, B, F),
        (   D==not_stored_yet
        ->  B=suspension(_, _, _, _, _, G),
            term_variables(G, H),
            'chr none_locked'(H),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',
                      I),
            J=[B|I],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',
                     J),
            (   I=[K|_]
            ->  setarg(5, K, J)
            ;   true
            ),
            'attach_known/1_1_$special_atomic/1___1'(H, B)
        ;   true
        ),
        'known/1_1_$special_nonvar/1'(A),
        (   B=suspension(_, active, _, F, _, _)
        ->  setarg(2, B, inactive),
            'known/1_1_$special_atomic/1___1__1'(A, B)
        ;   true
        )
    ;   'known/1_1_$special_atomic/1___1__1'(A, B)
    ).
'known/1_1_$special_atomic/1___1__1'(A, B) :-
    (   'chr newvia_1'(A, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, E, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  E)
    ),
    !,
    'known/1_1_$special_atomic/1___1__1__0__7'(E, A, B).
'known/1_1_$special_atomic/1___1__1__0__7'([], A, B) :-
    'known/1_1_$special_atomic/1___1__2'(A, B).
'known/1_1_$special_atomic/1___1__1__0__7'([A|B], C, D) :-
    (   A=suspension(_, active, _, _, E, F),
        nonvar(E),
        E=(\+G),
        nonvar(G),
        G=atomic(H),
        H==C
    ->  A=suspension(_, _, _, _, I, J),
        setarg(2, A, removed),
        term_variables(term(I, J), K),
        ( arg(4, A, L),
          (   var(L)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                        M),
              M=[_|N],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                       N),
              (   N=[O|_]
              ->  setarg(4, O, _)
              ;   true
              )
          ;   L=[_, _|N],
              setarg(2, L, N),
              (   N=[O|_]
              ->  setarg(4, O, L)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_;/2___2'(K, A),
        arg(2, D, P),
        setarg(2, D, active),
        ( arg(4, D, Q),
          R is Q+1,
          setarg(4, D, R)
        ),
        (   P==not_stored_yet
        ->  D=suspension(_, _, _, _, _, S),
            term_variables(S, T),
            'chr none_locked'(T),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',
                      U),
            V=[D|U],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',
                     V),
            (   U=[W|_]
            ->  setarg(5, W, V)
            ;   true
            ),
            'attach_known/1_1_$special_atomic/1___1'(T, D)
        ;   true
        ),
        known(F),
        (   D=suspension(_, active, _, R, _, _)
        ->  setarg(2, D, inactive),
            'known/1_1_$special_atomic/1___1__1__0__7'(B, C, D)
        ;   true
        )
    ;   'known/1_1_$special_atomic/1___1__1__0__7'(B, C, D)
    ).
'known/1_1_$special_atomic/1___1__1'(A, B) :-
    'known/1_1_$special_atomic/1___1__2'(A, B).
'known/1_1_$special_atomic/1___1__2'(A, B) :-
    (   'chr newvia_1'(A, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, E, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  E)
    ),
    !,
    'known/1_1_$special_atomic/1___1__2__0__8'(E, A, B).
'known/1_1_$special_atomic/1___1__2__0__8'([], A, B) :-
    'known/1_1_$special_atomic/1___1__3'(A, B).
'known/1_1_$special_atomic/1___1__2__0__8'([A|B], C, D) :-
    (   A=suspension(_, active, _, _, E, F),
        nonvar(E),
        E=(G, _),
        nonvar(G),
        G=(\+H),
        nonvar(H),
        H=atomic(I),
        I==C
    ->  A=suspension(_, _, _, _, J, K),
        setarg(2, A, removed),
        term_variables(term(J, K), L),
        ( arg(4, A, M),
          (   var(M)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                        N),
              N=[_|O],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                       O),
              (   O=[P|_]
              ->  setarg(4, P, _)
              ;   true
              )
          ;   M=[_, _|O],
              setarg(2, M, O),
              (   O=[P|_]
              ->  setarg(4, P, M)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_;/2___2'(L, A),
        arg(2, D, Q),
        setarg(2, D, active),
        ( arg(4, D, R),
          S is R+1,
          setarg(4, D, S)
        ),
        (   Q==not_stored_yet
        ->  D=suspension(_, _, _, _, _, T),
            term_variables(T, U),
            'chr none_locked'(U),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',
                      V),
            W=[D|V],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',
                     W),
            (   V=[X|_]
            ->  setarg(5, X, W)
            ;   true
            ),
            'attach_known/1_1_$special_atomic/1___1'(U, D)
        ;   true
        ),
        known(F),
        (   D=suspension(_, active, _, S, _, _)
        ->  setarg(2, D, inactive),
            'known/1_1_$special_atomic/1___1__2__0__8'(B, C, D)
        ;   true
        )
    ;   'known/1_1_$special_atomic/1___1__2__0__8'(B, C, D)
    ).
'known/1_1_$special_atomic/1___1__2'(A, B) :-
    'known/1_1_$special_atomic/1___1__3'(A, B).
'known/1_1_$special_atomic/1___1__3'(_, A) :-
    arg(2, A, B),
    setarg(2, A, active),
    arg(4, A, C),
    D is C+1,
    setarg(4, A, D),
    (   B==not_stored_yet
    ->  A=suspension(_, _, _, _, _, E),
        term_variables(E, F),
        'chr none_locked'(F),
        nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',
                  G),
        H=[A|G],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',
                 H),
        (   G=[I|_]
        ->  setarg(5, I, H)
        ;   true
        ),
        'attach_known/1_1_$special_atomic/1___1'(F, A)
    ;   true
    ).
'known/1_1_$special_compound/1'(A) :-
    'known/1_1_$special_compound/1___1__0'(A, _).
'known/1_1_$special_compound/1___1__0'(A, B) :-
    (   'chr newvia_1'(A, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, _, _, _, _, _, E, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',
                  E)
    ),
    member(F, E),
    F=suspension(_, active, _, _, _, G),
    G==A,
    !,
    (   var(B)
    ->  true
    ;   B=suspension(_, H, _, _, _, I),
        setarg(2, B, removed),
        (   H==not_stored_yet
        ->  J=[]
        ;   term_variables(I, J),
            arg(5, B, K),
            (   var(K)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',
                          L),
                L=[_|M],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',
                         M),
                (   M=[N|_]
                ->  setarg(5, N, _)
                ;   true
                )
            ;   K=[_, _|M],
                setarg(2, K, M),
                (   M=[N|_]
                ->  setarg(5, N, K)
                ;   true
                )
            ),
            'detach_known/1_1_$special_compound/1___1'(J, B)
        )
    ).
'known/1_1_$special_compound/1___1__0'(_, A) :-
    nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',
              B),
    member(C, B),
    C=suspension(_, active, _),
    !,
    (   var(A)
    ->  true
    ;   A=suspension(_, D, _, _, _, E),
        setarg(2, A, removed),
        (   D==not_stored_yet
        ->  F=[]
        ;   term_variables(E, F),
            arg(5, A, G),
            (   var(G)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',
                          H),
                H=[_|I],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',
                         I),
                (   I=[J|_]
                ->  setarg(5, J, _)
                ;   true
                )
            ;   G=[_, _|I],
                setarg(2, G, I),
                (   I=[J|_]
                ->  setarg(5, J, G)
                ;   true
                )
            ),
            'detach_known/1_1_$special_compound/1___1'(F, A)
        )
    ).
'known/1_1_$special_compound/1___1__0'(A, B) :-
    (   'chr newvia_1'(A, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, E, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                  E)
    ),
    member(F, E),
    F=suspension(_, active, _, _, G),
    nonvar(G),
    G=compound(H),
    H==A,
    !,
    F=suspension(_, _, _, _, I),
    setarg(2, F, removed),
    term_variables(I, J),
    arg(4, F, K),
    (   var(K)
    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                  L),
        L=[_|M],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                 M),
        (   M=[N|_]
        ->  setarg(4, N, _)
        ;   true
        )
    ;   K=[_, _|M],
        setarg(2, K, M),
        (   M=[N|_]
        ->  setarg(4, N, K)
        ;   true
        )
    ),
    'detach_known/1_1_$special_\\+/1___1'(J, F),
    (   var(B)
    ->  true
    ;   B=suspension(_, O, _, _, _, P),
        setarg(2, B, removed),
        (   O==not_stored_yet
        ->  Q=[]
        ;   term_variables(P, Q),
            arg(5, B, R),
            (   var(R)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',
                          S),
                S=[_|T],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',
                         T),
                (   T=[U|_]
                ->  setarg(5, U, _)
                ;   true
                )
            ;   R=[_, _|T],
                setarg(2, R, T),
                (   T=[U|_]
                ->  setarg(5, U, R)
                ;   true
                )
            ),
            'detach_known/1_1_$special_compound/1___1'(Q, B)
        )
    ),
    'known/1_1_$special_fail/0'.
'known/1_1_$special_compound/1___1__0'(A, B) :-
    (   var(B)
    ->  B=suspension(C, not_stored_yet, t, 0, _, A),
        'chr gen_id'(C)
    ;   true
    ),
    (   '$novel_production'(B, 236),
        !,
        '$extend_history'(B, 236),
        arg(2, B, D),
        setarg(2, B, active),
        arg(4, B, E),
        F is E+1,
        setarg(4, B, F),
        (   D==not_stored_yet
        ->  B=suspension(_, _, _, _, _, G),
            term_variables(G, H),
            'chr none_locked'(H),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',
                      I),
            J=[B|I],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',
                     J),
            (   I=[K|_]
            ->  setarg(5, K, J)
            ;   true
            ),
            'attach_known/1_1_$special_compound/1___1'(H, B)
        ;   true
        ),
        'known/1_1_$special_nonvar/1'(A),
        (   B=suspension(_, active, _, F, _, _)
        ->  setarg(2, B, inactive),
            'known/1_1_$special_compound/1___1__1'(A, B)
        ;   true
        )
    ;   'known/1_1_$special_compound/1___1__1'(A, B)
    ).
'known/1_1_$special_compound/1___1__1'(A, B) :-
    (   'chr newvia_1'(A, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, E, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  E)
    ),
    !,
    'known/1_1_$special_compound/1___1__1__0__7'(E, A, B).
'known/1_1_$special_compound/1___1__1__0__7'([], A, B) :-
    'known/1_1_$special_compound/1___1__2'(A, B).
'known/1_1_$special_compound/1___1__1__0__7'([A|B], C, D) :-
    (   A=suspension(_, active, _, _, E, F),
        nonvar(E),
        E=(\+G),
        nonvar(G),
        G=compound(H),
        H==C
    ->  A=suspension(_, _, _, _, I, J),
        setarg(2, A, removed),
        term_variables(term(I, J), K),
        ( arg(4, A, L),
          (   var(L)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                        M),
              M=[_|N],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                       N),
              (   N=[O|_]
              ->  setarg(4, O, _)
              ;   true
              )
          ;   L=[_, _|N],
              setarg(2, L, N),
              (   N=[O|_]
              ->  setarg(4, O, L)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_;/2___2'(K, A),
        arg(2, D, P),
        setarg(2, D, active),
        ( arg(4, D, Q),
          R is Q+1,
          setarg(4, D, R)
        ),
        (   P==not_stored_yet
        ->  D=suspension(_, _, _, _, _, S),
            term_variables(S, T),
            'chr none_locked'(T),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',
                      U),
            V=[D|U],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',
                     V),
            (   U=[W|_]
            ->  setarg(5, W, V)
            ;   true
            ),
            'attach_known/1_1_$special_compound/1___1'(T, D)
        ;   true
        ),
        known(F),
        (   D=suspension(_, active, _, R, _, _)
        ->  setarg(2, D, inactive),
            'known/1_1_$special_compound/1___1__1__0__7'(B,
                                                         C,
                                                         D)
        ;   true
        )
    ;   'known/1_1_$special_compound/1___1__1__0__7'(B, C, D)
    ).
'known/1_1_$special_compound/1___1__1'(A, B) :-
    'known/1_1_$special_compound/1___1__2'(A, B).
'known/1_1_$special_compound/1___1__2'(A, B) :-
    (   'chr newvia_1'(A, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, E, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  E)
    ),
    !,
    'known/1_1_$special_compound/1___1__2__0__8'(E, A, B).
'known/1_1_$special_compound/1___1__2__0__8'([], A, B) :-
    'known/1_1_$special_compound/1___1__3'(A, B).
'known/1_1_$special_compound/1___1__2__0__8'([A|B], C, D) :-
    (   A=suspension(_, active, _, _, E, F),
        nonvar(E),
        E=(G, _),
        nonvar(G),
        G=(\+H),
        nonvar(H),
        H=compound(I),
        I==C
    ->  A=suspension(_, _, _, _, J, K),
        setarg(2, A, removed),
        term_variables(term(J, K), L),
        ( arg(4, A, M),
          (   var(M)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                        N),
              N=[_|O],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                       O),
              (   O=[P|_]
              ->  setarg(4, P, _)
              ;   true
              )
          ;   M=[_, _|O],
              setarg(2, M, O),
              (   O=[P|_]
              ->  setarg(4, P, M)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_;/2___2'(L, A),
        arg(2, D, Q),
        setarg(2, D, active),
        ( arg(4, D, R),
          S is R+1,
          setarg(4, D, S)
        ),
        (   Q==not_stored_yet
        ->  D=suspension(_, _, _, _, _, T),
            term_variables(T, U),
            'chr none_locked'(U),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',
                      V),
            W=[D|V],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',
                     W),
            (   V=[X|_]
            ->  setarg(5, X, W)
            ;   true
            ),
            'attach_known/1_1_$special_compound/1___1'(U, D)
        ;   true
        ),
        known(F),
        (   D=suspension(_, active, _, S, _, _)
        ->  setarg(2, D, inactive),
            'known/1_1_$special_compound/1___1__2__0__8'(B,
                                                         C,
                                                         D)
        ;   true
        )
    ;   'known/1_1_$special_compound/1___1__2__0__8'(B, C, D)
    ).
'known/1_1_$special_compound/1___1__2'(A, B) :-
    'known/1_1_$special_compound/1___1__3'(A, B).
'known/1_1_$special_compound/1___1__3'(_, A) :-
    arg(2, A, B),
    setarg(2, A, active),
    arg(4, A, C),
    D is C+1,
    setarg(4, A, D),
    (   B==not_stored_yet
    ->  A=suspension(_, _, _, _, _, E),
        term_variables(E, F),
        'chr none_locked'(F),
        nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',
                  G),
        H=[A|G],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',
                 H),
        (   G=[I|_]
        ->  setarg(5, I, H)
        ;   true
        ),
        'attach_known/1_1_$special_compound/1___1'(F, A)
    ;   true
    ).
'known/1_1_$special_ground/1'(A) :-
    'known/1_1_$special_ground/1___1__0'(A, _).
'known/1_1_$special_ground/1___1__0'(A, B) :-
    (   'chr newvia_1'(A, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, _, _, _, _, _, _, E, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',
                  E)
    ),
    member(F, E),
    F=suspension(_, active, _, _, _, G),
    G==A,
    !,
    (   var(B)
    ->  true
    ;   B=suspension(_, H, _, _, _, I),
        setarg(2, B, removed),
        (   H==not_stored_yet
        ->  J=[]
        ;   term_variables(I, J),
            arg(5, B, K),
            (   var(K)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',
                          L),
                L=[_|M],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',
                         M),
                (   M=[N|_]
                ->  setarg(5, N, _)
                ;   true
                )
            ;   K=[_, _|M],
                setarg(2, K, M),
                (   M=[N|_]
                ->  setarg(5, N, K)
                ;   true
                )
            ),
            'detach_known/1_1_$special_ground/1___1'(J, B)
        )
    ).
'known/1_1_$special_ground/1___1__0'(_, A) :-
    nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',
              B),
    member(C, B),
    C=suspension(_, active, _),
    !,
    (   var(A)
    ->  true
    ;   A=suspension(_, D, _, _, _, E),
        setarg(2, A, removed),
        (   D==not_stored_yet
        ->  F=[]
        ;   term_variables(E, F),
            arg(5, A, G),
            (   var(G)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',
                          H),
                H=[_|I],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',
                         I),
                (   I=[J|_]
                ->  setarg(5, J, _)
                ;   true
                )
            ;   G=[_, _|I],
                setarg(2, G, I),
                (   I=[J|_]
                ->  setarg(5, J, G)
                ;   true
                )
            ),
            'detach_known/1_1_$special_ground/1___1'(F, A)
        )
    ).
'known/1_1_$special_ground/1___1__0'(A, B) :-
    (   'chr newvia_1'(A, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, E, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                  E)
    ),
    member(F, E),
    F=suspension(_, active, _, _, G),
    nonvar(G),
    G=ground(H),
    H==A,
    !,
    F=suspension(_, _, _, _, I),
    setarg(2, F, removed),
    term_variables(I, J),
    arg(4, F, K),
    (   var(K)
    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                  L),
        L=[_|M],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                 M),
        (   M=[N|_]
        ->  setarg(4, N, _)
        ;   true
        )
    ;   K=[_, _|M],
        setarg(2, K, M),
        (   M=[N|_]
        ->  setarg(4, N, K)
        ;   true
        )
    ),
    'detach_known/1_1_$special_\\+/1___1'(J, F),
    (   var(B)
    ->  true
    ;   B=suspension(_, O, _, _, _, P),
        setarg(2, B, removed),
        (   O==not_stored_yet
        ->  Q=[]
        ;   term_variables(P, Q),
            arg(5, B, R),
            (   var(R)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',
                          S),
                S=[_|T],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',
                         T),
                (   T=[U|_]
                ->  setarg(5, U, _)
                ;   true
                )
            ;   R=[_, _|T],
                setarg(2, R, T),
                (   T=[U|_]
                ->  setarg(5, U, R)
                ;   true
                )
            ),
            'detach_known/1_1_$special_ground/1___1'(Q, B)
        )
    ),
    'known/1_1_$special_fail/0'.
'known/1_1_$special_ground/1___1__0'(A, B) :-
    (   var(B)
    ->  B=suspension(C, not_stored_yet, t, 0, _, A),
        'chr gen_id'(C)
    ;   true
    ),
    (   '$novel_production'(B, 235),
        !,
        '$extend_history'(B, 235),
        arg(2, B, D),
        setarg(2, B, active),
        arg(4, B, E),
        F is E+1,
        setarg(4, B, F),
        (   D==not_stored_yet
        ->  B=suspension(_, _, _, _, _, G),
            term_variables(G, H),
            'chr none_locked'(H),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',
                      I),
            J=[B|I],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',
                     J),
            (   I=[K|_]
            ->  setarg(5, K, J)
            ;   true
            ),
            'attach_known/1_1_$special_ground/1___1'(H, B)
        ;   true
        ),
        'known/1_1_$special_nonvar/1'(A),
        (   B=suspension(_, active, _, F, _, _)
        ->  setarg(2, B, inactive),
            'known/1_1_$special_ground/1___1__1'(A, B)
        ;   true
        )
    ;   'known/1_1_$special_ground/1___1__1'(A, B)
    ).
'known/1_1_$special_ground/1___1__1'(A, B) :-
    (   'chr newvia_1'(A, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, E, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  E)
    ),
    !,
    'known/1_1_$special_ground/1___1__1__0__7'(E, A, B).
'known/1_1_$special_ground/1___1__1__0__7'([], A, B) :-
    'known/1_1_$special_ground/1___1__2'(A, B).
'known/1_1_$special_ground/1___1__1__0__7'([A|B], C, D) :-
    (   A=suspension(_, active, _, _, E, F),
        nonvar(E),
        E=(\+G),
        nonvar(G),
        G=ground(H),
        H==C
    ->  A=suspension(_, _, _, _, I, J),
        setarg(2, A, removed),
        term_variables(term(I, J), K),
        ( arg(4, A, L),
          (   var(L)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                        M),
              M=[_|N],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                       N),
              (   N=[O|_]
              ->  setarg(4, O, _)
              ;   true
              )
          ;   L=[_, _|N],
              setarg(2, L, N),
              (   N=[O|_]
              ->  setarg(4, O, L)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_;/2___2'(K, A),
        arg(2, D, P),
        setarg(2, D, active),
        ( arg(4, D, Q),
          R is Q+1,
          setarg(4, D, R)
        ),
        (   P==not_stored_yet
        ->  D=suspension(_, _, _, _, _, S),
            term_variables(S, T),
            'chr none_locked'(T),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',
                      U),
            V=[D|U],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',
                     V),
            (   U=[W|_]
            ->  setarg(5, W, V)
            ;   true
            ),
            'attach_known/1_1_$special_ground/1___1'(T, D)
        ;   true
        ),
        known(F),
        (   D=suspension(_, active, _, R, _, _)
        ->  setarg(2, D, inactive),
            'known/1_1_$special_ground/1___1__1__0__7'(B, C, D)
        ;   true
        )
    ;   'known/1_1_$special_ground/1___1__1__0__7'(B, C, D)
    ).
'known/1_1_$special_ground/1___1__1'(A, B) :-
    'known/1_1_$special_ground/1___1__2'(A, B).
'known/1_1_$special_ground/1___1__2'(A, B) :-
    (   'chr newvia_1'(A, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, E, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  E)
    ),
    !,
    'known/1_1_$special_ground/1___1__2__0__8'(E, A, B).
'known/1_1_$special_ground/1___1__2__0__8'([], A, B) :-
    'known/1_1_$special_ground/1___1__3'(A, B).
'known/1_1_$special_ground/1___1__2__0__8'([A|B], C, D) :-
    (   A=suspension(_, active, _, _, E, F),
        nonvar(E),
        E=(G, _),
        nonvar(G),
        G=(\+H),
        nonvar(H),
        H=ground(I),
        I==C
    ->  A=suspension(_, _, _, _, J, K),
        setarg(2, A, removed),
        term_variables(term(J, K), L),
        ( arg(4, A, M),
          (   var(M)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                        N),
              N=[_|O],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                       O),
              (   O=[P|_]
              ->  setarg(4, P, _)
              ;   true
              )
          ;   M=[_, _|O],
              setarg(2, M, O),
              (   O=[P|_]
              ->  setarg(4, P, M)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_;/2___2'(L, A),
        arg(2, D, Q),
        setarg(2, D, active),
        ( arg(4, D, R),
          S is R+1,
          setarg(4, D, S)
        ),
        (   Q==not_stored_yet
        ->  D=suspension(_, _, _, _, _, T),
            term_variables(T, U),
            'chr none_locked'(U),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',
                      V),
            W=[D|V],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',
                     W),
            (   V=[X|_]
            ->  setarg(5, X, W)
            ;   true
            ),
            'attach_known/1_1_$special_ground/1___1'(U, D)
        ;   true
        ),
        known(F),
        (   D=suspension(_, active, _, S, _, _)
        ->  setarg(2, D, inactive),
            'known/1_1_$special_ground/1___1__2__0__8'(B, C, D)
        ;   true
        )
    ;   'known/1_1_$special_ground/1___1__2__0__8'(B, C, D)
    ).
'known/1_1_$special_ground/1___1__2'(A, B) :-
    'known/1_1_$special_ground/1___1__3'(A, B).
'known/1_1_$special_ground/1___1__3'(_, A) :-
    arg(2, A, B),
    setarg(2, A, active),
    arg(4, A, C),
    D is C+1,
    setarg(4, A, D),
    (   B==not_stored_yet
    ->  A=suspension(_, _, _, _, _, E),
        term_variables(E, F),
        'chr none_locked'(F),
        nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',
                  G),
        H=[A|G],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',
                 H),
        (   G=[I|_]
        ->  setarg(5, I, H)
        ;   true
        ),
        'attach_known/1_1_$special_ground/1___1'(F, A)
    ;   true
    ).
'known/1_1_$special_integer/1'(A) :-
    'known/1_1_$special_integer/1___1__0'(A, _).
'known/1_1_$special_integer/1___1__0'(A, B) :-
    (   'chr newvia_1'(A, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, _, _, _, _, _, _, _, E, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',
                  E)
    ),
    member(F, E),
    F=suspension(_, active, _, _, _, G),
    G==A,
    !,
    (   var(B)
    ->  true
    ;   B=suspension(_, H, _, _, _, I),
        setarg(2, B, removed),
        (   H==not_stored_yet
        ->  J=[]
        ;   term_variables(I, J),
            arg(5, B, K),
            (   var(K)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',
                          L),
                L=[_|M],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',
                         M),
                (   M=[N|_]
                ->  setarg(5, N, _)
                ;   true
                )
            ;   K=[_, _|M],
                setarg(2, K, M),
                (   M=[N|_]
                ->  setarg(5, N, K)
                ;   true
                )
            ),
            'detach_known/1_1_$special_integer/1___1'(J, B)
        )
    ).
'known/1_1_$special_integer/1___1__0'(_, A) :-
    nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',
              B),
    member(C, B),
    C=suspension(_, active, _),
    !,
    (   var(A)
    ->  true
    ;   A=suspension(_, D, _, _, _, E),
        setarg(2, A, removed),
        (   D==not_stored_yet
        ->  F=[]
        ;   term_variables(E, F),
            arg(5, A, G),
            (   var(G)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',
                          H),
                H=[_|I],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',
                         I),
                (   I=[J|_]
                ->  setarg(5, J, _)
                ;   true
                )
            ;   G=[_, _|I],
                setarg(2, G, I),
                (   I=[J|_]
                ->  setarg(5, J, G)
                ;   true
                )
            ),
            'detach_known/1_1_$special_integer/1___1'(F, A)
        )
    ).
'known/1_1_$special_integer/1___1__0'(A, B) :-
    nonvar(A),
    \+ integer(A),
    !,
    (   var(B)
    ->  true
    ;   B=suspension(_, C, _, _, _, D),
        setarg(2, B, removed),
        (   C==not_stored_yet
        ->  E=[]
        ;   term_variables(D, E),
            arg(5, B, F),
            (   var(F)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',
                          G),
                G=[_|H],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',
                         H),
                (   H=[I|_]
                ->  setarg(5, I, _)
                ;   true
                )
            ;   F=[_, _|H],
                setarg(2, F, H),
                (   H=[I|_]
                ->  setarg(5, I, F)
                ;   true
                )
            ),
            'detach_known/1_1_$special_integer/1___1'(E, B)
        )
    ),
    'known/1_1_$special_fail/0'.
'known/1_1_$special_integer/1___1__0'(A, B) :-
    (   var(B)
    ->  B=suspension(C, not_stored_yet, t, 0, _, A),
        'chr gen_id'(C)
    ;   true
    ),
    (   '$novel_production'(B, 199),
        !,
        '$extend_history'(B, 199),
        arg(2, B, D),
        setarg(2, B, active),
        arg(4, B, E),
        F is E+1,
        setarg(4, B, F),
        (   D==not_stored_yet
        ->  B=suspension(_, _, _, _, _, G),
            term_variables(G, H),
            'chr none_locked'(H),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',
                      I),
            J=[B|I],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',
                     J),
            (   I=[K|_]
            ->  setarg(5, K, J)
            ;   true
            ),
            'attach_known/1_1_$special_integer/1___1'(H, B)
        ;   true
        ),
        'known/1_1_$special_number/1'(A),
        (   B=suspension(_, active, _, F, _, _)
        ->  setarg(2, B, inactive),
            'known/1_1_$special_integer/1___1__1'(A, B)
        ;   true
        )
    ;   'known/1_1_$special_integer/1___1__1'(A, B)
    ).
'known/1_1_$special_integer/1___1__1'(A, B) :-
    (   'chr newvia_1'(A, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, E, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                  E)
    ),
    member(F, E),
    F=suspension(_, active, _, _, G),
    nonvar(G),
    G=integer(H),
    H==A,
    !,
    F=suspension(_, _, _, _, I),
    setarg(2, F, removed),
    term_variables(I, J),
    arg(4, F, K),
    (   var(K)
    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                  L),
        L=[_|M],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                 M),
        (   M=[N|_]
        ->  setarg(4, N, _)
        ;   true
        )
    ;   K=[_, _|M],
        setarg(2, K, M),
        (   M=[N|_]
        ->  setarg(4, N, K)
        ;   true
        )
    ),
    'detach_known/1_1_$special_\\+/1___1'(J, F),
    (   var(B)
    ->  true
    ;   B=suspension(_, O, _, _, _, P),
        setarg(2, B, removed),
        (   O==not_stored_yet
        ->  Q=[]
        ;   term_variables(P, Q),
            arg(5, B, R),
            (   var(R)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',
                          S),
                S=[_|T],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',
                         T),
                (   T=[U|_]
                ->  setarg(5, U, _)
                ;   true
                )
            ;   R=[_, _|T],
                setarg(2, R, T),
                (   T=[U|_]
                ->  setarg(5, U, R)
                ;   true
                )
            ),
            'detach_known/1_1_$special_integer/1___1'(Q, B)
        )
    ),
    'known/1_1_$special_fail/0'.
'known/1_1_$special_integer/1___1__1'(A, B) :-
    (   'chr newvia_1'(A, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, E, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  E)
    ),
    !,
    'known/1_1_$special_integer/1___1__1__0__8'(E, A, B).
'known/1_1_$special_integer/1___1__1__0__8'([], A, B) :-
    'known/1_1_$special_integer/1___1__2'(A, B).
'known/1_1_$special_integer/1___1__1__0__8'([A|B], C, D) :-
    (   A=suspension(_, active, _, _, E, F),
        nonvar(E),
        E=(\+G),
        nonvar(G),
        G=integer(H),
        H==C
    ->  A=suspension(_, _, _, _, I, J),
        setarg(2, A, removed),
        term_variables(term(I, J), K),
        ( arg(4, A, L),
          (   var(L)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                        M),
              M=[_|N],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                       N),
              (   N=[O|_]
              ->  setarg(4, O, _)
              ;   true
              )
          ;   L=[_, _|N],
              setarg(2, L, N),
              (   N=[O|_]
              ->  setarg(4, O, L)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_;/2___2'(K, A),
        arg(2, D, P),
        setarg(2, D, active),
        ( arg(4, D, Q),
          R is Q+1,
          setarg(4, D, R)
        ),
        (   P==not_stored_yet
        ->  D=suspension(_, _, _, _, _, S),
            term_variables(S, T),
            'chr none_locked'(T),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',
                      U),
            V=[D|U],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',
                     V),
            (   U=[W|_]
            ->  setarg(5, W, V)
            ;   true
            ),
            'attach_known/1_1_$special_integer/1___1'(T, D)
        ;   true
        ),
        known(F),
        (   D=suspension(_, active, _, R, _, _)
        ->  setarg(2, D, inactive),
            'known/1_1_$special_integer/1___1__1__0__8'(B, C, D)
        ;   true
        )
    ;   'known/1_1_$special_integer/1___1__1__0__8'(B, C, D)
    ).
'known/1_1_$special_integer/1___1__1'(A, B) :-
    'known/1_1_$special_integer/1___1__2'(A, B).
'known/1_1_$special_integer/1___1__2'(A, B) :-
    (   'chr newvia_1'(A, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, E, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  E)
    ),
    !,
    'known/1_1_$special_integer/1___1__2__0__9'(E, A, B).
'known/1_1_$special_integer/1___1__2__0__9'([], A, B) :-
    'known/1_1_$special_integer/1___1__3'(A, B).
'known/1_1_$special_integer/1___1__2__0__9'([A|B], C, D) :-
    (   A=suspension(_, active, _, _, E, F),
        nonvar(E),
        E=(G, _),
        nonvar(G),
        G=(\+H),
        nonvar(H),
        H=integer(I),
        I==C
    ->  A=suspension(_, _, _, _, J, K),
        setarg(2, A, removed),
        term_variables(term(J, K), L),
        ( arg(4, A, M),
          (   var(M)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                        N),
              N=[_|O],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                       O),
              (   O=[P|_]
              ->  setarg(4, P, _)
              ;   true
              )
          ;   M=[_, _|O],
              setarg(2, M, O),
              (   O=[P|_]
              ->  setarg(4, P, M)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_;/2___2'(L, A),
        arg(2, D, Q),
        setarg(2, D, active),
        ( arg(4, D, R),
          S is R+1,
          setarg(4, D, S)
        ),
        (   Q==not_stored_yet
        ->  D=suspension(_, _, _, _, _, T),
            term_variables(T, U),
            'chr none_locked'(U),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',
                      V),
            W=[D|V],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',
                     W),
            (   V=[X|_]
            ->  setarg(5, X, W)
            ;   true
            ),
            'attach_known/1_1_$special_integer/1___1'(U, D)
        ;   true
        ),
        known(F),
        (   D=suspension(_, active, _, S, _, _)
        ->  setarg(2, D, inactive),
            'known/1_1_$special_integer/1___1__2__0__9'(B, C, D)
        ;   true
        )
    ;   'known/1_1_$special_integer/1___1__2__0__9'(B, C, D)
    ).
'known/1_1_$special_integer/1___1__2'(A, B) :-
    'known/1_1_$special_integer/1___1__3'(A, B).
'known/1_1_$special_integer/1___1__3'(_, A) :-
    arg(2, A, B),
    setarg(2, A, active),
    arg(4, A, C),
    D is C+1,
    setarg(4, A, D),
    (   B==not_stored_yet
    ->  A=suspension(_, _, _, _, _, E),
        term_variables(E, F),
        'chr none_locked'(F),
        nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',
                  G),
        H=[A|G],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',
                 H),
        (   G=[I|_]
        ->  setarg(5, I, H)
        ;   true
        ),
        'attach_known/1_1_$special_integer/1___1'(F, A)
    ;   true
    ).
'known/1_1_$special_float/1'(A) :-
    'known/1_1_$special_float/1___1__0'(A, _).
'known/1_1_$special_float/1___1__0'(A, B) :-
    (   'chr newvia_1'(A, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, _, _, _, _, _, _, _, _, E, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',
                  E)
    ),
    member(F, E),
    F=suspension(_, active, _, _, _, G),
    G==A,
    !,
    (   var(B)
    ->  true
    ;   B=suspension(_, H, _, _, _, I),
        setarg(2, B, removed),
        (   H==not_stored_yet
        ->  J=[]
        ;   term_variables(I, J),
            arg(5, B, K),
            (   var(K)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',
                          L),
                L=[_|M],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',
                         M),
                (   M=[N|_]
                ->  setarg(5, N, _)
                ;   true
                )
            ;   K=[_, _|M],
                setarg(2, K, M),
                (   M=[N|_]
                ->  setarg(5, N, K)
                ;   true
                )
            ),
            'detach_known/1_1_$special_float/1___1'(J, B)
        )
    ).
'known/1_1_$special_float/1___1__0'(_, A) :-
    nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',
              B),
    member(C, B),
    C=suspension(_, active, _),
    !,
    (   var(A)
    ->  true
    ;   A=suspension(_, D, _, _, _, E),
        setarg(2, A, removed),
        (   D==not_stored_yet
        ->  F=[]
        ;   term_variables(E, F),
            arg(5, A, G),
            (   var(G)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',
                          H),
                H=[_|I],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',
                         I),
                (   I=[J|_]
                ->  setarg(5, J, _)
                ;   true
                )
            ;   G=[_, _|I],
                setarg(2, G, I),
                (   I=[J|_]
                ->  setarg(5, J, G)
                ;   true
                )
            ),
            'detach_known/1_1_$special_float/1___1'(F, A)
        )
    ).
'known/1_1_$special_float/1___1__0'(A, B) :-
    nonvar(A),
    \+ float(A),
    !,
    (   var(B)
    ->  true
    ;   B=suspension(_, C, _, _, _, D),
        setarg(2, B, removed),
        (   C==not_stored_yet
        ->  E=[]
        ;   term_variables(D, E),
            arg(5, B, F),
            (   var(F)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',
                          G),
                G=[_|H],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',
                         H),
                (   H=[I|_]
                ->  setarg(5, I, _)
                ;   true
                )
            ;   F=[_, _|H],
                setarg(2, F, H),
                (   H=[I|_]
                ->  setarg(5, I, F)
                ;   true
                )
            ),
            'detach_known/1_1_$special_float/1___1'(E, B)
        )
    ),
    'known/1_1_$special_fail/0'.
'known/1_1_$special_float/1___1__0'(A, B) :-
    (   var(B)
    ->  B=suspension(C, not_stored_yet, t, 0, _, A),
        'chr gen_id'(C)
    ;   true
    ),
    (   '$novel_production'(B, 200),
        !,
        '$extend_history'(B, 200),
        arg(2, B, D),
        setarg(2, B, active),
        arg(4, B, E),
        F is E+1,
        setarg(4, B, F),
        (   D==not_stored_yet
        ->  B=suspension(_, _, _, _, _, G),
            term_variables(G, H),
            'chr none_locked'(H),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',
                      I),
            J=[B|I],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',
                     J),
            (   I=[K|_]
            ->  setarg(5, K, J)
            ;   true
            ),
            'attach_known/1_1_$special_float/1___1'(H, B)
        ;   true
        ),
        'known/1_1_$special_number/1'(A),
        (   B=suspension(_, active, _, F, _, _)
        ->  setarg(2, B, inactive),
            'known/1_1_$special_float/1___1__1'(A, B)
        ;   true
        )
    ;   'known/1_1_$special_float/1___1__1'(A, B)
    ).
'known/1_1_$special_float/1___1__1'(A, B) :-
    (   'chr newvia_1'(A, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, E, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                  E)
    ),
    member(F, E),
    F=suspension(_, active, _, _, G),
    nonvar(G),
    G=float(H),
    H==A,
    !,
    F=suspension(_, _, _, _, I),
    setarg(2, F, removed),
    term_variables(I, J),
    arg(4, F, K),
    (   var(K)
    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                  L),
        L=[_|M],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                 M),
        (   M=[N|_]
        ->  setarg(4, N, _)
        ;   true
        )
    ;   K=[_, _|M],
        setarg(2, K, M),
        (   M=[N|_]
        ->  setarg(4, N, K)
        ;   true
        )
    ),
    'detach_known/1_1_$special_\\+/1___1'(J, F),
    (   var(B)
    ->  true
    ;   B=suspension(_, O, _, _, _, P),
        setarg(2, B, removed),
        (   O==not_stored_yet
        ->  Q=[]
        ;   term_variables(P, Q),
            arg(5, B, R),
            (   var(R)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',
                          S),
                S=[_|T],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',
                         T),
                (   T=[U|_]
                ->  setarg(5, U, _)
                ;   true
                )
            ;   R=[_, _|T],
                setarg(2, R, T),
                (   T=[U|_]
                ->  setarg(5, U, R)
                ;   true
                )
            ),
            'detach_known/1_1_$special_float/1___1'(Q, B)
        )
    ),
    'known/1_1_$special_fail/0'.
'known/1_1_$special_float/1___1__1'(A, B) :-
    (   'chr newvia_1'(A, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, E, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  E)
    ),
    !,
    'known/1_1_$special_float/1___1__1__0__8'(E, A, B).
'known/1_1_$special_float/1___1__1__0__8'([], A, B) :-
    'known/1_1_$special_float/1___1__2'(A, B).
'known/1_1_$special_float/1___1__1__0__8'([A|B], C, D) :-
    (   A=suspension(_, active, _, _, E, F),
        nonvar(E),
        E=(\+G),
        nonvar(G),
        G=float(H),
        H==C
    ->  A=suspension(_, _, _, _, I, J),
        setarg(2, A, removed),
        term_variables(term(I, J), K),
        ( arg(4, A, L),
          (   var(L)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                        M),
              M=[_|N],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                       N),
              (   N=[O|_]
              ->  setarg(4, O, _)
              ;   true
              )
          ;   L=[_, _|N],
              setarg(2, L, N),
              (   N=[O|_]
              ->  setarg(4, O, L)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_;/2___2'(K, A),
        arg(2, D, P),
        setarg(2, D, active),
        ( arg(4, D, Q),
          R is Q+1,
          setarg(4, D, R)
        ),
        (   P==not_stored_yet
        ->  D=suspension(_, _, _, _, _, S),
            term_variables(S, T),
            'chr none_locked'(T),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',
                      U),
            V=[D|U],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',
                     V),
            (   U=[W|_]
            ->  setarg(5, W, V)
            ;   true
            ),
            'attach_known/1_1_$special_float/1___1'(T, D)
        ;   true
        ),
        known(F),
        (   D=suspension(_, active, _, R, _, _)
        ->  setarg(2, D, inactive),
            'known/1_1_$special_float/1___1__1__0__8'(B, C, D)
        ;   true
        )
    ;   'known/1_1_$special_float/1___1__1__0__8'(B, C, D)
    ).
'known/1_1_$special_float/1___1__1'(A, B) :-
    'known/1_1_$special_float/1___1__2'(A, B).
'known/1_1_$special_float/1___1__2'(A, B) :-
    (   'chr newvia_1'(A, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, E, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  E)
    ),
    !,
    'known/1_1_$special_float/1___1__2__0__9'(E, A, B).
'known/1_1_$special_float/1___1__2__0__9'([], A, B) :-
    'known/1_1_$special_float/1___1__3'(A, B).
'known/1_1_$special_float/1___1__2__0__9'([A|B], C, D) :-
    (   A=suspension(_, active, _, _, E, F),
        nonvar(E),
        E=(G, _),
        nonvar(G),
        G=(\+H),
        nonvar(H),
        H=float(I),
        I==C
    ->  A=suspension(_, _, _, _, J, K),
        setarg(2, A, removed),
        term_variables(term(J, K), L),
        ( arg(4, A, M),
          (   var(M)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                        N),
              N=[_|O],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                       O),
              (   O=[P|_]
              ->  setarg(4, P, _)
              ;   true
              )
          ;   M=[_, _|O],
              setarg(2, M, O),
              (   O=[P|_]
              ->  setarg(4, P, M)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_;/2___2'(L, A),
        arg(2, D, Q),
        setarg(2, D, active),
        ( arg(4, D, R),
          S is R+1,
          setarg(4, D, S)
        ),
        (   Q==not_stored_yet
        ->  D=suspension(_, _, _, _, _, T),
            term_variables(T, U),
            'chr none_locked'(U),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',
                      V),
            W=[D|V],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',
                     W),
            (   V=[X|_]
            ->  setarg(5, X, W)
            ;   true
            ),
            'attach_known/1_1_$special_float/1___1'(U, D)
        ;   true
        ),
        known(F),
        (   D=suspension(_, active, _, S, _, _)
        ->  setarg(2, D, inactive),
            'known/1_1_$special_float/1___1__2__0__9'(B, C, D)
        ;   true
        )
    ;   'known/1_1_$special_float/1___1__2__0__9'(B, C, D)
    ).
'known/1_1_$special_float/1___1__2'(A, B) :-
    'known/1_1_$special_float/1___1__3'(A, B).
'known/1_1_$special_float/1___1__3'(_, A) :-
    arg(2, A, B),
    setarg(2, A, active),
    arg(4, A, C),
    D is C+1,
    setarg(4, A, D),
    (   B==not_stored_yet
    ->  A=suspension(_, _, _, _, _, E),
        term_variables(E, F),
        'chr none_locked'(F),
        nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',
                  G),
        H=[A|G],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',
                 H),
        (   G=[I|_]
        ->  setarg(5, I, H)
        ;   true
        ),
        'attach_known/1_1_$special_float/1___1'(F, A)
    ;   true
    ).
'known/1_1_$special_number/1'(A) :-
    'known/1_1_$special_number/1___1__0'(A, _).
'known/1_1_$special_number/1___1__0'(A, B) :-
    (   'chr newvia_1'(A, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, _, _, _, _, _, _, _, _, _, E, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',
                  E)
    ),
    member(F, E),
    F=suspension(_, active, _, _, _, G),
    G==A,
    !,
    (   var(B)
    ->  true
    ;   B=suspension(_, H, _, _, _, I),
        setarg(2, B, removed),
        (   H==not_stored_yet
        ->  J=[]
        ;   term_variables(I, J),
            arg(5, B, K),
            (   var(K)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',
                          L),
                L=[_|M],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',
                         M),
                (   M=[N|_]
                ->  setarg(5, N, _)
                ;   true
                )
            ;   K=[_, _|M],
                setarg(2, K, M),
                (   M=[N|_]
                ->  setarg(5, N, K)
                ;   true
                )
            ),
            'detach_known/1_1_$special_number/1___1'(J, B)
        )
    ).
'known/1_1_$special_number/1___1__0'(_, A) :-
    nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',
              B),
    member(C, B),
    C=suspension(_, active, _),
    !,
    (   var(A)
    ->  true
    ;   A=suspension(_, D, _, _, _, E),
        setarg(2, A, removed),
        (   D==not_stored_yet
        ->  F=[]
        ;   term_variables(E, F),
            arg(5, A, G),
            (   var(G)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',
                          H),
                H=[_|I],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',
                         I),
                (   I=[J|_]
                ->  setarg(5, J, _)
                ;   true
                )
            ;   G=[_, _|I],
                setarg(2, G, I),
                (   I=[J|_]
                ->  setarg(5, J, G)
                ;   true
                )
            ),
            'detach_known/1_1_$special_number/1___1'(F, A)
        )
    ).
'known/1_1_$special_number/1___1__0'(A, B) :-
    nonvar(A),
    \+ number(A),
    !,
    (   var(B)
    ->  true
    ;   B=suspension(_, C, _, _, _, D),
        setarg(2, B, removed),
        (   C==not_stored_yet
        ->  E=[]
        ;   term_variables(D, E),
            arg(5, B, F),
            (   var(F)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',
                          G),
                G=[_|H],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',
                         H),
                (   H=[I|_]
                ->  setarg(5, I, _)
                ;   true
                )
            ;   F=[_, _|H],
                setarg(2, F, H),
                (   H=[I|_]
                ->  setarg(5, I, F)
                ;   true
                )
            ),
            'detach_known/1_1_$special_number/1___1'(E, B)
        )
    ),
    'known/1_1_$special_fail/0'.
'known/1_1_$special_number/1___1__0'(A, B) :-
    (   'chr newvia_1'(A, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, E, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                  E)
    ),
    member(F, E),
    F=suspension(_, active, _, _, G),
    nonvar(G),
    G=number(H),
    H==A,
    !,
    F=suspension(_, _, _, _, I),
    setarg(2, F, removed),
    term_variables(I, J),
    arg(4, F, K),
    (   var(K)
    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                  L),
        L=[_|M],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                 M),
        (   M=[N|_]
        ->  setarg(4, N, _)
        ;   true
        )
    ;   K=[_, _|M],
        setarg(2, K, M),
        (   M=[N|_]
        ->  setarg(4, N, K)
        ;   true
        )
    ),
    'detach_known/1_1_$special_\\+/1___1'(J, F),
    (   var(B)
    ->  true
    ;   B=suspension(_, O, _, _, _, P),
        setarg(2, B, removed),
        (   O==not_stored_yet
        ->  Q=[]
        ;   term_variables(P, Q),
            arg(5, B, R),
            (   var(R)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',
                          S),
                S=[_|T],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',
                         T),
                (   T=[U|_]
                ->  setarg(5, U, _)
                ;   true
                )
            ;   R=[_, _|T],
                setarg(2, R, T),
                (   T=[U|_]
                ->  setarg(5, U, R)
                ;   true
                )
            ),
            'detach_known/1_1_$special_number/1___1'(Q, B)
        )
    ),
    'known/1_1_$special_fail/0'.
'known/1_1_$special_number/1___1__0'(A, B) :-
    (   var(B)
    ->  B=suspension(C, not_stored_yet, t, 0, _, A),
        'chr gen_id'(C)
    ;   true
    ),
    (   '$novel_production'(B, 238),
        !,
        '$extend_history'(B, 238),
        arg(2, B, D),
        setarg(2, B, active),
        arg(4, B, E),
        F is E+1,
        setarg(4, B, F),
        (   D==not_stored_yet
        ->  B=suspension(_, _, _, _, _, G),
            term_variables(G, H),
            'chr none_locked'(H),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',
                      I),
            J=[B|I],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',
                     J),
            (   I=[K|_]
            ->  setarg(5, K, J)
            ;   true
            ),
            'attach_known/1_1_$special_number/1___1'(H, B)
        ;   true
        ),
        'known/1_1_$special_nonvar/1'(A),
        (   B=suspension(_, active, _, F, _, _)
        ->  setarg(2, B, inactive),
            'known/1_1_$special_number/1___1__1'(A, B)
        ;   true
        )
    ;   'known/1_1_$special_number/1___1__1'(A, B)
    ).
'known/1_1_$special_number/1___1__1'(A, B) :-
    (   'chr newvia_1'(A, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, E, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  E)
    ),
    !,
    'known/1_1_$special_number/1___1__1__0__8'(E, A, B).
'known/1_1_$special_number/1___1__1__0__8'([], A, B) :-
    'known/1_1_$special_number/1___1__2'(A, B).
'known/1_1_$special_number/1___1__1__0__8'([A|B], C, D) :-
    (   A=suspension(_, active, _, _, E, F),
        nonvar(E),
        E=(\+G),
        nonvar(G),
        G=number(H),
        H==C
    ->  A=suspension(_, _, _, _, I, J),
        setarg(2, A, removed),
        term_variables(term(I, J), K),
        ( arg(4, A, L),
          (   var(L)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                        M),
              M=[_|N],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                       N),
              (   N=[O|_]
              ->  setarg(4, O, _)
              ;   true
              )
          ;   L=[_, _|N],
              setarg(2, L, N),
              (   N=[O|_]
              ->  setarg(4, O, L)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_;/2___2'(K, A),
        arg(2, D, P),
        setarg(2, D, active),
        ( arg(4, D, Q),
          R is Q+1,
          setarg(4, D, R)
        ),
        (   P==not_stored_yet
        ->  D=suspension(_, _, _, _, _, S),
            term_variables(S, T),
            'chr none_locked'(T),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',
                      U),
            V=[D|U],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',
                     V),
            (   U=[W|_]
            ->  setarg(5, W, V)
            ;   true
            ),
            'attach_known/1_1_$special_number/1___1'(T, D)
        ;   true
        ),
        known(F),
        (   D=suspension(_, active, _, R, _, _)
        ->  setarg(2, D, inactive),
            'known/1_1_$special_number/1___1__1__0__8'(B, C, D)
        ;   true
        )
    ;   'known/1_1_$special_number/1___1__1__0__8'(B, C, D)
    ).
'known/1_1_$special_number/1___1__1'(A, B) :-
    'known/1_1_$special_number/1___1__2'(A, B).
'known/1_1_$special_number/1___1__2'(A, B) :-
    (   'chr newvia_1'(A, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, E, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  E)
    ),
    !,
    'known/1_1_$special_number/1___1__2__0__9'(E, A, B).
'known/1_1_$special_number/1___1__2__0__9'([], A, B) :-
    'known/1_1_$special_number/1___1__3'(A, B).
'known/1_1_$special_number/1___1__2__0__9'([A|B], C, D) :-
    (   A=suspension(_, active, _, _, E, F),
        nonvar(E),
        E=(G, _),
        nonvar(G),
        G=(\+H),
        nonvar(H),
        H=number(I),
        I==C
    ->  A=suspension(_, _, _, _, J, K),
        setarg(2, A, removed),
        term_variables(term(J, K), L),
        ( arg(4, A, M),
          (   var(M)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                        N),
              N=[_|O],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                       O),
              (   O=[P|_]
              ->  setarg(4, P, _)
              ;   true
              )
          ;   M=[_, _|O],
              setarg(2, M, O),
              (   O=[P|_]
              ->  setarg(4, P, M)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_;/2___2'(L, A),
        arg(2, D, Q),
        setarg(2, D, active),
        ( arg(4, D, R),
          S is R+1,
          setarg(4, D, S)
        ),
        (   Q==not_stored_yet
        ->  D=suspension(_, _, _, _, _, T),
            term_variables(T, U),
            'chr none_locked'(U),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',
                      V),
            W=[D|V],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',
                     W),
            (   V=[X|_]
            ->  setarg(5, X, W)
            ;   true
            ),
            'attach_known/1_1_$special_number/1___1'(U, D)
        ;   true
        ),
        known(F),
        (   D=suspension(_, active, _, S, _, _)
        ->  setarg(2, D, inactive),
            'known/1_1_$special_number/1___1__2__0__9'(B, C, D)
        ;   true
        )
    ;   'known/1_1_$special_number/1___1__2__0__9'(B, C, D)
    ).
'known/1_1_$special_number/1___1__2'(A, B) :-
    'known/1_1_$special_number/1___1__3'(A, B).
'known/1_1_$special_number/1___1__3'(_, A) :-
    arg(2, A, B),
    setarg(2, A, active),
    arg(4, A, C),
    D is C+1,
    setarg(4, A, D),
    (   B==not_stored_yet
    ->  A=suspension(_, _, _, _, _, E),
        term_variables(E, F),
        'chr none_locked'(F),
        nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',
                  G),
        H=[A|G],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',
                 H),
        (   G=[I|_]
        ->  setarg(5, I, H)
        ;   true
        ),
        'attach_known/1_1_$special_number/1___1'(F, A)
    ;   true
    ).
'known/1_1_$special_=\\=/2'(A, B) :-
    'known/1_1_$special_=\\=/2___2__0'(A, B, _).
'known/1_1_$special_=\\=/2___2__0'(A, B, C) :-
    (   'chr newvia_2'(A, B, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, _, _, _, _, _, _, _, _, _, _, F, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',
                  F)
    ),
    member(G, F),
    G=suspension(_, active, _, _, _, H, I),
    H==A,
    I==B,
    !,
    (   var(C)
    ->  true
    ;   C=suspension(_, J, _, _, _, K, L),
        setarg(2, C, removed),
        (   J==not_stored_yet
        ->  M=[]
        ;   term_variables(term(K, L), M),
            arg(5, C, N),
            (   var(N)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',
                          O),
                O=[_|P],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',
                         P),
                (   P=[Q|_]
                ->  setarg(5, Q, _)
                ;   true
                )
            ;   N=[_, _|P],
                setarg(2, N, P),
                (   P=[Q|_]
                ->  setarg(5, Q, N)
                ;   true
                )
            ),
            'detach_known/1_1_$special_=\\=/2___2'(M, C)
        )
    ).
'known/1_1_$special_=\\=/2___2__0'(_, _, A) :-
    nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',
              B),
    member(C, B),
    C=suspension(_, active, _),
    !,
    (   var(A)
    ->  true
    ;   A=suspension(_, D, _, _, _, E, F),
        setarg(2, A, removed),
        (   D==not_stored_yet
        ->  G=[]
        ;   term_variables(term(E, F), G),
            arg(5, A, H),
            (   var(H)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',
                          I),
                I=[_|J],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',
                         J),
                (   J=[K|_]
                ->  setarg(5, K, _)
                ;   true
                )
            ;   H=[_, _|J],
                setarg(2, H, J),
                (   J=[K|_]
                ->  setarg(5, K, H)
                ;   true
                )
            ),
            'detach_known/1_1_$special_=\\=/2___2'(G, A)
        )
    ).
'known/1_1_$special_=\\=/2___2__0'(A, B, C) :-
    (   'chr newvia_1'(B, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, _, _, _, _, _, _, _, _, _, _, F, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',
                  F)
    ),
    !,
    (   var(C)
    ->  C=suspension(G, not_stored_yet, t, 0, _, A, B),
        'chr gen_id'(G)
    ;   true
    ),
    'known/1_1_$special_=\\=/2___2__0__0__5'(F, A, B, C).
'known/1_1_$special_=\\=/2___2__0__0__5'([], A, B, C) :-
    'known/1_1_$special_=\\=/2___2__1'(A, B, C).
'known/1_1_$special_=\\=/2___2__0__0__5'([A|B], C, D, E) :-
    (   A=suspension(_, active, _, _, _, F, G),
        F==D,
        (   'chr newvia_2'(D, G, H)
        ->  get_attr(H, guard_entailment, I),
            I=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, J, _)
        ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                      J)
        )
    ->  'known/1_1_$special_=\\=/2___2__0__1__5'(J,
                                                 G,
                                                 A,
                                                 B,
                                                 C,
                                                 D,
                                                 E)
    ;   'known/1_1_$special_=\\=/2___2__0__0__5'(B, C, D, E)
    ).
'known/1_1_$special_=\\=/2___2__0__1__5'([], _, _, A, B, C, D) :-
    'known/1_1_$special_=\\=/2___2__0__0__5'(A, B, C, D).
'known/1_1_$special_=\\=/2___2__0__1__5'([A|B], C, D, E, F, G, H) :-
    (   A=suspension(_, active, _, _, _, I, J),
        I==G,
        J==C,
        (   'chr newvia_2'(F, G, K)
        ->  get_attr(K, guard_entailment, L),
            L=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, M, _)
        ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                      M)
        )
    ->  'known/1_1_$special_=\\=/2___2__0__2__5'(M,
                                                 A,
                                                 B,
                                                 C,
                                                 D,
                                                 E,
                                                 F,
                                                 G,
                                                 H)
    ;   'known/1_1_$special_=\\=/2___2__0__1__5'(B,
                                                 C,
                                                 D,
                                                 E,
                                                 F,
                                                 G,
                                                 H)
    ).
'known/1_1_$special_=\\=/2___2__0__2__5'([], _, A, B, C, D, E, F, G) :-
    'known/1_1_$special_=\\=/2___2__0__1__5'(A,
                                             B,
                                             C,
                                             D,
                                             E,
                                             F,
                                             G).
'known/1_1_$special_=\\=/2___2__0__2__5'([A|B], C, D, E, F, G, H, I, J) :-
    (   A=suspension(_, active, _, _, _, K, L),
        A\==C,
        K==H,
        L==I,
        M=t(188, A, J, C, F),
        '$novel_production'(A, M),
        '$novel_production'(J, M),
        '$novel_production'(C, M),
        '$novel_production'(F, M)
    ->  '$extend_history'(J, M),
        arg(2, J, N),
        setarg(2, J, active),
        ( arg(4, J, O),
          P is O+1,
          setarg(4, J, P)
        ),
        (   N==not_stored_yet
        ->  J=suspension(_, _, _, _, _, Q, R),
            term_variables(term(Q, R), S),
            'chr none_locked'(S),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',
                      T),
            U=[J|T],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',
                     U),
            (   T=[V|_]
            ->  setarg(5, V, U)
            ;   true
            ),
            'attach_known/1_1_$special_=\\=/2___2'(S, J)
        ;   true
        ),
        'known/1_1_$special_=\\=/2'(H, E),
        (   J=suspension(_, active, _, P, _, _, _)
        ->  setarg(2, J, inactive),
            'known/1_1_$special_=\\=/2___2__0__2__5'(B,
                                                     C,
                                                     D,
                                                     E,
                                                     F,
                                                     G,
                                                     H,
                                                     I,
                                                     J)
        ;   true
        )
    ;   'known/1_1_$special_=\\=/2___2__0__2__5'(B,
                                                 C,
                                                 D,
                                                 E,
                                                 F,
                                                 G,
                                                 H,
                                                 I,
                                                 J)
    ).
'known/1_1_$special_=\\=/2___2__0'(A, B, C) :-
    (   var(C)
    ->  C=suspension(D, not_stored_yet, t, 0, _, A, B),
        'chr gen_id'(D)
    ;   true
    ),
    'known/1_1_$special_=\\=/2___2__1'(A, B, C).
'known/1_1_$special_=\\=/2___2__1'(A, B, C) :-
    (   'chr newvia_1'(A, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, F, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                  F)
    ),
    !,
    'known/1_1_$special_=\\=/2___2__1__0__6'(F, A, B, C).
'known/1_1_$special_=\\=/2___2__1__0__6'([], A, B, C) :-
    'known/1_1_$special_=\\=/2___2__2'(A, B, C).
'known/1_1_$special_=\\=/2___2__1__0__6'([A|B], C, D, E) :-
    (   A=suspension(_, active, _, _, _, F, G),
        G==C,
        (   'chr newvia_2'(C, D, H)
        ->  get_attr(H, guard_entailment, I),
            I=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, J, _)
        ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                      J)
        )
    ->  'known/1_1_$special_=\\=/2___2__1__1__6'(J,
                                                 F,
                                                 A,
                                                 B,
                                                 C,
                                                 D,
                                                 E)
    ;   'known/1_1_$special_=\\=/2___2__1__0__6'(B, C, D, E)
    ).
'known/1_1_$special_=\\=/2___2__1__1__6'([], _, _, A, B, C, D) :-
    'known/1_1_$special_=\\=/2___2__1__0__6'(A, B, C, D).
'known/1_1_$special_=\\=/2___2__1__1__6'([A|B], C, D, E, F, G, H) :-
    (   A=suspension(_, active, _, _, _, I, J),
        A\==D,
        I==F,
        J==G,
        (   'chr newvia_2'(C, F, K)
        ->  get_attr(K, guard_entailment, L),
            L=v(_, _, _, _, _, _, _, _, _, _, _, _, _, M, _, _, _, _, _, _, _, _)
        ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',
                      M)
        )
    ->  'known/1_1_$special_=\\=/2___2__1__2__6'(M,
                                                 A,
                                                 B,
                                                 C,
                                                 D,
                                                 E,
                                                 F,
                                                 G,
                                                 H)
    ;   'known/1_1_$special_=\\=/2___2__1__1__6'(B,
                                                 C,
                                                 D,
                                                 E,
                                                 F,
                                                 G,
                                                 H)
    ).
'known/1_1_$special_=\\=/2___2__1__2__6'([], _, A, B, C, D, E, F, G) :-
    'known/1_1_$special_=\\=/2___2__1__1__6'(A,
                                             B,
                                             C,
                                             D,
                                             E,
                                             F,
                                             G).
'known/1_1_$special_=\\=/2___2__1__2__6'([A|B], C, D, E, F, G, H, I, J) :-
    (   A=suspension(_, active, _, _, _, K, L),
        K==E,
        L==H,
        M=t(188, F, A, C, J),
        '$novel_production'(F, M),
        '$novel_production'(A, M),
        '$novel_production'(C, M),
        '$novel_production'(J, M)
    ->  '$extend_history'(J, M),
        arg(2, J, N),
        setarg(2, J, active),
        ( arg(4, J, O),
          P is O+1,
          setarg(4, J, P)
        ),
        (   N==not_stored_yet
        ->  J=suspension(_, _, _, _, _, Q, R),
            term_variables(term(Q, R), S),
            'chr none_locked'(S),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',
                      T),
            U=[J|T],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',
                     U),
            (   T=[V|_]
            ->  setarg(5, V, U)
            ;   true
            ),
            'attach_known/1_1_$special_=\\=/2___2'(S, J)
        ;   true
        ),
        'known/1_1_$special_=\\=/2'(E, I),
        (   J=suspension(_, active, _, P, _, _, _)
        ->  setarg(2, J, inactive),
            'known/1_1_$special_=\\=/2___2__1__2__6'(B,
                                                     C,
                                                     D,
                                                     E,
                                                     F,
                                                     G,
                                                     H,
                                                     I,
                                                     J)
        ;   true
        )
    ;   'known/1_1_$special_=\\=/2___2__1__2__6'(B,
                                                 C,
                                                 D,
                                                 E,
                                                 F,
                                                 G,
                                                 H,
                                                 I,
                                                 J)
    ).
'known/1_1_$special_=\\=/2___2__1'(A, B, C) :-
    'known/1_1_$special_=\\=/2___2__2'(A, B, C).
'known/1_1_$special_=\\=/2___2__2'(A, B, C) :-
    number(B),
    number(A),
    A=:=B,
    !,
    (   var(C)
    ->  true
    ;   C=suspension(_, D, _, _, _, E, F),
        setarg(2, C, removed),
        (   D==not_stored_yet
        ->  G=[]
        ;   term_variables(term(E, F), G),
            arg(5, C, H),
            (   var(H)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',
                          I),
                I=[_|J],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',
                         J),
                (   J=[K|_]
                ->  setarg(5, K, _)
                ;   true
                )
            ;   H=[_, _|J],
                setarg(2, H, J),
                (   J=[K|_]
                ->  setarg(5, K, H)
                ;   true
                )
            ),
            'detach_known/1_1_$special_=\\=/2___2'(G, C)
        )
    ),
    'known/1_1_$special_fail/0'.
'known/1_1_$special_=\\=/2___2__2'(A, B, C) :-
    B==A,
    !,
    (   var(C)
    ->  true
    ;   C=suspension(_, D, _, _, _, E, F),
        setarg(2, C, removed),
        (   D==not_stored_yet
        ->  G=[]
        ;   term_variables(term(E, F), G),
            arg(5, C, H),
            (   var(H)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',
                          I),
                I=[_|J],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',
                         J),
                (   J=[K|_]
                ->  setarg(5, K, _)
                ;   true
                )
            ;   H=[_, _|J],
                setarg(2, H, J),
                (   J=[K|_]
                ->  setarg(5, K, H)
                ;   true
                )
            ),
            'detach_known/1_1_$special_=\\=/2___2'(G, C)
        )
    ),
    'known/1_1_$special_fail/0'.
'known/1_1_$special_=\\=/2___2__2'(A, B, C) :-
    (   'chr newvia_2'(A, B, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, F)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',
                  F)
    ),
    member(G, F),
    G=suspension(_, active, _, _, _, H, I),
    H==A,
    I==B,
    !,
    G=suspension(_, _, _, _, _, J, K),
    setarg(2, G, removed),
    term_variables(term(J, K), L),
    arg(5, G, M),
    (   var(M)
    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',
                  N),
        N=[_|O],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',
                 O),
        (   O=[P|_]
        ->  setarg(5, P, _)
        ;   true
        )
    ;   M=[_, _|O],
        setarg(2, M, O),
        (   O=[P|_]
        ->  setarg(5, P, M)
        ;   true
        )
    ),
    'detach_known/1_1_$special_=:=/2___2'(L, G),
    (   var(C)
    ->  true
    ;   C=suspension(_, Q, _, _, _, R, S),
        setarg(2, C, removed),
        (   Q==not_stored_yet
        ->  T=[]
        ;   term_variables(term(R, S), T),
            arg(5, C, U),
            (   var(U)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',
                          V),
                V=[_|W],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',
                         W),
                (   W=[X|_]
                ->  setarg(5, X, _)
                ;   true
                )
            ;   U=[_, _|W],
                setarg(2, U, W),
                (   W=[X|_]
                ->  setarg(5, X, U)
                ;   true
                )
            ),
            'detach_known/1_1_$special_=\\=/2___2'(T, C)
        )
    ),
    'known/1_1_$special_fail/0'.
'known/1_1_$special_=\\=/2___2__2'(A, B, C) :-
    '$novel_production'(C, 195),
    !,
    '$extend_history'(C, 195),
    arg(2, C, D),
    setarg(2, C, active),
    arg(4, C, E),
    F is E+1,
    setarg(4, C, F),
    (   D==not_stored_yet
    ->  C=suspension(_, _, _, _, _, G, H),
        term_variables(term(G, H), I),
        'chr none_locked'(I),
        nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',
                  J),
        K=[C|J],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',
                 K),
        (   J=[L|_]
        ->  setarg(5, L, K)
        ;   true
        ),
        'attach_known/1_1_$special_=\\=/2___2'(I, C)
    ;   true
    ),
    'known/1_1_$special_=\\=/2'(B, A),
    (   C=suspension(_, active, _, F, _, _, _)
    ->  setarg(2, C, inactive),
        'known/1_1_$special_=\\=/2___2__3'(A, B, C)
    ;   true
    ).
'known/1_1_$special_=\\=/2___2__2'(A, B, C) :-
    'known/1_1_$special_=\\=/2___2__3'(A, B, C).
'known/1_1_$special_=\\=/2___2__3'(A, B, C) :-
    (   'chr newvia_2'(A, B, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, F, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                  F)
    ),
    member(G, F),
    G=suspension(_, active, _, _, H),
    nonvar(H),
    H=(I=\=J),
    I==A,
    J==B,
    !,
    G=suspension(_, _, _, _, K),
    setarg(2, G, removed),
    term_variables(K, L),
    arg(4, G, M),
    (   var(M)
    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                  N),
        N=[_|O],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                 O),
        (   O=[P|_]
        ->  setarg(4, P, _)
        ;   true
        )
    ;   M=[_, _|O],
        setarg(2, M, O),
        (   O=[P|_]
        ->  setarg(4, P, M)
        ;   true
        )
    ),
    'detach_known/1_1_$special_\\+/1___1'(L, G),
    (   var(C)
    ->  true
    ;   C=suspension(_, Q, _, _, _, R, S),
        setarg(2, C, removed),
        (   Q==not_stored_yet
        ->  T=[]
        ;   term_variables(term(R, S), T),
            arg(5, C, U),
            (   var(U)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',
                          V),
                V=[_|W],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',
                         W),
                (   W=[X|_]
                ->  setarg(5, X, _)
                ;   true
                )
            ;   U=[_, _|W],
                setarg(2, U, W),
                (   W=[X|_]
                ->  setarg(5, X, U)
                ;   true
                )
            ),
            'detach_known/1_1_$special_=\\=/2___2'(T, C)
        )
    ),
    'known/1_1_$special_fail/0'.
'known/1_1_$special_=\\=/2___2__3'(A, B, C) :-
    (   'chr newvia_2'(A, B, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, F, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  F)
    ),
    !,
    'known/1_1_$special_=\\=/2___2__3__0__12'(F, A, B, C).
'known/1_1_$special_=\\=/2___2__3__0__12'([], A, B, C) :-
    'known/1_1_$special_=\\=/2___2__4'(A, B, C).
'known/1_1_$special_=\\=/2___2__3__0__12'([A|B], C, D, E) :-
    (   A=suspension(_, active, _, _, F, G),
        nonvar(F),
        F=(\+H),
        nonvar(H),
        H=(I=\=J),
        I==C,
        J==D
    ->  A=suspension(_, _, _, _, K, L),
        setarg(2, A, removed),
        term_variables(term(K, L), M),
        ( arg(4, A, N),
          (   var(N)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                        O),
              O=[_|P],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                       P),
              (   P=[Q|_]
              ->  setarg(4, Q, _)
              ;   true
              )
          ;   N=[_, _|P],
              setarg(2, N, P),
              (   P=[Q|_]
              ->  setarg(4, Q, N)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_;/2___2'(M, A),
        arg(2, E, R),
        setarg(2, E, active),
        ( arg(4, E, S),
          T is S+1,
          setarg(4, E, T)
        ),
        (   R==not_stored_yet
        ->  E=suspension(_, _, _, _, _, U, V),
            term_variables(term(U, V), W),
            'chr none_locked'(W),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',
                      X),
            Y=[E|X],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',
                     Y),
            (   X=[Z|_]
            ->  setarg(5, Z, Y)
            ;   true
            ),
            'attach_known/1_1_$special_=\\=/2___2'(W, E)
        ;   true
        ),
        known(G),
        (   E=suspension(_, active, _, T, _, _, _)
        ->  setarg(2, E, inactive),
            'known/1_1_$special_=\\=/2___2__3__0__12'(B,
                                                      C,
                                                      D,
                                                      E)
        ;   true
        )
    ;   'known/1_1_$special_=\\=/2___2__3__0__12'(B,
                                                  C,
                                                  D,
                                                  E)
    ).
'known/1_1_$special_=\\=/2___2__3'(A, B, C) :-
    'known/1_1_$special_=\\=/2___2__4'(A, B, C).
'known/1_1_$special_=\\=/2___2__4'(A, B, C) :-
    (   'chr newvia_2'(A, B, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, F, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  F)
    ),
    !,
    'known/1_1_$special_=\\=/2___2__4__0__13'(F, A, B, C).
'known/1_1_$special_=\\=/2___2__4__0__13'([], A, B, C) :-
    'known/1_1_$special_=\\=/2___2__5'(A, B, C).
'known/1_1_$special_=\\=/2___2__4__0__13'([A|B], C, D, E) :-
    (   A=suspension(_, active, _, _, F, G),
        nonvar(F),
        F=(H, _),
        nonvar(H),
        H=(\+I),
        nonvar(I),
        I=(J=\=K),
        J==C,
        K==D
    ->  A=suspension(_, _, _, _, L, M),
        setarg(2, A, removed),
        term_variables(term(L, M), N),
        ( arg(4, A, O),
          (   var(O)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                        P),
              P=[_|Q],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                       Q),
              (   Q=[R|_]
              ->  setarg(4, R, _)
              ;   true
              )
          ;   O=[_, _|Q],
              setarg(2, O, Q),
              (   Q=[R|_]
              ->  setarg(4, R, O)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_;/2___2'(N, A),
        arg(2, E, S),
        setarg(2, E, active),
        ( arg(4, E, T),
          U is T+1,
          setarg(4, E, U)
        ),
        (   S==not_stored_yet
        ->  E=suspension(_, _, _, _, _, V, W),
            term_variables(term(V, W), X),
            'chr none_locked'(X),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',
                      Y),
            Z=[E|Y],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',
                     Z),
            (   Y=[A1|_]
            ->  setarg(5, A1, Z)
            ;   true
            ),
            'attach_known/1_1_$special_=\\=/2___2'(X, E)
        ;   true
        ),
        known(G),
        (   E=suspension(_, active, _, U, _, _, _)
        ->  setarg(2, E, inactive),
            'known/1_1_$special_=\\=/2___2__4__0__13'(B,
                                                      C,
                                                      D,
                                                      E)
        ;   true
        )
    ;   'known/1_1_$special_=\\=/2___2__4__0__13'(B,
                                                  C,
                                                  D,
                                                  E)
    ).
'known/1_1_$special_=\\=/2___2__4'(A, B, C) :-
    'known/1_1_$special_=\\=/2___2__5'(A, B, C).
'known/1_1_$special_=\\=/2___2__5'(_, _, A) :-
    arg(2, A, B),
    setarg(2, A, active),
    arg(4, A, C),
    D is C+1,
    setarg(4, A, D),
    (   B==not_stored_yet
    ->  A=suspension(_, _, _, _, _, E, F),
        term_variables(term(E, F), G),
        'chr none_locked'(G),
        nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',
                  H),
        I=[A|H],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',
                 I),
        (   H=[J|_]
        ->  setarg(5, J, I)
        ;   true
        ),
        'attach_known/1_1_$special_=\\=/2___2'(G, A)
    ;   true
    ).
'known/1_1_$special_\\+/1'(A) :-
    'known/1_1_$special_\\+/1___1__0'(A, _).
'known/1_1_$special_\\+/1___1__0'(A, B) :-
    (   'chr newvia_1'(A, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, E, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                  E)
    ),
    member(F, E),
    F=suspension(_, active, _, _, G),
    G==A,
    !,
    (   var(B)
    ->  true
    ;   B=suspension(_, H, _, _, I),
        setarg(2, B, removed),
        (   H==not_stored_yet
        ->  J=[]
        ;   term_variables(I, J),
            arg(4, B, K),
            (   var(K)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                          L),
                L=[_|M],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                         M),
                (   M=[N|_]
                ->  setarg(4, N, _)
                ;   true
                )
            ;   K=[_, _|M],
                setarg(2, K, M),
                (   M=[N|_]
                ->  setarg(4, N, K)
                ;   true
                )
            ),
            'detach_known/1_1_$special_\\+/1___1'(J, B)
        )
    ).
'known/1_1_$special_\\+/1___1__0'(_, A) :-
    nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',
              B),
    member(C, B),
    C=suspension(_, active, _),
    !,
    (   var(A)
    ->  true
    ;   A=suspension(_, D, _, _, E),
        setarg(2, A, removed),
        (   D==not_stored_yet
        ->  F=[]
        ;   term_variables(E, F),
            arg(4, A, G),
            (   var(G)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                          H),
                H=[_|I],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                         I),
                (   I=[J|_]
                ->  setarg(4, J, _)
                ;   true
                )
            ;   G=[_, _|I],
                setarg(2, G, I),
                (   I=[J|_]
                ->  setarg(4, J, G)
                ;   true
                )
            ),
            'detach_known/1_1_$special_\\+/1___1'(F, A)
        )
    ).
'known/1_1_$special_\\+/1___1__0'(A, B) :-
    nonvar(A),
    (   (   (   (   (   (   (   (   (   (   (   A=functor(C, D, E),
                                                nonvar(C),
                                                'chr lock'(C),
                                                'chr lock'(D),
                                                'chr lock'(E),
                                                functor(C,
                                                        D,
                                                        E),
                                                'chr unlock'(C),
                                                'chr unlock'(D),
                                                'chr unlock'(E),
                                                !,
                                                (   var(B)
                                                ->  true
                                                ;   B=suspension(_, F, _, _, G),
                                                    setarg(2, B, removed),
                                                    (   F==not_stored_yet
                                                    ->  H=[]
                                                    ;   term_variables(G,
                                                                       H),
                                                        arg(4, B, I),
                                                        (   var(I)
                                                        ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                                                                      J),
                                                            J=[_|K],
                                                            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                                                                     K),
                                                            (   K=[L|_]
                                                            ->  setarg(4,
                                                                       L,
                                                                       _)
                                                            ;   true
                                                            )
                                                        ;   I=[_, _|K],
                                                            setarg(2,
                                                                   I,
                                                                   K),
                                                            (   K=[L|_]
                                                            ->  setarg(4,
                                                                       L,
                                                                       I)
                                                            ;   true
                                                            )
                                                        ),
                                                        'detach_known/1_1_$special_\\+/1___1'(H,
                                                                                              B)
                                                    )
                                                ),
                                                'known/1_1_$special_fail/0'
                                            ;   A=(M;N),
                                                (   'chr newvia_2'(M,
                                                                   N,
                                                                   O)
                                                ->  get_attr(O,
                                                             guard_entailment,
                                                             P),
                                                    P=v(_, _, _, Q, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
                                                ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                              Q)
                                                ),
                                                member(R, Q),
                                                R=suspension(_, active, _, _, S, T),
                                                S==M,
                                                T==N,
                                                !,
                                                R=suspension(_, _, _, _, U, V),
                                                setarg(2, R, removed),
                                                term_variables(term(U,
                                                                    V),
                                                               W),
                                                arg(4, R, X),
                                                (   var(X)
                                                ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                              Y),
                                                    Y=[_|Z],
                                                    b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                                                             Z),
                                                    (   Z=[A1|_]
                                                    ->  setarg(4,
                                                               A1,
                                                               _)
                                                    ;   true
                                                    )
                                                ;   X=[_, _|Z],
                                                    setarg(2,
                                                           X,
                                                           Z),
                                                    (   Z=[A1|_]
                                                    ->  setarg(4,
                                                               A1,
                                                               X)
                                                    ;   true
                                                    )
                                                ),
                                                'detach_known/1_1_$special_;/2___2'(W,
                                                                                    R),
                                                (   var(B)
                                                ->  true
                                                ;   B=suspension(_, B1, _, _, C1),
                                                    setarg(2, B, removed),
                                                    (   B1==not_stored_yet
                                                    ->  D1=[]
                                                    ;   term_variables(C1,
                                                                       D1),
                                                        arg(4,
                                                            B,
                                                            E1),
                                                        (   var(E1)
                                                        ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                                                                      F1),
                                                            F1=[_|G1],
                                                            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                                                                     G1),
                                                            (   G1=[H1|_]
                                                            ->  setarg(4,
                                                                       H1,
                                                                       _)
                                                            ;   true
                                                            )
                                                        ;   E1=[_, _|G1],
                                                            setarg(2,
                                                                   E1,
                                                                   G1),
                                                            (   G1=[H1|_]
                                                            ->  setarg(4,
                                                                       H1,
                                                                       E1)
                                                            ;   true
                                                            )
                                                        ),
                                                        'detach_known/1_1_$special_\\+/1___1'(D1,
                                                                                              B)
                                                    )
                                                ),
                                                'known/1_1_$special_fail/0'
                                            )
                                        ;   A=nonvar(I1),
                                            (   'chr newvia_1'(I1,
                                                               J1)
                                            ->  get_attr(J1,
                                                         guard_entailment,
                                                         K1),
                                                K1=v(_, _, _, _, L1, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
                                            ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',
                                                          L1)
                                            ),
                                            member(M1, L1),
                                            M1=suspension(_, active, _, _, N1),
                                            N1==I1,
                                            !,
                                            M1=suspension(_, _, _, _, O1),
                                            setarg(2, M1, removed),
                                            term_variables(O1, P1),
                                            arg(4, M1, Q1),
                                            (   var(Q1)
                                            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',
                                                          R1),
                                                R1=[_|S1],
                                                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',
                                                         S1),
                                                (   S1=[T1|_]
                                                ->  setarg(4, T1, _)
                                                ;   true
                                                )
                                            ;   Q1=[_, _|S1],
                                                setarg(2, Q1, S1),
                                                (   S1=[T1|_]
                                                ->  setarg(4,
                                                           T1,
                                                           Q1)
                                                ;   true
                                                )
                                            ),
                                            'detach_known/1_1_$special_nonvar/1___1'(P1,
                                                                                     M1),
                                            (   var(B)
                                            ->  true
                                            ;   B=suspension(_, U1, _, _, V1),
                                                setarg(2, B, removed),
                                                (   U1==not_stored_yet
                                                ->  W1=[]
                                                ;   term_variables(V1,
                                                                   W1),
                                                    arg(4, B, X1),
                                                    (   var(X1)
                                                    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                                                                  Y1),
                                                        Y1=[_|Z1],
                                                        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                                                                 Z1),
                                                        (   Z1=[A2|_]
                                                        ->  setarg(4,
                                                                   A2,
                                                                   _)
                                                        ;   true
                                                        )
                                                    ;   X1=[_, _|Z1],
                                                        setarg(2,
                                                               X1,
                                                               Z1),
                                                        (   Z1=[A2|_]
                                                        ->  setarg(4,
                                                                   A2,
                                                                   X1)
                                                        ;   true
                                                        )
                                                    ),
                                                    'detach_known/1_1_$special_\\+/1___1'(W1,
                                                                                          B)
                                                )
                                            ),
                                            'known/1_1_$special_fail/0'
                                        )
                                    ;   A=var(B2),
                                        (   'chr newvia_1'(B2, C2)
                                        ->  get_attr(C2,
                                                     guard_entailment,
                                                     D2),
                                            D2=v(_, _, _, _, _, E2, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
                                        ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',
                                                      E2)
                                        ),
                                        member(F2, E2),
                                        F2=suspension(_, active, _, _, G2),
                                        G2==B2,
                                        !,
                                        F2=suspension(_, _, _, _, H2),
                                        setarg(2, F2, removed),
                                        term_variables(H2, I2),
                                        arg(4, F2, J2),
                                        (   var(J2)
                                        ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',
                                                      K2),
                                            K2=[_|L2],
                                            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',
                                                     L2),
                                            (   L2=[M2|_]
                                            ->  setarg(4, M2, _)
                                            ;   true
                                            )
                                        ;   J2=[_, _|L2],
                                            setarg(2, J2, L2),
                                            (   L2=[M2|_]
                                            ->  setarg(4, M2, J2)
                                            ;   true
                                            )
                                        ),
                                        'detach_known/1_1_$special_var/1___1'(I2,
                                                                              F2),
                                        (   var(B)
                                        ->  true
                                        ;   B=suspension(_, N2, _, _, O2),
                                            setarg(2, B, removed),
                                            (   N2==not_stored_yet
                                            ->  P2=[]
                                            ;   term_variables(O2,
                                                               P2),
                                                arg(4, B, Q2),
                                                (   var(Q2)
                                                ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                                                              R2),
                                                    R2=[_|S2],
                                                    b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                                                             S2),
                                                    (   S2=[T2|_]
                                                    ->  setarg(4,
                                                               T2,
                                                               _)
                                                    ;   true
                                                    )
                                                ;   Q2=[_, _|S2],
                                                    setarg(2,
                                                           Q2,
                                                           S2),
                                                    (   S2=[T2|_]
                                                    ->  setarg(4,
                                                               T2,
                                                               Q2)
                                                    ;   true
                                                    )
                                                ),
                                                'detach_known/1_1_$special_\\+/1___1'(P2,
                                                                                      B)
                                            )
                                        ),
                                        'known/1_1_$special_fail/0'
                                    )
                                ;   A=atom(U2),
                                    (   'chr newvia_1'(U2, V2)
                                    ->  get_attr(V2,
                                                 guard_entailment,
                                                 W2),
                                        W2=v(_, _, _, _, _, _, X2, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
                                    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',
                                                  X2)
                                    ),
                                    member(Y2, X2),
                                    Y2=suspension(_, active, _, _, _, Z2),
                                    Z2==U2,
                                    !,
                                    Y2=suspension(_, _, _, _, _, A3),
                                    setarg(2, Y2, removed),
                                    term_variables(A3, B3),
                                    arg(5, Y2, C3),
                                    (   var(C3)
                                    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',
                                                  D3),
                                        D3=[_|E3],
                                        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',
                                                 E3),
                                        (   E3=[F3|_]
                                        ->  setarg(5, F3, _)
                                        ;   true
                                        )
                                    ;   C3=[_, _|E3],
                                        setarg(2, C3, E3),
                                        (   E3=[F3|_]
                                        ->  setarg(5, F3, C3)
                                        ;   true
                                        )
                                    ),
                                    'detach_known/1_1_$special_atom/1___1'(B3,
                                                                           Y2),
                                    (   var(B)
                                    ->  true
                                    ;   B=suspension(_, G3, _, _, H3),
                                        setarg(2, B, removed),
                                        (   G3==not_stored_yet
                                        ->  I3=[]
                                        ;   term_variables(H3, I3),
                                            arg(4, B, J3),
                                            (   var(J3)
                                            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                                                          K3),
                                                K3=[_|L3],
                                                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                                                         L3),
                                                (   L3=[M3|_]
                                                ->  setarg(4, M3, _)
                                                ;   true
                                                )
                                            ;   J3=[_, _|L3],
                                                setarg(2, J3, L3),
                                                (   L3=[M3|_]
                                                ->  setarg(4,
                                                           M3,
                                                           J3)
                                                ;   true
                                                )
                                            ),
                                            'detach_known/1_1_$special_\\+/1___1'(I3,
                                                                                  B)
                                        )
                                    ),
                                    'known/1_1_$special_fail/0'
                                )
                            ;   A=atomic(N3),
                                (   'chr newvia_1'(N3, O3)
                                ->  get_attr(O3,
                                             guard_entailment,
                                             P3),
                                    P3=v(_, _, _, _, _, _, _, Q3, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
                                ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',
                                              Q3)
                                ),
                                member(R3, Q3),
                                R3=suspension(_, active, _, _, _, S3),
                                S3==N3,
                                !,
                                R3=suspension(_, _, _, _, _, T3),
                                setarg(2, R3, removed),
                                term_variables(T3, U3),
                                arg(5, R3, V3),
                                (   var(V3)
                                ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',
                                              W3),
                                    W3=[_|X3],
                                    b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',
                                             X3),
                                    (   X3=[Y3|_]
                                    ->  setarg(5, Y3, _)
                                    ;   true
                                    )
                                ;   V3=[_, _|X3],
                                    setarg(2, V3, X3),
                                    (   X3=[Y3|_]
                                    ->  setarg(5, Y3, V3)
                                    ;   true
                                    )
                                ),
                                'detach_known/1_1_$special_atomic/1___1'(U3,
                                                                         R3),
                                (   var(B)
                                ->  true
                                ;   B=suspension(_, Z3, _, _, A4),
                                    setarg(2, B, removed),
                                    (   Z3==not_stored_yet
                                    ->  B4=[]
                                    ;   term_variables(A4, B4),
                                        arg(4, B, C4),
                                        (   var(C4)
                                        ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                                                      D4),
                                            D4=[_|E4],
                                            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                                                     E4),
                                            (   E4=[F4|_]
                                            ->  setarg(4, F4, _)
                                            ;   true
                                            )
                                        ;   C4=[_, _|E4],
                                            setarg(2, C4, E4),
                                            (   E4=[F4|_]
                                            ->  setarg(4, F4, C4)
                                            ;   true
                                            )
                                        ),
                                        'detach_known/1_1_$special_\\+/1___1'(B4,
                                                                              B)
                                    )
                                ),
                                'known/1_1_$special_fail/0'
                            )
                        ;   A=compound(G4),
                            (   'chr newvia_1'(G4, H4)
                            ->  get_attr(H4, guard_entailment, I4),
                                I4=v(_, _, _, _, _, _, _, _, J4, _, _, _, _, _, _, _, _, _, _, _, _, _)
                            ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',
                                          J4)
                            ),
                            member(K4, J4),
                            K4=suspension(_, active, _, _, _, L4),
                            L4==G4,
                            !,
                            K4=suspension(_, _, _, _, _, M4),
                            setarg(2, K4, removed),
                            term_variables(M4, N4),
                            arg(5, K4, O4),
                            (   var(O4)
                            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',
                                          P4),
                                P4=[_|Q4],
                                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',
                                         Q4),
                                (   Q4=[R4|_]
                                ->  setarg(5, R4, _)
                                ;   true
                                )
                            ;   O4=[_, _|Q4],
                                setarg(2, O4, Q4),
                                (   Q4=[R4|_]
                                ->  setarg(5, R4, O4)
                                ;   true
                                )
                            ),
                            'detach_known/1_1_$special_compound/1___1'(N4,
                                                                       K4),
                            (   var(B)
                            ->  true
                            ;   B=suspension(_, S4, _, _, T4),
                                setarg(2, B, removed),
                                (   S4==not_stored_yet
                                ->  U4=[]
                                ;   term_variables(T4, U4),
                                    arg(4, B, V4),
                                    (   var(V4)
                                    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                                                  W4),
                                        W4=[_|X4],
                                        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                                                 X4),
                                        (   X4=[Y4|_]
                                        ->  setarg(4, Y4, _)
                                        ;   true
                                        )
                                    ;   V4=[_, _|X4],
                                        setarg(2, V4, X4),
                                        (   X4=[Y4|_]
                                        ->  setarg(4, Y4, V4)
                                        ;   true
                                        )
                                    ),
                                    'detach_known/1_1_$special_\\+/1___1'(U4,
                                                                          B)
                                )
                            ),
                            'known/1_1_$special_fail/0'
                        )
                    ;   A=ground(Z4),
                        (   'chr newvia_1'(Z4, A5)
                        ->  get_attr(A5, guard_entailment, B5),
                            B5=v(_, _, _, _, _, _, _, _, _, C5, _, _, _, _, _, _, _, _, _, _, _, _)
                        ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',
                                      C5)
                        ),
                        member(D5, C5),
                        D5=suspension(_, active, _, _, _, E5),
                        E5==Z4,
                        !,
                        D5=suspension(_, _, _, _, _, F5),
                        setarg(2, D5, removed),
                        term_variables(F5, G5),
                        arg(5, D5, H5),
                        (   var(H5)
                        ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',
                                      I5),
                            I5=[_|J5],
                            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',
                                     J5),
                            (   J5=[K5|_]
                            ->  setarg(5, K5, _)
                            ;   true
                            )
                        ;   H5=[_, _|J5],
                            setarg(2, H5, J5),
                            (   J5=[K5|_]
                            ->  setarg(5, K5, H5)
                            ;   true
                            )
                        ),
                        'detach_known/1_1_$special_ground/1___1'(G5,
                                                                 D5),
                        (   var(B)
                        ->  true
                        ;   B=suspension(_, L5, _, _, M5),
                            setarg(2, B, removed),
                            (   L5==not_stored_yet
                            ->  N5=[]
                            ;   term_variables(M5, N5),
                                arg(4, B, O5),
                                (   var(O5)
                                ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                                              P5),
                                    P5=[_|Q5],
                                    b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                                             Q5),
                                    (   Q5=[R5|_]
                                    ->  setarg(4, R5, _)
                                    ;   true
                                    )
                                ;   O5=[_, _|Q5],
                                    setarg(2, O5, Q5),
                                    (   Q5=[R5|_]
                                    ->  setarg(4, R5, O5)
                                    ;   true
                                    )
                                ),
                                'detach_known/1_1_$special_\\+/1___1'(N5,
                                                                      B)
                            )
                        ),
                        'known/1_1_$special_fail/0'
                    )
                ;   A=integer(S5),
                    (   'chr newvia_1'(S5, T5)
                    ->  get_attr(T5, guard_entailment, U5),
                        U5=v(_, _, _, _, _, _, _, _, _, _, V5, _, _, _, _, _, _, _, _, _, _, _)
                    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',
                                  V5)
                    ),
                    member(W5, V5),
                    W5=suspension(_, active, _, _, _, X5),
                    X5==S5,
                    !,
                    W5=suspension(_, _, _, _, _, Y5),
                    setarg(2, W5, removed),
                    term_variables(Y5, Z5),
                    arg(5, W5, A6),
                    (   var(A6)
                    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',
                                  B6),
                        B6=[_|C6],
                        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',
                                 C6),
                        (   C6=[D6|_]
                        ->  setarg(5, D6, _)
                        ;   true
                        )
                    ;   A6=[_, _|C6],
                        setarg(2, A6, C6),
                        (   C6=[D6|_]
                        ->  setarg(5, D6, A6)
                        ;   true
                        )
                    ),
                    'detach_known/1_1_$special_integer/1___1'(Z5,
                                                              W5),
                    (   var(B)
                    ->  true
                    ;   B=suspension(_, E6, _, _, F6),
                        setarg(2, B, removed),
                        (   E6==not_stored_yet
                        ->  G6=[]
                        ;   term_variables(F6, G6),
                            arg(4, B, H6),
                            (   var(H6)
                            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                                          I6),
                                I6=[_|J6],
                                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                                         J6),
                                (   J6=[K6|_]
                                ->  setarg(4, K6, _)
                                ;   true
                                )
                            ;   H6=[_, _|J6],
                                setarg(2, H6, J6),
                                (   J6=[K6|_]
                                ->  setarg(4, K6, H6)
                                ;   true
                                )
                            ),
                            'detach_known/1_1_$special_\\+/1___1'(G6,
                                                                  B)
                        )
                    ),
                    'known/1_1_$special_fail/0'
                )
            ;   A=float(L6),
                (   'chr newvia_1'(L6, M6)
                ->  get_attr(M6, guard_entailment, N6),
                    N6=v(_, _, _, _, _, _, _, _, _, _, _, O6, _, _, _, _, _, _, _, _, _, _)
                ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',
                              O6)
                ),
                member(P6, O6),
                P6=suspension(_, active, _, _, _, Q6),
                Q6==L6,
                !,
                P6=suspension(_, _, _, _, _, R6),
                setarg(2, P6, removed),
                term_variables(R6, S6),
                arg(5, P6, T6),
                (   var(T6)
                ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',
                              U6),
                    U6=[_|V6],
                    b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',
                             V6),
                    (   V6=[W6|_]
                    ->  setarg(5, W6, _)
                    ;   true
                    )
                ;   T6=[_, _|V6],
                    setarg(2, T6, V6),
                    (   V6=[W6|_]
                    ->  setarg(5, W6, T6)
                    ;   true
                    )
                ),
                'detach_known/1_1_$special_float/1___1'(S6, P6),
                (   var(B)
                ->  true
                ;   B=suspension(_, X6, _, _, Y6),
                    setarg(2, B, removed),
                    (   X6==not_stored_yet
                    ->  Z6=[]
                    ;   term_variables(Y6, Z6),
                        arg(4, B, A7),
                        (   var(A7)
                        ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                                      B7),
                            B7=[_|C7],
                            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                                     C7),
                            (   C7=[D7|_]
                            ->  setarg(4, D7, _)
                            ;   true
                            )
                        ;   A7=[_, _|C7],
                            setarg(2, A7, C7),
                            (   C7=[D7|_]
                            ->  setarg(4, D7, A7)
                            ;   true
                            )
                        ),
                        'detach_known/1_1_$special_\\+/1___1'(Z6, B)
                    )
                ),
                'known/1_1_$special_fail/0'
            )
        ;   A=number(E7),
            (   'chr newvia_1'(E7, F7)
            ->  get_attr(F7, guard_entailment, G7),
                G7=v(_, _, _, _, _, _, _, _, _, _, _, _, H7, _, _, _, _, _, _, _, _, _)
            ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',
                          H7)
            ),
            member(I7, H7),
            I7=suspension(_, active, _, _, _, J7),
            J7==E7,
            !,
            I7=suspension(_, _, _, _, _, K7),
            setarg(2, I7, removed),
            term_variables(K7, L7),
            arg(5, I7, M7),
            (   var(M7)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',
                          N7),
                N7=[_|O7],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',
                         O7),
                (   O7=[P7|_]
                ->  setarg(5, P7, _)
                ;   true
                )
            ;   M7=[_, _|O7],
                setarg(2, M7, O7),
                (   O7=[P7|_]
                ->  setarg(5, P7, M7)
                ;   true
                )
            ),
            'detach_known/1_1_$special_number/1___1'(L7, I7),
            (   var(B)
            ->  true
            ;   B=suspension(_, Q7, _, _, R7),
                setarg(2, B, removed),
                (   Q7==not_stored_yet
                ->  S7=[]
                ;   term_variables(R7, S7),
                    arg(4, B, T7),
                    (   var(T7)
                    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                                  U7),
                        U7=[_|V7],
                        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                                 V7),
                        (   V7=[W7|_]
                        ->  setarg(4, W7, _)
                        ;   true
                        )
                    ;   T7=[_, _|V7],
                        setarg(2, T7, V7),
                        (   V7=[W7|_]
                        ->  setarg(4, W7, T7)
                        ;   true
                        )
                    ),
                    'detach_known/1_1_$special_\\+/1___1'(S7, B)
                )
            ),
            'known/1_1_$special_fail/0'
        )
    ;   A=(X7=\=Y7),
        (   'chr newvia_2'(X7, Y7, Z7)
        ->  get_attr(Z7, guard_entailment, A8),
            A8=v(_, _, _, _, _, _, _, _, _, _, _, _, _, B8, _, _, _, _, _, _, _, _)
        ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',
                      B8)
        ),
        member(C8, B8),
        C8=suspension(_, active, _, _, _, D8, E8),
        D8==X7,
        E8==Y7,
        !,
        C8=suspension(_, _, _, _, _, F8, G8),
        setarg(2, C8, removed),
        term_variables(term(F8, G8), H8),
        arg(5, C8, I8),
        (   var(I8)
        ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',
                      J8),
            J8=[_|K8],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',
                     K8),
            (   K8=[L8|_]
            ->  setarg(5, L8, _)
            ;   true
            )
        ;   I8=[_, _|K8],
            setarg(2, I8, K8),
            (   K8=[L8|_]
            ->  setarg(5, L8, I8)
            ;   true
            )
        ),
        'detach_known/1_1_$special_=\\=/2___2'(H8, C8),
        (   var(B)
        ->  true
        ;   B=suspension(_, M8, _, _, N8),
            setarg(2, B, removed),
            (   M8==not_stored_yet
            ->  O8=[]
            ;   term_variables(N8, O8),
                arg(4, B, P8),
                (   var(P8)
                ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                              Q8),
                    Q8=[_|R8],
                    b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                             R8),
                    (   R8=[S8|_]
                    ->  setarg(4, S8, _)
                    ;   true
                    )
                ;   P8=[_, _|R8],
                    setarg(2, P8, R8),
                    (   R8=[S8|_]
                    ->  setarg(4, S8, P8)
                    ;   true
                    )
                ),
                'detach_known/1_1_$special_\\+/1___1'(O8, B)
            )
        ),
        'known/1_1_$special_fail/0'
    ).
'known/1_1_$special_\\+/1___1__0'(A, B) :-
    (   'chr newvia_1'(A, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, E, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                  E)
    ),
    member(F, E),
    F=suspension(_, active, _, _, G),
    nonvar(G),
    G=(\+H),
    H==A,
    !,
    F=suspension(_, _, _, _, I),
    setarg(2, F, removed),
    term_variables(I, J),
    arg(4, F, K),
    (   var(K)
    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                  L),
        L=[_|M],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                 M),
        (   M=[N|_]
        ->  setarg(4, N, _)
        ;   true
        )
    ;   K=[_, _|M],
        setarg(2, K, M),
        (   M=[N|_]
        ->  setarg(4, N, K)
        ;   true
        )
    ),
    'detach_known/1_1_$special_\\+/1___1'(J, F),
    (   var(B)
    ->  true
    ;   B=suspension(_, O, _, _, P),
        setarg(2, B, removed),
        (   O==not_stored_yet
        ->  Q=[]
        ;   term_variables(P, Q),
            arg(4, B, R),
            (   var(R)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                          S),
                S=[_|T],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                         T),
                (   T=[U|_]
                ->  setarg(4, U, _)
                ;   true
                )
            ;   R=[_, _|T],
                setarg(2, R, T),
                (   T=[U|_]
                ->  setarg(4, U, R)
                ;   true
                )
            ),
            'detach_known/1_1_$special_\\+/1___1'(Q, B)
        )
    ),
    'known/1_1_$special_fail/0'.
'known/1_1_$special_\\+/1___1__0'(A, B) :-
    nonvar(A),
    (   (   (   (   (   (   (   A=(\+C),
                                (   'chr newvia_1'(C, D)
                                ->  get_attr(D, guard_entailment, E),
                                    E=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, F, _, _, _, _, _, _, _)
                                ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                                              F)
                                ),
                                member(G, F),
                                G=suspension(_, active, _, _, H),
                                H==C,
                                !,
                                G=suspension(_, _, _, _, I),
                                setarg(2, G, removed),
                                term_variables(I, J),
                                arg(4, G, K),
                                (   var(K)
                                ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                                              L),
                                    L=[_|M],
                                    b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                                             M),
                                    (   M=[N|_]
                                    ->  setarg(4, N, _)
                                    ;   true
                                    )
                                ;   K=[_, _|M],
                                    setarg(2, K, M),
                                    (   M=[N|_]
                                    ->  setarg(4, N, K)
                                    ;   true
                                    )
                                ),
                                'detach_known/1_1_$special_\\+/1___1'(J,
                                                                      G),
                                (   var(B)
                                ->  true
                                ;   B=suspension(_, O, _, _, P),
                                    setarg(2, B, removed),
                                    (   O==not_stored_yet
                                    ->  Q=[]
                                    ;   term_variables(P, Q),
                                        arg(4, B, R),
                                        (   var(R)
                                        ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                                                      S),
                                            S=[_|T],
                                            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                                                     T),
                                            (   T=[U|_]
                                            ->  setarg(4, U, _)
                                            ;   true
                                            )
                                        ;   R=[_, _|T],
                                            setarg(2, R, T),
                                            (   T=[U|_]
                                            ->  setarg(4, U, R)
                                            ;   true
                                            )
                                        ),
                                        'detach_known/1_1_$special_\\+/1___1'(Q,
                                                                              B)
                                    )
                                ),
                                'known/1_1_$special_fail/0'
                            ;   A=functor(V, W, X),
                                (   'chr newvia'([V, W, X],
                                                 Y)
                                ->  get_attr(Y,
                                             guard_entailment,
                                             Z),
                                    Z=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, A1, _, _, _, _, _, _)
                                ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',
                                              A1)
                                ),
                                member(B1, A1),
                                B1=suspension(_, active, _, _, C1, D1, E1),
                                C1==V,
                                D1==W,
                                E1==X,
                                !,
                                B1=suspension(_, _, _, _, F1, G1, H1),
                                setarg(2, B1, removed),
                                term_variables(term(F1,
                                                    G1,
                                                    H1),
                                               I1),
                                arg(4, B1, J1),
                                (   var(J1)
                                ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',
                                              K1),
                                    K1=[_|L1],
                                    b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',
                                             L1),
                                    (   L1=[M1|_]
                                    ->  setarg(4, M1, _)
                                    ;   true
                                    )
                                ;   J1=[_, _|L1],
                                    setarg(2, J1, L1),
                                    (   L1=[M1|_]
                                    ->  setarg(4, M1, J1)
                                    ;   true
                                    )
                                ),
                                'detach_known/1_1_$special_functor/3___3'(I1,
                                                                          B1),
                                (   var(B)
                                ->  true
                                ;   B=suspension(_, N1, _, _, O1),
                                    setarg(2, B, removed),
                                    (   N1==not_stored_yet
                                    ->  P1=[]
                                    ;   term_variables(O1, P1),
                                        arg(4, B, Q1),
                                        (   var(Q1)
                                        ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                                                      R1),
                                            R1=[_|S1],
                                            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                                                     S1),
                                            (   S1=[T1|_]
                                            ->  setarg(4, T1, _)
                                            ;   true
                                            )
                                        ;   Q1=[_, _|S1],
                                            setarg(2, Q1, S1),
                                            (   S1=[T1|_]
                                            ->  setarg(4, T1, Q1)
                                            ;   true
                                            )
                                        ),
                                        'detach_known/1_1_$special_\\+/1___1'(P1,
                                                                              B)
                                    )
                                ),
                                'known/1_1_$special_fail/0'
                            )
                        ;   A=(U1\=V1),
                            (   'chr newvia_2'(U1, V1, W1)
                            ->  get_attr(W1, guard_entailment, X1),
                                X1=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, Y1, _, _, _, _, _)
                            ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',
                                          Y1)
                            ),
                            member(Z1, Y1),
                            Z1=suspension(_, active, _, _, _, A2, B2),
                            A2==U1,
                            B2==V1,
                            !,
                            Z1=suspension(_, _, _, _, _, C2, D2),
                            setarg(2, Z1, removed),
                            term_variables(term(C2, D2), E2),
                            arg(5, Z1, F2),
                            (   var(F2)
                            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',
                                          G2),
                                G2=[_|H2],
                                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',
                                         H2),
                                (   H2=[I2|_]
                                ->  setarg(5, I2, _)
                                ;   true
                                )
                            ;   F2=[_, _|H2],
                                setarg(2, F2, H2),
                                (   H2=[I2|_]
                                ->  setarg(5, I2, F2)
                                ;   true
                                )
                            ),
                            'detach_known/1_1_$special_\\=/2___2'(E2,
                                                                  Z1),
                            (   var(B)
                            ->  true
                            ;   B=suspension(_, J2, _, _, K2),
                                setarg(2, B, removed),
                                (   J2==not_stored_yet
                                ->  L2=[]
                                ;   term_variables(K2, L2),
                                    arg(4, B, M2),
                                    (   var(M2)
                                    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                                                  N2),
                                        N2=[_|O2],
                                        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                                                 O2),
                                        (   O2=[P2|_]
                                        ->  setarg(4, P2, _)
                                        ;   true
                                        )
                                    ;   M2=[_, _|O2],
                                        setarg(2, M2, O2),
                                        (   O2=[P2|_]
                                        ->  setarg(4, P2, M2)
                                        ;   true
                                        )
                                    ),
                                    'detach_known/1_1_$special_\\+/1___1'(L2,
                                                                          B)
                                )
                            ),
                            'known/1_1_$special_fail/0'
                        )
                    ;   A=(Q2=R2),
                        (   'chr newvia_2'(Q2, R2, S2)
                        ->  get_attr(S2, guard_entailment, T2),
                            T2=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, U2, _, _, _, _)
                        ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',
                                      U2)
                        ),
                        member(V2, U2),
                        V2=suspension(_, active, _, _, W2, X2),
                        W2==Q2,
                        X2==R2,
                        !,
                        V2=suspension(_, _, _, _, Y2, Z2),
                        setarg(2, V2, removed),
                        term_variables(term(Y2, Z2), A3),
                        arg(4, V2, B3),
                        (   var(B3)
                        ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',
                                      C3),
                            C3=[_|D3],
                            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',
                                     D3),
                            (   D3=[E3|_]
                            ->  setarg(4, E3, _)
                            ;   true
                            )
                        ;   B3=[_, _|D3],
                            setarg(2, B3, D3),
                            (   D3=[E3|_]
                            ->  setarg(4, E3, B3)
                            ;   true
                            )
                        ),
                        'detach_known/1_1_$special_=/2___2'(A3, V2),
                        (   var(B)
                        ->  true
                        ;   B=suspension(_, F3, _, _, G3),
                            setarg(2, B, removed),
                            (   F3==not_stored_yet
                            ->  H3=[]
                            ;   term_variables(G3, H3),
                                arg(4, B, I3),
                                (   var(I3)
                                ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                                              J3),
                                    J3=[_|K3],
                                    b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                                             K3),
                                    (   K3=[L3|_]
                                    ->  setarg(4, L3, _)
                                    ;   true
                                    )
                                ;   I3=[_, _|K3],
                                    setarg(2, I3, K3),
                                    (   K3=[L3|_]
                                    ->  setarg(4, L3, I3)
                                    ;   true
                                    )
                                ),
                                'detach_known/1_1_$special_\\+/1___1'(H3,
                                                                      B)
                            )
                        ),
                        'known/1_1_$special_fail/0'
                    )
                ;   A=(M3\==N3),
                    (   'chr newvia_2'(M3, N3, O3)
                    ->  get_attr(O3, guard_entailment, P3),
                        P3=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, Q3, _, _, _)
                    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',
                                  Q3)
                    ),
                    member(R3, Q3),
                    R3=suspension(_, active, _, _, _, S3, T3),
                    S3==M3,
                    T3==N3,
                    !,
                    R3=suspension(_, _, _, _, _, U3, V3),
                    setarg(2, R3, removed),
                    term_variables(term(U3, V3), W3),
                    arg(5, R3, X3),
                    (   var(X3)
                    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',
                                  Y3),
                        Y3=[_|Z3],
                        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',
                                 Z3),
                        (   Z3=[A4|_]
                        ->  setarg(5, A4, _)
                        ;   true
                        )
                    ;   X3=[_, _|Z3],
                        setarg(2, X3, Z3),
                        (   Z3=[A4|_]
                        ->  setarg(5, A4, X3)
                        ;   true
                        )
                    ),
                    'detach_known/1_1_$special_\\==/2___2'(W3, R3),
                    (   var(B)
                    ->  true
                    ;   B=suspension(_, B4, _, _, C4),
                        setarg(2, B, removed),
                        (   B4==not_stored_yet
                        ->  D4=[]
                        ;   term_variables(C4, D4),
                            arg(4, B, E4),
                            (   var(E4)
                            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                                          F4),
                                F4=[_|G4],
                                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                                         G4),
                                (   G4=[H4|_]
                                ->  setarg(4, H4, _)
                                ;   true
                                )
                            ;   E4=[_, _|G4],
                                setarg(2, E4, G4),
                                (   G4=[H4|_]
                                ->  setarg(4, H4, E4)
                                ;   true
                                )
                            ),
                            'detach_known/1_1_$special_\\+/1___1'(D4,
                                                                  B)
                        )
                    ),
                    'known/1_1_$special_fail/0'
                )
            ;   A=(I4==J4),
                (   'chr newvia_2'(I4, J4, K4)
                ->  get_attr(K4, guard_entailment, L4),
                    L4=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, M4, _, _)
                ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',
                              M4)
                ),
                member(N4, M4),
                N4=suspension(_, active, _, _, _, O4, P4),
                O4==I4,
                P4==J4,
                !,
                N4=suspension(_, _, _, _, _, Q4, R4),
                setarg(2, N4, removed),
                term_variables(term(Q4, R4), S4),
                arg(5, N4, T4),
                (   var(T4)
                ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',
                              U4),
                    U4=[_|V4],
                    b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',
                             V4),
                    (   V4=[W4|_]
                    ->  setarg(5, W4, _)
                    ;   true
                    )
                ;   T4=[_, _|V4],
                    setarg(2, T4, V4),
                    (   V4=[W4|_]
                    ->  setarg(5, W4, T4)
                    ;   true
                    )
                ),
                'detach_known/1_1_$special_==/2___2'(S4, N4),
                (   var(B)
                ->  true
                ;   B=suspension(_, X4, _, _, Y4),
                    setarg(2, B, removed),
                    (   X4==not_stored_yet
                    ->  Z4=[]
                    ;   term_variables(Y4, Z4),
                        arg(4, B, A5),
                        (   var(A5)
                        ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                                      B5),
                            B5=[_|C5],
                            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                                     C5),
                            (   C5=[D5|_]
                            ->  setarg(4, D5, _)
                            ;   true
                            )
                        ;   A5=[_, _|C5],
                            setarg(2, A5, C5),
                            (   C5=[D5|_]
                            ->  setarg(4, D5, A5)
                            ;   true
                            )
                        ),
                        'detach_known/1_1_$special_\\+/1___1'(Z4, B)
                    )
                ),
                'known/1_1_$special_fail/0'
            )
        ;   A=(E5=<F5),
            (   'chr newvia_2'(E5, F5, G5)
            ->  get_attr(G5, guard_entailment, H5),
                H5=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, I5, _)
            ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                          I5)
            ),
            member(J5, I5),
            J5=suspension(_, active, _, _, _, K5, L5),
            K5==E5,
            L5==F5,
            !,
            J5=suspension(_, _, _, _, _, M5, N5),
            setarg(2, J5, removed),
            term_variables(term(M5, N5), O5),
            arg(5, J5, P5),
            (   var(P5)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                          Q5),
                Q5=[_|R5],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                         R5),
                (   R5=[S5|_]
                ->  setarg(5, S5, _)
                ;   true
                )
            ;   P5=[_, _|R5],
                setarg(2, P5, R5),
                (   R5=[S5|_]
                ->  setarg(5, S5, P5)
                ;   true
                )
            ),
            'detach_known/1_1_$special_=</2___2'(O5, J5),
            (   var(B)
            ->  true
            ;   B=suspension(_, T5, _, _, U5),
                setarg(2, B, removed),
                (   T5==not_stored_yet
                ->  V5=[]
                ;   term_variables(U5, V5),
                    arg(4, B, W5),
                    (   var(W5)
                    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                                  X5),
                        X5=[_|Y5],
                        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                                 Y5),
                        (   Y5=[Z5|_]
                        ->  setarg(4, Z5, _)
                        ;   true
                        )
                    ;   W5=[_, _|Y5],
                        setarg(2, W5, Y5),
                        (   Y5=[Z5|_]
                        ->  setarg(4, Z5, W5)
                        ;   true
                        )
                    ),
                    'detach_known/1_1_$special_\\+/1___1'(V5, B)
                )
            ),
            'known/1_1_$special_fail/0'
        )
    ;   A=(A6=:=B6),
        (   'chr newvia_2'(A6, B6, C6)
        ->  get_attr(C6, guard_entailment, D6),
            D6=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, E6)
        ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',
                      E6)
        ),
        member(F6, E6),
        F6=suspension(_, active, _, _, _, G6, H6),
        G6==A6,
        H6==B6,
        !,
        F6=suspension(_, _, _, _, _, I6, J6),
        setarg(2, F6, removed),
        term_variables(term(I6, J6), K6),
        arg(5, F6, L6),
        (   var(L6)
        ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',
                      M6),
            M6=[_|N6],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',
                     N6),
            (   N6=[O6|_]
            ->  setarg(5, O6, _)
            ;   true
            )
        ;   L6=[_, _|N6],
            setarg(2, L6, N6),
            (   N6=[O6|_]
            ->  setarg(5, O6, L6)
            ;   true
            )
        ),
        'detach_known/1_1_$special_=:=/2___2'(K6, F6),
        (   var(B)
        ->  true
        ;   B=suspension(_, P6, _, _, Q6),
            setarg(2, B, removed),
            (   P6==not_stored_yet
            ->  R6=[]
            ;   term_variables(Q6, R6),
                arg(4, B, S6),
                (   var(S6)
                ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                              T6),
                    T6=[_|U6],
                    b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                             U6),
                    (   U6=[V6|_]
                    ->  setarg(4, V6, _)
                    ;   true
                    )
                ;   S6=[_, _|U6],
                    setarg(2, S6, U6),
                    (   U6=[V6|_]
                    ->  setarg(4, V6, S6)
                    ;   true
                    )
                ),
                'detach_known/1_1_$special_\\+/1___1'(R6, B)
            )
        ),
        'known/1_1_$special_fail/0'
    ).
'known/1_1_$special_\\+/1___1__0'(A, B) :-
    (   'chr newvia_1'(A, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, E, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',
                  E)
    ),
    member(F, E),
    F=suspension(_, active, _, _, G),
    G==A,
    !,
    F=suspension(_, _, _, _, H),
    setarg(2, F, removed),
    term_variables(H, I),
    arg(4, F, J),
    (   var(J)
    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',
                  K),
        K=[_|L],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',
                 L),
        (   L=[M|_]
        ->  setarg(4, M, _)
        ;   true
        )
    ;   J=[_, _|L],
        setarg(2, J, L),
        (   L=[M|_]
        ->  setarg(4, M, J)
        ;   true
        )
    ),
    'detach_known/1_1_$default___1'(I, F),
    (   var(B)
    ->  true
    ;   B=suspension(_, N, _, _, O),
        setarg(2, B, removed),
        (   N==not_stored_yet
        ->  P=[]
        ;   term_variables(O, P),
            arg(4, B, Q),
            (   var(Q)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                          R),
                R=[_|S],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                         S),
                (   S=[T|_]
                ->  setarg(4, T, _)
                ;   true
                )
            ;   Q=[_, _|S],
                setarg(2, Q, S),
                (   S=[T|_]
                ->  setarg(4, T, Q)
                ;   true
                )
            ),
            'detach_known/1_1_$special_\\+/1___1'(P, B)
        )
    ),
    'known/1_1_$special_fail/0'.
'known/1_1_$special_\\+/1___1__0'(A, B) :-
    (   'chr newvia_1'(A, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, E, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  E)
    ),
    !,
    (   var(B)
    ->  B=suspension(F, not_stored_yet, 0, _, A),
        'chr gen_id'(F)
    ;   true
    ),
    'known/1_1_$special_\\+/1___1__0__0__33'(E, A, B).
'known/1_1_$special_\\+/1___1__0__0__33'([], A, B) :-
    'known/1_1_$special_\\+/1___1__1'(A, B).
'known/1_1_$special_\\+/1___1__0__0__33'([A|B], C, D) :-
    (   A=suspension(_, active, _, _, E, F),
        nonvar(E),
        E=(\+G),
        nonvar(G),
        G=(\+H),
        H==C
    ->  A=suspension(_, _, _, _, I, J),
        setarg(2, A, removed),
        term_variables(term(I, J), K),
        ( arg(4, A, L),
          (   var(L)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                        M),
              M=[_|N],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                       N),
              (   N=[O|_]
              ->  setarg(4, O, _)
              ;   true
              )
          ;   L=[_, _|N],
              setarg(2, L, N),
              (   N=[O|_]
              ->  setarg(4, O, L)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_;/2___2'(K, A),
        arg(2, D, P),
        setarg(2, D, active),
        ( arg(3, D, Q),
          R is Q+1,
          setarg(3, D, R)
        ),
        (   P==not_stored_yet
        ->  D=suspension(_, _, _, _, S),
            term_variables(S, T),
            'chr none_locked'(T),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                      U),
            V=[D|U],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                     V),
            (   U=[W|_]
            ->  setarg(4, W, V)
            ;   true
            ),
            'attach_known/1_1_$special_\\+/1___1'(T, D)
        ;   true
        ),
        known(F),
        (   D=suspension(_, active, R, _, _)
        ->  setarg(2, D, inactive),
            'known/1_1_$special_\\+/1___1__0__0__33'(B, C, D)
        ;   true
        )
    ;   'known/1_1_$special_\\+/1___1__0__0__33'(B, C, D)
    ).
'known/1_1_$special_\\+/1___1__0'(A, B) :-
    (   var(B)
    ->  B=suspension(C, not_stored_yet, 0, _, A),
        'chr gen_id'(C)
    ;   true
    ),
    'known/1_1_$special_\\+/1___1__1'(A, B).
'known/1_1_$special_\\+/1___1__1'(A, B) :-
    (   'chr newvia_1'(A, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, E, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  E)
    ),
    !,
    'known/1_1_$special_\\+/1___1__1__0__34'(E, A, B).
'known/1_1_$special_\\+/1___1__1__0__34'([], A, B) :-
    'known/1_1_$special_\\+/1___1__2'(A, B).
'known/1_1_$special_\\+/1___1__1__0__34'([A|B], C, D) :-
    (   A=suspension(_, active, _, _, E, F),
        nonvar(E),
        E=(G, _),
        nonvar(G),
        G=(\+H),
        nonvar(H),
        H=(\+I),
        I==C
    ->  A=suspension(_, _, _, _, J, K),
        setarg(2, A, removed),
        term_variables(term(J, K), L),
        ( arg(4, A, M),
          (   var(M)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                        N),
              N=[_|O],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                       O),
              (   O=[P|_]
              ->  setarg(4, P, _)
              ;   true
              )
          ;   M=[_, _|O],
              setarg(2, M, O),
              (   O=[P|_]
              ->  setarg(4, P, M)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_;/2___2'(L, A),
        arg(2, D, Q),
        setarg(2, D, active),
        ( arg(3, D, R),
          S is R+1,
          setarg(3, D, S)
        ),
        (   Q==not_stored_yet
        ->  D=suspension(_, _, _, _, T),
            term_variables(T, U),
            'chr none_locked'(U),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                      V),
            W=[D|V],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                     W),
            (   V=[X|_]
            ->  setarg(4, X, W)
            ;   true
            ),
            'attach_known/1_1_$special_\\+/1___1'(U, D)
        ;   true
        ),
        known(F),
        (   D=suspension(_, active, S, _, _)
        ->  setarg(2, D, inactive),
            'known/1_1_$special_\\+/1___1__1__0__34'(B, C, D)
        ;   true
        )
    ;   'known/1_1_$special_\\+/1___1__1__0__34'(B, C, D)
    ).
'known/1_1_$special_\\+/1___1__1'(A, B) :-
    'known/1_1_$special_\\+/1___1__2'(A, B).
'known/1_1_$special_\\+/1___1__2'(A, B) :-
    (   'chr newvia_1'(A, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, E, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  E)
    ),
    !,
    'known/1_1_$special_\\+/1___1__2__0__35'(E, A, B).
'known/1_1_$special_\\+/1___1__2__0__35'([], A, B) :-
    'known/1_1_$special_\\+/1___1__3'(A, B).
'known/1_1_$special_\\+/1___1__2__0__35'([A|B], C, D) :-
    (   A=suspension(_, active, _, _, E, F),
        E==C
    ->  A=suspension(_, _, _, _, G, H),
        setarg(2, A, removed),
        term_variables(term(G, H), I),
        ( arg(4, A, J),
          (   var(J)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                        K),
              K=[_|L],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                       L),
              (   L=[M|_]
              ->  setarg(4, M, _)
              ;   true
              )
          ;   J=[_, _|L],
              setarg(2, J, L),
              (   L=[M|_]
              ->  setarg(4, M, J)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_;/2___2'(I, A),
        arg(2, D, N),
        setarg(2, D, active),
        ( arg(3, D, O),
          P is O+1,
          setarg(3, D, P)
        ),
        (   N==not_stored_yet
        ->  D=suspension(_, _, _, _, Q),
            term_variables(Q, R),
            'chr none_locked'(R),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                      S),
            T=[D|S],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                     T),
            (   S=[U|_]
            ->  setarg(4, U, T)
            ;   true
            ),
            'attach_known/1_1_$special_\\+/1___1'(R, D)
        ;   true
        ),
        known(F),
        (   D=suspension(_, active, P, _, _)
        ->  setarg(2, D, inactive),
            'known/1_1_$special_\\+/1___1__2__0__35'(B, C, D)
        ;   true
        )
    ;   'known/1_1_$special_\\+/1___1__2__0__35'(B, C, D)
    ).
'known/1_1_$special_\\+/1___1__2'(A, B) :-
    'known/1_1_$special_\\+/1___1__3'(A, B).
'known/1_1_$special_\\+/1___1__3'(A, B) :-
    (   'chr newvia_1'(A, C)
    ->  get_attr(C, guard_entailment, D),
        D=v(_, _, _, E, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  E)
    ),
    !,
    'known/1_1_$special_\\+/1___1__3__0__36'(E, A, B).
'known/1_1_$special_\\+/1___1__3__0__36'([], A, B) :-
    'known/1_1_$special_\\+/1___1__4'(A, B).
'known/1_1_$special_\\+/1___1__3__0__36'([A|B], C, D) :-
    (   A=suspension(_, active, _, _, E, F),
        nonvar(E),
        E=(G, _),
        G==C
    ->  A=suspension(_, _, _, _, H, I),
        setarg(2, A, removed),
        term_variables(term(H, I), J),
        ( arg(4, A, K),
          (   var(K)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                        L),
              L=[_|M],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                       M),
              (   M=[N|_]
              ->  setarg(4, N, _)
              ;   true
              )
          ;   K=[_, _|M],
              setarg(2, K, M),
              (   M=[N|_]
              ->  setarg(4, N, K)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_;/2___2'(J, A),
        arg(2, D, O),
        setarg(2, D, active),
        ( arg(3, D, P),
          Q is P+1,
          setarg(3, D, Q)
        ),
        (   O==not_stored_yet
        ->  D=suspension(_, _, _, _, R),
            term_variables(R, S),
            'chr none_locked'(S),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                      T),
            U=[D|T],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                     U),
            (   T=[V|_]
            ->  setarg(4, V, U)
            ;   true
            ),
            'attach_known/1_1_$special_\\+/1___1'(S, D)
        ;   true
        ),
        known(F),
        (   D=suspension(_, active, Q, _, _)
        ->  setarg(2, D, inactive),
            'known/1_1_$special_\\+/1___1__3__0__36'(B, C, D)
        ;   true
        )
    ;   'known/1_1_$special_\\+/1___1__3__0__36'(B, C, D)
    ).
'known/1_1_$special_\\+/1___1__3'(A, B) :-
    'known/1_1_$special_\\+/1___1__4'(A, B).
'known/1_1_$special_\\+/1___1__4'(_, A) :-
    arg(2, A, B),
    setarg(2, A, active),
    arg(3, A, C),
    D is C+1,
    setarg(3, A, D),
    (   B==not_stored_yet
    ->  A=suspension(_, _, _, _, E),
        term_variables(E, F),
        'chr none_locked'(F),
        nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                  G),
        H=[A|G],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                 H),
        (   G=[I|_]
        ->  setarg(4, I, H)
        ;   true
        ),
        'attach_known/1_1_$special_\\+/1___1'(F, A)
    ;   true
    ).
'known/1_1_$special_functor/3'(A, B, C) :-
    'known/1_1_$special_functor/3___3__0'(A, B, C, _).
'known/1_1_$special_functor/3___3__0'(A, B, C, D) :-
    (   'chr newvia'([A, B, C], E)
    ->  get_attr(E, guard_entailment, F),
        F=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, G, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',
                  G)
    ),
    member(H, G),
    H=suspension(_, active, _, _, I, J, K),
    I==A,
    J==B,
    K==C,
    !,
    (   var(D)
    ->  true
    ;   D=suspension(_, L, _, _, M, N, O),
        setarg(2, D, removed),
        (   L==not_stored_yet
        ->  P=[]
        ;   term_variables(term(M, N, O), P),
            arg(4, D, Q),
            (   var(Q)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',
                          R),
                R=[_|S],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',
                         S),
                (   S=[T|_]
                ->  setarg(4, T, _)
                ;   true
                )
            ;   Q=[_, _|S],
                setarg(2, Q, S),
                (   S=[T|_]
                ->  setarg(4, T, Q)
                ;   true
                )
            ),
            'detach_known/1_1_$special_functor/3___3'(P, D)
        )
    ).
'known/1_1_$special_functor/3___3__0'(_, _, _, A) :-
    nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',
              B),
    member(C, B),
    C=suspension(_, active, _),
    !,
    (   var(A)
    ->  true
    ;   A=suspension(_, D, _, _, E, F, G),
        setarg(2, A, removed),
        (   D==not_stored_yet
        ->  H=[]
        ;   term_variables(term(E, F, G), H),
            arg(4, A, I),
            (   var(I)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',
                          J),
                J=[_|K],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',
                         K),
                (   K=[L|_]
                ->  setarg(4, L, _)
                ;   true
                )
            ;   I=[_, _|K],
                setarg(2, I, K),
                (   K=[L|_]
                ->  setarg(4, L, I)
                ;   true
                )
            ),
            'detach_known/1_1_$special_functor/3___3'(H, A)
        )
    ).
'known/1_1_$special_functor/3___3__0'(A, B, C, D) :-
    ground(C),
    ground(B),
    var(A),
    nb_getval('$chr_store_global_list_guard_entailment____variables___1',
              E),
    member(F, E),
    F=suspension(_, active, _, G),
    !,
    F=suspension(_, _, _, H),
    setarg(2, F, removed),
    term_variables(H, I),
    arg(3, F, J),
    (   var(J)
    ->  nb_getval('$chr_store_global_list_guard_entailment____variables___1',
                  K),
        K=[_|L],
        b_setval('$chr_store_global_list_guard_entailment____variables___1',
                 L),
        (   L=[M|_]
        ->  setarg(3, M, _)
        ;   true
        )
    ;   J=[_, _|L],
        setarg(2, J, L),
        (   L=[M|_]
        ->  setarg(3, M, J)
        ;   true
        )
    ),
    detach_variables___1(I, F),
    (   var(D)
    ->  true
    ;   D=suspension(_, N, _, _, O, P, Q),
        setarg(2, D, removed),
        (   N==not_stored_yet
        ->  R=[]
        ;   term_variables(term(O, P, Q), R),
            arg(4, D, S),
            (   var(S)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',
                          T),
                T=[_|U],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',
                         U),
                (   U=[V|_]
                ->  setarg(4, V, _)
                ;   true
                )
            ;   S=[_, _|U],
                setarg(2, S, U),
                (   U=[V|_]
                ->  setarg(4, V, S)
                ;   true
                )
            ),
            'detach_known/1_1_$special_functor/3___3'(R, D)
        )
    ),
    functor(A, B, C),
    A=..[_|W],
    append(W, G, X),
    variables(X).
'known/1_1_$special_functor/3___3__0'(A, B, C, D) :-
    nonvar(A),
    'chr lock'(A),
    'chr lock'(B),
    'chr lock'(C),
    \+ functor(A, B, C),
    'chr unlock'(A),
    'chr unlock'(B),
    'chr unlock'(C),
    !,
    (   var(D)
    ->  true
    ;   D=suspension(_, E, _, _, F, G, H),
        setarg(2, D, removed),
        (   E==not_stored_yet
        ->  I=[]
        ;   term_variables(term(F, G, H), I),
            arg(4, D, J),
            (   var(J)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',
                          K),
                K=[_|L],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',
                         L),
                (   L=[M|_]
                ->  setarg(4, M, _)
                ;   true
                )
            ;   J=[_, _|L],
                setarg(2, J, L),
                (   L=[M|_]
                ->  setarg(4, M, J)
                ;   true
                )
            ),
            'detach_known/1_1_$special_functor/3___3'(I, D)
        )
    ),
    'known/1_1_$special_fail/0'.
'known/1_1_$special_functor/3___3__0'(A, B, C, D) :-
    nonvar(C),
    nonvar(B),
    (   'chr newvia_1'(A, E)
    ->  get_attr(E, guard_entailment, F),
        F=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, G, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',
                  G)
    ),
    member(H, G),
    H=suspension(_, active, _, _, I, J, K),
    I==A,
    nonvar(K),
    nonvar(J),
    !,
    H=suspension(_, _, _, _, L, M, N),
    setarg(2, H, removed),
    term_variables(term(L, M, N), O),
    arg(4, H, P),
    (   var(P)
    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',
                  Q),
        Q=[_|R],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',
                 R),
        (   R=[S|_]
        ->  setarg(4, S, _)
        ;   true
        )
    ;   P=[_, _|R],
        setarg(2, P, R),
        (   R=[S|_]
        ->  setarg(4, S, P)
        ;   true
        )
    ),
    'detach_known/1_1_$special_functor/3___3'(O, H),
    (   var(D)
    ->  true
    ;   D=suspension(_, T, _, _, U, V, W),
        setarg(2, D, removed),
        (   T==not_stored_yet
        ->  X=[]
        ;   term_variables(term(U, V, W), X),
            arg(4, D, Y),
            (   var(Y)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',
                          Z),
                Z=[_|A1],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',
                         A1),
                (   A1=[B1|_]
                ->  setarg(4, B1, _)
                ;   true
                )
            ;   Y=[_, _|A1],
                setarg(2, Y, A1),
                (   A1=[B1|_]
                ->  setarg(4, B1, Y)
                ;   true
                )
            ),
            'detach_known/1_1_$special_functor/3___3'(X, D)
        )
    ),
    'known/1_1_$special_fail/0'.
'known/1_1_$special_functor/3___3__0'(A, B, C, D) :-
    (   'chr newvia'([A, B, C], E)
    ->  get_attr(E, guard_entailment, F),
        F=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, G, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                  G)
    ),
    member(H, G),
    H=suspension(_, active, _, _, I),
    nonvar(I),
    I=functor(J, K, L),
    J==A,
    K==B,
    L==C,
    !,
    H=suspension(_, _, _, _, M),
    setarg(2, H, removed),
    term_variables(M, N),
    arg(4, H, O),
    (   var(O)
    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                  P),
        P=[_|Q],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                 Q),
        (   Q=[R|_]
        ->  setarg(4, R, _)
        ;   true
        )
    ;   O=[_, _|Q],
        setarg(2, O, Q),
        (   Q=[R|_]
        ->  setarg(4, R, O)
        ;   true
        )
    ),
    'detach_known/1_1_$special_\\+/1___1'(N, H),
    (   var(D)
    ->  true
    ;   D=suspension(_, S, _, _, T, U, V),
        setarg(2, D, removed),
        (   S==not_stored_yet
        ->  W=[]
        ;   term_variables(term(T, U, V), W),
            arg(4, D, X),
            (   var(X)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',
                          Y),
                Y=[_|Z],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',
                         Z),
                (   Z=[A1|_]
                ->  setarg(4, A1, _)
                ;   true
                )
            ;   X=[_, _|Z],
                setarg(2, X, Z),
                (   Z=[A1|_]
                ->  setarg(4, A1, X)
                ;   true
                )
            ),
            'detach_known/1_1_$special_functor/3___3'(W, D)
        )
    ),
    'known/1_1_$special_fail/0'.
'known/1_1_$special_functor/3___3__0'(A, B, C, D) :-
    (   'chr newvia'([A, B, C], E)
    ->  get_attr(E, guard_entailment, F),
        F=v(_, _, _, G, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  G)
    ),
    !,
    (   var(D)
    ->  D=suspension(H, not_stored_yet, 0, _, A, B, C),
        'chr gen_id'(H)
    ;   true
    ),
    'known/1_1_$special_functor/3___3__0__0__10'(G,
                                                 A,
                                                 B,
                                                 C,
                                                 D).
'known/1_1_$special_functor/3___3__0__0__10'([], A, B, C, D) :-
    'known/1_1_$special_functor/3___3__1'(A, B, C, D).
'known/1_1_$special_functor/3___3__0__0__10'([A|B], C, D, E, F) :-
    (   A=suspension(_, active, _, _, G, H),
        nonvar(G),
        G=(\+I),
        nonvar(I),
        I=functor(J, K, L),
        J==C,
        K==D,
        L==E
    ->  A=suspension(_, _, _, _, M, N),
        setarg(2, A, removed),
        term_variables(term(M, N), O),
        ( arg(4, A, P),
          (   var(P)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                        Q),
              Q=[_|R],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                       R),
              (   R=[S|_]
              ->  setarg(4, S, _)
              ;   true
              )
          ;   P=[_, _|R],
              setarg(2, P, R),
              (   R=[S|_]
              ->  setarg(4, S, P)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_;/2___2'(O, A),
        arg(2, F, T),
        setarg(2, F, active),
        ( arg(3, F, U),
          V is U+1,
          setarg(3, F, V)
        ),
        (   T==not_stored_yet
        ->  F=suspension(_, _, _, _, W, X, Y),
            term_variables(term(W, X, Y), Z),
            'chr none_locked'(Z),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',
                      A1),
            B1=[F|A1],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',
                     B1),
            (   A1=[C1|_]
            ->  setarg(4, C1, B1)
            ;   true
            ),
            'attach_known/1_1_$special_functor/3___3'(Z, F)
        ;   true
        ),
        known(H),
        (   F=suspension(_, active, V, _, _, _, _)
        ->  setarg(2, F, inactive),
            'known/1_1_$special_functor/3___3__0__0__10'(B,
                                                         C,
                                                         D,
                                                         E,
                                                         F)
        ;   true
        )
    ;   'known/1_1_$special_functor/3___3__0__0__10'(B,
                                                     C,
                                                     D,
                                                     E,
                                                     F)
    ).
'known/1_1_$special_functor/3___3__0'(A, B, C, D) :-
    (   var(D)
    ->  D=suspension(E, not_stored_yet, 0, _, A, B, C),
        'chr gen_id'(E)
    ;   true
    ),
    'known/1_1_$special_functor/3___3__1'(A, B, C, D).
'known/1_1_$special_functor/3___3__1'(A, B, C, D) :-
    (   'chr newvia'([A, B, C], E)
    ->  get_attr(E, guard_entailment, F),
        F=v(_, _, _, G, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  G)
    ),
    !,
    'known/1_1_$special_functor/3___3__1__0__11'(G,
                                                 A,
                                                 B,
                                                 C,
                                                 D).
'known/1_1_$special_functor/3___3__1__0__11'([], A, B, C, D) :-
    'known/1_1_$special_functor/3___3__2'(A, B, C, D).
'known/1_1_$special_functor/3___3__1__0__11'([A|B], C, D, E, F) :-
    (   A=suspension(_, active, _, _, G, H),
        nonvar(G),
        G=(I, _),
        nonvar(I),
        I=(\+J),
        nonvar(J),
        J=functor(K, L, M),
        K==C,
        L==D,
        M==E
    ->  A=suspension(_, _, _, _, N, O),
        setarg(2, A, removed),
        term_variables(term(N, O), P),
        ( arg(4, A, Q),
          (   var(Q)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                        R),
              R=[_|S],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                       S),
              (   S=[T|_]
              ->  setarg(4, T, _)
              ;   true
              )
          ;   Q=[_, _|S],
              setarg(2, Q, S),
              (   S=[T|_]
              ->  setarg(4, T, Q)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_;/2___2'(P, A),
        arg(2, F, U),
        setarg(2, F, active),
        ( arg(3, F, V),
          W is V+1,
          setarg(3, F, W)
        ),
        (   U==not_stored_yet
        ->  F=suspension(_, _, _, _, X, Y, Z),
            term_variables(term(X, Y, Z), A1),
            'chr none_locked'(A1),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',
                      B1),
            C1=[F|B1],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',
                     C1),
            (   B1=[D1|_]
            ->  setarg(4, D1, C1)
            ;   true
            ),
            'attach_known/1_1_$special_functor/3___3'(A1, F)
        ;   true
        ),
        known(H),
        (   F=suspension(_, active, W, _, _, _, _)
        ->  setarg(2, F, inactive),
            'known/1_1_$special_functor/3___3__1__0__11'(B,
                                                         C,
                                                         D,
                                                         E,
                                                         F)
        ;   true
        )
    ;   'known/1_1_$special_functor/3___3__1__0__11'(B,
                                                     C,
                                                     D,
                                                     E,
                                                     F)
    ).
'known/1_1_$special_functor/3___3__1'(A, B, C, D) :-
    'known/1_1_$special_functor/3___3__2'(A, B, C, D).
'known/1_1_$special_functor/3___3__2'(A, B, C, D) :-
    (   'chr newvia_1'(A, E)
    ->  get_attr(E, guard_entailment, F),
        F=v(_, _, _, G, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  G)
    ),
    !,
    'known/1_1_$special_functor/3___3__2__0__12'(G,
                                                 A,
                                                 B,
                                                 C,
                                                 D).
'known/1_1_$special_functor/3___3__2__0__12'([], A, B, C, D) :-
    'known/1_1_$special_functor/3___3__3'(A, B, C, D).
'known/1_1_$special_functor/3___3__2__0__12'([A|B], C, D, E, F) :-
    (   A=suspension(_, active, _, _, G, _),
        nonvar(G),
        G=(\+H),
        nonvar(H),
        H=functor(I, _, _),
        I==C
    ->  A=suspension(_, _, _, _, J, K),
        setarg(2, A, removed),
        term_variables(term(J, K), L),
        ( arg(4, A, M),
          (   var(M)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                        N),
              N=[_|O],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                       O),
              (   O=[P|_]
              ->  setarg(4, P, _)
              ;   true
              )
          ;   M=[_, _|O],
              setarg(2, M, O),
              (   O=[P|_]
              ->  setarg(4, P, M)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_;/2___2'(L, A),
        'known/1_1_$special_functor/3___3__2__0__12'(B,
                                                     C,
                                                     D,
                                                     E,
                                                     F)
    ;   'known/1_1_$special_functor/3___3__2__0__12'(B,
                                                     C,
                                                     D,
                                                     E,
                                                     F)
    ).
'known/1_1_$special_functor/3___3__2'(A, B, C, D) :-
    'known/1_1_$special_functor/3___3__3'(A, B, C, D).
'known/1_1_$special_functor/3___3__3'(_, _, _, A) :-
    arg(2, A, B),
    setarg(2, A, active),
    arg(3, A, C),
    D is C+1,
    setarg(3, A, D),
    (   B==not_stored_yet
    ->  A=suspension(_, _, _, _, E, F, G),
        term_variables(term(E, F, G), H),
        'chr none_locked'(H),
        nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',
                  I),
        J=[A|I],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',
                 J),
        (   I=[K|_]
        ->  setarg(4, K, J)
        ;   true
        ),
        'attach_known/1_1_$special_functor/3___3'(H, A)
    ;   true
    ).
'known/1_1_$special_\\=/2'(A, B) :-
    'known/1_1_$special_\\=/2___2__0'(A, B, _).
'known/1_1_$special_\\=/2___2__0'(A, B, C) :-
    (   'chr newvia_2'(A, B, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, F, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',
                  F)
    ),
    member(G, F),
    G=suspension(_, active, _, _, _, H, I),
    H==A,
    I==B,
    !,
    (   var(C)
    ->  true
    ;   C=suspension(_, J, _, _, _, K, L),
        setarg(2, C, removed),
        (   J==not_stored_yet
        ->  M=[]
        ;   term_variables(term(K, L), M),
            arg(5, C, N),
            (   var(N)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',
                          O),
                O=[_|P],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',
                         P),
                (   P=[Q|_]
                ->  setarg(5, Q, _)
                ;   true
                )
            ;   N=[_, _|P],
                setarg(2, N, P),
                (   P=[Q|_]
                ->  setarg(5, Q, N)
                ;   true
                )
            ),
            'detach_known/1_1_$special_\\=/2___2'(M, C)
        )
    ).
'known/1_1_$special_\\=/2___2__0'(_, _, A) :-
    nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',
              B),
    member(C, B),
    C=suspension(_, active, _),
    !,
    (   var(A)
    ->  true
    ;   A=suspension(_, D, _, _, _, E, F),
        setarg(2, A, removed),
        (   D==not_stored_yet
        ->  G=[]
        ;   term_variables(term(E, F), G),
            arg(5, A, H),
            (   var(H)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',
                          I),
                I=[_|J],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',
                         J),
                (   J=[K|_]
                ->  setarg(5, K, _)
                ;   true
                )
            ;   H=[_, _|J],
                setarg(2, H, J),
                (   J=[K|_]
                ->  setarg(5, K, H)
                ;   true
                )
            ),
            'detach_known/1_1_$special_\\=/2___2'(G, A)
        )
    ).
'known/1_1_$special_\\=/2___2__0'(A, B, C) :-
    ground(B),
    ground(A),
    'chr lock'(A),
    'chr lock'(B),
    A=B,
    'chr unlock'(A),
    'chr unlock'(B),
    !,
    (   var(C)
    ->  true
    ;   C=suspension(_, D, _, _, _, E, F),
        setarg(2, C, removed),
        (   D==not_stored_yet
        ->  G=[]
        ;   term_variables(term(E, F), G),
            arg(5, C, H),
            (   var(H)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',
                          I),
                I=[_|J],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',
                         J),
                (   J=[K|_]
                ->  setarg(5, K, _)
                ;   true
                )
            ;   H=[_, _|J],
                setarg(2, H, J),
                (   J=[K|_]
                ->  setarg(5, K, H)
                ;   true
                )
            ),
            'detach_known/1_1_$special_\\=/2___2'(G, C)
        )
    ),
    'known/1_1_$special_fail/0'.
'known/1_1_$special_\\=/2___2__0'(A, B, C) :-
    B==A,
    !,
    (   var(C)
    ->  true
    ;   C=suspension(_, D, _, _, _, E, F),
        setarg(2, C, removed),
        (   D==not_stored_yet
        ->  G=[]
        ;   term_variables(term(E, F), G),
            arg(5, C, H),
            (   var(H)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',
                          I),
                I=[_|J],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',
                         J),
                (   J=[K|_]
                ->  setarg(5, K, _)
                ;   true
                )
            ;   H=[_, _|J],
                setarg(2, H, J),
                (   J=[K|_]
                ->  setarg(5, K, H)
                ;   true
                )
            ),
            'detach_known/1_1_$special_\\=/2___2'(G, C)
        )
    ),
    'known/1_1_$special_fail/0'.
'known/1_1_$special_\\=/2___2__0'(A, B, C) :-
    nonvar(B),
    (   var(A),
        'chr lock'(B),
        functor(B, D, E),
        E>0,
        'chr unlock'(B),
        !,
        (   var(C)
        ->  true
        ;   C=suspension(_, F, _, _, _, G, H),
            setarg(2, C, removed),
            (   F==not_stored_yet
            ->  I=[]
            ;   term_variables(term(G, H), I),
                arg(5, C, J),
                (   var(J)
                ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',
                              K),
                    K=[_|L],
                    b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',
                             L),
                    (   L=[M|_]
                    ->  setarg(5, M, _)
                    ;   true
                    )
                ;   J=[_, _|L],
                    setarg(2, J, L),
                    (   L=[M|_]
                    ->  setarg(5, M, J)
                    ;   true
                    )
                ),
                'detach_known/1_1_$special_\\=/2___2'(I, C)
            )
        ),
        length(N, E),
        B=..[D|O],
        P=..[D|N],
        add_args_nunif(O, N, Q),
        R=(\+functor(A, D, E);A=P, Q),
        known(R)
    ;   nonvar(A),
        'chr lock'(A),
        functor(A, S, T),
        'chr unlock'(A),
        !,
        (   var(C)
        ->  true
        ;   C=suspension(_, U, _, _, _, V, W),
            setarg(2, C, removed),
            (   U==not_stored_yet
            ->  X=[]
            ;   term_variables(term(V, W), X),
                arg(5, C, Y),
                (   var(Y)
                ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',
                              Z),
                    Z=[_|A1],
                    b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',
                             A1),
                    (   A1=[B1|_]
                    ->  setarg(5, B1, _)
                    ;   true
                    )
                ;   Y=[_, _|A1],
                    setarg(2, Y, A1),
                    (   A1=[B1|_]
                    ->  setarg(5, B1, Y)
                    ;   true
                    )
                ),
                'detach_known/1_1_$special_\\=/2___2'(X, C)
            )
        ),
        (   functor(B, S, T)
        ->  A=..[S|C1],
            B=..[S|D1],
            add_args_nunif(C1, D1, E1),
            known(E1)
        ;   true
        )
    ).
'known/1_1_$special_\\=/2___2__0'(A, B, C) :-
    (   var(C)
    ->  C=suspension(D, not_stored_yet, t, 0, _, A, B),
        'chr gen_id'(D)
    ;   true
    ),
    (   '$novel_production'(C, 182),
        !,
        '$extend_history'(C, 182),
        arg(2, C, E),
        setarg(2, C, active),
        arg(4, C, F),
        G is F+1,
        setarg(4, C, G),
        (   E==not_stored_yet
        ->  C=suspension(_, _, _, _, _, H, I),
            term_variables(term(H, I), J),
            'chr none_locked'(J),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',
                      K),
            L=[C|K],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',
                     L),
            (   K=[M|_]
            ->  setarg(5, M, L)
            ;   true
            ),
            'attach_known/1_1_$special_\\=/2___2'(J, C)
        ;   true
        ),
        'known/1_1_$special_\\=/2'(B, A),
        (   C=suspension(_, active, _, G, _, _, _)
        ->  setarg(2, C, inactive),
            'known/1_1_$special_\\=/2___2__1'(A, B, C)
        ;   true
        )
    ;   'known/1_1_$special_\\=/2___2__1'(A, B, C)
    ).
'known/1_1_$special_\\=/2___2__1'(A, B, C) :-
    (   'chr newvia_2'(A, B, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, F, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                  F)
    ),
    member(G, F),
    G=suspension(_, active, _, _, H),
    nonvar(H),
    H=(I\=J),
    I==A,
    J==B,
    !,
    G=suspension(_, _, _, _, K),
    setarg(2, G, removed),
    term_variables(K, L),
    arg(4, G, M),
    (   var(M)
    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                  N),
        N=[_|O],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                 O),
        (   O=[P|_]
        ->  setarg(4, P, _)
        ;   true
        )
    ;   M=[_, _|O],
        setarg(2, M, O),
        (   O=[P|_]
        ->  setarg(4, P, M)
        ;   true
        )
    ),
    'detach_known/1_1_$special_\\+/1___1'(L, G),
    (   var(C)
    ->  true
    ;   C=suspension(_, Q, _, _, _, R, S),
        setarg(2, C, removed),
        (   Q==not_stored_yet
        ->  T=[]
        ;   term_variables(term(R, S), T),
            arg(5, C, U),
            (   var(U)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',
                          V),
                V=[_|W],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',
                         W),
                (   W=[X|_]
                ->  setarg(5, X, _)
                ;   true
                )
            ;   U=[_, _|W],
                setarg(2, U, W),
                (   W=[X|_]
                ->  setarg(5, X, U)
                ;   true
                )
            ),
            'detach_known/1_1_$special_\\=/2___2'(T, C)
        )
    ),
    'known/1_1_$special_fail/0'.
'known/1_1_$special_\\=/2___2__1'(A, B, C) :-
    (   'chr newvia_2'(A, B, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, F, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  F)
    ),
    !,
    'known/1_1_$special_\\=/2___2__1__0__11'(F, A, B, C).
'known/1_1_$special_\\=/2___2__1__0__11'([], A, B, C) :-
    'known/1_1_$special_\\=/2___2__2'(A, B, C).
'known/1_1_$special_\\=/2___2__1__0__11'([A|B], C, D, E) :-
    (   A=suspension(_, active, _, _, F, G),
        nonvar(F),
        F=(\+H),
        nonvar(H),
        H=(I\=J),
        I==C,
        J==D
    ->  A=suspension(_, _, _, _, K, L),
        setarg(2, A, removed),
        term_variables(term(K, L), M),
        ( arg(4, A, N),
          (   var(N)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                        O),
              O=[_|P],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                       P),
              (   P=[Q|_]
              ->  setarg(4, Q, _)
              ;   true
              )
          ;   N=[_, _|P],
              setarg(2, N, P),
              (   P=[Q|_]
              ->  setarg(4, Q, N)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_;/2___2'(M, A),
        arg(2, E, R),
        setarg(2, E, active),
        ( arg(4, E, S),
          T is S+1,
          setarg(4, E, T)
        ),
        (   R==not_stored_yet
        ->  E=suspension(_, _, _, _, _, U, V),
            term_variables(term(U, V), W),
            'chr none_locked'(W),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',
                      X),
            Y=[E|X],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',
                     Y),
            (   X=[Z|_]
            ->  setarg(5, Z, Y)
            ;   true
            ),
            'attach_known/1_1_$special_\\=/2___2'(W, E)
        ;   true
        ),
        known(G),
        (   E=suspension(_, active, _, T, _, _, _)
        ->  setarg(2, E, inactive),
            'known/1_1_$special_\\=/2___2__1__0__11'(B,
                                                     C,
                                                     D,
                                                     E)
        ;   true
        )
    ;   'known/1_1_$special_\\=/2___2__1__0__11'(B, C, D, E)
    ).
'known/1_1_$special_\\=/2___2__1'(A, B, C) :-
    'known/1_1_$special_\\=/2___2__2'(A, B, C).
'known/1_1_$special_\\=/2___2__2'(A, B, C) :-
    (   'chr newvia_2'(A, B, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, F, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  F)
    ),
    !,
    'known/1_1_$special_\\=/2___2__2__0__12'(F, A, B, C).
'known/1_1_$special_\\=/2___2__2__0__12'([], A, B, C) :-
    'known/1_1_$special_\\=/2___2__3'(A, B, C).
'known/1_1_$special_\\=/2___2__2__0__12'([A|B], C, D, E) :-
    (   A=suspension(_, active, _, _, F, G),
        nonvar(F),
        F=(H, _),
        nonvar(H),
        H=(\+I),
        nonvar(I),
        I=(J\=K),
        J==C,
        K==D
    ->  A=suspension(_, _, _, _, L, M),
        setarg(2, A, removed),
        term_variables(term(L, M), N),
        ( arg(4, A, O),
          (   var(O)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                        P),
              P=[_|Q],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                       Q),
              (   Q=[R|_]
              ->  setarg(4, R, _)
              ;   true
              )
          ;   O=[_, _|Q],
              setarg(2, O, Q),
              (   Q=[R|_]
              ->  setarg(4, R, O)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_;/2___2'(N, A),
        arg(2, E, S),
        setarg(2, E, active),
        ( arg(4, E, T),
          U is T+1,
          setarg(4, E, U)
        ),
        (   S==not_stored_yet
        ->  E=suspension(_, _, _, _, _, V, W),
            term_variables(term(V, W), X),
            'chr none_locked'(X),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',
                      Y),
            Z=[E|Y],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',
                     Z),
            (   Y=[A1|_]
            ->  setarg(5, A1, Z)
            ;   true
            ),
            'attach_known/1_1_$special_\\=/2___2'(X, E)
        ;   true
        ),
        known(G),
        (   E=suspension(_, active, _, U, _, _, _)
        ->  setarg(2, E, inactive),
            'known/1_1_$special_\\=/2___2__2__0__12'(B,
                                                     C,
                                                     D,
                                                     E)
        ;   true
        )
    ;   'known/1_1_$special_\\=/2___2__2__0__12'(B, C, D, E)
    ).
'known/1_1_$special_\\=/2___2__2'(A, B, C) :-
    'known/1_1_$special_\\=/2___2__3'(A, B, C).
'known/1_1_$special_\\=/2___2__3'(_, _, A) :-
    arg(2, A, B),
    setarg(2, A, active),
    arg(4, A, C),
    D is C+1,
    setarg(4, A, D),
    (   B==not_stored_yet
    ->  A=suspension(_, _, _, _, _, E, F),
        term_variables(term(E, F), G),
        'chr none_locked'(G),
        nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',
                  H),
        I=[A|H],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',
                 I),
        (   H=[J|_]
        ->  setarg(5, J, I)
        ;   true
        ),
        'attach_known/1_1_$special_\\=/2___2'(G, A)
    ;   true
    ).
'known/1_1_$special_=/2'(A, B) :-
    'known/1_1_$special_=/2___2__0'(A, B, _).
'known/1_1_$special_=/2___2__0'(A, B, C) :-
    (   'chr newvia_2'(A, B, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, F, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',
                  F)
    ),
    member(G, F),
    G=suspension(_, active, _, _, H, I),
    H==A,
    I==B,
    !,
    (   var(C)
    ->  true
    ;   C=suspension(_, J, _, _, K, L),
        setarg(2, C, removed),
        (   J==not_stored_yet
        ->  M=[]
        ;   term_variables(term(K, L), M),
            arg(4, C, N),
            (   var(N)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',
                          O),
                O=[_|P],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',
                         P),
                (   P=[Q|_]
                ->  setarg(4, Q, _)
                ;   true
                )
            ;   N=[_, _|P],
                setarg(2, N, P),
                (   P=[Q|_]
                ->  setarg(4, Q, N)
                ;   true
                )
            ),
            'detach_known/1_1_$special_=/2___2'(M, C)
        )
    ).
'known/1_1_$special_=/2___2__0'(_, _, A) :-
    nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',
              B),
    member(C, B),
    C=suspension(_, active, _),
    !,
    (   var(A)
    ->  true
    ;   A=suspension(_, D, _, _, E, F),
        setarg(2, A, removed),
        (   D==not_stored_yet
        ->  G=[]
        ;   term_variables(term(E, F), G),
            arg(4, A, H),
            (   var(H)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',
                          I),
                I=[_|J],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',
                         J),
                (   J=[K|_]
                ->  setarg(4, K, _)
                ;   true
                )
            ;   H=[_, _|J],
                setarg(2, H, J),
                (   J=[K|_]
                ->  setarg(4, K, H)
                ;   true
                )
            ),
            'detach_known/1_1_$special_=/2___2'(G, A)
        )
    ).
'known/1_1_$special_=/2___2__0'(A, B, C) :-
    B==A,
    !,
    (   var(C)
    ->  true
    ;   C=suspension(_, D, _, _, E, F),
        setarg(2, C, removed),
        (   D==not_stored_yet
        ->  G=[]
        ;   term_variables(term(E, F), G),
            arg(4, C, H),
            (   var(H)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',
                          I),
                I=[_|J],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',
                         J),
                (   J=[K|_]
                ->  setarg(4, K, _)
                ;   true
                )
            ;   H=[_, _|J],
                setarg(2, H, J),
                (   J=[K|_]
                ->  setarg(4, K, H)
                ;   true
                )
            ),
            'detach_known/1_1_$special_=/2___2'(G, C)
        )
    ).
'known/1_1_$special_=/2___2__0'(A, B, C) :-
    var(A),
    !,
    (   var(C)
    ->  true
    ;   C=suspension(_, D, _, _, E, F),
        setarg(2, C, removed),
        (   D==not_stored_yet
        ->  G=[]
        ;   term_variables(term(E, F), G),
            arg(4, C, H),
            (   var(H)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',
                          I),
                I=[_|J],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',
                         J),
                (   J=[K|_]
                ->  setarg(4, K, _)
                ;   true
                )
            ;   H=[_, _|J],
                setarg(2, H, J),
                (   J=[K|_]
                ->  setarg(4, K, H)
                ;   true
                )
            ),
            'detach_known/1_1_$special_=/2___2'(G, C)
        )
    ),
    A=B.
'known/1_1_$special_=/2___2__0'(A, B, C) :-
    var(B),
    !,
    (   var(C)
    ->  true
    ;   C=suspension(_, D, _, _, E, F),
        setarg(2, C, removed),
        (   D==not_stored_yet
        ->  G=[]
        ;   term_variables(term(E, F), G),
            arg(4, C, H),
            (   var(H)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',
                          I),
                I=[_|J],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',
                         J),
                (   J=[K|_]
                ->  setarg(4, K, _)
                ;   true
                )
            ;   H=[_, _|J],
                setarg(2, H, J),
                (   J=[K|_]
                ->  setarg(4, K, H)
                ;   true
                )
            ),
            'detach_known/1_1_$special_=/2___2'(G, C)
        )
    ),
    A=B.
'known/1_1_$special_=/2___2__0'(A, B, C) :-
    'chr lock'(A),
    functor(A, D, E),
    'chr unlock'(A),
    !,
    (   var(C)
    ->  true
    ;   C=suspension(_, F, _, _, G, H),
        setarg(2, C, removed),
        (   F==not_stored_yet
        ->  I=[]
        ;   term_variables(term(G, H), I),
            arg(4, C, J),
            (   var(J)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',
                          K),
                K=[_|L],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',
                         L),
                (   L=[M|_]
                ->  setarg(4, M, _)
                ;   true
                )
            ;   J=[_, _|L],
                setarg(2, J, L),
                (   L=[M|_]
                ->  setarg(4, M, J)
                ;   true
                )
            ),
            'detach_known/1_1_$special_=/2___2'(I, C)
        )
    ),
    (   functor(B, D, E),
        A=B
    ->  true
    ;   'known/1_1_$special_fail/0'
    ).
'known/1_1_$special_=/2___2__0'(A, B, C) :-
    (   'chr newvia_2'(A, B, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, F, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                  F)
    ),
    member(G, F),
    G=suspension(_, active, _, _, H),
    nonvar(H),
    H=(I=J),
    I==A,
    J==B,
    !,
    G=suspension(_, _, _, _, K),
    setarg(2, G, removed),
    term_variables(K, L),
    arg(4, G, M),
    (   var(M)
    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                  N),
        N=[_|O],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                 O),
        (   O=[P|_]
        ->  setarg(4, P, _)
        ;   true
        )
    ;   M=[_, _|O],
        setarg(2, M, O),
        (   O=[P|_]
        ->  setarg(4, P, M)
        ;   true
        )
    ),
    'detach_known/1_1_$special_\\+/1___1'(L, G),
    (   var(C)
    ->  true
    ;   C=suspension(_, Q, _, _, R, S),
        setarg(2, C, removed),
        (   Q==not_stored_yet
        ->  T=[]
        ;   term_variables(term(R, S), T),
            arg(4, C, U),
            (   var(U)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',
                          V),
                V=[_|W],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',
                         W),
                (   W=[X|_]
                ->  setarg(4, X, _)
                ;   true
                )
            ;   U=[_, _|W],
                setarg(2, U, W),
                (   W=[X|_]
                ->  setarg(4, X, U)
                ;   true
                )
            ),
            'detach_known/1_1_$special_=/2___2'(T, C)
        )
    ),
    'known/1_1_$special_fail/0'.
'known/1_1_$special_=/2___2__0'(A, B, C) :-
    (   'chr newvia_2'(A, B, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, F, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  F)
    ),
    !,
    (   var(C)
    ->  C=suspension(G, not_stored_yet, 0, _, A, B),
        'chr gen_id'(G)
    ;   true
    ),
    'known/1_1_$special_=/2___2__0__0__10'(F, A, B, C).
'known/1_1_$special_=/2___2__0__0__10'([], A, B, C) :-
    'known/1_1_$special_=/2___2__1'(A, B, C).
'known/1_1_$special_=/2___2__0__0__10'([A|B], C, D, E) :-
    (   A=suspension(_, active, _, _, F, G),
        nonvar(F),
        F=(\+H),
        nonvar(H),
        H=(I=J),
        I==C,
        J==D
    ->  A=suspension(_, _, _, _, K, L),
        setarg(2, A, removed),
        term_variables(term(K, L), M),
        ( arg(4, A, N),
          (   var(N)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                        O),
              O=[_|P],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                       P),
              (   P=[Q|_]
              ->  setarg(4, Q, _)
              ;   true
              )
          ;   N=[_, _|P],
              setarg(2, N, P),
              (   P=[Q|_]
              ->  setarg(4, Q, N)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_;/2___2'(M, A),
        arg(2, E, R),
        setarg(2, E, active),
        ( arg(3, E, S),
          T is S+1,
          setarg(3, E, T)
        ),
        (   R==not_stored_yet
        ->  E=suspension(_, _, _, _, U, V),
            term_variables(term(U, V), W),
            'chr none_locked'(W),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',
                      X),
            Y=[E|X],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',
                     Y),
            (   X=[Z|_]
            ->  setarg(4, Z, Y)
            ;   true
            ),
            'attach_known/1_1_$special_=/2___2'(W, E)
        ;   true
        ),
        known(G),
        (   E=suspension(_, active, T, _, _, _)
        ->  setarg(2, E, inactive),
            'known/1_1_$special_=/2___2__0__0__10'(B,
                                                   C,
                                                   D,
                                                   E)
        ;   true
        )
    ;   'known/1_1_$special_=/2___2__0__0__10'(B, C, D, E)
    ).
'known/1_1_$special_=/2___2__0'(A, B, C) :-
    (   var(C)
    ->  C=suspension(D, not_stored_yet, 0, _, A, B),
        'chr gen_id'(D)
    ;   true
    ),
    'known/1_1_$special_=/2___2__1'(A, B, C).
'known/1_1_$special_=/2___2__1'(A, B, C) :-
    (   'chr newvia_2'(A, B, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, F, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  F)
    ),
    !,
    'known/1_1_$special_=/2___2__1__0__11'(F, A, B, C).
'known/1_1_$special_=/2___2__1__0__11'([], A, B, C) :-
    'known/1_1_$special_=/2___2__2'(A, B, C).
'known/1_1_$special_=/2___2__1__0__11'([A|B], C, D, E) :-
    (   A=suspension(_, active, _, _, F, G),
        nonvar(F),
        F=(H, _),
        nonvar(H),
        H=(\+I),
        nonvar(I),
        I=(J=K),
        J==C,
        K==D
    ->  A=suspension(_, _, _, _, L, M),
        setarg(2, A, removed),
        term_variables(term(L, M), N),
        ( arg(4, A, O),
          (   var(O)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                        P),
              P=[_|Q],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                       Q),
              (   Q=[R|_]
              ->  setarg(4, R, _)
              ;   true
              )
          ;   O=[_, _|Q],
              setarg(2, O, Q),
              (   Q=[R|_]
              ->  setarg(4, R, O)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_;/2___2'(N, A),
        arg(2, E, S),
        setarg(2, E, active),
        ( arg(3, E, T),
          U is T+1,
          setarg(3, E, U)
        ),
        (   S==not_stored_yet
        ->  E=suspension(_, _, _, _, V, W),
            term_variables(term(V, W), X),
            'chr none_locked'(X),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',
                      Y),
            Z=[E|Y],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',
                     Z),
            (   Y=[A1|_]
            ->  setarg(4, A1, Z)
            ;   true
            ),
            'attach_known/1_1_$special_=/2___2'(X, E)
        ;   true
        ),
        known(G),
        (   E=suspension(_, active, U, _, _, _)
        ->  setarg(2, E, inactive),
            'known/1_1_$special_=/2___2__1__0__11'(B,
                                                   C,
                                                   D,
                                                   E)
        ;   true
        )
    ;   'known/1_1_$special_=/2___2__1__0__11'(B, C, D, E)
    ).
'known/1_1_$special_=/2___2__1'(A, B, C) :-
    'known/1_1_$special_=/2___2__2'(A, B, C).
'known/1_1_$special_=/2___2__2'(_, _, A) :-
    arg(2, A, B),
    setarg(2, A, active),
    arg(3, A, C),
    D is C+1,
    setarg(3, A, D),
    (   B==not_stored_yet
    ->  A=suspension(_, _, _, _, E, F),
        term_variables(term(E, F), G),
        'chr none_locked'(G),
        nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',
                  H),
        I=[A|H],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',
                 I),
        (   H=[J|_]
        ->  setarg(4, J, I)
        ;   true
        ),
        'attach_known/1_1_$special_=/2___2'(G, A)
    ;   true
    ).
'known/1_1_$special_,/2'(_, _) :-
    nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',
              A),
    member(B, A),
    B=suspension(_, active, _),
    !.
'known/1_1_$special_,/2'(A, B) :-
    known(A),
    known(B).
'known/1_1_$special_\\==/2'(A, B) :-
    'known/1_1_$special_\\==/2___2__0'(A, B, _).
'known/1_1_$special_\\==/2___2__0'(A, B, C) :-
    (   'chr newvia_2'(A, B, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, F, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',
                  F)
    ),
    member(G, F),
    G=suspension(_, active, _, _, _, H, I),
    H==A,
    I==B,
    !,
    (   var(C)
    ->  true
    ;   C=suspension(_, J, _, _, _, K, L),
        setarg(2, C, removed),
        (   J==not_stored_yet
        ->  M=[]
        ;   term_variables(term(K, L), M),
            arg(5, C, N),
            (   var(N)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',
                          O),
                O=[_|P],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',
                         P),
                (   P=[Q|_]
                ->  setarg(5, Q, _)
                ;   true
                )
            ;   N=[_, _|P],
                setarg(2, N, P),
                (   P=[Q|_]
                ->  setarg(5, Q, N)
                ;   true
                )
            ),
            'detach_known/1_1_$special_\\==/2___2'(M, C)
        )
    ).
'known/1_1_$special_\\==/2___2__0'(A, B, C) :-
    (   var(C)
    ->  C=suspension(D, not_stored_yet, t, 0, _, A, B),
        'chr gen_id'(D)
    ;   true
    ),
    (   '$novel_production'(C, 138),
        number(A),
        !,
        '$extend_history'(C, 138),
        arg(2, C, E),
        setarg(2, C, active),
        arg(4, C, F),
        G is F+1,
        setarg(4, C, G),
        (   E==not_stored_yet
        ->  C=suspension(_, _, _, _, _, H, I),
            term_variables(term(H, I), J),
            'chr none_locked'(J),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',
                      K),
            L=[C|K],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',
                     L),
            (   K=[M|_]
            ->  setarg(5, M, L)
            ;   true
            ),
            'attach_known/1_1_$special_\\==/2___2'(J, C)
        ;   true
        ),
        'known/1_1_$special_=\\=/2'(A, B),
        (   C=suspension(_, active, _, G, _, _, _)
        ->  setarg(2, C, inactive),
            'known/1_1_$special_\\==/2___2__1'(A, B, C)
        ;   true
        )
    ;   'known/1_1_$special_\\==/2___2__1'(A, B, C)
    ).
'known/1_1_$special_\\==/2___2__1'(A, B, C) :-
    '$novel_production'(C, 139),
    number(B),
    !,
    '$extend_history'(C, 139),
    arg(2, C, D),
    setarg(2, C, active),
    arg(4, C, E),
    F is E+1,
    setarg(4, C, F),
    (   D==not_stored_yet
    ->  C=suspension(_, _, _, _, _, G, H),
        term_variables(term(G, H), I),
        'chr none_locked'(I),
        nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',
                  J),
        K=[C|J],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',
                 K),
        (   J=[L|_]
        ->  setarg(5, L, K)
        ;   true
        ),
        'attach_known/1_1_$special_\\==/2___2'(I, C)
    ;   true
    ),
    'known/1_1_$special_=\\=/2'(A, B),
    (   C=suspension(_, active, _, F, _, _, _)
    ->  setarg(2, C, inactive),
        'known/1_1_$special_\\==/2___2__2'(A, B, C)
    ;   true
    ).
'known/1_1_$special_\\==/2___2__1'(A, B, C) :-
    'known/1_1_$special_\\==/2___2__2'(A, B, C).
'known/1_1_$special_\\==/2___2__2'(_, _, A) :-
    nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',
              B),
    member(C, B),
    C=suspension(_, active, _),
    !,
    (   var(A)
    ->  true
    ;   A=suspension(_, D, _, _, _, E, F),
        setarg(2, A, removed),
        (   D==not_stored_yet
        ->  G=[]
        ;   term_variables(term(E, F), G),
            arg(5, A, H),
            (   var(H)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',
                          I),
                I=[_|J],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',
                         J),
                (   J=[K|_]
                ->  setarg(5, K, _)
                ;   true
                )
            ;   H=[_, _|J],
                setarg(2, H, J),
                (   J=[K|_]
                ->  setarg(5, K, H)
                ;   true
                )
            ),
            'detach_known/1_1_$special_\\==/2___2'(G, A)
        )
    ).
'known/1_1_$special_\\==/2___2__2'(A, B, C) :-
    (   'chr newvia_2'(A, B, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, F, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                  F)
    ),
    member(G, F),
    G=suspension(_, active, _, _, H),
    nonvar(H),
    H=(I\==J),
    I==A,
    J==B,
    !,
    G=suspension(_, _, _, _, K),
    setarg(2, G, removed),
    term_variables(K, L),
    arg(4, G, M),
    (   var(M)
    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                  N),
        N=[_|O],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                 O),
        (   O=[P|_]
        ->  setarg(4, P, _)
        ;   true
        )
    ;   M=[_, _|O],
        setarg(2, M, O),
        (   O=[P|_]
        ->  setarg(4, P, M)
        ;   true
        )
    ),
    'detach_known/1_1_$special_\\+/1___1'(L, G),
    (   var(C)
    ->  true
    ;   C=suspension(_, Q, _, _, _, R, S),
        setarg(2, C, removed),
        (   Q==not_stored_yet
        ->  T=[]
        ;   term_variables(term(R, S), T),
            arg(5, C, U),
            (   var(U)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',
                          V),
                V=[_|W],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',
                         W),
                (   W=[X|_]
                ->  setarg(5, X, _)
                ;   true
                )
            ;   U=[_, _|W],
                setarg(2, U, W),
                (   W=[X|_]
                ->  setarg(5, X, U)
                ;   true
                )
            ),
            'detach_known/1_1_$special_\\==/2___2'(T, C)
        )
    ),
    'known/1_1_$special_fail/0'.
'known/1_1_$special_\\==/2___2__2'(A, B, C) :-
    (   'chr newvia_2'(A, B, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, F, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',
                  F)
    ),
    member(G, F),
    G=suspension(_, active, _, _, _, H, I),
    H==A,
    I==B,
    !,
    G=suspension(_, _, _, _, _, J, K),
    setarg(2, G, removed),
    term_variables(term(J, K), L),
    arg(5, G, M),
    (   var(M)
    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',
                  N),
        N=[_|O],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',
                 O),
        (   O=[P|_]
        ->  setarg(5, P, _)
        ;   true
        )
    ;   M=[_, _|O],
        setarg(2, M, O),
        (   O=[P|_]
        ->  setarg(5, P, M)
        ;   true
        )
    ),
    'detach_known/1_1_$special_==/2___2'(L, G),
    (   var(C)
    ->  true
    ;   C=suspension(_, Q, _, _, _, R, S),
        setarg(2, C, removed),
        (   Q==not_stored_yet
        ->  T=[]
        ;   term_variables(term(R, S), T),
            arg(5, C, U),
            (   var(U)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',
                          V),
                V=[_|W],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',
                         W),
                (   W=[X|_]
                ->  setarg(5, X, _)
                ;   true
                )
            ;   U=[_, _|W],
                setarg(2, U, W),
                (   W=[X|_]
                ->  setarg(5, X, U)
                ;   true
                )
            ),
            'detach_known/1_1_$special_\\==/2___2'(T, C)
        )
    ),
    'known/1_1_$special_fail/0'.
'known/1_1_$special_\\==/2___2__2'(A, B, C) :-
    (   'chr newvia_1'(A, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, F, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',
                  F)
    ),
    !,
    'known/1_1_$special_\\==/2___2__2__0__9'(F, A, B, C).
'known/1_1_$special_\\==/2___2__2__0__9'([], A, B, C) :-
    'known/1_1_$special_\\==/2___2__3'(A, B, C).
'known/1_1_$special_\\==/2___2__2__0__9'([A|B], C, D, E) :-
    (   A=suspension(_, active, _, _, _, F, G),
        G==C,
        H=t(229, A, E),
        '$novel_production'(A, H),
        '$novel_production'(E, H)
    ->  '$extend_history'(E, H),
        arg(2, E, I),
        setarg(2, E, active),
        ( arg(4, E, J),
          K is J+1,
          setarg(4, E, K)
        ),
        (   I==not_stored_yet
        ->  E=suspension(_, _, _, _, _, L, M),
            term_variables(term(L, M), N),
            'chr none_locked'(N),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',
                      O),
            P=[E|O],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',
                     P),
            (   O=[Q|_]
            ->  setarg(5, Q, P)
            ;   true
            ),
            'attach_known/1_1_$special_\\==/2___2'(N, E)
        ;   true
        ),
        'known/1_1_$special_\\==/2'(F, D),
        (   E=suspension(_, active, _, K, _, _, _)
        ->  setarg(2, E, inactive),
            'known/1_1_$special_\\==/2___2__2__0__9'(B,
                                                     C,
                                                     D,
                                                     E)
        ;   true
        )
    ;   'known/1_1_$special_\\==/2___2__2__0__9'(B, C, D, E)
    ).
'known/1_1_$special_\\==/2___2__2'(A, B, C) :-
    'known/1_1_$special_\\==/2___2__3'(A, B, C).
'known/1_1_$special_\\==/2___2__3'(A, B, C) :-
    '$novel_production'(C, 231),
    !,
    '$extend_history'(C, 231),
    arg(2, C, D),
    setarg(2, C, active),
    arg(4, C, E),
    F is E+1,
    setarg(4, C, F),
    (   D==not_stored_yet
    ->  C=suspension(_, _, _, _, _, G, H),
        term_variables(term(G, H), I),
        'chr none_locked'(I),
        nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',
                  J),
        K=[C|J],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',
                 K),
        (   J=[L|_]
        ->  setarg(5, L, K)
        ;   true
        ),
        'attach_known/1_1_$special_\\==/2___2'(I, C)
    ;   true
    ),
    'known/1_1_$special_\\==/2'(B, A),
    (   C=suspension(_, active, _, F, _, _, _)
    ->  setarg(2, C, inactive),
        'known/1_1_$special_\\==/2___2__4'(A, B, C)
    ;   true
    ).
'known/1_1_$special_\\==/2___2__3'(A, B, C) :-
    'known/1_1_$special_\\==/2___2__4'(A, B, C).
'known/1_1_$special_\\==/2___2__4'(A, B, C) :-
    B==A,
    '$novel_production'(C, 232),
    !,
    '$extend_history'(C, 232),
    arg(2, C, D),
    setarg(2, C, active),
    arg(4, C, E),
    F is E+1,
    setarg(4, C, F),
    (   D==not_stored_yet
    ->  C=suspension(_, _, _, _, _, G, H),
        term_variables(term(G, H), I),
        'chr none_locked'(I),
        nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',
                  J),
        K=[C|J],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',
                 K),
        (   J=[L|_]
        ->  setarg(5, L, K)
        ;   true
        ),
        'attach_known/1_1_$special_\\==/2___2'(I, C)
    ;   true
    ),
    'known/1_1_$special_fail/0',
    (   C=suspension(_, active, _, F, _, _, _)
    ->  setarg(2, C, inactive),
        'known/1_1_$special_\\==/2___2__5'(A, B, C)
    ;   true
    ).
'known/1_1_$special_\\==/2___2__4'(A, B, C) :-
    'known/1_1_$special_\\==/2___2__5'(A, B, C).
'known/1_1_$special_\\==/2___2__5'(A, B, C) :-
    nonvar(B),
    nonvar(A),
    'chr lock'(A),
    functor(A, D, E),
    'chr unlock'(A),
    !,
    (   var(C)
    ->  true
    ;   C=suspension(_, F, _, _, _, G, H),
        setarg(2, C, removed),
        (   F==not_stored_yet
        ->  I=[]
        ;   term_variables(term(G, H), I),
            arg(5, C, J),
            (   var(J)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',
                          K),
                K=[_|L],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',
                         L),
                (   L=[M|_]
                ->  setarg(5, M, _)
                ;   true
                )
            ;   J=[_, _|L],
                setarg(2, J, L),
                (   L=[M|_]
                ->  setarg(5, M, J)
                ;   true
                )
            ),
            'detach_known/1_1_$special_\\==/2___2'(I, C)
        )
    ),
    (   functor(B, D, E)
    ->  A=..[D|N],
        B=..[D|O],
        add_args_nmatch(N, O, P),
        known(P)
    ;   true
    ).
'known/1_1_$special_\\==/2___2__5'(A, B, C) :-
    (   'chr newvia_2'(A, B, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, F, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  F)
    ),
    !,
    'known/1_1_$special_\\==/2___2__5__0__13'(F, A, B, C).
'known/1_1_$special_\\==/2___2__5__0__13'([], A, B, C) :-
    'known/1_1_$special_\\==/2___2__6'(A, B, C).
'known/1_1_$special_\\==/2___2__5__0__13'([A|B], C, D, E) :-
    (   A=suspension(_, active, _, _, F, G),
        nonvar(F),
        F=(\+H),
        nonvar(H),
        H=(I\==J),
        I==C,
        J==D
    ->  A=suspension(_, _, _, _, K, L),
        setarg(2, A, removed),
        term_variables(term(K, L), M),
        ( arg(4, A, N),
          (   var(N)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                        O),
              O=[_|P],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                       P),
              (   P=[Q|_]
              ->  setarg(4, Q, _)
              ;   true
              )
          ;   N=[_, _|P],
              setarg(2, N, P),
              (   P=[Q|_]
              ->  setarg(4, Q, N)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_;/2___2'(M, A),
        arg(2, E, R),
        setarg(2, E, active),
        ( arg(4, E, S),
          T is S+1,
          setarg(4, E, T)
        ),
        (   R==not_stored_yet
        ->  E=suspension(_, _, _, _, _, U, V),
            term_variables(term(U, V), W),
            'chr none_locked'(W),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',
                      X),
            Y=[E|X],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',
                     Y),
            (   X=[Z|_]
            ->  setarg(5, Z, Y)
            ;   true
            ),
            'attach_known/1_1_$special_\\==/2___2'(W, E)
        ;   true
        ),
        known(G),
        (   E=suspension(_, active, _, T, _, _, _)
        ->  setarg(2, E, inactive),
            'known/1_1_$special_\\==/2___2__5__0__13'(B,
                                                      C,
                                                      D,
                                                      E)
        ;   true
        )
    ;   'known/1_1_$special_\\==/2___2__5__0__13'(B,
                                                  C,
                                                  D,
                                                  E)
    ).
'known/1_1_$special_\\==/2___2__5'(A, B, C) :-
    'known/1_1_$special_\\==/2___2__6'(A, B, C).
'known/1_1_$special_\\==/2___2__6'(A, B, C) :-
    (   'chr newvia_2'(A, B, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, F, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  F)
    ),
    !,
    'known/1_1_$special_\\==/2___2__6__0__14'(F, A, B, C).
'known/1_1_$special_\\==/2___2__6__0__14'([], A, B, C) :-
    'known/1_1_$special_\\==/2___2__7'(A, B, C).
'known/1_1_$special_\\==/2___2__6__0__14'([A|B], C, D, E) :-
    (   A=suspension(_, active, _, _, F, G),
        nonvar(F),
        F=(H, _),
        nonvar(H),
        H=(\+I),
        nonvar(I),
        I=(J\==K),
        J==C,
        K==D
    ->  A=suspension(_, _, _, _, L, M),
        setarg(2, A, removed),
        term_variables(term(L, M), N),
        ( arg(4, A, O),
          (   var(O)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                        P),
              P=[_|Q],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                       Q),
              (   Q=[R|_]
              ->  setarg(4, R, _)
              ;   true
              )
          ;   O=[_, _|Q],
              setarg(2, O, Q),
              (   Q=[R|_]
              ->  setarg(4, R, O)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_;/2___2'(N, A),
        arg(2, E, S),
        setarg(2, E, active),
        ( arg(4, E, T),
          U is T+1,
          setarg(4, E, U)
        ),
        (   S==not_stored_yet
        ->  E=suspension(_, _, _, _, _, V, W),
            term_variables(term(V, W), X),
            'chr none_locked'(X),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',
                      Y),
            Z=[E|Y],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',
                     Z),
            (   Y=[A1|_]
            ->  setarg(5, A1, Z)
            ;   true
            ),
            'attach_known/1_1_$special_\\==/2___2'(X, E)
        ;   true
        ),
        known(G),
        (   E=suspension(_, active, _, U, _, _, _)
        ->  setarg(2, E, inactive),
            'known/1_1_$special_\\==/2___2__6__0__14'(B,
                                                      C,
                                                      D,
                                                      E)
        ;   true
        )
    ;   'known/1_1_$special_\\==/2___2__6__0__14'(B,
                                                  C,
                                                  D,
                                                  E)
    ).
'known/1_1_$special_\\==/2___2__6'(A, B, C) :-
    'known/1_1_$special_\\==/2___2__7'(A, B, C).
'known/1_1_$special_\\==/2___2__7'(_, _, A) :-
    arg(2, A, B),
    setarg(2, A, active),
    arg(4, A, C),
    D is C+1,
    setarg(4, A, D),
    (   B==not_stored_yet
    ->  A=suspension(_, _, _, _, _, E, F),
        term_variables(term(E, F), G),
        'chr none_locked'(G),
        nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',
                  H),
        I=[A|H],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',
                 I),
        (   H=[J|_]
        ->  setarg(5, J, I)
        ;   true
        ),
        'attach_known/1_1_$special_\\==/2___2'(G, A)
    ;   true
    ).
'known/1_1_$special_==/2'(A, B) :-
    'known/1_1_$special_==/2___2__0'(A, B, _).
'known/1_1_$special_==/2___2__0'(A, B, C) :-
    (   'chr newvia_2'(A, B, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, F, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',
                  F)
    ),
    member(G, F),
    G=suspension(_, active, _, _, _, H, I),
    H==A,
    I==B,
    !,
    (   var(C)
    ->  true
    ;   C=suspension(_, J, _, _, _, K, L),
        setarg(2, C, removed),
        (   J==not_stored_yet
        ->  M=[]
        ;   term_variables(term(K, L), M),
            arg(5, C, N),
            (   var(N)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',
                          O),
                O=[_|P],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',
                         P),
                (   P=[Q|_]
                ->  setarg(5, Q, _)
                ;   true
                )
            ;   N=[_, _|P],
                setarg(2, N, P),
                (   P=[Q|_]
                ->  setarg(5, Q, N)
                ;   true
                )
            ),
            'detach_known/1_1_$special_==/2___2'(M, C)
        )
    ).
'known/1_1_$special_==/2___2__0'(A, B, C) :-
    (   var(C)
    ->  C=suspension(D, not_stored_yet, t, 0, _, A, B),
        'chr gen_id'(D)
    ;   true
    ),
    (   '$novel_production'(C, 136),
        number(A),
        !,
        '$extend_history'(C, 136),
        arg(2, C, E),
        setarg(2, C, active),
        arg(4, C, F),
        G is F+1,
        setarg(4, C, G),
        (   E==not_stored_yet
        ->  C=suspension(_, _, _, _, _, H, I),
            term_variables(term(H, I), J),
            'chr none_locked'(J),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',
                      K),
            L=[C|K],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',
                     L),
            (   K=[M|_]
            ->  setarg(5, M, L)
            ;   true
            ),
            'attach_known/1_1_$special_==/2___2'(J, C)
        ;   true
        ),
        'known/1_1_$special_=:=/2'(A, B),
        (   C=suspension(_, active, _, G, _, _, _)
        ->  setarg(2, C, inactive),
            'known/1_1_$special_==/2___2__1'(A, B, C)
        ;   true
        )
    ;   'known/1_1_$special_==/2___2__1'(A, B, C)
    ).
'known/1_1_$special_==/2___2__1'(A, B, C) :-
    '$novel_production'(C, 137),
    number(B),
    !,
    '$extend_history'(C, 137),
    arg(2, C, D),
    setarg(2, C, active),
    arg(4, C, E),
    F is E+1,
    setarg(4, C, F),
    (   D==not_stored_yet
    ->  C=suspension(_, _, _, _, _, G, H),
        term_variables(term(G, H), I),
        'chr none_locked'(I),
        nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',
                  J),
        K=[C|J],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',
                 K),
        (   J=[L|_]
        ->  setarg(5, L, K)
        ;   true
        ),
        'attach_known/1_1_$special_==/2___2'(I, C)
    ;   true
    ),
    'known/1_1_$special_=:=/2'(A, B),
    (   C=suspension(_, active, _, F, _, _, _)
    ->  setarg(2, C, inactive),
        'known/1_1_$special_==/2___2__2'(A, B, C)
    ;   true
    ).
'known/1_1_$special_==/2___2__1'(A, B, C) :-
    'known/1_1_$special_==/2___2__2'(A, B, C).
'known/1_1_$special_==/2___2__2'(_, _, A) :-
    nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',
              B),
    member(C, B),
    C=suspension(_, active, _),
    !,
    (   var(A)
    ->  true
    ;   A=suspension(_, D, _, _, _, E, F),
        setarg(2, A, removed),
        (   D==not_stored_yet
        ->  G=[]
        ;   term_variables(term(E, F), G),
            arg(5, A, H),
            (   var(H)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',
                          I),
                I=[_|J],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',
                         J),
                (   J=[K|_]
                ->  setarg(5, K, _)
                ;   true
                )
            ;   H=[_, _|J],
                setarg(2, H, J),
                (   J=[K|_]
                ->  setarg(5, K, H)
                ;   true
                )
            ),
            'detach_known/1_1_$special_==/2___2'(G, A)
        )
    ).
'known/1_1_$special_==/2___2__2'(A, B, C) :-
    B==A,
    !,
    (   var(C)
    ->  true
    ;   C=suspension(_, D, _, _, _, E, F),
        setarg(2, C, removed),
        (   D==not_stored_yet
        ->  G=[]
        ;   term_variables(term(E, F), G),
            arg(5, C, H),
            (   var(H)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',
                          I),
                I=[_|J],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',
                         J),
                (   J=[K|_]
                ->  setarg(5, K, _)
                ;   true
                )
            ;   H=[_, _|J],
                setarg(2, H, J),
                (   J=[K|_]
                ->  setarg(5, K, H)
                ;   true
                )
            ),
            'detach_known/1_1_$special_==/2___2'(G, C)
        )
    ).
'known/1_1_$special_==/2___2__2'(A, B, C) :-
    (   'chr newvia_2'(A, B, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, F, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                  F)
    ),
    member(G, F),
    G=suspension(_, active, _, _, H),
    nonvar(H),
    H=(I==J),
    I==A,
    J==B,
    !,
    G=suspension(_, _, _, _, K),
    setarg(2, G, removed),
    term_variables(K, L),
    arg(4, G, M),
    (   var(M)
    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                  N),
        N=[_|O],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                 O),
        (   O=[P|_]
        ->  setarg(4, P, _)
        ;   true
        )
    ;   M=[_, _|O],
        setarg(2, M, O),
        (   O=[P|_]
        ->  setarg(4, P, M)
        ;   true
        )
    ),
    'detach_known/1_1_$special_\\+/1___1'(L, G),
    (   var(C)
    ->  true
    ;   C=suspension(_, Q, _, _, _, R, S),
        setarg(2, C, removed),
        (   Q==not_stored_yet
        ->  T=[]
        ;   term_variables(term(R, S), T),
            arg(5, C, U),
            (   var(U)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',
                          V),
                V=[_|W],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',
                         W),
                (   W=[X|_]
                ->  setarg(5, X, _)
                ;   true
                )
            ;   U=[_, _|W],
                setarg(2, U, W),
                (   W=[X|_]
                ->  setarg(5, X, U)
                ;   true
                )
            ),
            'detach_known/1_1_$special_==/2___2'(T, C)
        )
    ),
    'known/1_1_$special_fail/0'.
'known/1_1_$special_==/2___2__2'(A, B, C) :-
    (   'chr newvia_2'(A, B, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, F, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',
                  F)
    ),
    member(G, F),
    G=suspension(_, active, _, _, _, H, I),
    H==A,
    I==B,
    !,
    G=suspension(_, _, _, _, _, J, K),
    setarg(2, G, removed),
    term_variables(term(J, K), L),
    arg(5, G, M),
    (   var(M)
    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',
                  N),
        N=[_|O],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',
                 O),
        (   O=[P|_]
        ->  setarg(5, P, _)
        ;   true
        )
    ;   M=[_, _|O],
        setarg(2, M, O),
        (   O=[P|_]
        ->  setarg(5, P, M)
        ;   true
        )
    ),
    'detach_known/1_1_$special_\\==/2___2'(L, G),
    (   var(C)
    ->  true
    ;   C=suspension(_, Q, _, _, _, R, S),
        setarg(2, C, removed),
        (   Q==not_stored_yet
        ->  T=[]
        ;   term_variables(term(R, S), T),
            arg(5, C, U),
            (   var(U)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',
                          V),
                V=[_|W],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',
                         W),
                (   W=[X|_]
                ->  setarg(5, X, _)
                ;   true
                )
            ;   U=[_, _|W],
                setarg(2, U, W),
                (   W=[X|_]
                ->  setarg(5, X, U)
                ;   true
                )
            ),
            'detach_known/1_1_$special_==/2___2'(T, C)
        )
    ),
    'known/1_1_$special_fail/0'.
'known/1_1_$special_==/2___2__2'(A, B, C) :-
    (   'chr newvia_1'(B, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, F, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',
                  F)
    ),
    !,
    'known/1_1_$special_==/2___2__2__0__10'(F, A, B, C).
'known/1_1_$special_==/2___2__2__0__10'([], A, B, C) :-
    'known/1_1_$special_==/2___2__3'(A, B, C).
'known/1_1_$special_==/2___2__2__0__10'([A|B], C, D, E) :-
    (   A=suspension(_, active, _, _, _, F, G),
        F==D,
        H=t(228, E, A),
        '$novel_production'(E, H),
        '$novel_production'(A, H)
    ->  '$extend_history'(E, H),
        arg(2, E, I),
        setarg(2, E, active),
        ( arg(4, E, J),
          K is J+1,
          setarg(4, E, K)
        ),
        (   I==not_stored_yet
        ->  E=suspension(_, _, _, _, _, L, M),
            term_variables(term(L, M), N),
            'chr none_locked'(N),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',
                      O),
            P=[E|O],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',
                     P),
            (   O=[Q|_]
            ->  setarg(5, Q, P)
            ;   true
            ),
            'attach_known/1_1_$special_==/2___2'(N, E)
        ;   true
        ),
        'known/1_1_$special_==/2'(C, G),
        (   E=suspension(_, active, _, K, _, _, _)
        ->  setarg(2, E, inactive),
            'known/1_1_$special_==/2___2__2__0__10'(B,
                                                    C,
                                                    D,
                                                    E)
        ;   true
        )
    ;   'known/1_1_$special_==/2___2__2__0__10'(B, C, D, E)
    ).
'known/1_1_$special_==/2___2__2'(A, B, C) :-
    'known/1_1_$special_==/2___2__3'(A, B, C).
'known/1_1_$special_==/2___2__3'(A, B, C) :-
    (   'chr newvia_1'(A, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, F, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',
                  F)
    ),
    !,
    'known/1_1_$special_==/2___2__3__0__11'(F, A, B, C).
'known/1_1_$special_==/2___2__3__0__11'([], A, B, C) :-
    'known/1_1_$special_==/2___2__4'(A, B, C).
'known/1_1_$special_==/2___2__3__0__11'([A|B], C, D, E) :-
    (   A=suspension(_, active, _, _, _, F, G),
        G==C,
        H=t(228, A, E),
        '$novel_production'(A, H),
        '$novel_production'(E, H)
    ->  '$extend_history'(E, H),
        arg(2, E, I),
        setarg(2, E, active),
        ( arg(4, E, J),
          K is J+1,
          setarg(4, E, K)
        ),
        (   I==not_stored_yet
        ->  E=suspension(_, _, _, _, _, L, M),
            term_variables(term(L, M), N),
            'chr none_locked'(N),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',
                      O),
            P=[E|O],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',
                     P),
            (   O=[Q|_]
            ->  setarg(5, Q, P)
            ;   true
            ),
            'attach_known/1_1_$special_==/2___2'(N, E)
        ;   true
        ),
        'known/1_1_$special_==/2'(F, D),
        (   E=suspension(_, active, _, K, _, _, _)
        ->  setarg(2, E, inactive),
            'known/1_1_$special_==/2___2__3__0__11'(B,
                                                    C,
                                                    D,
                                                    E)
        ;   true
        )
    ;   'known/1_1_$special_==/2___2__3__0__11'(B, C, D, E)
    ).
'known/1_1_$special_==/2___2__3'(A, B, C) :-
    'known/1_1_$special_==/2___2__4'(A, B, C).
'known/1_1_$special_==/2___2__4'(A, B, C) :-
    (   'chr newvia_1'(B, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, F, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',
                  F)
    ),
    !,
    'known/1_1_$special_==/2___2__4__0__12'(F, A, B, C).
'known/1_1_$special_==/2___2__4__0__12'([], A, B, C) :-
    'known/1_1_$special_==/2___2__5'(A, B, C).
'known/1_1_$special_==/2___2__4__0__12'([A|B], C, D, E) :-
    (   A=suspension(_, active, _, _, _, F, G),
        F==D,
        H=t(229, E, A),
        '$novel_production'(E, H),
        '$novel_production'(A, H)
    ->  '$extend_history'(E, H),
        arg(2, E, I),
        setarg(2, E, active),
        ( arg(4, E, J),
          K is J+1,
          setarg(4, E, K)
        ),
        (   I==not_stored_yet
        ->  E=suspension(_, _, _, _, _, L, M),
            term_variables(term(L, M), N),
            'chr none_locked'(N),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',
                      O),
            P=[E|O],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',
                     P),
            (   O=[Q|_]
            ->  setarg(5, Q, P)
            ;   true
            ),
            'attach_known/1_1_$special_==/2___2'(N, E)
        ;   true
        ),
        'known/1_1_$special_\\==/2'(C, G),
        (   E=suspension(_, active, _, K, _, _, _)
        ->  setarg(2, E, inactive),
            'known/1_1_$special_==/2___2__4__0__12'(B,
                                                    C,
                                                    D,
                                                    E)
        ;   true
        )
    ;   'known/1_1_$special_==/2___2__4__0__12'(B, C, D, E)
    ).
'known/1_1_$special_==/2___2__4'(A, B, C) :-
    'known/1_1_$special_==/2___2__5'(A, B, C).
'known/1_1_$special_==/2___2__5'(A, B, C) :-
    '$novel_production'(C, 230),
    !,
    '$extend_history'(C, 230),
    arg(2, C, D),
    setarg(2, C, active),
    arg(4, C, E),
    F is E+1,
    setarg(4, C, F),
    (   D==not_stored_yet
    ->  C=suspension(_, _, _, _, _, G, H),
        term_variables(term(G, H), I),
        'chr none_locked'(I),
        nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',
                  J),
        K=[C|J],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',
                 K),
        (   J=[L|_]
        ->  setarg(5, L, K)
        ;   true
        ),
        'attach_known/1_1_$special_==/2___2'(I, C)
    ;   true
    ),
    'known/1_1_$special_==/2'(B, A),
    (   C=suspension(_, active, _, F, _, _, _)
    ->  setarg(2, C, inactive),
        'known/1_1_$special_==/2___2__6'(A, B, C)
    ;   true
    ).
'known/1_1_$special_==/2___2__5'(A, B, C) :-
    'known/1_1_$special_==/2___2__6'(A, B, C).
'known/1_1_$special_==/2___2__6'(A, B, C) :-
    '$novel_production'(C, 234),
    !,
    '$extend_history'(C, 234),
    arg(2, C, D),
    setarg(2, C, active),
    arg(4, C, E),
    F is E+1,
    setarg(4, C, F),
    (   D==not_stored_yet
    ->  C=suspension(_, _, _, _, _, G, H),
        term_variables(term(G, H), I),
        'chr none_locked'(I),
        nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',
                  J),
        K=[C|J],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',
                 K),
        (   J=[L|_]
        ->  setarg(5, L, K)
        ;   true
        ),
        'attach_known/1_1_$special_==/2___2'(I, C)
    ;   true
    ),
    'known/1_1_$special_=/2'(A, B),
    (   C=suspension(_, active, _, F, _, _, _)
    ->  setarg(2, C, inactive),
        'known/1_1_$special_==/2___2__7'(A, B, C)
    ;   true
    ).
'known/1_1_$special_==/2___2__6'(A, B, C) :-
    'known/1_1_$special_==/2___2__7'(A, B, C).
'known/1_1_$special_==/2___2__7'(A, B, C) :-
    (   'chr newvia_2'(A, B, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, F, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  F)
    ),
    !,
    'known/1_1_$special_==/2___2__7__0__15'(F, A, B, C).
'known/1_1_$special_==/2___2__7__0__15'([], A, B, C) :-
    'known/1_1_$special_==/2___2__8'(A, B, C).
'known/1_1_$special_==/2___2__7__0__15'([A|B], C, D, E) :-
    (   A=suspension(_, active, _, _, F, G),
        nonvar(F),
        F=(\+H),
        nonvar(H),
        H=(I==J),
        I==C,
        J==D
    ->  A=suspension(_, _, _, _, K, L),
        setarg(2, A, removed),
        term_variables(term(K, L), M),
        ( arg(4, A, N),
          (   var(N)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                        O),
              O=[_|P],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                       P),
              (   P=[Q|_]
              ->  setarg(4, Q, _)
              ;   true
              )
          ;   N=[_, _|P],
              setarg(2, N, P),
              (   P=[Q|_]
              ->  setarg(4, Q, N)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_;/2___2'(M, A),
        arg(2, E, R),
        setarg(2, E, active),
        ( arg(4, E, S),
          T is S+1,
          setarg(4, E, T)
        ),
        (   R==not_stored_yet
        ->  E=suspension(_, _, _, _, _, U, V),
            term_variables(term(U, V), W),
            'chr none_locked'(W),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',
                      X),
            Y=[E|X],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',
                     Y),
            (   X=[Z|_]
            ->  setarg(5, Z, Y)
            ;   true
            ),
            'attach_known/1_1_$special_==/2___2'(W, E)
        ;   true
        ),
        known(G),
        (   E=suspension(_, active, _, T, _, _, _)
        ->  setarg(2, E, inactive),
            'known/1_1_$special_==/2___2__7__0__15'(B,
                                                    C,
                                                    D,
                                                    E)
        ;   true
        )
    ;   'known/1_1_$special_==/2___2__7__0__15'(B, C, D, E)
    ).
'known/1_1_$special_==/2___2__7'(A, B, C) :-
    'known/1_1_$special_==/2___2__8'(A, B, C).
'known/1_1_$special_==/2___2__8'(A, B, C) :-
    (   'chr newvia_2'(A, B, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, F, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  F)
    ),
    !,
    'known/1_1_$special_==/2___2__8__0__16'(F, A, B, C).
'known/1_1_$special_==/2___2__8__0__16'([], A, B, C) :-
    'known/1_1_$special_==/2___2__9'(A, B, C).
'known/1_1_$special_==/2___2__8__0__16'([A|B], C, D, E) :-
    (   A=suspension(_, active, _, _, F, G),
        nonvar(F),
        F=(H, _),
        nonvar(H),
        H=(\+I),
        nonvar(I),
        I=(J==K),
        J==C,
        K==D
    ->  A=suspension(_, _, _, _, L, M),
        setarg(2, A, removed),
        term_variables(term(L, M), N),
        ( arg(4, A, O),
          (   var(O)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                        P),
              P=[_|Q],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                       Q),
              (   Q=[R|_]
              ->  setarg(4, R, _)
              ;   true
              )
          ;   O=[_, _|Q],
              setarg(2, O, Q),
              (   Q=[R|_]
              ->  setarg(4, R, O)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_;/2___2'(N, A),
        arg(2, E, S),
        setarg(2, E, active),
        ( arg(4, E, T),
          U is T+1,
          setarg(4, E, U)
        ),
        (   S==not_stored_yet
        ->  E=suspension(_, _, _, _, _, V, W),
            term_variables(term(V, W), X),
            'chr none_locked'(X),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',
                      Y),
            Z=[E|Y],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',
                     Z),
            (   Y=[A1|_]
            ->  setarg(5, A1, Z)
            ;   true
            ),
            'attach_known/1_1_$special_==/2___2'(X, E)
        ;   true
        ),
        known(G),
        (   E=suspension(_, active, _, U, _, _, _)
        ->  setarg(2, E, inactive),
            'known/1_1_$special_==/2___2__8__0__16'(B,
                                                    C,
                                                    D,
                                                    E)
        ;   true
        )
    ;   'known/1_1_$special_==/2___2__8__0__16'(B, C, D, E)
    ).
'known/1_1_$special_==/2___2__8'(A, B, C) :-
    'known/1_1_$special_==/2___2__9'(A, B, C).
'known/1_1_$special_==/2___2__9'(_, _, A) :-
    arg(2, A, B),
    setarg(2, A, active),
    arg(4, A, C),
    D is C+1,
    setarg(4, A, D),
    (   B==not_stored_yet
    ->  A=suspension(_, _, _, _, _, E, F),
        term_variables(term(E, F), G),
        'chr none_locked'(G),
        nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',
                  H),
        I=[A|H],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',
                 I),
        (   H=[J|_]
        ->  setarg(5, J, I)
        ;   true
        ),
        'attach_known/1_1_$special_==/2___2'(G, A)
    ;   true
    ).
'known/1_1_$special_is/2'(A, B) :-
    'known/1_1_$special_=:=/2'(A, B).
'known/1_1_$special_</2'(A, B) :-
    'known/1_1_$special_=</2'(A, B),
    'known/1_1_$special_=\\=/2'(A, B).
'known/1_1_$special_>=/2'(A, B) :-
    'known/1_1_$special_=</2'(B, A).
'known/1_1_$special_>/2'(A, B) :-
    'known/1_1_$special_</2'(B, A).
'known/1_1_$special_=</2'(A, B) :-
    'known/1_1_$special_=</2___2__0'(A, B, _).
'known/1_1_$special_=</2___2__0'(A, B, C) :-
    (   'chr newvia_2'(A, B, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, F, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                  F)
    ),
    member(G, F),
    G=suspension(_, active, _, _, _, H, I),
    H==A,
    I==B,
    !,
    (   var(C)
    ->  true
    ;   C=suspension(_, J, _, _, _, K, L),
        setarg(2, C, removed),
        (   J==not_stored_yet
        ->  M=[]
        ;   term_variables(term(K, L), M),
            arg(5, C, N),
            (   var(N)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                          O),
                O=[_|P],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                         P),
                (   P=[Q|_]
                ->  setarg(5, Q, _)
                ;   true
                )
            ;   N=[_, _|P],
                setarg(2, N, P),
                (   P=[Q|_]
                ->  setarg(5, Q, N)
                ;   true
                )
            ),
            'detach_known/1_1_$special_=</2___2'(M, C)
        )
    ).
'known/1_1_$special_=</2___2__0'(_, _, A) :-
    nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',
              B),
    member(C, B),
    C=suspension(_, active, _),
    !,
    (   var(A)
    ->  true
    ;   A=suspension(_, D, _, _, _, E, F),
        setarg(2, A, removed),
        (   D==not_stored_yet
        ->  G=[]
        ;   term_variables(term(E, F), G),
            arg(5, A, H),
            (   var(H)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                          I),
                I=[_|J],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                         J),
                (   J=[K|_]
                ->  setarg(5, K, _)
                ;   true
                )
            ;   H=[_, _|J],
                setarg(2, H, J),
                (   J=[K|_]
                ->  setarg(5, K, H)
                ;   true
                )
            ),
            'detach_known/1_1_$special_=</2___2'(G, A)
        )
    ).
'known/1_1_$special_=</2___2__0'(A, B, C) :-
    B==A,
    !,
    (   var(C)
    ->  true
    ;   C=suspension(_, D, _, _, _, E, F),
        setarg(2, C, removed),
        (   D==not_stored_yet
        ->  G=[]
        ;   term_variables(term(E, F), G),
            arg(5, C, H),
            (   var(H)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                          I),
                I=[_|J],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                         J),
                (   J=[K|_]
                ->  setarg(5, K, _)
                ;   true
                )
            ;   H=[_, _|J],
                setarg(2, H, J),
                (   J=[K|_]
                ->  setarg(5, K, H)
                ;   true
                )
            ),
            'detach_known/1_1_$special_=</2___2'(G, C)
        )
    ).
'known/1_1_$special_=</2___2__0'(A, B, C) :-
    number(B),
    (   number(A),
        A>B,
        !,
        (   var(C)
        ->  true
        ;   C=suspension(_, D, _, _, _, E, F),
            setarg(2, C, removed),
            (   D==not_stored_yet
            ->  G=[]
            ;   term_variables(term(E, F), G),
                arg(5, C, H),
                (   var(H)
                ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                              I),
                    I=[_|J],
                    b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                             J),
                    (   J=[K|_]
                    ->  setarg(5, K, _)
                    ;   true
                    )
                ;   H=[_, _|J],
                    setarg(2, H, J),
                    (   J=[K|_]
                    ->  setarg(5, K, H)
                    ;   true
                    )
                ),
                'detach_known/1_1_$special_=</2___2'(G, C)
            )
        ),
        'known/1_1_$special_fail/0'
    ;   (   'chr newvia_1'(A, L)
        ->  get_attr(L, guard_entailment, M),
            M=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, N, _)
        ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                      N)
        ),
        member(O, N),
        O=suspension(_, active, _, _, _, P, Q),
        P==A,
        number(Q),
        Q=<B,
        !,
        (   var(C)
        ->  true
        ;   C=suspension(_, R, _, _, _, S, T),
            setarg(2, C, removed),
            (   R==not_stored_yet
            ->  U=[]
            ;   term_variables(term(S, T), U),
                arg(5, C, V),
                (   var(V)
                ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                              W),
                    W=[_|X],
                    b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                             X),
                    (   X=[Y|_]
                    ->  setarg(5, Y, _)
                    ;   true
                    )
                ;   V=[_, _|X],
                    setarg(2, V, X),
                    (   X=[Y|_]
                    ->  setarg(5, Y, V)
                    ;   true
                    )
                ),
                'detach_known/1_1_$special_=</2___2'(U, C)
            )
        )
    ).
'known/1_1_$special_=</2___2__0'(A, B, C) :-
    (   'chr newvia_1'(A, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, F, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                  F)
    ),
    !,
    'known/1_1_$special_=</2___2__0__0__12'(F, A, B, C).
'known/1_1_$special_=</2___2__0__0__12'([], A, B, C) :-
    'known/1_1_$special_=</2___2__1'(A, B, C).
'known/1_1_$special_=</2___2__0__0__12'([A|B], C, D, E) :-
    (   A=suspension(_, active, _, _, _, F, G),
        F==C,
        number(G),
        number(D),
        D=<G
    ->  A=suspension(_, _, _, _, _, H, I),
        setarg(2, A, removed),
        term_variables(term(H, I), J),
        ( arg(5, A, K),
          (   var(K)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                        L),
              L=[_|M],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                       M),
              (   M=[N|_]
              ->  setarg(5, N, _)
              ;   true
              )
          ;   K=[_, _|M],
              setarg(2, K, M),
              (   M=[N|_]
              ->  setarg(5, N, K)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_=</2___2'(J, A),
        'known/1_1_$special_=</2___2__0__0__12'(B, C, D, E)
    ;   'known/1_1_$special_=</2___2__0__0__12'(B, C, D, E)
    ).
'known/1_1_$special_=</2___2__0'(A, B, C) :-
    'known/1_1_$special_=</2___2__1'(A, B, C).
'known/1_1_$special_=</2___2__1'(A, B, C) :-
    number(A),
    (   'chr newvia_1'(B, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, F, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                  F)
    ),
    member(G, F),
    G=suspension(_, active, _, _, _, H, I),
    I==B,
    number(H),
    A=<H,
    !,
    (   var(C)
    ->  true
    ;   C=suspension(_, J, _, _, _, K, L),
        setarg(2, C, removed),
        (   J==not_stored_yet
        ->  M=[]
        ;   term_variables(term(K, L), M),
            arg(5, C, N),
            (   var(N)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                          O),
                O=[_|P],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                         P),
                (   P=[Q|_]
                ->  setarg(5, Q, _)
                ;   true
                )
            ;   N=[_, _|P],
                setarg(2, N, P),
                (   P=[Q|_]
                ->  setarg(5, Q, N)
                ;   true
                )
            ),
            'detach_known/1_1_$special_=</2___2'(M, C)
        )
    ).
'known/1_1_$special_=</2___2__1'(A, B, C) :-
    (   'chr newvia_1'(B, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, F, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                  F)
    ),
    !,
    'known/1_1_$special_=</2___2__1__0__14'(F, A, B, C).
'known/1_1_$special_=</2___2__1__0__14'([], A, B, C) :-
    'known/1_1_$special_=</2___2__2'(A, B, C).
'known/1_1_$special_=</2___2__1__0__14'([A|B], C, D, E) :-
    (   A=suspension(_, active, _, _, _, F, G),
        G==D,
        number(C),
        number(F),
        F=<C
    ->  A=suspension(_, _, _, _, _, H, I),
        setarg(2, A, removed),
        term_variables(term(H, I), J),
        ( arg(5, A, K),
          (   var(K)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                        L),
              L=[_|M],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                       M),
              (   M=[N|_]
              ->  setarg(5, N, _)
              ;   true
              )
          ;   K=[_, _|M],
              setarg(2, K, M),
              (   M=[N|_]
              ->  setarg(5, N, K)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_=</2___2'(J, A),
        'known/1_1_$special_=</2___2__1__0__14'(B, C, D, E)
    ;   'known/1_1_$special_=</2___2__1__0__14'(B, C, D, E)
    ).
'known/1_1_$special_=</2___2__1'(A, B, C) :-
    'known/1_1_$special_=</2___2__2'(A, B, C).
'known/1_1_$special_=</2___2__2'(A, B, C) :-
    (   'chr newvia_2'(B, A, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, F, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                  F)
    ),
    member(G, F),
    G=suspension(_, active, _, _, _, H, I),
    H==B,
    I==A,
    !,
    G=suspension(_, _, _, _, _, J, K),
    setarg(2, G, removed),
    term_variables(term(J, K), L),
    arg(5, G, M),
    (   var(M)
    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                  N),
        N=[_|O],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                 O),
        (   O=[P|_]
        ->  setarg(5, P, _)
        ;   true
        )
    ;   M=[_, _|O],
        setarg(2, M, O),
        (   O=[P|_]
        ->  setarg(5, P, M)
        ;   true
        )
    ),
    'detach_known/1_1_$special_=</2___2'(L, G),
    (   var(C)
    ->  true
    ;   C=suspension(_, Q, _, _, _, R, S),
        setarg(2, C, removed),
        (   Q==not_stored_yet
        ->  T=[]
        ;   term_variables(term(R, S), T),
            arg(5, C, U),
            (   var(U)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                          V),
                V=[_|W],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                         W),
                (   W=[X|_]
                ->  setarg(5, X, _)
                ;   true
                )
            ;   U=[_, _|W],
                setarg(2, U, W),
                (   W=[X|_]
                ->  setarg(5, X, U)
                ;   true
                )
            ),
            'detach_known/1_1_$special_=</2___2'(T, C)
        )
    ),
    'known/1_1_$special_=:=/2'(A, B).
'known/1_1_$special_=</2___2__2'(A, B, C) :-
    (   'chr newvia_1'(B, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, F, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                  F)
    ),
    !,
    (   var(C)
    ->  C=suspension(G, not_stored_yet, t, 0, _, A, B),
        'chr gen_id'(G)
    ;   true
    ),
    'known/1_1_$special_=</2___2__2__0__17'(F, A, B, C).
'known/1_1_$special_=</2___2__2__0__17'([], A, B, C) :-
    'known/1_1_$special_=</2___2__3'(A, B, C).
'known/1_1_$special_=</2___2__2__0__17'([A|B], C, D, E) :-
    (   A=suspension(_, active, _, _, _, F, G),
        F==D,
        H=t(187, E, A),
        '$novel_production'(E, H),
        '$novel_production'(A, H)
    ->  '$extend_history'(E, H),
        arg(2, E, I),
        setarg(2, E, active),
        ( arg(4, E, J),
          K is J+1,
          setarg(4, E, K)
        ),
        (   I==not_stored_yet
        ->  E=suspension(_, _, _, _, _, L, M),
            term_variables(term(L, M), N),
            'chr none_locked'(N),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                      O),
            P=[E|O],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                     P),
            (   O=[Q|_]
            ->  setarg(5, Q, P)
            ;   true
            ),
            'attach_known/1_1_$special_=</2___2'(N, E)
        ;   true
        ),
        'known/1_1_$special_=</2'(C, G),
        (   E=suspension(_, active, _, K, _, _, _)
        ->  setarg(2, E, inactive),
            'known/1_1_$special_=</2___2__2__0__17'(B,
                                                    C,
                                                    D,
                                                    E)
        ;   true
        )
    ;   'known/1_1_$special_=</2___2__2__0__17'(B, C, D, E)
    ).
'known/1_1_$special_=</2___2__2'(A, B, C) :-
    (   var(C)
    ->  C=suspension(D, not_stored_yet, t, 0, _, A, B),
        'chr gen_id'(D)
    ;   true
    ),
    'known/1_1_$special_=</2___2__3'(A, B, C).
'known/1_1_$special_=</2___2__3'(A, B, C) :-
    (   'chr newvia_1'(A, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, F, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                  F)
    ),
    !,
    'known/1_1_$special_=</2___2__3__0__18'(F, A, B, C).
'known/1_1_$special_=</2___2__3__0__18'([], A, B, C) :-
    'known/1_1_$special_=</2___2__4'(A, B, C).
'known/1_1_$special_=</2___2__3__0__18'([A|B], C, D, E) :-
    (   A=suspension(_, active, _, _, _, F, G),
        G==C,
        H=t(187, A, E),
        '$novel_production'(A, H),
        '$novel_production'(E, H)
    ->  '$extend_history'(E, H),
        arg(2, E, I),
        setarg(2, E, active),
        ( arg(4, E, J),
          K is J+1,
          setarg(4, E, K)
        ),
        (   I==not_stored_yet
        ->  E=suspension(_, _, _, _, _, L, M),
            term_variables(term(L, M), N),
            'chr none_locked'(N),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                      O),
            P=[E|O],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                     P),
            (   O=[Q|_]
            ->  setarg(5, Q, P)
            ;   true
            ),
            'attach_known/1_1_$special_=</2___2'(N, E)
        ;   true
        ),
        'known/1_1_$special_=</2'(F, D),
        (   E=suspension(_, active, _, K, _, _, _)
        ->  setarg(2, E, inactive),
            'known/1_1_$special_=</2___2__3__0__18'(B,
                                                    C,
                                                    D,
                                                    E)
        ;   true
        )
    ;   'known/1_1_$special_=</2___2__3__0__18'(B, C, D, E)
    ).
'known/1_1_$special_=</2___2__3'(A, B, C) :-
    'known/1_1_$special_=</2___2__4'(A, B, C).
'known/1_1_$special_=</2___2__4'(A, B, C) :-
    (   'chr newvia_1'(B, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, _, _, _, _, _, _, _, _, _, _, F, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',
                  F)
    ),
    !,
    'known/1_1_$special_=</2___2__4__0__19'(F, A, B, C).
'known/1_1_$special_=</2___2__4__0__19'([], A, B, C) :-
    'known/1_1_$special_=</2___2__5'(A, B, C).
'known/1_1_$special_=</2___2__4__0__19'([A|B], C, D, E) :-
    (   A=suspension(_, active, _, _, _, F, G),
        F==D,
        (   'chr newvia_2'(D, G, H)
        ->  get_attr(H, guard_entailment, I),
            I=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, J, _)
        ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                      J)
        )
    ->  'known/1_1_$special_=</2___2__4__1__19'(J,
                                                G,
                                                A,
                                                B,
                                                C,
                                                D,
                                                E)
    ;   'known/1_1_$special_=</2___2__4__0__19'(B, C, D, E)
    ).
'known/1_1_$special_=</2___2__4__1__19'([], _, _, A, B, C, D) :-
    'known/1_1_$special_=</2___2__4__0__19'(A, B, C, D).
'known/1_1_$special_=</2___2__4__1__19'([A|B], C, D, E, F, G, H) :-
    (   A=suspension(_, active, _, _, _, I, J),
        I==G,
        J==C,
        (   'chr newvia_2'(F, G, K)
        ->  get_attr(K, guard_entailment, L),
            L=v(_, _, _, _, _, _, _, _, _, _, _, _, _, M, _, _, _, _, _, _, _, _)
        ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',
                      M)
        )
    ->  'known/1_1_$special_=</2___2__4__2__19'(M,
                                                A,
                                                B,
                                                C,
                                                D,
                                                E,
                                                F,
                                                G,
                                                H)
    ;   'known/1_1_$special_=</2___2__4__1__19'(B,
                                                C,
                                                D,
                                                E,
                                                F,
                                                G,
                                                H)
    ).
'known/1_1_$special_=</2___2__4__2__19'([], _, A, B, C, D, E, F, G) :-
    'known/1_1_$special_=</2___2__4__1__19'(A,
                                            B,
                                            C,
                                            D,
                                            E,
                                            F,
                                            G).
'known/1_1_$special_=</2___2__4__2__19'([A|B], C, D, E, F, G, H, I, J) :-
    (   A=suspension(_, active, _, _, _, K, L),
        A\==F,
        K==H,
        L==I,
        M=t(188, J, A, C, F),
        '$novel_production'(J, M),
        '$novel_production'(A, M),
        '$novel_production'(C, M),
        '$novel_production'(F, M)
    ->  '$extend_history'(J, M),
        arg(2, J, N),
        setarg(2, J, active),
        ( arg(4, J, O),
          P is O+1,
          setarg(4, J, P)
        ),
        (   N==not_stored_yet
        ->  J=suspension(_, _, _, _, _, Q, R),
            term_variables(term(Q, R), S),
            'chr none_locked'(S),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                      T),
            U=[J|T],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                     U),
            (   T=[V|_]
            ->  setarg(5, V, U)
            ;   true
            ),
            'attach_known/1_1_$special_=</2___2'(S, J)
        ;   true
        ),
        'known/1_1_$special_=\\=/2'(H, E),
        (   J=suspension(_, active, _, P, _, _, _)
        ->  setarg(2, J, inactive),
            'known/1_1_$special_=</2___2__4__2__19'(B,
                                                    C,
                                                    D,
                                                    E,
                                                    F,
                                                    G,
                                                    H,
                                                    I,
                                                    J)
        ;   true
        )
    ;   'known/1_1_$special_=</2___2__4__2__19'(B,
                                                C,
                                                D,
                                                E,
                                                F,
                                                G,
                                                H,
                                                I,
                                                J)
    ).
'known/1_1_$special_=</2___2__4'(A, B, C) :-
    'known/1_1_$special_=</2___2__5'(A, B, C).
'known/1_1_$special_=</2___2__5'(A, B, C) :-
    (   'chr newvia_1'(A, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, F, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                  F)
    ),
    !,
    'known/1_1_$special_=</2___2__5__0__20'(F, A, B, C).
'known/1_1_$special_=</2___2__5__0__20'([], A, B, C) :-
    'known/1_1_$special_=</2___2__6'(A, B, C).
'known/1_1_$special_=</2___2__5__0__20'([A|B], C, D, E) :-
    (   A=suspension(_, active, _, _, _, F, G),
        G==C,
        (   'chr newvia_2'(C, D, H)
        ->  get_attr(H, guard_entailment, I),
            I=v(_, _, _, _, _, _, _, _, _, _, _, _, _, J, _, _, _, _, _, _, _, _)
        ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',
                      J)
        )
    ->  'known/1_1_$special_=</2___2__5__1__20'(J,
                                                F,
                                                A,
                                                B,
                                                C,
                                                D,
                                                E)
    ;   'known/1_1_$special_=</2___2__5__0__20'(B, C, D, E)
    ).
'known/1_1_$special_=</2___2__5__1__20'([], _, _, A, B, C, D) :-
    'known/1_1_$special_=</2___2__5__0__20'(A, B, C, D).
'known/1_1_$special_=</2___2__5__1__20'([A|B], C, D, E, F, G, H) :-
    (   A=suspension(_, active, _, _, _, I, J),
        I==F,
        J==G,
        (   'chr newvia_2'(C, F, K)
        ->  get_attr(K, guard_entailment, L),
            L=v(_, _, _, _, _, _, _, _, _, _, _, _, _, M, _, _, _, _, _, _, _, _)
        ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',
                      M)
        )
    ->  'known/1_1_$special_=</2___2__5__2__20'(M,
                                                A,
                                                B,
                                                C,
                                                D,
                                                E,
                                                F,
                                                G,
                                                H)
    ;   'known/1_1_$special_=</2___2__5__1__20'(B,
                                                C,
                                                D,
                                                E,
                                                F,
                                                G,
                                                H)
    ).
'known/1_1_$special_=</2___2__5__2__20'([], _, A, B, C, D, E, F, G) :-
    'known/1_1_$special_=</2___2__5__1__20'(A,
                                            B,
                                            C,
                                            D,
                                            E,
                                            F,
                                            G).
'known/1_1_$special_=</2___2__5__2__20'([A|B], C, D, E, F, G, H, I, J) :-
    (   A=suspension(_, active, _, _, _, K, L),
        A\==C,
        K==E,
        L==H,
        M=t(188, F, A, J, C),
        '$novel_production'(F, M),
        '$novel_production'(A, M),
        '$novel_production'(J, M),
        '$novel_production'(C, M)
    ->  '$extend_history'(J, M),
        arg(2, J, N),
        setarg(2, J, active),
        ( arg(4, J, O),
          P is O+1,
          setarg(4, J, P)
        ),
        (   N==not_stored_yet
        ->  J=suspension(_, _, _, _, _, Q, R),
            term_variables(term(Q, R), S),
            'chr none_locked'(S),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                      T),
            U=[J|T],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                     U),
            (   T=[V|_]
            ->  setarg(5, V, U)
            ;   true
            ),
            'attach_known/1_1_$special_=</2___2'(S, J)
        ;   true
        ),
        'known/1_1_$special_=\\=/2'(E, I),
        (   J=suspension(_, active, _, P, _, _, _)
        ->  setarg(2, J, inactive),
            'known/1_1_$special_=</2___2__5__2__20'(B,
                                                    C,
                                                    D,
                                                    E,
                                                    F,
                                                    G,
                                                    H,
                                                    I,
                                                    J)
        ;   true
        )
    ;   'known/1_1_$special_=</2___2__5__2__20'(B,
                                                C,
                                                D,
                                                E,
                                                F,
                                                G,
                                                H,
                                                I,
                                                J)
    ).
'known/1_1_$special_=</2___2__5'(A, B, C) :-
    'known/1_1_$special_=</2___2__6'(A, B, C).
'known/1_1_$special_=</2___2__6'(A, B, C) :-
    (   'chr newvia_2'(A, B, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, F, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                  F)
    ),
    member(G, F),
    G=suspension(_, active, _, _, H),
    nonvar(H),
    H=(I=<J),
    I==A,
    J==B,
    !,
    G=suspension(_, _, _, _, K),
    setarg(2, G, removed),
    term_variables(K, L),
    arg(4, G, M),
    (   var(M)
    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                  N),
        N=[_|O],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                 O),
        (   O=[P|_]
        ->  setarg(4, P, _)
        ;   true
        )
    ;   M=[_, _|O],
        setarg(2, M, O),
        (   O=[P|_]
        ->  setarg(4, P, M)
        ;   true
        )
    ),
    'detach_known/1_1_$special_\\+/1___1'(L, G),
    (   var(C)
    ->  true
    ;   C=suspension(_, Q, _, _, _, R, S),
        setarg(2, C, removed),
        (   Q==not_stored_yet
        ->  T=[]
        ;   term_variables(term(R, S), T),
            arg(5, C, U),
            (   var(U)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                          V),
                V=[_|W],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                         W),
                (   W=[X|_]
                ->  setarg(5, X, _)
                ;   true
                )
            ;   U=[_, _|W],
                setarg(2, U, W),
                (   W=[X|_]
                ->  setarg(5, X, U)
                ;   true
                )
            ),
            'detach_known/1_1_$special_=</2___2'(T, C)
        )
    ),
    'known/1_1_$special_fail/0'.
'known/1_1_$special_=</2___2__6'(A, B, C) :-
    (   'chr newvia_2'(A, B, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, F, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  F)
    ),
    !,
    'known/1_1_$special_=</2___2__6__0__22'(F, A, B, C).
'known/1_1_$special_=</2___2__6__0__22'([], A, B, C) :-
    'known/1_1_$special_=</2___2__7'(A, B, C).
'known/1_1_$special_=</2___2__6__0__22'([A|B], C, D, E) :-
    (   A=suspension(_, active, _, _, F, G),
        nonvar(F),
        F=(\+H),
        nonvar(H),
        H=(I=<J),
        I==C,
        J==D
    ->  A=suspension(_, _, _, _, K, L),
        setarg(2, A, removed),
        term_variables(term(K, L), M),
        ( arg(4, A, N),
          (   var(N)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                        O),
              O=[_|P],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                       P),
              (   P=[Q|_]
              ->  setarg(4, Q, _)
              ;   true
              )
          ;   N=[_, _|P],
              setarg(2, N, P),
              (   P=[Q|_]
              ->  setarg(4, Q, N)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_;/2___2'(M, A),
        arg(2, E, R),
        setarg(2, E, active),
        ( arg(4, E, S),
          T is S+1,
          setarg(4, E, T)
        ),
        (   R==not_stored_yet
        ->  E=suspension(_, _, _, _, _, U, V),
            term_variables(term(U, V), W),
            'chr none_locked'(W),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                      X),
            Y=[E|X],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                     Y),
            (   X=[Z|_]
            ->  setarg(5, Z, Y)
            ;   true
            ),
            'attach_known/1_1_$special_=</2___2'(W, E)
        ;   true
        ),
        known(G),
        (   E=suspension(_, active, _, T, _, _, _)
        ->  setarg(2, E, inactive),
            'known/1_1_$special_=</2___2__6__0__22'(B,
                                                    C,
                                                    D,
                                                    E)
        ;   true
        )
    ;   'known/1_1_$special_=</2___2__6__0__22'(B, C, D, E)
    ).
'known/1_1_$special_=</2___2__6'(A, B, C) :-
    'known/1_1_$special_=</2___2__7'(A, B, C).
'known/1_1_$special_=</2___2__7'(A, B, C) :-
    (   'chr newvia_2'(A, B, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, F, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  F)
    ),
    !,
    'known/1_1_$special_=</2___2__7__0__23'(F, A, B, C).
'known/1_1_$special_=</2___2__7__0__23'([], A, B, C) :-
    'known/1_1_$special_=</2___2__8'(A, B, C).
'known/1_1_$special_=</2___2__7__0__23'([A|B], C, D, E) :-
    (   A=suspension(_, active, _, _, F, G),
        nonvar(F),
        F=(H, _),
        nonvar(H),
        H=(\+I),
        nonvar(I),
        I=(J=<K),
        J==C,
        K==D
    ->  A=suspension(_, _, _, _, L, M),
        setarg(2, A, removed),
        term_variables(term(L, M), N),
        ( arg(4, A, O),
          (   var(O)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                        P),
              P=[_|Q],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                       Q),
              (   Q=[R|_]
              ->  setarg(4, R, _)
              ;   true
              )
          ;   O=[_, _|Q],
              setarg(2, O, Q),
              (   Q=[R|_]
              ->  setarg(4, R, O)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_;/2___2'(N, A),
        arg(2, E, S),
        setarg(2, E, active),
        ( arg(4, E, T),
          U is T+1,
          setarg(4, E, U)
        ),
        (   S==not_stored_yet
        ->  E=suspension(_, _, _, _, _, V, W),
            term_variables(term(V, W), X),
            'chr none_locked'(X),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                      Y),
            Z=[E|Y],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                     Z),
            (   Y=[A1|_]
            ->  setarg(5, A1, Z)
            ;   true
            ),
            'attach_known/1_1_$special_=</2___2'(X, E)
        ;   true
        ),
        known(G),
        (   E=suspension(_, active, _, U, _, _, _)
        ->  setarg(2, E, inactive),
            'known/1_1_$special_=</2___2__7__0__23'(B,
                                                    C,
                                                    D,
                                                    E)
        ;   true
        )
    ;   'known/1_1_$special_=</2___2__7__0__23'(B, C, D, E)
    ).
'known/1_1_$special_=</2___2__7'(A, B, C) :-
    'known/1_1_$special_=</2___2__8'(A, B, C).
'known/1_1_$special_=</2___2__8'(_, _, A) :-
    arg(2, A, B),
    setarg(2, A, active),
    arg(4, A, C),
    D is C+1,
    setarg(4, A, D),
    (   B==not_stored_yet
    ->  A=suspension(_, _, _, _, _, E, F),
        term_variables(term(E, F), G),
        'chr none_locked'(G),
        nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                  H),
        I=[A|H],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                 I),
        (   H=[J|_]
        ->  setarg(5, J, I)
        ;   true
        ),
        'attach_known/1_1_$special_=</2___2'(G, A)
    ;   true
    ).
'known/1_1_$special_=:=/2'(A, B) :-
    'known/1_1_$special_=:=/2___2__0'(A, B, _).
'known/1_1_$special_=:=/2___2__0'(A, B, C) :-
    (   'chr newvia_2'(A, B, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, F)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',
                  F)
    ),
    member(G, F),
    G=suspension(_, active, _, _, _, H, I),
    H==A,
    I==B,
    !,
    (   var(C)
    ->  true
    ;   C=suspension(_, J, _, _, _, K, L),
        setarg(2, C, removed),
        (   J==not_stored_yet
        ->  M=[]
        ;   term_variables(term(K, L), M),
            arg(5, C, N),
            (   var(N)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',
                          O),
                O=[_|P],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',
                         P),
                (   P=[Q|_]
                ->  setarg(5, Q, _)
                ;   true
                )
            ;   N=[_, _|P],
                setarg(2, N, P),
                (   P=[Q|_]
                ->  setarg(5, Q, N)
                ;   true
                )
            ),
            'detach_known/1_1_$special_=:=/2___2'(M, C)
        )
    ).
'known/1_1_$special_=:=/2___2__0'(_, _, A) :-
    nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',
              B),
    member(C, B),
    C=suspension(_, active, _),
    !,
    (   var(A)
    ->  true
    ;   A=suspension(_, D, _, _, _, E, F),
        setarg(2, A, removed),
        (   D==not_stored_yet
        ->  G=[]
        ;   term_variables(term(E, F), G),
            arg(5, A, H),
            (   var(H)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',
                          I),
                I=[_|J],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',
                         J),
                (   J=[K|_]
                ->  setarg(5, K, _)
                ;   true
                )
            ;   H=[_, _|J],
                setarg(2, H, J),
                (   J=[K|_]
                ->  setarg(5, K, H)
                ;   true
                )
            ),
            'detach_known/1_1_$special_=:=/2___2'(G, A)
        )
    ).
'known/1_1_$special_=:=/2___2__0'(A, B, C) :-
    B==A,
    !,
    (   var(C)
    ->  true
    ;   C=suspension(_, D, _, _, _, E, F),
        setarg(2, C, removed),
        (   D==not_stored_yet
        ->  G=[]
        ;   term_variables(term(E, F), G),
            arg(5, C, H),
            (   var(H)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',
                          I),
                I=[_|J],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',
                         J),
                (   J=[K|_]
                ->  setarg(5, K, _)
                ;   true
                )
            ;   H=[_, _|J],
                setarg(2, H, J),
                (   J=[K|_]
                ->  setarg(5, K, H)
                ;   true
                )
            ),
            'detach_known/1_1_$special_=:=/2___2'(G, C)
        )
    ).
'known/1_1_$special_=:=/2___2__0'(A, B, C) :-
    number(B),
    number(A),
    A=\=B,
    !,
    (   var(C)
    ->  true
    ;   C=suspension(_, D, _, _, _, E, F),
        setarg(2, C, removed),
        (   D==not_stored_yet
        ->  G=[]
        ;   term_variables(term(E, F), G),
            arg(5, C, H),
            (   var(H)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',
                          I),
                I=[_|J],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',
                         J),
                (   J=[K|_]
                ->  setarg(5, K, _)
                ;   true
                )
            ;   H=[_, _|J],
                setarg(2, H, J),
                (   J=[K|_]
                ->  setarg(5, K, H)
                ;   true
                )
            ),
            'detach_known/1_1_$special_=:=/2___2'(G, C)
        )
    ),
    'known/1_1_$special_fail/0'.
'known/1_1_$special_=:=/2___2__0'(A, B, C) :-
    (   'chr newvia_2'(A, B, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, _, _, _, _, _, _, _, _, _, _, F, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',
                  F)
    ),
    member(G, F),
    G=suspension(_, active, _, _, _, H, I),
    H==A,
    I==B,
    !,
    G=suspension(_, _, _, _, _, J, K),
    setarg(2, G, removed),
    term_variables(term(J, K), L),
    arg(5, G, M),
    (   var(M)
    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',
                  N),
        N=[_|O],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',
                 O),
        (   O=[P|_]
        ->  setarg(5, P, _)
        ;   true
        )
    ;   M=[_, _|O],
        setarg(2, M, O),
        (   O=[P|_]
        ->  setarg(5, P, M)
        ;   true
        )
    ),
    'detach_known/1_1_$special_=\\=/2___2'(L, G),
    (   var(C)
    ->  true
    ;   C=suspension(_, Q, _, _, _, R, S),
        setarg(2, C, removed),
        (   Q==not_stored_yet
        ->  T=[]
        ;   term_variables(term(R, S), T),
            arg(5, C, U),
            (   var(U)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',
                          V),
                V=[_|W],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',
                         W),
                (   W=[X|_]
                ->  setarg(5, X, _)
                ;   true
                )
            ;   U=[_, _|W],
                setarg(2, U, W),
                (   W=[X|_]
                ->  setarg(5, X, U)
                ;   true
                )
            ),
            'detach_known/1_1_$special_=:=/2___2'(T, C)
        )
    ),
    'known/1_1_$special_fail/0'.
'known/1_1_$special_=:=/2___2__0'(A, B, C) :-
    (   'chr newvia_1'(B, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, F)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',
                  F)
    ),
    !,
    (   var(C)
    ->  C=suspension(G, not_stored_yet, t, 0, _, A, B),
        'chr gen_id'(G)
    ;   true
    ),
    'known/1_1_$special_=:=/2___2__0__0__11'(F, A, B, C).
'known/1_1_$special_=:=/2___2__0__0__11'([], A, B, C) :-
    'known/1_1_$special_=:=/2___2__1'(A, B, C).
'known/1_1_$special_=:=/2___2__0__0__11'([A|B], C, D, E) :-
    (   A=suspension(_, active, _, _, _, F, G),
        F==D,
        H=t(193, E, A),
        '$novel_production'(E, H),
        '$novel_production'(A, H),
        C\==G
    ->  '$extend_history'(E, H),
        arg(2, E, I),
        setarg(2, E, active),
        ( arg(4, E, J),
          K is J+1,
          setarg(4, E, K)
        ),
        (   I==not_stored_yet
        ->  E=suspension(_, _, _, _, _, L, M),
            term_variables(term(L, M), N),
            'chr none_locked'(N),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',
                      O),
            P=[E|O],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',
                     P),
            (   O=[Q|_]
            ->  setarg(5, Q, P)
            ;   true
            ),
            'attach_known/1_1_$special_=:=/2___2'(N, E)
        ;   true
        ),
        'known/1_1_$special_=:=/2'(C, G),
        (   E=suspension(_, active, _, K, _, _, _)
        ->  setarg(2, E, inactive),
            'known/1_1_$special_=:=/2___2__0__0__11'(B,
                                                     C,
                                                     D,
                                                     E)
        ;   true
        )
    ;   'known/1_1_$special_=:=/2___2__0__0__11'(B,
                                                 C,
                                                 D,
                                                 E)
    ).
'known/1_1_$special_=:=/2___2__0'(A, B, C) :-
    (   var(C)
    ->  C=suspension(D, not_stored_yet, t, 0, _, A, B),
        'chr gen_id'(D)
    ;   true
    ),
    'known/1_1_$special_=:=/2___2__1'(A, B, C).
'known/1_1_$special_=:=/2___2__1'(A, B, C) :-
    (   'chr newvia_1'(A, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, F)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',
                  F)
    ),
    !,
    'known/1_1_$special_=:=/2___2__1__0__12'(F, A, B, C).
'known/1_1_$special_=:=/2___2__1__0__12'([], A, B, C) :-
    'known/1_1_$special_=:=/2___2__2'(A, B, C).
'known/1_1_$special_=:=/2___2__1__0__12'([A|B], C, D, E) :-
    (   A=suspension(_, active, _, _, _, F, G),
        G==C,
        H=t(193, A, E),
        '$novel_production'(A, H),
        '$novel_production'(E, H),
        F\==D
    ->  '$extend_history'(E, H),
        arg(2, E, I),
        setarg(2, E, active),
        ( arg(4, E, J),
          K is J+1,
          setarg(4, E, K)
        ),
        (   I==not_stored_yet
        ->  E=suspension(_, _, _, _, _, L, M),
            term_variables(term(L, M), N),
            'chr none_locked'(N),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',
                      O),
            P=[E|O],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',
                     P),
            (   O=[Q|_]
            ->  setarg(5, Q, P)
            ;   true
            ),
            'attach_known/1_1_$special_=:=/2___2'(N, E)
        ;   true
        ),
        'known/1_1_$special_=:=/2'(F, D),
        (   E=suspension(_, active, _, K, _, _, _)
        ->  setarg(2, E, inactive),
            'known/1_1_$special_=:=/2___2__1__0__12'(B,
                                                     C,
                                                     D,
                                                     E)
        ;   true
        )
    ;   'known/1_1_$special_=:=/2___2__1__0__12'(B,
                                                 C,
                                                 D,
                                                 E)
    ).
'known/1_1_$special_=:=/2___2__1'(A, B, C) :-
    'known/1_1_$special_=:=/2___2__2'(A, B, C).
'known/1_1_$special_=:=/2___2__2'(A, B, C) :-
    '$novel_production'(C, 194),
    !,
    '$extend_history'(C, 194),
    arg(2, C, D),
    setarg(2, C, active),
    arg(4, C, E),
    F is E+1,
    setarg(4, C, F),
    (   D==not_stored_yet
    ->  C=suspension(_, _, _, _, _, G, H),
        term_variables(term(G, H), I),
        'chr none_locked'(I),
        nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',
                  J),
        K=[C|J],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',
                 K),
        (   J=[L|_]
        ->  setarg(5, L, K)
        ;   true
        ),
        'attach_known/1_1_$special_=:=/2___2'(I, C)
    ;   true
    ),
    'known/1_1_$special_=:=/2'(B, A),
    (   C=suspension(_, active, _, F, _, _, _)
    ->  setarg(2, C, inactive),
        'known/1_1_$special_=:=/2___2__3'(A, B, C)
    ;   true
    ).
'known/1_1_$special_=:=/2___2__2'(A, B, C) :-
    'known/1_1_$special_=:=/2___2__3'(A, B, C).
'known/1_1_$special_=:=/2___2__3'(A, B, C) :-
    (   'chr newvia_2'(A, B, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, _, _, _, _, _, _, _, _, _, _, _, F, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                  F)
    ),
    member(G, F),
    G=suspension(_, active, _, _, H),
    nonvar(H),
    H=(I=:=J),
    I==A,
    J==B,
    !,
    G=suspension(_, _, _, _, K),
    setarg(2, G, removed),
    term_variables(K, L),
    arg(4, G, M),
    (   var(M)
    ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                  N),
        N=[_|O],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                 O),
        (   O=[P|_]
        ->  setarg(4, P, _)
        ;   true
        )
    ;   M=[_, _|O],
        setarg(2, M, O),
        (   O=[P|_]
        ->  setarg(4, P, M)
        ;   true
        )
    ),
    'detach_known/1_1_$special_\\+/1___1'(L, G),
    (   var(C)
    ->  true
    ;   C=suspension(_, Q, _, _, _, R, S),
        setarg(2, C, removed),
        (   Q==not_stored_yet
        ->  T=[]
        ;   term_variables(term(R, S), T),
            arg(5, C, U),
            (   var(U)
            ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',
                          V),
                V=[_|W],
                b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',
                         W),
                (   W=[X|_]
                ->  setarg(5, X, _)
                ;   true
                )
            ;   U=[_, _|W],
                setarg(2, U, W),
                (   W=[X|_]
                ->  setarg(5, X, U)
                ;   true
                )
            ),
            'detach_known/1_1_$special_=:=/2___2'(T, C)
        )
    ),
    'known/1_1_$special_fail/0'.
'known/1_1_$special_=:=/2___2__3'(A, B, C) :-
    (   'chr newvia_2'(A, B, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, F, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  F)
    ),
    !,
    'known/1_1_$special_=:=/2___2__3__0__15'(F, A, B, C).
'known/1_1_$special_=:=/2___2__3__0__15'([], A, B, C) :-
    'known/1_1_$special_=:=/2___2__4'(A, B, C).
'known/1_1_$special_=:=/2___2__3__0__15'([A|B], C, D, E) :-
    (   A=suspension(_, active, _, _, F, G),
        nonvar(F),
        F=(\+H),
        nonvar(H),
        H=(I=:=J),
        I==C,
        J==D
    ->  A=suspension(_, _, _, _, K, L),
        setarg(2, A, removed),
        term_variables(term(K, L), M),
        ( arg(4, A, N),
          (   var(N)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                        O),
              O=[_|P],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                       P),
              (   P=[Q|_]
              ->  setarg(4, Q, _)
              ;   true
              )
          ;   N=[_, _|P],
              setarg(2, N, P),
              (   P=[Q|_]
              ->  setarg(4, Q, N)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_;/2___2'(M, A),
        arg(2, E, R),
        setarg(2, E, active),
        ( arg(4, E, S),
          T is S+1,
          setarg(4, E, T)
        ),
        (   R==not_stored_yet
        ->  E=suspension(_, _, _, _, _, U, V),
            term_variables(term(U, V), W),
            'chr none_locked'(W),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',
                      X),
            Y=[E|X],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',
                     Y),
            (   X=[Z|_]
            ->  setarg(5, Z, Y)
            ;   true
            ),
            'attach_known/1_1_$special_=:=/2___2'(W, E)
        ;   true
        ),
        known(G),
        (   E=suspension(_, active, _, T, _, _, _)
        ->  setarg(2, E, inactive),
            'known/1_1_$special_=:=/2___2__3__0__15'(B,
                                                     C,
                                                     D,
                                                     E)
        ;   true
        )
    ;   'known/1_1_$special_=:=/2___2__3__0__15'(B,
                                                 C,
                                                 D,
                                                 E)
    ).
'known/1_1_$special_=:=/2___2__3'(A, B, C) :-
    'known/1_1_$special_=:=/2___2__4'(A, B, C).
'known/1_1_$special_=:=/2___2__4'(A, B, C) :-
    (   'chr newvia_2'(A, B, D)
    ->  get_attr(D, guard_entailment, E),
        E=v(_, _, _, F, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _)
    ;   nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                  F)
    ),
    !,
    'known/1_1_$special_=:=/2___2__4__0__16'(F, A, B, C).
'known/1_1_$special_=:=/2___2__4__0__16'([], A, B, C) :-
    'known/1_1_$special_=:=/2___2__5'(A, B, C).
'known/1_1_$special_=:=/2___2__4__0__16'([A|B], C, D, E) :-
    (   A=suspension(_, active, _, _, F, G),
        nonvar(F),
        F=(H, _),
        nonvar(H),
        H=(\+I),
        nonvar(I),
        I=(J=:=K),
        J==C,
        K==D
    ->  A=suspension(_, _, _, _, L, M),
        setarg(2, A, removed),
        term_variables(term(L, M), N),
        ( arg(4, A, O),
          (   var(O)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                        P),
              P=[_|Q],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                       Q),
              (   Q=[R|_]
              ->  setarg(4, R, _)
              ;   true
              )
          ;   O=[_, _|Q],
              setarg(2, O, Q),
              (   Q=[R|_]
              ->  setarg(4, R, O)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_;/2___2'(N, A),
        arg(2, E, S),
        setarg(2, E, active),
        ( arg(4, E, T),
          U is T+1,
          setarg(4, E, U)
        ),
        (   S==not_stored_yet
        ->  E=suspension(_, _, _, _, _, V, W),
            term_variables(term(V, W), X),
            'chr none_locked'(X),
            nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',
                      Y),
            Z=[E|Y],
            b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',
                     Z),
            (   Y=[A1|_]
            ->  setarg(5, A1, Z)
            ;   true
            ),
            'attach_known/1_1_$special_=:=/2___2'(X, E)
        ;   true
        ),
        known(G),
        (   E=suspension(_, active, _, U, _, _, _)
        ->  setarg(2, E, inactive),
            'known/1_1_$special_=:=/2___2__4__0__16'(B,
                                                     C,
                                                     D,
                                                     E)
        ;   true
        )
    ;   'known/1_1_$special_=:=/2___2__4__0__16'(B,
                                                 C,
                                                 D,
                                                 E)
    ).
'known/1_1_$special_=:=/2___2__4'(A, B, C) :-
    'known/1_1_$special_=:=/2___2__5'(A, B, C).
'known/1_1_$special_=:=/2___2__5'(_, _, A) :-
    arg(2, A, B),
    setarg(2, A, active),
    arg(4, A, C),
    D is C+1,
    setarg(4, A, D),
    (   B==not_stored_yet
    ->  A=suspension(_, _, _, _, _, E, F),
        term_variables(term(E, F), G),
        'chr none_locked'(G),
        nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',
                  H),
        I=[A|H],
        b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',
                 I),
        (   H=[J|_]
        ->  setarg(5, J, I)
        ;   true
        ),
        'attach_known/1_1_$special_=:=/2___2'(G, A)
    ;   true
    ).
'known/1_1_$special_fail/0' :-
    nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',
              A),
    member(B, A),
    B=suspension(_, active, _),
    !.
'known/1_1_$special_fail/0' :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
              A),
    !,
    'known/1_1_$special_fail/0___0__0__0__24'(A).
'known/1_1_$special_fail/0___0__0__0__24'([]) :-
    'known/1_1_$special_fail/0___0__1'.
'known/1_1_$special_fail/0___0__0__0__24'([A|B]) :-
    (   A=suspension(_, active, _, _, _, _)
    ->  A=suspension(_, _, _, _, C, D),
        setarg(2, A, removed),
        term_variables(term(C, D), E),
        ( arg(4, A, F),
          (   var(F)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                        G),
              G=[_|H],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_;/2___2',
                       H),
              (   H=[I|_]
              ->  setarg(4, I, _)
              ;   true
              )
          ;   F=[_, _|H],
              setarg(2, F, H),
              (   H=[I|_]
              ->  setarg(4, I, F)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_;/2___2'(E, A),
        'known/1_1_$special_fail/0___0__0__0__24'(B)
    ;   'known/1_1_$special_fail/0___0__0__0__24'(B)
    ).
'known/1_1_$special_fail/0' :-
    'known/1_1_$special_fail/0___0__1'.
'known/1_1_$special_fail/0___0__1' :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',
              A),
    !,
    'known/1_1_$special_fail/0___0__1__0__25'(A).
'known/1_1_$special_fail/0___0__1__0__25'([]) :-
    'known/1_1_$special_fail/0___0__2'.
'known/1_1_$special_fail/0___0__1__0__25'([A|B]) :-
    (   A=suspension(_, active, _, _, _)
    ->  A=suspension(_, _, _, _, C),
        setarg(2, A, removed),
        term_variables(C, D),
        ( arg(4, A, E),
          (   var(E)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',
                        F),
              F=[_|G],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_nonvar/1___1',
                       G),
              (   G=[H|_]
              ->  setarg(4, H, _)
              ;   true
              )
          ;   E=[_, _|G],
              setarg(2, E, G),
              (   G=[H|_]
              ->  setarg(4, H, E)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_nonvar/1___1'(D, A),
        'known/1_1_$special_fail/0___0__1__0__25'(B)
    ;   'known/1_1_$special_fail/0___0__1__0__25'(B)
    ).
'known/1_1_$special_fail/0___0__1' :-
    'known/1_1_$special_fail/0___0__2'.
'known/1_1_$special_fail/0___0__2' :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',
              A),
    !,
    'known/1_1_$special_fail/0___0__2__0__26'(A).
'known/1_1_$special_fail/0___0__2__0__26'([]) :-
    'known/1_1_$special_fail/0___0__3'.
'known/1_1_$special_fail/0___0__2__0__26'([A|B]) :-
    (   A=suspension(_, active, _, _, _)
    ->  A=suspension(_, _, _, _, C),
        setarg(2, A, removed),
        term_variables(C, D),
        ( arg(4, A, E),
          (   var(E)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',
                        F),
              F=[_|G],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_var/1___1',
                       G),
              (   G=[H|_]
              ->  setarg(4, H, _)
              ;   true
              )
          ;   E=[_, _|G],
              setarg(2, E, G),
              (   G=[H|_]
              ->  setarg(4, H, E)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_var/1___1'(D, A),
        'known/1_1_$special_fail/0___0__2__0__26'(B)
    ;   'known/1_1_$special_fail/0___0__2__0__26'(B)
    ).
'known/1_1_$special_fail/0___0__2' :-
    'known/1_1_$special_fail/0___0__3'.
'known/1_1_$special_fail/0___0__3' :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',
              A),
    !,
    'known/1_1_$special_fail/0___0__3__0__27'(A).
'known/1_1_$special_fail/0___0__3__0__27'([]) :-
    'known/1_1_$special_fail/0___0__4'.
'known/1_1_$special_fail/0___0__3__0__27'([A|B]) :-
    (   A=suspension(_, active, _, _, _, _)
    ->  A=suspension(_, _, _, _, _, C),
        setarg(2, A, removed),
        term_variables(C, D),
        ( arg(5, A, E),
          (   var(E)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',
                        F),
              F=[_|G],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_atom/1___1',
                       G),
              (   G=[H|_]
              ->  setarg(5, H, _)
              ;   true
              )
          ;   E=[_, _|G],
              setarg(2, E, G),
              (   G=[H|_]
              ->  setarg(5, H, E)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_atom/1___1'(D, A),
        'known/1_1_$special_fail/0___0__3__0__27'(B)
    ;   'known/1_1_$special_fail/0___0__3__0__27'(B)
    ).
'known/1_1_$special_fail/0___0__3' :-
    'known/1_1_$special_fail/0___0__4'.
'known/1_1_$special_fail/0___0__4' :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',
              A),
    !,
    'known/1_1_$special_fail/0___0__4__0__28'(A).
'known/1_1_$special_fail/0___0__4__0__28'([]) :-
    'known/1_1_$special_fail/0___0__5'.
'known/1_1_$special_fail/0___0__4__0__28'([A|B]) :-
    (   A=suspension(_, active, _, _, _, _)
    ->  A=suspension(_, _, _, _, _, C),
        setarg(2, A, removed),
        term_variables(C, D),
        ( arg(5, A, E),
          (   var(E)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',
                        F),
              F=[_|G],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_atomic/1___1',
                       G),
              (   G=[H|_]
              ->  setarg(5, H, _)
              ;   true
              )
          ;   E=[_, _|G],
              setarg(2, E, G),
              (   G=[H|_]
              ->  setarg(5, H, E)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_atomic/1___1'(D, A),
        'known/1_1_$special_fail/0___0__4__0__28'(B)
    ;   'known/1_1_$special_fail/0___0__4__0__28'(B)
    ).
'known/1_1_$special_fail/0___0__4' :-
    'known/1_1_$special_fail/0___0__5'.
'known/1_1_$special_fail/0___0__5' :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',
              A),
    !,
    'known/1_1_$special_fail/0___0__5__0__29'(A).
'known/1_1_$special_fail/0___0__5__0__29'([]) :-
    'known/1_1_$special_fail/0___0__6'.
'known/1_1_$special_fail/0___0__5__0__29'([A|B]) :-
    (   A=suspension(_, active, _, _, _, _)
    ->  A=suspension(_, _, _, _, _, C),
        setarg(2, A, removed),
        term_variables(C, D),
        ( arg(5, A, E),
          (   var(E)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',
                        F),
              F=[_|G],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_compound/1___1',
                       G),
              (   G=[H|_]
              ->  setarg(5, H, _)
              ;   true
              )
          ;   E=[_, _|G],
              setarg(2, E, G),
              (   G=[H|_]
              ->  setarg(5, H, E)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_compound/1___1'(D, A),
        'known/1_1_$special_fail/0___0__5__0__29'(B)
    ;   'known/1_1_$special_fail/0___0__5__0__29'(B)
    ).
'known/1_1_$special_fail/0___0__5' :-
    'known/1_1_$special_fail/0___0__6'.
'known/1_1_$special_fail/0___0__6' :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',
              A),
    !,
    'known/1_1_$special_fail/0___0__6__0__30'(A).
'known/1_1_$special_fail/0___0__6__0__30'([]) :-
    'known/1_1_$special_fail/0___0__7'.
'known/1_1_$special_fail/0___0__6__0__30'([A|B]) :-
    (   A=suspension(_, active, _, _, _, _)
    ->  A=suspension(_, _, _, _, _, C),
        setarg(2, A, removed),
        term_variables(C, D),
        ( arg(5, A, E),
          (   var(E)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',
                        F),
              F=[_|G],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_ground/1___1',
                       G),
              (   G=[H|_]
              ->  setarg(5, H, _)
              ;   true
              )
          ;   E=[_, _|G],
              setarg(2, E, G),
              (   G=[H|_]
              ->  setarg(5, H, E)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_ground/1___1'(D, A),
        'known/1_1_$special_fail/0___0__6__0__30'(B)
    ;   'known/1_1_$special_fail/0___0__6__0__30'(B)
    ).
'known/1_1_$special_fail/0___0__6' :-
    'known/1_1_$special_fail/0___0__7'.
'known/1_1_$special_fail/0___0__7' :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',
              A),
    !,
    'known/1_1_$special_fail/0___0__7__0__31'(A).
'known/1_1_$special_fail/0___0__7__0__31'([]) :-
    'known/1_1_$special_fail/0___0__8'.
'known/1_1_$special_fail/0___0__7__0__31'([A|B]) :-
    (   A=suspension(_, active, _, _, _, _)
    ->  A=suspension(_, _, _, _, _, C),
        setarg(2, A, removed),
        term_variables(C, D),
        ( arg(5, A, E),
          (   var(E)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',
                        F),
              F=[_|G],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_integer/1___1',
                       G),
              (   G=[H|_]
              ->  setarg(5, H, _)
              ;   true
              )
          ;   E=[_, _|G],
              setarg(2, E, G),
              (   G=[H|_]
              ->  setarg(5, H, E)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_integer/1___1'(D, A),
        'known/1_1_$special_fail/0___0__7__0__31'(B)
    ;   'known/1_1_$special_fail/0___0__7__0__31'(B)
    ).
'known/1_1_$special_fail/0___0__7' :-
    'known/1_1_$special_fail/0___0__8'.
'known/1_1_$special_fail/0___0__8' :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',
              A),
    !,
    'known/1_1_$special_fail/0___0__8__0__32'(A).
'known/1_1_$special_fail/0___0__8__0__32'([]) :-
    'known/1_1_$special_fail/0___0__9'.
'known/1_1_$special_fail/0___0__8__0__32'([A|B]) :-
    (   A=suspension(_, active, _, _, _, _)
    ->  A=suspension(_, _, _, _, _, C),
        setarg(2, A, removed),
        term_variables(C, D),
        ( arg(5, A, E),
          (   var(E)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',
                        F),
              F=[_|G],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_float/1___1',
                       G),
              (   G=[H|_]
              ->  setarg(5, H, _)
              ;   true
              )
          ;   E=[_, _|G],
              setarg(2, E, G),
              (   G=[H|_]
              ->  setarg(5, H, E)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_float/1___1'(D, A),
        'known/1_1_$special_fail/0___0__8__0__32'(B)
    ;   'known/1_1_$special_fail/0___0__8__0__32'(B)
    ).
'known/1_1_$special_fail/0___0__8' :-
    'known/1_1_$special_fail/0___0__9'.
'known/1_1_$special_fail/0___0__9' :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',
              A),
    !,
    'known/1_1_$special_fail/0___0__9__0__33'(A).
'known/1_1_$special_fail/0___0__9__0__33'([]) :-
    'known/1_1_$special_fail/0___0__10'.
'known/1_1_$special_fail/0___0__9__0__33'([A|B]) :-
    (   A=suspension(_, active, _, _, _, _)
    ->  A=suspension(_, _, _, _, _, C),
        setarg(2, A, removed),
        term_variables(C, D),
        ( arg(5, A, E),
          (   var(E)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',
                        F),
              F=[_|G],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_number/1___1',
                       G),
              (   G=[H|_]
              ->  setarg(5, H, _)
              ;   true
              )
          ;   E=[_, _|G],
              setarg(2, E, G),
              (   G=[H|_]
              ->  setarg(5, H, E)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_number/1___1'(D, A),
        'known/1_1_$special_fail/0___0__9__0__33'(B)
    ;   'known/1_1_$special_fail/0___0__9__0__33'(B)
    ).
'known/1_1_$special_fail/0___0__9' :-
    'known/1_1_$special_fail/0___0__10'.
'known/1_1_$special_fail/0___0__10' :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',
              A),
    !,
    'known/1_1_$special_fail/0___0__10__0__34'(A).
'known/1_1_$special_fail/0___0__10__0__34'([]) :-
    'known/1_1_$special_fail/0___0__11'.
'known/1_1_$special_fail/0___0__10__0__34'([A|B]) :-
    (   A=suspension(_, active, _, _, _, _, _)
    ->  A=suspension(_, _, _, _, _, C, D),
        setarg(2, A, removed),
        term_variables(term(C, D), E),
        ( arg(5, A, F),
          (   var(F)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',
                        G),
              G=[_|H],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=\\=/2___2',
                       H),
              (   H=[I|_]
              ->  setarg(5, I, _)
              ;   true
              )
          ;   F=[_, _|H],
              setarg(2, F, H),
              (   H=[I|_]
              ->  setarg(5, I, F)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_=\\=/2___2'(E, A),
        'known/1_1_$special_fail/0___0__10__0__34'(B)
    ;   'known/1_1_$special_fail/0___0__10__0__34'(B)
    ).
'known/1_1_$special_fail/0___0__10' :-
    'known/1_1_$special_fail/0___0__11'.
'known/1_1_$special_fail/0___0__11' :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
              A),
    !,
    'known/1_1_$special_fail/0___0__11__0__35'(A).
'known/1_1_$special_fail/0___0__11__0__35'([]) :-
    'known/1_1_$special_fail/0___0__12'.
'known/1_1_$special_fail/0___0__11__0__35'([A|B]) :-
    (   A=suspension(_, active, _, _, _)
    ->  A=suspension(_, _, _, _, C),
        setarg(2, A, removed),
        term_variables(C, D),
        ( arg(4, A, E),
          (   var(E)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                        F),
              F=[_|G],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\+/1___1',
                       G),
              (   G=[H|_]
              ->  setarg(4, H, _)
              ;   true
              )
          ;   E=[_, _|G],
              setarg(2, E, G),
              (   G=[H|_]
              ->  setarg(4, H, E)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_\\+/1___1'(D, A),
        'known/1_1_$special_fail/0___0__11__0__35'(B)
    ;   'known/1_1_$special_fail/0___0__11__0__35'(B)
    ).
'known/1_1_$special_fail/0___0__11' :-
    'known/1_1_$special_fail/0___0__12'.
'known/1_1_$special_fail/0___0__12' :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',
              A),
    !,
    'known/1_1_$special_fail/0___0__12__0__36'(A).
'known/1_1_$special_fail/0___0__12__0__36'([]) :-
    'known/1_1_$special_fail/0___0__13'.
'known/1_1_$special_fail/0___0__12__0__36'([A|B]) :-
    (   A=suspension(_, active, _, _, _, _, _)
    ->  A=suspension(_, _, _, _, C, D, E),
        setarg(2, A, removed),
        term_variables(term(C, D, E), F),
        ( arg(4, A, G),
          (   var(G)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',
                        H),
              H=[_|I],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_functor/3___3',
                       I),
              (   I=[J|_]
              ->  setarg(4, J, _)
              ;   true
              )
          ;   G=[_, _|I],
              setarg(2, G, I),
              (   I=[J|_]
              ->  setarg(4, J, G)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_functor/3___3'(F, A),
        'known/1_1_$special_fail/0___0__12__0__36'(B)
    ;   'known/1_1_$special_fail/0___0__12__0__36'(B)
    ).
'known/1_1_$special_fail/0___0__12' :-
    'known/1_1_$special_fail/0___0__13'.
'known/1_1_$special_fail/0___0__13' :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',
              A),
    !,
    'known/1_1_$special_fail/0___0__13__0__37'(A).
'known/1_1_$special_fail/0___0__13__0__37'([]) :-
    'known/1_1_$special_fail/0___0__14'.
'known/1_1_$special_fail/0___0__13__0__37'([A|B]) :-
    (   A=suspension(_, active, _, _, _, _, _)
    ->  A=suspension(_, _, _, _, _, C, D),
        setarg(2, A, removed),
        term_variables(term(C, D), E),
        ( arg(5, A, F),
          (   var(F)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',
                        G),
              G=[_|H],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\=/2___2',
                       H),
              (   H=[I|_]
              ->  setarg(5, I, _)
              ;   true
              )
          ;   F=[_, _|H],
              setarg(2, F, H),
              (   H=[I|_]
              ->  setarg(5, I, F)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_\\=/2___2'(E, A),
        'known/1_1_$special_fail/0___0__13__0__37'(B)
    ;   'known/1_1_$special_fail/0___0__13__0__37'(B)
    ).
'known/1_1_$special_fail/0___0__13' :-
    'known/1_1_$special_fail/0___0__14'.
'known/1_1_$special_fail/0___0__14' :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',
              A),
    !,
    'known/1_1_$special_fail/0___0__14__0__38'(A).
'known/1_1_$special_fail/0___0__14__0__38'([]) :-
    'known/1_1_$special_fail/0___0__15'.
'known/1_1_$special_fail/0___0__14__0__38'([A|B]) :-
    (   A=suspension(_, active, _, _, _, _)
    ->  A=suspension(_, _, _, _, C, D),
        setarg(2, A, removed),
        term_variables(term(C, D), E),
        ( arg(4, A, F),
          (   var(F)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',
                        G),
              G=[_|H],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=/2___2',
                       H),
              (   H=[I|_]
              ->  setarg(4, I, _)
              ;   true
              )
          ;   F=[_, _|H],
              setarg(2, F, H),
              (   H=[I|_]
              ->  setarg(4, I, F)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_=/2___2'(E, A),
        'known/1_1_$special_fail/0___0__14__0__38'(B)
    ;   'known/1_1_$special_fail/0___0__14__0__38'(B)
    ).
'known/1_1_$special_fail/0___0__14' :-
    'known/1_1_$special_fail/0___0__15'.
'known/1_1_$special_fail/0___0__15' :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',
              A),
    !,
    'known/1_1_$special_fail/0___0__15__0__40'(A).
'known/1_1_$special_fail/0___0__15__0__40'([]) :-
    'known/1_1_$special_fail/0___0__16'.
'known/1_1_$special_fail/0___0__15__0__40'([A|B]) :-
    (   A=suspension(_, active, _, _, _, _, _)
    ->  A=suspension(_, _, _, _, _, C, D),
        setarg(2, A, removed),
        term_variables(term(C, D), E),
        ( arg(5, A, F),
          (   var(F)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',
                        G),
              G=[_|H],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_\\==/2___2',
                       H),
              (   H=[I|_]
              ->  setarg(5, I, _)
              ;   true
              )
          ;   F=[_, _|H],
              setarg(2, F, H),
              (   H=[I|_]
              ->  setarg(5, I, F)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_\\==/2___2'(E, A),
        'known/1_1_$special_fail/0___0__15__0__40'(B)
    ;   'known/1_1_$special_fail/0___0__15__0__40'(B)
    ).
'known/1_1_$special_fail/0___0__15' :-
    'known/1_1_$special_fail/0___0__16'.
'known/1_1_$special_fail/0___0__16' :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',
              A),
    !,
    'known/1_1_$special_fail/0___0__16__0__41'(A).
'known/1_1_$special_fail/0___0__16__0__41'([]) :-
    'known/1_1_$special_fail/0___0__17'.
'known/1_1_$special_fail/0___0__16__0__41'([A|B]) :-
    (   A=suspension(_, active, _, _, _, _, _)
    ->  A=suspension(_, _, _, _, _, C, D),
        setarg(2, A, removed),
        term_variables(term(C, D), E),
        ( arg(5, A, F),
          (   var(F)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',
                        G),
              G=[_|H],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_==/2___2',
                       H),
              (   H=[I|_]
              ->  setarg(5, I, _)
              ;   true
              )
          ;   F=[_, _|H],
              setarg(2, F, H),
              (   H=[I|_]
              ->  setarg(5, I, F)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_==/2___2'(E, A),
        'known/1_1_$special_fail/0___0__16__0__41'(B)
    ;   'known/1_1_$special_fail/0___0__16__0__41'(B)
    ).
'known/1_1_$special_fail/0___0__16' :-
    'known/1_1_$special_fail/0___0__17'.
'known/1_1_$special_fail/0___0__17' :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
              A),
    !,
    'known/1_1_$special_fail/0___0__17__0__46'(A).
'known/1_1_$special_fail/0___0__17__0__46'([]) :-
    'known/1_1_$special_fail/0___0__18'.
'known/1_1_$special_fail/0___0__17__0__46'([A|B]) :-
    (   A=suspension(_, active, _, _, _, _, _)
    ->  A=suspension(_, _, _, _, _, C, D),
        setarg(2, A, removed),
        term_variables(term(C, D), E),
        ( arg(5, A, F),
          (   var(F)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                        G),
              G=[_|H],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=</2___2',
                       H),
              (   H=[I|_]
              ->  setarg(5, I, _)
              ;   true
              )
          ;   F=[_, _|H],
              setarg(2, F, H),
              (   H=[I|_]
              ->  setarg(5, I, F)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_=</2___2'(E, A),
        'known/1_1_$special_fail/0___0__17__0__46'(B)
    ;   'known/1_1_$special_fail/0___0__17__0__46'(B)
    ).
'known/1_1_$special_fail/0___0__17' :-
    'known/1_1_$special_fail/0___0__18'.
'known/1_1_$special_fail/0___0__18' :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',
              A),
    !,
    'known/1_1_$special_fail/0___0__18__0__47'(A).
'known/1_1_$special_fail/0___0__18__0__47'([]) :-
    'known/1_1_$special_fail/0___0__19'.
'known/1_1_$special_fail/0___0__18__0__47'([A|B]) :-
    (   A=suspension(_, active, _, _, _, _, _)
    ->  A=suspension(_, _, _, _, _, C, D),
        setarg(2, A, removed),
        term_variables(term(C, D), E),
        ( arg(5, A, F),
          (   var(F)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',
                        G),
              G=[_|H],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$special_=:=/2___2',
                       H),
              (   H=[I|_]
              ->  setarg(5, I, _)
              ;   true
              )
          ;   F=[_, _|H],
              setarg(2, F, H),
              (   H=[I|_]
              ->  setarg(5, I, F)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$special_=:=/2___2'(E, A),
        'known/1_1_$special_fail/0___0__18__0__47'(B)
    ;   'known/1_1_$special_fail/0___0__18__0__47'(B)
    ).
'known/1_1_$special_fail/0___0__18' :-
    'known/1_1_$special_fail/0___0__19'.
'known/1_1_$special_fail/0___0__19' :-
    nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',
              A),
    !,
    'known/1_1_$special_fail/0___0__19__0__50'(A).
'known/1_1_$special_fail/0___0__19__0__50'([]) :-
    'known/1_1_$special_fail/0___0__20'.
'known/1_1_$special_fail/0___0__19__0__50'([A|B]) :-
    (   A=suspension(_, active, _, _, _)
    ->  A=suspension(_, _, _, _, C),
        setarg(2, A, removed),
        term_variables(C, D),
        ( arg(4, A, E),
          (   var(E)
          ->  nb_getval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',
                        F),
              F=[_|G],
              b_setval('$chr_store_global_list_guard_entailment____known/1_1_$default___1',
                       G),
              (   G=[H|_]
              ->  setarg(4, H, _)
              ;   true
              )
          ;   E=[_, _|G],
              setarg(2, E, G),
              (   G=[H|_]
              ->  setarg(4, H, E)
              ;   true
              )
          )
        ),
        'detach_known/1_1_$default___1'(D, A),
        'known/1_1_$special_fail/0___0__19__0__50'(B)
    ;   'known/1_1_$special_fail/0___0__19__0__50'(B)
    ).
'known/1_1_$special_fail/0___0__19' :-
    'known/1_1_$special_fail/0___0__20'.
'known/1_1_$special_fail/0___0__20' :-
    A=suspension(B, active, _),
    'chr gen_id'(B),
    nb_getval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',
              C),
    D=[A|C],
    b_setval('$chr_store_global_ground_guard_entailment____known/1_1_$special_fail/0___0',
             D),
    (   C=[E|_]
    ->  setarg(3, E, D)
    ;   true
    ).
:- (multifile chr:'$chr_module'/1).
chr:'$chr_module'(guard_entailment).
end_of_file.
