Elm Exactly

TheoremgenAt_arity

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

Statement

theorem genAt_arity {σ : Scheme} {inst ts : List Ty} {τ : Ty} {n : Nat}
    (hg : genAt σ inst (arrows ts τ) = true) (hc : isConTy τ = true) (ha : ArityIs σ n) :
    ts.length = n

Proof

by
  obtain ⟨ks, args, t, hb, hl⟩ := ha
  unfold genAt at hg
  split at hg
  · simp only [Bool.and_eq_true, decide_eq_true_eq] at hg
    rw [hb] at hg
    obtain ⟨ks', args', he, hl'⟩ := apply_arrows _ ks args t _ hg.2
    rw [← hl, ← hl']
    exact (arrows_len ks' ts args' t τ hc he.symm).symm
  · cases hg

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.