Elm Exactly

TheoremconBind_ok

StandardElmMech/Stat/RefuseTypes.lean:785, Type declarations · term proof

Statement

theorem conBind_ok (C : Ctx) (τ : Ty) : ∀ (cb : BConBind) (VE : ValEnv), elabConBind C τ cb = some VE →
    ∀ y ∈ cb, (elabTyList C y.2).isSome = true
  | [], _, _ => by simp
  | (k, tys) :: rest, VE, h => by
    simp only [elabConBind] at h
    split at h
    · rename_i τs VE' h1 h2
      intro y hy
      rcases List.mem_cons.mp hy with rfl | hy
      · simp [h1]
      · exact conBind_ok C τ rest VE' h2 y hy
    · cases h

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.