Elm Exactly
Results / elm /

WideRecord40Test

Tags:elm-spec

Checks, in A Standard Definition of Elm?:rule d-atexp-recordrule d-exprow-fieldrule d-atpat-recordrule d-patrow-fieldrule d-atexp-update

Translated into Lean for the mechanisation of the book: see its Lean translation.

elm-0.19.1 passelm-0.19.2 passelm-0.19.3 passlamdera-1.5.0 pass
A record with 40 fields, cycling through `Int`, `Float`, `Char`, `String` and
`Bool`, supports field access, record patterns, update, equality and printing.

The test checks:

  - Access to fields 0, 31, 32 and 39.
  - A record pattern reading the first and last fields.
  - An update that negates the last field.
  - `==` against a record built from the same input (`True`) and against the
    updated record (`False`).
  - `Debug.log` printing all 40 fields.

Results

elm-0.19.1

passran in 71 ms
Output
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.1/optimize for better performance and smaller assets.
f0000: 1000
f0031: 31.5
f0032: 'g'
f0039: False
pattern: (1000,False)
update: True
eq self: True
eq updated: False
show: { f0000 = 1000, f0001 = 1.5, f0002 = 'c', f0003 = "3s", f0004 = True, f0005 = 1005, f0006 = 6.5, f0007 = 'h', f0008 = "8s", f0009 = False, f0010 = 1010, f0011 = 11.5, f0012 = 'm', f0013 = "13s", f0014 = True, f0015 = 1015, f0016 = 16.5, f0017 = 'r', f0018 = "18s", f0019 = False, f0020 = 1020, f0021 = 21.5, f0022 = 'w', f0023 = "23s", f0024 = True, f0025 = 1025, f0026 = 26.5, f0027 = 'b', f0028 = "28s", f0029 = False, f0030 = 1030, f0031 = 31.5, f0032 = 'g', f0033 = "33s", f0034 = True, f0035 = 1035, f0036 = 36.5, f0037 = 'l', f0038 = "38s", f0039 = False }

elm-0.19.2

passran in 49 ms
Output
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.2/optimize for better performance and smaller assets.
f0000: 1000
f0031: 31.5
f0032: 'g'
f0039: False
pattern: (1000,False)
update: True
eq self: True
eq updated: False
show: { f0000 = 1000, f0001 = 1.5, f0002 = 'c', f0003 = "3s", f0004 = True, f0005 = 1005, f0006 = 6.5, f0007 = 'h', f0008 = "8s", f0009 = False, f0010 = 1010, f0011 = 11.5, f0012 = 'm', f0013 = "13s", f0014 = True, f0015 = 1015, f0016 = 16.5, f0017 = 'r', f0018 = "18s", f0019 = False, f0020 = 1020, f0021 = 21.5, f0022 = 'w', f0023 = "23s", f0024 = True, f0025 = 1025, f0026 = 26.5, f0027 = 'b', f0028 = "28s", f0029 = False, f0030 = 1030, f0031 = 31.5, f0032 = 'g', f0033 = "33s", f0034 = True, f0035 = 1035, f0036 = 36.5, f0037 = 'l', f0038 = "38s", f0039 = False }

elm-0.19.3

passran in 60 ms
Output
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.3/optimize for better performance and smaller assets.
show: { f0000 = 1000, f0001 = 1.5, f0002 = 'c', f0003 = "3s", f0004 = True, f0005 = 1005, f0006 = 6.5, f0007 = 'h', f0008 = "8s", f0009 = False, f0010 = 1010, f0011 = 11.5, f0012 = 'm', f0013 = "13s", f0014 = True, f0015 = 1015, f0016 = 16.5, f0017 = 'r', f0018 = "18s", f0019 = False, f0020 = 1020, f0021 = 21.5, f0022 = 'w', f0023 = "23s", f0024 = True, f0025 = 1025, f0026 = 26.5, f0027 = 'b', f0028 = "28s", f0029 = False, f0030 = 1030, f0031 = 31.5, f0032 = 'g', f0033 = "33s", f0034 = True, f0035 = 1035, f0036 = 36.5, f0037 = 'l', f0038 = "38s", f0039 = False }
eq updated: False
eq self: True
update: True
pattern: (1000,False)
f0039: False
f0032: 'g'
f0031: 31.5
f0000: 1000

lamdera-1.5.0

