Elm Exactly

TheoremelabTyRow_sim

StandardElmMech/Stat/RefuseTypes.lean:408, Simulation of the elaboration of type expressions · term proof

Statement

theorem elabTyRow_sim : ∀ (r : BTyRow) (ρ : Row), (∀ lc ∈ bTyRowCons r, LookSim f C A lc) →
    elabTyRow C r = some ρ → elabTyRow A r = some (mapRow f ρ)
  | .field l t rest, ρ, hl, h => by
    unfold elabTyRow at h ⊢
    simp only [bTyRowCons, List.mem_append] at hl
    cases h1 : elabTy C t with
    | none => rw [h1] at h; simp at h
    | some τ =>
      cases h2 : elabTyRowOpt C rest with
      | none => rw [h1, h2] at h; simp at h
      | some ρ' =>
        rw [h1, h2] at h; cases h
        rw [elabTy_sim t τ (fun lc h => hl lc (.inl h)) h1,
          elabTyRowOpt_sim rest ρ' (fun lc h => hl lc (.inr h)) h2]
        simp [modify_single_map]

Proof

Proved by a term, which Lean's kernel checks directly.

Used by

In StandardElmMech/Stat/RefuseTypes.lean: Refusals by type expressions (aliases, constructor arguments, annotations, ports) and by the type of main (typesFailB, mainFailB), for every choice of generated names and variable sorts.

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.