Conversation
shilangyu
reviewed
Apr 21, 2025
Owner
shilangyu
left a comment
There was a problem hiding this comment.
What is "ema" in the PR title?
AlphaCalculus/Reduce.lean
Outdated
Comment on lines
96
to
115
| | nand_true : | ||
| Reduce (.nand .btrue .btrue) (.bfalse) | ||
| | nand_false1 : | ||
| Reduce (.nand .bfalse _) (.btrue) | ||
| | nand_false2 : | ||
| Reduce (.nand _ .bfalse) (.btrue) | ||
| | successor : | ||
| Reduce t t' -> | ||
| Reduce (.succ t) (.succ t') | ||
| | ctx_add1 : | ||
| Reduce t t' -> | ||
| Reduce (.add t t2) (.add t' t2) | ||
| | ctx_add2 : | ||
| Reduce t t' -> | ||
| IsValue v -> | ||
| Reduce (.add v t) (.add v t') | ||
| | add_zero : | ||
| Reduce (.add .zero t) (t) | ||
| | add_succ : | ||
| Reduce (.add (Term.succ t) (t2)) (Term.succ (.add t t2)) |
Owner
There was a problem hiding this comment.
Let's be consistent with the other rules
Suggested change
| | nand_true : | |
| Reduce (.nand .btrue .btrue) (.bfalse) | |
| | nand_false1 : | |
| Reduce (.nand .bfalse _) (.btrue) | |
| | nand_false2 : | |
| Reduce (.nand _ .bfalse) (.btrue) | |
| | successor : | |
| Reduce t t' -> | |
| Reduce (.succ t) (.succ t') | |
| | ctx_add1 : | |
| Reduce t t' -> | |
| Reduce (.add t t2) (.add t' t2) | |
| | ctx_add2 : | |
| Reduce t t' -> | |
| IsValue v -> | |
| Reduce (.add v t) (.add v t') | |
| | add_zero : | |
| Reduce (.add .zero t) (t) | |
| | add_succ : | |
| Reduce (.add (Term.succ t) (t2)) (Term.succ (.add t t2)) | |
| | nand_true : | |
| Reduce (.nand .btrue .btrue) .bfalse | |
| | nand_false1 : | |
| Reduce (.nand .bfalse _) .btrue | |
| | nand_false2 : | |
| Reduce (.nand _ .bfalse) .btrue | |
| | ctx_succ : | |
| Reduce t t' -> | |
| Reduce (.succ t) (.succ t') | |
| | ctx_add1 : | |
| Reduce t1 t1' -> | |
| Reduce (.add t1 t2) (.add t1' t2) | |
| | ctx_add2 : | |
| IsValue v1 -> | |
| Reduce t2 t2' -> | |
| Reduce (.add v1 t2) (.add v1 t2') | |
| | add_zero : | |
| Reduce (.add .zero t2) t2 | |
| | add_succ : | |
| Reduce (.add (Term.succ t1) t2) (Term.succ (.add t1 t2)) |
shilangyu
approved these changes
Apr 24, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pull request for true false nand zero and add