passran in 60 ms
Output
show: { f0000 = 1000, f0001 = 1.5, f0002 = 'c', f0003 = "3s", f0004 = True, f0005 = 1005, f0006 = 6.5, f0007 = 'h', f0008 = "8s", f0009 = False, f0010 = 1010, f0011 = 11.5, f0012 = 'm', f0013 = "13s", f0014 = True, f0015 = 1015, f0016 = 16.5, f0017 = 'r', f0018 = "18s", f0019 = False, f0020 = 1020, f0021 = 21.5, f0022 = 'w', f0023 = "23s", f0024 = True, f0025 = 1025, f0026 = 26.5, f0027 = 'b', f0028 = "28s", f0029 = False, f0030 = 1030, f0031 = 31.5, f0032 = 'g', f0033 = "33s", f0034 = True, f0035 = 1035, f0036 = 36.5, f0037 = 'l', f0038 = "38s", f0039 = False }
eq updated: False
eq self: True
update: True
pattern: (1000,False)
f0039: False
f0032: 'g'
f0031: 31.5
f0000: 1000

Discussions

Discuss this test·Search the discussions on GitHub

Discussions are on GitHub; one about this test has [t:elm/WideRecord40Test] in its title.

Source

The -- CHECK: lines give the expected output.

module WideRecord40Test exposing (main)
{-| A record with 40 fields, cycling through `Int`, `Float`, `Char`, `String` and
`Bool`, supports field access, record patterns, update, equality and printing.
The test checks:
- Access to fields 0, 31, 32 and 39.
- A record pattern reading the first and last fields.
- An update that negates the last field.
- `==` against a record built from the same input (`True`) and against the
updated record (`False`).
- `Debug.log` printing all 40 fields.
-}
-- TAGS: elm-spec, d-atexp-record, d-exprow-field, d-atpat-record, d-patrow-field, d-atexp-update
-- CHECK: f0000: 1000
-- CHECK: f0031: 31.5
-- CHECK: f0032: 'g'
-- CHECK: f0039: False
-- CHECK: pattern: (1000,False)
-- CHECK: update: True
-- CHECK: eq self: True
-- CHECK: eq updated: False
-- CHECK: show: { f0000 = 1000, f0001 = 1.5, f0002 = 'c', f0003 = "3s", f0004 = True, f0005 = 1005, f0006 = 6.5, f0007 = 'h', f0008 = "8s", f0009 = False, f0010 = 1010, f0011 = 11.5, f0012 = 'm', f0013 = "13s", f0014 = True, f0015 = 1015, f0016 = 16.5, f0017 = 'r', f0018 = "18s", f0019 = False, f0020 = 1020, f0021 = 21.5, f0022 = 'w', f0023 = "23s", f0024 = True, f0025 = 1025, f0026 = 26.5, f0027 = 'b', f0028 = "28s", f0029 = False, f0030 = 1030, f0031 = 31.5, f0032 = 'g', f0033 = "33s", f0034 = True, f0035 = 1035, f0036 = 36.5, f0037 = 'l', f0038 = "38s", f0039 = False }
import Html exposing (text)
type alias R =
{ f0000 : Int
, f0001 : Float
, f0002 : Char
, f0003 : String
, f0004 : Bool
, f0005 : Int
, f0006 : Float
, f0007 : Char
, f0008 : String
, f0009 : Bool
, f0010 : Int
, f0011 : Float
, f0012 : Char
, f0013 : String
, f0014 : Bool
, f0015 : Int
, f0016 : Float
, f0017 : Char
, f0018 : String
, f0019 : Bool
, f0020 : Int
, f0021 : Float
, f0022 : Char
, f0023 : String
, f0024 : Bool
, f0025 : Int
, f0026 : Float
, f0027 : Char
, f0028 : String
, f0029 : Bool
, f0030 : Int
, f0031 : Float
, f0032 : Char
, f0033 : String
, f0034 : Bool
, f0035 : Int
, f0036 : Float
, f0037 : Char
, f0038 : String
, f0039 : Bool
}
make : Int -> R
make base =
{ f0000 = (base + 999)
, f0001 = (toFloat base + 1.5 - 1)
, f0002 = ((if base == 1 then 'c' else '?'))
, f0003 = ((if base == 1 then "3s" else "?"))
, f0004 = (modBy 2 (base + 3) == 0)
, f0005 = (base + 1004)
, f0006 = (toFloat base + 6.5 - 1)
, f0007 = ((if base == 1 then 'h' else '?'))
, f0008 = ((if base == 1 then "8s" else "?"))
, f0009 = (modBy 2 (base + 8) == 0)
, f0010 = (base + 1009)
, f0011 = (toFloat base + 11.5 - 1)
, f0012 = ((if base == 1 then 'm' else '?'))
, f0013 = ((if base == 1 then "13s" else "?"))
, f0014 = (modBy 2 (base + 13) == 0)
, f0015 = (base + 1014)
, f0016 = (toFloat base + 16.5 - 1)
, f0017 = ((if base == 1 then 'r' else '?'))
, f0018 = ((if base == 1 then "18s" else "?"))
, f0019 = (modBy 2 (base + 18) == 0)
, f0020 = (base + 1019)
, f0021 = (toFloat base + 21.5 - 1)
, f0022 = ((if base == 1 then 'w' else '?'))
, f0023 = ((if base == 1 then "23s" else "?"))
, f0024 = (modBy 2 (base + 23) == 0)
, f0025 = (base + 1024)
, f0026 = (toFloat base + 26.5 - 1)
, f0027 = ((if base == 1 then 'b' else '?'))
, f0028 = ((if base == 1 then "28s" else "?"))
, f0029 = (modBy 2 (base + 28) == 0)
, f0030 = (base + 1029)
, f0031 = (toFloat base + 31.5 - 1)
, f0032 = ((if base == 1 then 'g' else '?'))
, f0033 = ((if base == 1 then "33s" else "?"))
, f0034 = (modBy 2 (base + 33) == 0)
, f0035 = (base + 1034)
, f0036 = (toFloat base + 36.5 - 1)
, f0037 = ((if base == 1 then 'l' else '?'))
, f0038 = ((if base == 1 then "38s" else "?"))
, f0039 = (modBy 2 (base + 38) == 0)
}
viaPat : R -> ( Int, Bool )
viaPat { f0000, f0039 } =
( f0000, f0039 )
upd : R -> R
upd r =
{ r | f0039 = not r.f0039 }
main =
let
base =
1 + (Char.toCode 'b' - Char.toCode 'a') - 1
r =
make base
_ =
Debug.log "f0000" (r.f0000)
_ =
Debug.log "f0031" (r.f0031)
_ =
Debug.log "f0032" (r.f0032)
_ =
Debug.log "f0039" (r.f0039)
_ =
Debug.log "pattern" (viaPat r)
_ =
Debug.log "update" ((upd r).f0039)
_ =
Debug.log "eq self" (r == make base)
_ =
Debug.log "eq updated" (r == upd r)
_ =
Debug.log "show" (r)
in
text "done"

