TheoremannCands_cover
Every U' an annotation may have agrees, on named variables, with a candidate.
Statement
theorem annCands_cover {U' : List BVar} {ty : BTy} (h : newForB U' ty [] = true) :
∃ U ∈ annCands ty, UEq U' UProof
by
obtain ⟨U, hU, hc⟩ := assigns_cover (fun s => BVar.ty (.named s) ∈ U') (fun s => BVar.row (.named s) ∈ U')
(dedupL (bTyNames ty))
refine ⟨U, hU, fun s => ⟨?_, ?_⟩⟩
· rw [(hc s).1, mem_dedupL]
exact ⟨fun h' => ⟨names_of_newFor h _ s h' rfl, h'⟩, fun h' => h'.2⟩
· rw [(hc s).2, mem_dedupL]
exact ⟨fun h' => ⟨names_of_newFor h _ s h' rfl, h'⟩, fun h' => h'.2⟩Proved 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.