Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tej Chajed
stdpp
Commits
ffb7f0cc
Commit
ffb7f0cc
authored
Oct 28, 2017
by
Robbert Krebbers
Browse files
Minor beautification.
parent
8d0efe8e
Changes
2
Hide whitespace changes
Inline
Side-by-side
theories/finite.v
View file @
ffb7f0cc
...
...
@@ -72,7 +72,7 @@ Definition encode_fin `{Finite A} (x : A) : fin (card A) :=
Fin
.
of_nat_lt
(
encode_lt_card
x
).
Program
Definition
decode_fin
`
{
Finite
A
}
(
i
:
fin
(
card
A
))
:
A
:
=
match
Some_dec
(
decode_nat
i
)
return
_
with
|
inleft
(
exist
_
x
_
)
=>
x
|
inright
_
=>
_
|
inleft
(
x
↾
_
)
=>
x
|
inright
_
=>
_
end
.
Next
Obligation
.
intros
A
??
i
?
;
exfalso
.
...
...
theories/hlist.v
View file @
ffb7f0cc
...
...
@@ -40,10 +40,10 @@ Definition hlam {A As B} (f : A → himpl As B) : himpl (tcons A As) B := f.
Arguments
hlam
_
_
_
_
_
/
:
assert
.
Definition
hcurry
{
As
B
}
(
f
:
himpl
As
B
)
(
xs
:
hlist
As
)
:
B
:
=
(
fix
go
As
xs
:
=
(
fix
go
{
As
}
xs
:
=
match
xs
in
hlist
As
return
himpl
As
B
→
B
with
|
hnil
=>
λ
f
,
f
|
@
hcons
A
As
x
xs
=>
λ
f
,
go
As
xs
(
f
x
)
|
hcons
x
xs
=>
λ
f
,
go
xs
(
f
x
)
end
)
_
xs
f
.
Coercion
hcurry
:
himpl
>->
Funclass
.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment