Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Programming Computable Functions
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
Service Desk
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Max Ole Elliger
Programming Computable Functions
Commits
0660746a
Commit
0660746a
authored
1 year ago
by
Max Ole Elliger
Browse files
Options
Downloads
Patches
Plain Diff
headlines pcf
parent
dff6c022
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!4
Docs/headlines
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/PCF.v
+12
-0
12 additions, 0 deletions
src/PCF.v
with
12 additions
and
0 deletions
src/PCF.v
+
12
−
0
View file @
0660746a
(
**
*
Programming
Computable
Functions
(
PCF
)
*
)
Require
Import
Nat
Bool
List
.
(
**
**
Types
*
)
Inductive
type
:=
|
ty_nat
:
type
|
ty_bool
:
type
...
...
@@ -8,6 +12,8 @@ Inductive type :=
|
ty_sum
:
type
->
type
->
type
|
ty_func
:
type
->
type
->
type
.
(
**
**
Contexts
*
)
Definition
context
:=
nat
->
option
type
.
Definition
cempty
:
context
:=
fun
_
=>
None
.
...
...
@@ -24,6 +30,8 @@ Proof.
apply
c
;
exact
n
.
Defined
.
(
**
**
Formulas
*
)
Inductive
form
:=
|
f_var
:
nat
->
form
|
f_nat
:
nat
->
form
...
...
@@ -45,6 +53,8 @@ Inductive form :=
|
f_mul
:
form
->
form
->
form
|
f_minus
:
form
->
form
->
form
.
(
**
***
Operations
and
Properties
*
)
Fixpoint
occ
(
f
:
form
)
:
list
nat
:=
match
f
with
|
f_var
n
=>
n
::
nil
...
...
@@ -125,6 +135,8 @@ Fixpoint subst (f : form) (x : nat) (s : form) : form :=
|
f_minus
f1
f2
=>
f_minus
(
subst
f1
x
s
)
(
subst
f2
x
s
)
end
.
(
**
**
Derivable
terms
in
context
*
)
Inductive
f_deriv
:
context
->
form
->
type
->
Prop
:=
|
f_deriv_var
:
forall
x
A
c
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment