Quickly Prove Me Wrong! Introduction

This is the evolution of this previous challenge which was about checking satisfieability of normal formulae in conjunctive normal form (CNF). However, this problem is NP-complete and watching algorithms finish is just boring, so we're gonna simplify the problem!

Specification

Input

You may tune the following input specification to optimally match your language as long as you don't encode additional information.
Your input will be a list of implications. Each implication has a list of variables on the left and a single variable on the right. Variables may be represented using your favorite representation (integer, strings, whatever), for the sake of this specification, characters will be used. The list on the left side may be empty and there may not be a variable on the right. The variable on the right side will not appear on the left side of the same implication.

Example input:

[A -&gt; B; B -&gt; A]
[A,B,C -&gt; D; B,C -&gt; E; -&gt; A; B -&gt; ]


Output

Your output will be a truthy or a falsy value.

What to do?

You need to determine whether the given formula is satisfieable and output truthy if it is satisfieable and falsy if not.
A,B -&gt; C means that if A and B need to hold then C needs to hold as well.
-&gt; C means that C always needs to hold (this is short-hand for True -&gt; C).
A,B -&gt; means that if A and B need to hold, so does falsum and thus there is a contradiction, thus if you find such an implication where A and B hold, you can immediately output falsy (this is short-hand for A,B -&gt; False).
The list of implications all need to hold at the same time.

Because this problem is also known as HORNSAT, it is P-complete and to avoid trivial solutions to this, your solution must run in polynomial time and you must provide reasoning why your solution does so.

Who wins?

This is code-golf, thus the shortest solution in bytes wins! Standard rules apply.

Examples

with Explanation

[A,B -&gt; C; C -&gt;; -&gt; A; A -&gt; B] A needs to hold, thus B needs to hold, thus C needs to hold and thus you found a contradiction.
[A,B -&gt; D; C -&gt;; -&gt; A; A -&gt; B] A needs to hold, thus B needs to hold, thus D needs to hold, however C doesn't need to hold and thus this formula is satisfieable.

without Explanation

[A -&gt; B; B -&gt; A] =&gt; 1
[A,B,C -&gt; D; B,C -&gt; E; -&gt; A; B -&gt; ] =&gt; 1
[A,B -&gt; C; C -&gt;; -&gt; A; A -&gt; B] =&gt; 0
[A,B -&gt; D; C -&gt;; -&gt; A; A -&gt; B] =&gt; 1
[P -&gt; ; -&gt; S ; P -&gt; R; Q -&gt; U; R -&gt; X; S -&gt; Q; P,U -&gt; ; Q,U -&gt; W] =&gt; 1
[-&gt; P; Q -&gt; ; T -&gt; R; P -&gt; S; S -&gt; T; T,P -&gt; Q ] =&gt; 0
Alice, 45 bytes

/;;?dhE..';F&gt;@.&gt;F*.?oK
\'..zi;w!";-$"'!?n-$-/


Try it online!

Input is in the form A-&gt;B;B-&gt;A with no spaces.  Output is Jabberwocky if the formula is satisfiable, and nothing otherwise.

Explanation

This follows a standard template for programs that run entirely in ordinal mode.  Unwrapped, the program is:

';.diEw.";-&gt;".!Fn.$o;.?zh;.!';F$@'&gt;?*-?-K

';.     Push a semicolon and duplicate it
d       Join these two semicolons into a single string and push it, without removing the originals
        This puts ";;" on top of the stack, with a ";" under it (and an irrelevant ";" under that)
i       Take input
E       Insert input between the only pair of characters in ";;"
w       Push return address (start main loop)
.       Duplicate current set of implications
";-&gt;"   Push this string
.!      Copy to tape (to get it again later with fewer bytes)
F       Check whether this string is in current set of implications
n       Negate result: "Jabberwocky" if no match, "" if match
.$o     Output this string if nonempty (no unit clauses remain)
;       Discard top of stack: if the previous command didn't output, this puts the implications back on the TOS
        If the previous command did output, this discards the implications and puts ";" on the TOS
.       Duplicate
?z      Remove everything up to and including the first ";-&gt;"
h;      Take first character of remaining string: this is the literal in the first unit clause,
        or ";" if the clause is simply "-&gt;" (or if "Jabberwocky" was output earlier)
.!      Copy to tape, since we will need it later
';F     Check whether this character contains (i.e., is) a semicolon
$@      If so, terminate
        (Replace "A" in the next two lines with the actual value of the literal in this unit clause)
'&gt;?*-   Remove all instances of "&gt;A"; this destroys all clauses that imply A
?-      Remove all instances of "A"
K       Return to start of main loop


Each command in the main loop takes polynomial time, and each iteration of the loop either terminates the program or destroys at least one clause.  Hence, the entire program runs in polynomial time.