Theoremport_not_fails
Statement
theorem port_not_fails {C : Ctx} (hI : Inv B f A C) {x : Var} {ty : BTy} {U : List BVar} {r : Env × PortEnv}
(h : elabPort C x ty U = some r) : portFails A ty = falseProof
by
obtain ⟨hnew, ⟨τ, hel, hsh⟩, _⟩ := elabPort_shape h
obtain ⟨U'', hU'', hs⟩ := ann_sim hcol hAU hI.look hI.U hnew hel
cases hc : portFails A ty with
| false => rfl
| true =>
have := List.all_eq_true.mp hc U'' hU''
simp only [hs, Bool.not_eq_true'] at this
rw [portShapeB_map hcol.fixed τ hsh] at this
cases thisProved with tactics, which Lean expands into a proof term that its kernel checks.
Theorems it uses
Used by
In StandardElmMech/Stat/RefuseTypes.lean: Refusals by type expressions (aliases, constructor arguments, annotations, ports) and by the type of main (typesFailB, mainFailB), for every choice of generated names and variable sorts.
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.