Theoremkeys_atPat
Statement
theorem keys_atPat : (p : AAtPat) → KeysIn p.ve (atPatVars p.erase)
| .wild _ => keysIn_nil _
| .scon _ _ => keysIn_nil _
| .var x _ => keysIn_single (by simp [AAtPat.erase, atPatVars])
| .con _ _ _ => keysIn_nil _
| .unit => keysIn_nil _
| .tuple p1 p2 p3 => by
simp only [AAtPat.ve, AAtPat.erase, atPatVars]
refine keysIn_modify (keysIn_modify ?_ ?_) ?_
· exact keysIn_mono (keys_pat p1) (by intro x hx; simp [hx])
· exact keysIn_mono (keys_pat p2) (by intro x hx; simp [hx])
· exact keysIn_mono (keys_patOpt p3) (by intro x hx; simp [hx])
| .nil _ => keysIn_nil _
| .record row _ => by
simp only [AAtPat.ve, AAtPat.erase, atPatVars]
exact keys_patRowOpt row
| .paren p => by
simp only [AAtPat.ve, AAtPat.erase, atPatVars]
exact keys_pat pProof
Proved by a term, which Lean's kernel checks directly.
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.