More properties of INT_FLOOR and INT_CEILING #1129
Merged
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.
Hi,
Recently I started needing
INT_FLOOR
andINT_CEILING
ofintrealTheory
and immediately found that the existing set of theorems are missing some notable (and nice) ones, e.g. the following two "negated properties" (proof is from [1]) at the end of a chain of newly added theorems:However, I must say that all new proofs are quite simple, because the existing theorems (some proofs are hard) have indeed provided an axiomatic system where all the remaining properties of
INT_FLOOR
andINT_CEILING
can be derived from just the existing ones without going into their original definition byLEAST
bindings.Besides, I also added a new definition for the "Fractional part" [2] of real numbers. Although there's no much supporting theorems for it, I believe this definition is famous and sometimes occurs in other definitions:
Furthermore, for the
is_int
predicate, I added the following alternative definitions:I also cleaned up the script by explicitly opening
arithmeticTheory
,realTheory
andintLib
and then removed all functions calls with their prefixes. I think this is in the right direction causing no other issues.Regards,
Chun Tian
[1] https://proofwiki.org/wiki/Floor_of_Negative_equals_Negative_of_Ceiling
[2] https://en.wikipedia.org/wiki/Fractional_part