lean4-htt/tests/lean/fixedIndexToParamIssue.lean
Leonardo de Moura 4fa5f50559 feat: implement TODO at "fixed indices to parameters"
The missing feature (TODO in the code) is needed for the `BinTree` example.
2022-04-02 14:37:24 -07:00

22 lines
601 B
Text

inductive Tree (β : Type v) where
| leaf
| node (left : Tree β) (key : Nat) (value : β) (right : Tree β)
deriving Repr
inductive ForallTree (p : Nat → β → Prop) : Tree β → Prop
| leaf : ForallTree p .leaf
| node :
ForallTree p left →
p key value →
ForallTree p right →
ForallTree p (.node left key value right)
inductive BST : Tree β → Prop
| leaf : BST .leaf
| node :
ForallTree (fun k v => k < key) left →
ForallTree (fun k v => key < k) right →
BST left → BST right →
BST (.node left key value right)
#print BST