Skip to content

Conversation

@Coda-Coda
Copy link
Collaborator

This fixes the default value for hash_collision as defined in EVMState.lean

false is a Bool. The intended default value.
False is the Prop representing a contradiction, not the intended default value of hash_collision, but since False is a decidable proposition, Lean automatically treats this as decide False which is a Bool. Although we can actually prove false = False in Lean, using false directly is preferable.

The way this is handled in Lean leads to the following:
theorem false_eq_false : false = false := by rfl -- succeeds (of course)
theorem false_eq_False₁ : false = False := by rfl -- fails
theorem false_eq_False₂ : false = False := by simp -- succeeds

This has implications when doing proofs relating to the default value for hash_collision, such as here:

(currently in the branch WIP-erc20-daniel-3). Changing the default value for hash_collision back to False there causes lake build +Generated.erc20shim.ERC20Shim.fun_allowance_user to fail. We could work around this in the proof, but it seems better to fix EVMState.lean instead.

`false` is a `Bool`. The intended default value.
`False` is the `Prop` representing a contradiction, not the intended default value of `hash_collision`, but since `False` is a decidable proposition, Lean automatically treats this as `decide False` which is a `Bool`.
Although we can actually prove `false = False` in Lean, using `false` directly is preferable.
@Coda-Coda Coda-Coda requested a review from Julek October 29, 2024 01:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants