-
Notifications
You must be signed in to change notification settings - Fork 7
/
examples.lean
41 lines (36 loc) · 903 Bytes
/
examples.lean
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import data.fix.parser.equations
universes u
data tree (α β : Type)
| nil : tree
| cons : α → (β → tree) → tree
-- #print prefix tree
-- #print tree.shape
-- #print tree.shape.internal
-- #print tree.shape.internal.mvfunctor
-- #print tree.shape.internal.mvqpf
-- #print tree.internal
-- #print tree
-- #print tree.mvfunctor
-- #print tree.mvqpf
-- #check tree.nil
-- #check tree.cons
-- #check @tree.cases_on
-- #check @tree.rec
-- #check @tree.drec
codata tree' (α β : Type)
| nil : tree'
| cons : α → (β → tree') → tree'
-- #print prefix tree'
-- #print tree'.shape
-- #print tree'.shape.internal
-- #print tree'.shape.internal.mvfunctor
-- #print tree'.shape.internal.mvqpf
-- #print tree'.internal
-- #print tree'
-- #print tree.mvfunctor
-- #print tree.mvqpf
-- #check tree'.nil
-- #check tree'.cons
-- #check @tree'.cases_on
-- #check @tree'.corec
-- #check @tree'.bisim