Theorema27_annotation_bound
A27 (clarification of 2026-11-10), dynamic-core's f/g example: the number of x is bound by f's annotation, not by the closure of g, and is not defaulted. So g is not copied, and its constant 1 follows the copy of f that encloses it: Float in f, Int in f$Int, the copy main uses.
Statement
theorem a27_annotation_bound :
onOk a27AnnView (endToEnd Btest s_a27_annotation_bound) =
some (some ["f", "f$Int", "main"], some [.intF 1], some [.int 1],
some [lid "text", qlid "Debug" "toString", lid "f$Int"])Proof
by
decide +kernelProved 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.
About ruling A27 of the book, where the implementations disagreed or were silent and the definition decides.
In StandardElmMech/Stat/SpecExamples.lean: The rulings on small programs: A27 (a free number is Float, annotations bind), A87 (the default copy is made), A93 (vacuous variables), polymorphic recursion, copy names, abs$Int, exposing items, payload types, kinds of main, eight copies, renaming invariance, record-pattern copies.
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.