Theoremsc_atPat
Statement
theorem sc_atPat (C : Ctx) (Γ : Shape) (hA : Abs C Γ) : (p : AAtPat) → checkAtPat C p = true →
scAtPat Γ p.erase = true
| .wild _, _ => rfl
| .scon _ _, _ => rfl
| .var _ _, _ => rfl
| .con lc inst τ, h => by
simp only [checkAtPat] at h
split at h
· rename_i σ hl
simp only [Bool.and_eq_true] at h
simp only [AAtPat.erase, scAtPat]
exact conOK_of hA hl (fun n hn => (genAt_arity (tsProof
[]) h.1 h.2 hn))
· cases h
| .unit, _ => rfl
| .tuple p1 p2 p3, h => by
simp only [checkAtPat, Bool.and_eq_true] at h
simp only [AAtPat.erase, scAtPat, Bool.and_eq_true]
exact ⟨⟨sc_pat C Γ hA p1 h.1.1, sc_pat C Γ hA p2 h.1.2⟩, sc_patOpt C Γ hA p3 h.2⟩
| .nil _, _ => rfl
| .record _ _, _ => rfl
| .paren p, h => by
simp only [checkAtPat] at h
simp only [AAtPat.erase, scAtPat]
exact sc_pat C Γ hA p hProved by a term, which Lean's kernel checks directly.
Theorems it uses
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.