Why does Lean allow invalid UInt8 literals?
def x := (0xFFFF : UInt8) That compiles with no errors, which I find surprising given Lean’s focus on proving correctness. Is there a good reason for this or is it simply an oversight? Also what does it do at runtime? Bonus question: is there a more elegant way to write a UInt8 literal? E.g. […]
Proving array indices are in bounds in Lean 4
Suppose I have this code:
Proving array indices are in bounds in Lean 4
Suppose I have this code:
Proving array indices are in bounds in Lean 4
Suppose I have this code:
Proving array indices are in bounds in Lean 4
Suppose I have this code:
Why does this typecheck in Lean?
I ran this program, and was very surprised that it type checked:
Simplify types in lean
With this definition:
Simplify types in lean
With this definition:
Simplify types in lean
With this definition:
Simple implication proof does not work as expected in Lean
As elementary as it is, let me ask the following question.
Given the theorem below, how does the proof function express the case the proposition p does not hold?
The implication, interpreted in its classical meaning, should still hold in this case.