Theorema74_value_enc
A74: at the type Json.Encode.Value a value encodes exactly as the JSON value it holds.
Statement
theorem a74_value_enc {v : Val} {j : BVal} : Enc .value v j ↔ v = .bv j ∧ j.isJson = trueProof
by
rw [enc_iff]
constructor
· intro h
cases v <;> simp [enc] at h
obtain ⟨hj, rfl⟩ := h
exact ⟨rfl, hj⟩
· rintro ⟨rfl, hj⟩; simp [enc, hj]Proved with tactics, which Lean expands into a proof term that its kernel checks.
Theorems it uses
Used by
About ruling A74 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.