Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BLOT Valentin
SystemFtoBarRecursion
Commits
93fa2d5d
Commit
93fa2d5d
authored
Dec 07, 2017
by
Valentin Blot
Browse files
Optimized extraction
parent
bee5b44c
Changes
1
Show whitespace changes
Inline
Side-by-side
Coq/f.v
View file @
93fa2d5d
...
...
@@ -965,9 +965,24 @@ rewrite form_to_type_substt.
reflexivity
.
Qed
.
Extract
Inductive
unit
=>
"unit"
[
"()"
]
.
Extract
ion
Inline
id
.
Extract
Inductive
bool
=>
"bool"
[
"true"
"false"
].
Extract
Inductive
list
=>
"list"
[
"[]"
"(::)"
].
Extract
Inlined
Constant
List
.
map
=>
"List.map"
.
Extract
Inlined
Constant
List
.
nth
=>
"(fun n l d -> match List.nth_opt l n with Some a -> a | None -> d)"
.
Extract
Inlined
Constant
List
.
fold_right
=>
"(fun f a l -> List.fold_right f l a)"
.
Extract
Inductive
prod
=>
"(*)"
[
"(,)"
].
Extract
Inlined
Constant
fst
=>
"fst"
.
Extract
Inlined
Constant
snd
=>
"snd"
.
Extract
Inductive
sigT
=>
"(*)"
[
"(,)"
].
Extract
Inlined
Constant
projT1
=>
"fst"
.
Extract
Inlined
Constant
projT2
=>
"snd"
.
Extract
Inductive
option
=>
"option"
[
"Some"
"None"
].
Extraction
"f.ml"
term_equal
bound
term1
term2
.
Extract
Inductive
nat
=>
int
[
"0"
"succ"
]
"(fun fO fS n -> if n=0 then fO () else fS (n-1))"
.
Extract
Inlined
Constant
pred
=>
"pred"
.
Extract
Inlined
Constant
Init
.
Nat
.
sub
=>
"(fun m n -> m - n)"
.
Extract
Inlined
Constant
Nat
.
eqb
=>
"(fun m n -> m = n)"
.
Extract
Inlined
Constant
Nat
.
leb
=>
"(fun m n -> m <= n)"
.
Extract
Inlined
Constant
Nat
.
ltb
=>
"(fun m n -> m < n)"
.
Extract
Inlined
Constant
Nat
.
compare
=>
"(fun m n -> if m < n then Lt else if m > n then Gt else Eq)"
.
Extraction
"f.ml"
term_equal
bound
type1
term1
type2
term2
.
Write
Preview
Markdown
is supported
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