Lean translation

This program is translated into Lean by the translator of the Lean mechanisation of A Standard Definition of Elm?: the program it is, its modules in the reduced syntax of Chapter 7 with every integer constant at Int or Float by number specialisation, and its CHECK lines as written (g_elm_WideRecord40Test, in StandardElmMech/Generated/Elm_TailRecT.lean). Lean's evaluator runs the program by the rules of Chapters 7 and 9, and its checks become one generated theorem: some derivation of the program has a log that meets every check, or, for a test that stops at Debug.todo, the program has no meaning.

CheckExpected (CHECK)Lean evaluatorProved by
f000010001000t_elm_WideRecord40Test
f003131.531.5t_elm_WideRecord40Test
f0032'g''g't_elm_WideRecord40Test
f0039FalseFalset_elm_WideRecord40Test
pattern(1000,False)(1000,False)t_elm_WideRecord40Test
updateTrueTruet_elm_WideRecord40Test
eq selfTrueTruet_elm_WideRecord40Test
eq updatedFalseFalset_elm_WideRecord40Test
show{ f0000 = 1000, f0001 = 1.5, f0002 = 'c', f0003 = "3s", f0004 = True, f0005 = 1005, f0006 = 6.5, f0007 = 'h', f0008 = "8s", f0009 = False, f0010 = 1010, f0011 = 11.5, f0012 = 'm', f0013 = "13s", f0014 = True, f0015 = 1015, f0016 = 16.5, f0017 = 'r', f0018 = "18s", f0019 = False, f0020 = 1020, f0021 = 21.5, f0022 = 'w', f0023 = "23s", f0024 = True, f0025 = 1025, f0026 = 26.5, f0027 = 'b', f0028 = "28s", f0029 = False, f0030 = 1030, f0031 = 31.5, f0032 = 'g', f0033 = "33s", f0034 = True, f0035 = 1035, f0036 = 36.5, f0037 = 'l', f0038 = "38s", f0039 = False }{ f0000 = 1000, f0001 = 1.5, f0002 = 'c', f0003 = "3s", f0004 = True, f0005 = 1005, f0006 = 6.5, f0007 = 'h', f0008 = "8s", f0009 = False, f0010 = 1010, f0011 = 11.5, f0012 = 'm', f0013 = "13s", f0014 = True, f0015 = 1015, f0016 = 16.5, f0017 = 'r', f0018 = "18s", f0019 = False, f0020 = 1020, f0021 = 21.5, f0022 = 'w', f0023 = "23s", f0024 = True, f0025 = 1025, f0026 = 26.5, f0027 = 'b', f0028 = "28s", f0029 = False, f0030 = 1030, f0031 = 31.5, f0032 = 'g', f0033 = "33s", f0034 = True, f0035 = 1035, f0036 = 36.5, f0037 = 'l', f0038 = "38s", f0039 = False }t_elm_WideRecord40Test
/-- tests/elm/src/WideRecord40Test.elm -/
def g_elm_WideRecord40Test : Program := {
  name := "WideRecord40Test", source := "tests/elm/src",
  exposing := (.items [.var "main"]), imports := [⟨"Html", "Html", some (.items [.var "text"])⟩],
  types := [],
  aliases := [("R", some ["f0000", "f0001", "f0002", "f0003", "f0004", "f0005", "f0006", "f0007", "f0008", "f0009", "f0010", "f0011", "f0012", "f0013", "f0014", "f0015", "f0016", "f0017", "f0018", "f0019", "f0020", "f0021", "f0022", "f0023", "f0024", "f0025", "f0026", "f0027", "f0028", "f0029", "f0030", "f0031", "f0032", "f0033", "f0034", "f0035", "f0036", "f0037", "f0038", "f0039"])],
  defs := [
    .fn "make" [pv "base"] (recE [("f0000", .atexp (.paren (bin "+" (v "base") (i 999)))), ("f0001", .atexp (.paren (bin "-" (bin "+" (ap (v "toFloat") [v "base"]) (.atexp (.scon (.float 15 (-1))))) (.atexp (.scon (.intF 1)))))), ("f0002", .atexp (.paren (.atexp (.paren (ifte (bin "==" (v "base") (i 1)) (.atexp (chA 'c')) (.atexp (chA '?'))))))), ("f0003", .atexp (.paren (.atexp (.paren (ifte (bin "==" (v "base") (i 1)) (str "3s") (str "?")))))), ("f0004", .atexp (.paren (bin "==" (ap (v "modBy") [i 2, .atexp (.paren (bin "+" (v "base") (i 3)))]) (i 0)))), ("f0005", .atexp (.paren (bin "+" (v "base") (i 1004)))), ("f0006", .atexp (.paren (bin "-" (bin "+" (ap (v "toFloat") [v "base"]) (.atexp (.scon (.float 65 (-1))))) (.atexp (.scon (.intF 1)))))), ("f0007", .atexp (.paren (.atexp (.paren (ifte (bin "==" (v "base") (i 1)) (.atexp (chA 'h')) (.atexp (chA '?'))))))), ("f0008", .atexp (.paren (.atexp (.paren (ifte (bin "==" (v "base") (i 1)) (str "8s") (str "?")))))), ("f0009", .atexp (.paren (bin "==" (ap (v "modBy") [i 2, .atexp (.paren (bin "+" (v "base") (i 8)))]) (i 0)))), ("f0010", .atexp (.paren (bin "+" (v "base") (i 1009)))), ("f0011", .atexp (.paren (bin "-" (bin "+" (ap (v "toFloat") [v "base"]) (.atexp (.scon (.float 115 (-1))))) (.atexp (.scon (.intF 1)))))), ("f0012", .atexp (.paren (.atexp (.paren (ifte (bin "==" (v "base") (i 1)) (.atexp (chA 'm')) (.atexp (chA '?'))))))), ("f0013", .atexp (.paren (.atexp (.paren (ifte (bin "==" (v "base") (i 1)) (str "13s") (str "?")))))), ("f0014", .atexp (.paren (bin "==" (ap (v "modBy") [i 2, .atexp (.paren (bin "+" (v "base") (i 13)))]) (i 0)))), ("f0015", .atexp (.paren (bin "+" (v "base") (i 1014)))), ("f0016", .atexp (.paren (bin "-" (bin "+" (ap (v "toFloat") [v "base"]) (.atexp (.scon (.float 165 (-1))))) (.atexp (.scon (.intF 1)))))), ("f0017", .atexp (.paren (.atexp (.paren (ifte (bin "==" (v "base") (i 1)) (.atexp (chA 'r')) (.atexp (chA '?'))))))), ("f0018", .atexp (.paren (.atexp (.paren (ifte (bin "==" (v "base") (i 1)) (str "18s") (str "?")))))), ("f0019", .atexp (.paren (bin "==" (ap (v "modBy") [i 2, .atexp (.paren (bin "+" (v "base") (i 18)))]) (i 0)))), ("f0020", .atexp (.paren (bin "+" (v "base") (i 1019)))), ("f0021", .atexp (.paren (bin "-" (bin "+" (ap (v "toFloat") [v "base"]) (.atexp (.scon (.float 215 (-1))))) (.atexp (.scon (.intF 1)))))), ("f0022", .atexp (.paren (.atexp (.paren (ifte (bin "==" (v "base") (i 1)) (.atexp (chA 'w')) (.atexp (chA '?'))))))), ("f0023", .atexp (.paren (.atexp (.paren (ifte (bin "==" (v "base") (i 1)) (str "23s") (str "?")))))), ("f0024", .atexp (.paren (bin "==" (ap (v "modBy") [i 2, .atexp (.paren (bin "+" (v "base") (i 23)))]) (i 0)))), ("f0025", .atexp (.paren (bin "+" (v "base") (i 1024)))), ("f0026", .atexp (.paren (bin "-" (bin "+" (ap (v "toFloat") [v "base"]) (.atexp (.scon (.float 265 (-1))))) (.atexp (.scon (.intF 1)))))), ("f0027", .atexp (.paren (.atexp (.paren (ifte (bin "==" (v "base") (i 1)) (.atexp (chA 'b')) (.atexp (chA '?'))))))), ("f0028", .atexp (.paren (.atexp (.paren (ifte (bin "==" (v "base") (i 1)) (str "28s") (str "?")))))), ("f0029", .atexp (.paren (bin "==" (ap (v "modBy") [i 2, .atexp (.paren (bin "+" (v "base") (i 28)))]) (i 0)))), ("f0030", .atexp (.paren (bin "+" (v "base") (i 1029)))), ("f0031", .atexp (.paren (bin "-" (bin "+" (ap (v "toFloat") [v "base"]) (.atexp (.scon (.float 315 (-1))))) (.atexp (.scon (.intF 1)))))), ("f0032", .atexp (.paren (.atexp (.paren (ifte (bin "==" (v "base") (i 1)) (.atexp (chA 'g')) (.atexp (chA '?'))))))), ("f0033", .atexp (.paren (.atexp (.paren (ifte (bin "==" (v "base") (i 1)) (str "33s") (str "?")))))), ("f0034", .atexp (.paren (bin "==" (ap (v "modBy") [i 2, .atexp (.paren (bin "+" (v "base") (i 33)))]) (i 0)))), ("f0035", .atexp (.paren (bin "+" (v "base") (i 1034)))), ("f0036", .atexp (.paren (bin "-" (bin "+" (ap (v "toFloat") [v "base"]) (.atexp (.scon (.float 365 (-1))))) (.atexp (.scon (.intF 1)))))), ("f0037", .atexp (.paren (.atexp (.paren (ifte (bin "==" (v "base") (i 1)) (.atexp (chA 'l')) (.atexp (chA '?'))))))), ("f0038", .atexp (.paren (.atexp (.paren (ifte (bin "==" (v "base") (i 1)) (str "38s") (str "?")))))), ("f0039", .atexp (.paren (bin "==" (ap (v "modBy") [i 2, .atexp (.paren (bin "+" (v "base") (i 38)))]) (i 0))))]),
    .fn "viaPat" [precord [("f0000", "f0000"), ("f0039", "f0039")]] (tup2 (v "f0000") (v "f0039")),
    .fn "upd" [pv "r"] (updE "r" [("f0039", ap (v "not") [.atexp (access (A (v "r")) "f0039")])]),
    .fn "main" [] (letDefs [.fn "base" [] (bin "-" (bin "+" (i 1) (.atexp (.paren (bin "-" (ap (qv "Char" "toCode") [.atexp (chA 'b')]) (ap (qv "Char" "toCode") [.atexp (chA 'a')]))))) (i 1)), .fn "r" [] (ap (v "make") [v "base"]), .pat pw (ap (qv "Debug" "log") [str "f0000", .atexp (.paren (.atexp (access (A (v "r")) "f0000")))]), .pat pw (ap (qv "Debug" "log") [str "f0031", .atexp (.paren (.atexp (access (A (v "r")) "f0031")))]), .pat pw (ap (qv "Debug" "log") [str "f0032", .atexp (.paren (.atexp (access (A (v "r")) "f0032")))]), .pat pw (ap (qv "Debug" "log") [str "f0039", .atexp (.paren (.atexp (access (A (v "r")) "f0039")))]), .pat pw (ap (qv "Debug" "log") [str "pattern", .atexp (.paren (ap (v "viaPat") [v "r"]))]), .pat pw (ap (qv "Debug" "log") [str "update", .atexp (.paren (.atexp (access (.paren (ap (v "upd") [v "r"])) "f0039")))]), .pat pw (ap (qv "Debug" "log") [str "eq self", .atexp (.paren (bin "==" (v "r") (ap (v "make") [v "base"])))]), .pat pw (ap (qv "Debug" "log") [str "eq updated", .atexp (.paren (bin "==" (v "r") (ap (v "upd") [v "r"])))]), .pat pw (ap (qv "Debug" "log") [str "show", .atexp (.paren (v "r"))])] (ap (v "text") [str "done"])) ],
  checks := [
    chk .check "f0000: 1000" .int,
    chk .check "f0031: 31.5" .float,
    chk .check "f0032: 'g'" .char,
    chk .check "f0039: False" .data,
    chk .check "pattern: (1000,False)" .data,
    chk .check "update: True" .data,
    chk .check "eq self: True" .data,
    chk .check "eq updated: False" .data,
    chk .check "show: { f0000 = 1000, f0001 = 1.5, f0002 = 'c', f0003 = \"3s\", f0004 = True, f0005 = 1005, f0006 = 6.5, f0007 = 'h', f0008 = \"8s\", f0009 = False, f0010 = 1010, f0011 = 11.5, f0012 = 'm', f0013 = \"13s\", f0014 = True, f0015 = 1015, f0016 = 16.5, f0017 = 'r', f0018 = \"18s\", f0019 = False, f0020 = 1020, f0021 = 21.5, f0022 = 'w', f0023 = \"23s\", f0024 = True, f0025 = 1025, f0026 = 26.5, f0027 = 'b', f0028 = \"28s\", f0029 = False, f0030 = 1030, f0031 = 31.5, f0032 = 'g', f0033 = \"33s\", f0034 = True, f0035 = 1035, f0036 = 36.5, f0037 = 'l', f0038 = \"38s\", f0039 = False }" .data ] }

