Skip to content

Commit 4113472

Browse files
committed
style: match De Morgan's Law with moduledoc and other rewrite rules
- NOT (A AND B) = (NOT A) OR (NOT B) - NOT (A OR B) = (NOT A) AND (NOT B)
1 parent 0fb4a4f commit 4113472

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/crux/expression/rewrite_rule/de_morgans_law.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ defmodule Crux.Expression.RewriteRule.DeMorgansLaw do
2626
def needs_reapplication?, do: true
2727

2828
@impl RewriteRule
29-
def walk(b(nand(left, right))), do: b(not left or not right)
30-
def walk(b(nor(left, right))), do: b(not left and not right)
29+
def walk(b(not (left and right))), do: b(not left or not right)
30+
def walk(b(not (left or right))), do: b(not left and not right)
3131
def walk(other), do: other
3232
end

0 commit comments

Comments
 (0)