Skip to main content
added 9 characters in body
Source Link
Noodle9
  • 20.3k
  • 3
  • 21
  • 46

SageMath, 140 134 134132 bytes

lambda p:propcalc.formula(r("'","0"*"'0",r("implies","->",r("or","|",r("and","&",r("not","~",p)))))).is_tautology()
from re import sub as r

Try it online!Try it online!

SageMath, 140 134 bytes

lambda p:propcalc.formula(r("'","0",r("implies","->",r("or","|",r("and","&",r("not","~",p)))))).is_tautology()
from re import sub as r

Try it online!

SageMath, 140 134 132 bytes

lambda p:propcalc.formula(r(*"'0",r("implies","->",r("or","|",r("and","&",r("not","~",p)))))).is_tautology()
from re import sub as r

Try it online!

added 12 characters in body
Source Link
Noodle9
  • 20.3k
  • 3
  • 21
  • 46

SageMath, 140140 134 bytes

lambda p:propcalc.formula(r(r(r(r(r(p,"'","0"),r("implies","->"),r("or","|"),r("and","&"),r("not","~",p)))))).is_tautology()
r=lambdafrom s,a,b:s.replace(a,b)re import sub as r

Try it online!Try it online!

SageMath, 140 bytes

lambda p:propcalc.formula(r(r(r(r(r(p,"'","0"),"implies","->"),"or","|"),"and","&"),"not","~")).is_tautology()
r=lambda s,a,b:s.replace(a,b)

Try it online!

SageMath, 140 134 bytes

lambda p:propcalc.formula(r("'","0",r("implies","->",r("or","|",r("and","&",r("not","~",p)))))).is_tautology()
from re import sub as r

Try it online!

edited body
Source Link
Noodle9
  • 20.3k
  • 3
  • 21
  • 46

SageMath, 140 bytes

lambda p:propcalc.formula(r(r(r(r(r(p,"'","0"),"implies","->"),"or","|"),"and","&"),"not","~")).is_tautology()
r=lambda s,a,b:s.replace(a,b)

Try it online!Try it online!

SageMath, 140 bytes

lambda p:propcalc.formula(r(r(r(r(r(p,"'","0"),"implies","->"),"or","|"),"and","&"),"not","~")).is_tautology()
r=lambda s,a,b:s.replace(a,b)

Try it online!

SageMath, 140 bytes

lambda p:propcalc.formula(r(r(r(r(r(p,"'","0"),"implies","->"),"or","|"),"and","&"),"not","~")).is_tautology()
r=lambda s,a,b:s.replace(a,b)

Try it online!

added 25 characters in body
Source Link
Noodle9
  • 20.3k
  • 3
  • 21
  • 46
Loading
deleted 267 characters in body
Source Link
Noodle9
  • 20.3k
  • 3
  • 21
  • 46
Loading
Source Link
Noodle9
  • 20.3k
  • 3
  • 21
  • 46
Loading