Reading the translation: v "x" is the variable x, c "K" the constructor K, i 42 the integer 42 at Int, .scon (.intF 2) the integer 2 at Float, and str "s" a string; ap f [a, b] applies f to a and then b, and bin "+" a b is a + b. lams, caseOf, ifte, listE, tup2 and recE build lambdas, case, if, lists, pairs and records by the book's derived forms; pv, pw and pcon are variable, wildcard and constructor patterns. defs are the program's top-level definitions and locals the other declarations of main's let, placed in a let around each check; ckk label value kind exp is one check. A name with $ (incF$Float) is a copy number specialisation made.

Static semantics (Chapters 4, 5 and 9): legal_elm_WideRecord40Test states that the program as written is legal, with no hypothesis: the proved inference W gives each module a principal derivation, which meets the syntactic restrictions and the further restrictions, with a type of main Chapter 9 allows. End to end: spec_elm_WideRecord40Test states that Lean computes the reduced program above from the source (derived forms, inference, the proved checker, number specialisation, type erasure), so the theorems about it do not trust the translator's elaboration ([elab]); mean_elm_WideRecord40Test states that the program has a meaning by r:p-program, with both premises, and ident_elm_WideRecord40Test that its specialisation is unique and is the reduced program above, both with no hypothesis about principality. One of these theorems is proved by native_decide ([native]).