Skip to content

Invert logical expression, using De Morgan Law #70

@sparcbr

Description

@sparcbr

It would be nice if I could transform an Boolean expression using De Morgan's Theorems. It's useful when you want to convert an 'if' expression into an 'else', or simply switch the form of your expression.

image

Examples:
Selecting first OR term (!(A && B)) in the next expression and switching:
!(A && B) || C
wold give:
(A && B) || C

Anywhere in the expression:
A || B && (C || D)
transforms the whole expression into:
!(A || B) || !(C || D)
Simplifying further:
(!A && !B) || (!C && !D)

I think you get the idea...
Maybe the language servers have some functions that could help with the tokenization.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions