Unfolding
Let
- A, B be instances of Context,
- x a Symbol,
- a, a', b, c, d instances of Math.
We will define unfolding of a definition in a
Math-expression. Only the basic case is interesting,
the other rules just formalize that unfolding may be done inside a term.
Unfolding a definition of A in a with result a'
is denoted by A |- a -> a'.
It is defined as follows:
- Basic unfolding
A, Definition( subject=x, body=a, type=b), B
|- x -> a
- Internal unfolding.
- {If A |- a -> a' then}
-
A |-
Application( function=a, argument=b) ->
Application( function=a', argument=b)
-
A |-
Application( function=b, argument=a) ->
Application( function=b, argument=a')
-
A |-
Abstraction( local=x, domain=a, body=b)
->
Abstraction( local=x, domain=a', body=b)
-
A |-
PiType( local=x, domain=a, range=b)
->
PiType( local=x, domain=a', range=b)
-
A |-
Fst( pair=a) -> Fst( pair=a')
-
A |-
Snd( pair=a) -> Snd( pair=a')
-
A |-
Pair( local=x, fst=a, snd=b, sndtype=c)
->
Pair( local=x, fst=a', snd=b, sndtype=c)
-
A |-
Pair( local=x, fst=b, snd=a, sndtype=c)
->
Pair( local=x, fst=b, snd=a', sndtype=c)
-
A |-
SigmaType( local=x, fsttype=a, sndtype=b)
->
SigmaType( local=x, fsttype=a', sndtype=b)
- {If A, Declaration( subject=x, type=b)
|- a -> a' then}
-
A |-
Abstraction( local=x, domain=b, body=a)
->
Abstraction( local=x, domain=b, body=a')
-
A |-
PiType( local=x, domain=b, range=a)
->
PiType( local=x, domain=b, range=a')
-
A |-
SigmaType( local=x, fsttype=b, sndtype=a)
->
SigmaType( local=x, fsttype=b, sndtype=a')
- {If A, Definition( subject=x, body=b, type=d)
|- a -> a' then
}
A |-
Pair( local=x, fst=b, snd=c, sndtype=a)
->
Pair( local=x, fst=b, snd=c, sndtype=a')