Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

update before class

  • Loading branch information...
commit 909a048f1354262c31265f8520a4c90b2bacac29 1 parent 30568e0
Janno authored

Showing 1 changed file with 19 additions and 2 deletions. Show diff stats Hide diff stats

  1. +19 2 ex1.v
21 ex1.v
@@ -79,18 +79,35 @@ Section Ex1.
79 79
80 80 (* We define total computable functions to be
81 81 reducible partial computable functions. *)
  82 + Record tcfunction' : Type :=
  83 + tcfuncI' {
  84 + tcfunc' :> pcfunction;
  85 + tcreducible' : reducible tcfunc'
  86 + }.
  87 +
  88 + (* We give an equivalent definition and only use that
  89 + from here on. *)
82 90 Record tcfunction : Type :=
83 91 tcfuncI {
84   - tcfunc :> pcfunction;
85   - tcreducible : reducible tcfunc
  92 + tcfunc :> func
86 93 }.
87 94
  95 + Lemma tcf_1 : tcfunction -> tcfunction'.
  96 + Proof.
  97 + intros f.
  98 + pose (f' := fun x y => f x = y).
  99 + assert (forall x y, f x = f y -> x = y).
  100 +
  101 + apply (tcfuncI' f').
  102 + Lemma tcf_2: tcfunction' -> tcfunction.
  103 +
88 104 (* We define a coercion from total computable
89 105 functions to normal Coq functions. *)
90 106 Definition tcf (f: tcfunction) : nat -> nat.
91 107 intros x. destruct (tcreducible f x). exact x0. Defined.
92 108
93 109
  110 +
94 111 (* We define the type of turing machines to
95 112 be the natural numbers, i.e. we only deal
96 113 with encoded turing machines.

0 comments on commit 909a048

Please sign in to comment.
Something went wrong with that request. Please try again.