Theorema88_int_range
A88: 2^63 is outside IntRange, and 1.5 is no Int: neither decodes at Int.
Statement
theorem a88_int_range :
(¬ ∃ v, Dec .int (.num (2 ^ 63)) v) ∧ (¬ ∃ v, Dec .int (.num (jnum 15 (-1))) v)Proof
by
have h1 : dec .int (.num (2 ^ 63)) = none := by decide +kernel
have h2 : dec .int (.num (jnum 15 (-1))) = none := by decide +kernel
refine ⟨fun ⟨v, h⟩ => ?_, fun ⟨v, h⟩ => ?_⟩
· rw [dec_iff, h1] at h; cases h
· rw [dec_iff, h2] at h; cases hProved by decide +kernel: Lean's kernel itself runs the decision procedure, here the evaluator, and checks that the answer is true, so nothing outside the kernel is trusted.
Theorems it uses
About ruling A88 of the book, where the implementations disagreed or were silent and the definition decides.
In StandardElmMech/Eff/Properties.lean: APPLY of the effect values has one member; the rulings A74, A76, A88 and A92; canonical payload types, the decimality of a float's exact value, and that every value of a payload type has a canonical encoding (enc_total).
A Standard Definition of Elm? (Draft version 0.4) © Rupert Smith. The text is licensed under CC BY 4.0: share and adapt it freely, with credit and a link to the licence.