feat: add byCases tactic
This commit is contained in:
parent
08927f1e66
commit
79a4aebf96
2 changed files with 5 additions and 5 deletions
|
|
@ -127,4 +127,9 @@ theorem byCases {p q : Prop} (hpq : p → q) (hnpq : ¬p → q) : q :=
|
|||
theorem byContradiction {p : Prop} (h : ¬p → False) : p :=
|
||||
Decidable.byContradiction (dec := propDecidable _) h
|
||||
|
||||
macro "byCases" h:ident ":" e:term : tactic =>
|
||||
`(cases em $e:term with
|
||||
| Or.inl $h:ident => _
|
||||
| Or.inr $h:ident => _)
|
||||
|
||||
end Classical
|
||||
|
|
|
|||
|
|
@ -104,11 +104,6 @@ def mkExpr : List Nat → Expr
|
|||
| [i] => Expr.var i
|
||||
| i::is => Expr.op (Expr.var i) (mkExpr is)
|
||||
|
||||
macro "byCases" h:ident ":" e:term : tactic =>
|
||||
`(cases Decidable.em $e:term with
|
||||
| Or.inl $h:ident => _
|
||||
| Or.inr $h:ident => _)
|
||||
|
||||
theorem Expr.denote_sort (ctx : Context α) (e : Expr) : denote ctx (sort e) = denote ctx e := by
|
||||
apply denote_loop
|
||||
where
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue