Elm Exactly

TheoremME0_good

StandardElmMech/Mod/Good.lean:392, ME0 and the harness · tactic proof

The interfaces of ME0 and of the harness have the property.

Statement

theorem ME0_good : ∀ md I, fmLookup (Btest []) md = some I → I.Good

Proof

by
  intro md I h
  have hm := fmLookup_some_mem _ md I h
  simp only [Btest, List.foldl_nil] at hm
  rcases mem_fmPlus hm with hm | hm
  · simp only [ME0, List.mem_cons, Prod.mk.injEq, List.not_mem_nil, or_false] at hm
    rcases hm with ⟨_, rfl⟩ | ⟨_, rfl⟩ | ⟨_, rfl⟩ | ⟨_, rfl⟩ | ⟨_, rfl⟩ | ⟨_, rfl⟩ | ⟨_, rfl⟩ |
      ⟨_, rfl⟩ | ⟨_, rfl⟩ | ⟨_, rfl⟩ | ⟨_, rfl⟩ | ⟨_, rfl⟩ | ⟨_, rfl⟩ | ⟨_, rfl⟩ | ⟨_, rfl⟩ |
      ⟨_, rfl⟩ | ⟨_, rfl⟩ | ⟨_, rfl⟩ | ⟨_, rfl⟩
    all_goals first
      | exact I_Basics_good | exact I_Maybe_good | exact I_Result_good | exact empty_good
      | exact ofVE_good _
  · simp only [List.mem_singleton, Prod.mk.injEq] at hm
    obtain ⟨_, rfl⟩ := hm
    exact ofVE_good _

Proved with tactics, which Lean expands into a proof term that its kernel checks.

Theorems it uses

In StandardElmMech/Mod/Good.lean: The property of interfaces (Interface.Good): ME0 and the harness have it (ME0_good), a top-level declaration with distinct bound names infers an interface with it (EvalTopDec.good), a header's exposing list keeps it (EvalHeader.good), and so does every interface a module puts in the basis (EvalModule.good).

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.