TheoremteSk_top
Statement
theorem teSk_top : (a : ATopDec) → (C : Ctx) → (E : Env) → (PE : PortEnv) →
checkTopDec C a = some (E, PE) → ∀ c, FMap.find? (FMap.mapV E.TE skS) c = FMap.find? (teSkTop a.erase) c
| .value VE vb, C, E, PE, h, c => by
simp only [checkTopDec] at h
split at h
· simp only [Option.some.injEq, Prod.mk.injEq] at h
obtain ⟨rfl, rfl⟩Proof
h
rfl
· cases h
| .types TE VE db tbs, C, E, PE, h, c => by
simp only [checkTopDec] at h
split at h
· rename_i hc
simp only [Option.some.injEq, Prod.mk.injEq] at h
obtain ⟨rfl, rfl⟩ := h
simp only [ATopDec.erase, teSkTop]
rw [checkTypes_sk hc]
· cases h
| .port x ty U, C, E, PE, h, c => by
simp only [checkTopDec] at h
rw [elabPort_TE h]
rfl
| .seq a1 a2, C, E, PE, h, c => by
simp only [checkTopDec] at h
split at h
· rename_i E1 PE1 h1
split at h
· rename_i E2 PE2 h2
simp only [Option.some.injEq, Prod.mk.injEq] at h
obtain ⟨rfl, rfl⟩ := h
simp only [Env.plus, ATopDec.erase, teSkTop]
rw [mapV_modify, FMap.find?_modify, FMap.find?_modify, teSk_top a1 C E1 PE1 h1 c,
teSk_top a2 _ E2 PE2 h2 c]
· cases h
· cases hProved by a term, which Lean's kernel checks directly.
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.