maybe good?
This commit is contained in:
@@ -724,6 +724,26 @@ Definition specification_of_run (run : target_program -> expressible_value) :=
|
||||
fetch_decode_execute_loop bcis nil = KO s ->
|
||||
run (Target_program bcis) = Expressible_msg s).
|
||||
|
||||
|
||||
Theorem there_is_at_most_one_run_function :
|
||||
forall (f g : target_program -> expressible_value),
|
||||
specification_of_run f ->
|
||||
specification_of_run g ->
|
||||
forall (t: target_program),
|
||||
f t = g t.
|
||||
Proof.
|
||||
intros f g.
|
||||
unfold specification_of_run.
|
||||
intros S_f S_g [bcis].
|
||||
case (fetch_decode_execute_loop bcis nil) as [ds | s] eqn:H_fdel.
|
||||
- destruct (S_f fetch_decode_execute_loop fetch_decode_execute_loop_satifies_the_specification) as [S_f_nil _].
|
||||
destruct (S_g fetch_decode_execute_loop fetch_decode_execute_loop_satifies_the_specification) as [S_g_nil _].
|
||||
case ds as [ | n ds' ] eqn:H_ds.
|
||||
+ rewrite -> (S_g_nil bcis H_fdel).
|
||||
exact (S_f_nil bcis H_fdel).
|
||||
+ Check (S_f_nil bcis).
|
||||
|
||||
|
||||
(* Task 4:
|
||||
a. time permitting, prove that the definition above specifies at most one function;
|
||||
b. implement this function; and
|
||||
|
||||
Reference in New Issue
Block a user