Account name:
Password
(OpenID?)
(Forgot it?)
Remember Me
You're viewing
deniok
's journal
Create a Dreamwidth Account
Learn More
Interest
Region
Site and Account
FAQ
Email
Reload page in style:
site
light
deniok
Цитата для памяти
Цитата для памяти
Jan
.
4th
,
2013
12:11 am
deniok
Как лучше делать сопоставление с образцом в языке с зависимыми типами?
Coq's inductive types are implemented using separate "match" and "fix" constructions, which allow for deep matching, mutual matching, etc. Similarly, Agda allows function definition by pattern matching with a separate termination checker. However, this approach is only justified semantically by translating it into eliminators, and it is hard to make sense of for higher inductive types. On the other hand, deep matching is very useful for functional programmers.
One potential solution to this problem is the approach used in Epigram, where there is a "pattern matching" syntax that is extensible rather than baked into the system. Any term whose type has "the form of an induction principle" can be used to justify a pattern-matching syntax. Thus, although each inductive definition comes with its defining induction principle, the user can prove their own new induction principles (such as for deep matching, mutual recursion, etc.) and then use those elimination rules with the same sort of pattern-matching syntax.
This may be especially nice for higher inductive types, where preliminary experiments suggest that there can be meaningful notions of "deep recursion" and "mutual recursion" in particular cases, but it seems difficult to give one general formulation of such principles.
Crossposts:
http://deni-ok.livejournal.com/47486.html
Profile
deniok
Recent Entries
Archive
Reading
Tags
Memories
Profile
February
2022
S
M
T
W
T
F
S
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
Most Popular Tags
agda
-
15 uses
bananas in space
-
3 uses
coq
-
7 uses
cs club
-
3 uses
curry-howard
-
2 uses
dependent types
-
7 uses
epigram
-
3 uses
fp
-
72 uses
fprog
-
44 uses
free theorems
-
3 uses
ghc
-
9 uses
haskell
-
78 uses
lambda calculus
-
16 uses
language design
-
2 uses
logic
-
2 uses
repost
-
3 uses
ruwiki
-
2 uses
spbhug
-
5 uses
type theory
-
13 uses
typed lambda
-
8 uses
wikipedia
-
2 uses
zipper
-
2 uses
википедия
-
2 uses
встреча
-
2 uses
выборы
-
8 uses
высшая школа
-
2 uses
егэ
-
2 uses
жж
-
4 uses
задачка
-
5 uses
здорово
-
4 uses
идиоты
-
2 uses
клипы
-
2 uses
красота
-
3 uses
математика
-
3 uses
наблюдения за природой
-
2 uses
петербург
-
2 uses
пиар
-
2 uses
политика
-
10 uses
рабочее
-
3 uses
ржунимагу
-
2 uses
сборник задач и упражнений по матлогике
-
2 uses
сборник задач и упражнений по хаскелю
-
25 uses
смешно
-
7 uses
теория категорий
-
2 uses
тест
-
2 uses
тесты
-
2 uses
фальсификации
-
3 uses
черногория
-
2 uses
языки программирования
-
2 uses
яхта
-
2 uses
Style Credit
Style:
Cloudy Days
for
Ciel
by
carisma_sensei
Expand Cut Tags
No cut tags
Page generated Jul. 20th, 2025 05:34 am
Powered by
Dreamwidth Studios