Elm Exactly

Theoremarity_canon

StandardElmMech/Stat/RefuseScope.lean:227, Arities · tactic proof

Statement

theorem arity_canon {σ : Scheme} {n : Nat} (h : ArityIs σ n) : ArityIs (Scheme.canon σ) n

Proof

by
  obtain ⟨ks, args, t, hb, hl⟩ := h
  unfold Scheme.canon
  generalize renumber true 0 (canonVars σ.bound σ.body) = r
  obtain ⟨S, bs⟩ := r
  simp only
  cases ha : S.apply σ.body with
  | none => exact ⟨ks, args, t, by simp [hb], hl⟩
  | some τ =>
    rw [hb] at ha
    obtain ⟨ks', args', rfl, hl'⟩ := apply_arrows S ks args t τ ha
    exact ⟨ks', args', t, rfl, by rw [hl', hl]⟩

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

Theorems it uses

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.