Elm Exactly

Theoremabs_piShape

StandardElmMech/Stat/RefuseScope.lean:1193, The context of a provider map binds only what the map provides · tactic proof

Statement

theorem abs_piShape (B : SBasis) (π : ProvMap) : Abs (modCtx B π) (piShape π)

Proof

by
  intro lid b h
  have hk := envKeys_envOf B.ME π
  refine ⟨none, ?_, fun n hn => by cases hn⟩
  obtain ⟨q, x⟩ := lid
  simp only [piShape]
  cases q with
  | none =>
    simp only [modCtx, Ctx.lookupVal, Env.lookupVal] at h
    simp [hk.1 x b h]
  | some m =>
    simp only [modCtx, Ctx.lookupVal, Env.lookupVal] at h
    cases hq : FMap.find? (envOf B.ME π).QE m with
    | none => rw [hq] at h; cases h
    | some I =>
      rw [hq] at h
      simp [hk.2 m I hq x b h]

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.