lean4-htt/tests/lean/run/inductive2.lean
2022-04-13 08:30:21 -07:00

16 lines
470 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

mutual
inductive isEvenList : List α → Prop
| nil (α) : isEvenList (α := α) []
| cons (h : α) {t : List α} : isOddList t → isEvenList (h::t)
inductive isOddList : List α → Prop
| cons (h : α) {t : List α} : isEvenList t → isOddList (h::t)
end
set_option pp.explicit true
#print isEvenList
#check @isEvenList.nil
#check @isEvenList.cons
#check @isOddList.cons
#check isEvenList.nil Nat
#check isEvenList.cons 1 $ isOddList.cons 2 $ isEvenList.nil Nat