Skip to content

Issue with Demorgan Definition of AND #125

@stevenhuyn

Description

@stevenhuyn

Thank you for the project! Was super fun!

I tried defining AND in terms of NOT and OR and my definition does not seem to work. I believe this to be a bug? https://en.wikipedia.org/wiki/De_Morgan's_laws

AND:=λab.NOT(OR(NOTa)(NOTb))
AND: λa.λb.(λa.λb.λc.acb)((λa.λb.a(λa.λb.a)b)((λa.λb.λc.acb)a)((λa.λb.λc.acb)b))
<assignment>

> AND FALSE FALSE
λb.λc.c
<function, church numeral 0, church boolean false>

> AND FALSE TRUE
λb.λc.c
<function, church numeral 0, church boolean false>

// This case here doesn't seem to evaluate properly?
> AND TRUE FALSE 
λb.λc.b
<function, church boolean true>

> AND TRUE TRUE
λb.λc.b
<function, church boolean true>(+)

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