Elm Exactly

Theoremarrows_len

StandardElmMech/Stat/RefuseScope.lean:187, Arities · term proof

Statement

theorem arrows_len : (ks ts : List Ty) → (args : List Ty) → (t : TyName) → (τ : Ty) → isConTy τ = true →
    arrows ks (.con args t) = arrows ts τ → ks.length = ts.length
  | [], [], _, _, _, _, _ => rfl
  | [], _ :: _, _, _, _, _, h => by simp [arrows] at h
  | _ :: _, [], _, _, τ, hc, h => by
    simp only [arrows] at h; subst h; simp [isConTy] at hc
  | _ :: ks, _ :: ts, args, t, τ, hc, h => by
    simp only [arrows, Ty.fn.injEq] at h
    simp [arrows_len ks ts args t τ hc h.2]

Proof

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

Used by

In StandardElmMech/Stat/RefuseScope.lean: Refusals by scope, constructor arity and imports, for one module and for a module after a helper (scopeFailB).

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.