@@ -868,31 +868,6 @@ We have already seen that, for our language, single-step reduction is
868
868
> normal_forms_unique : deterministic Smallstep.normal_form_of
869
869
> normal_forms_unique (l,r) (l2,r2) = ?normal_forms_unique_rhs
870
870
871
- > {-
872
- > notAndLemmaLeft : Not x -> Not (x,y)
873
- > notAndLemmaLeft nx (l,r) = nx l
874
-
875
- > notStepEqual : Not (Step x x)
876
- > notStepEqual ST_PlusConstConst impossible
877
- > notStepEqual (ST_Plus1 h) = notStepEqual h
878
- > notStepEqual (ST_Plus2 s h) = notStepEqual h
879
-
880
- > normal_forms_unique : deterministic {x} {y1} {y2} normal_form_of
881
- > normal_forms_unique (l,r) (l2,r2) =
882
- > case l of
883
- > Multi_refl =>
884
- > case l2 of
885
- > Multi_refl => Refl
886
- > Multi_step {x} {y=y'} single mult => void (r (y' ** single))
887
- > Multi_step {x} {y} single mult =>
888
- > case l2 of
889
- > Multi_refl => void (r2 (y ** single))
890
- > Multi_step {x} {y=y'} single' mult' =>
891
- > let -- indHyp1 = step_deterministic single single'
892
- > -- indHyp2 = normal_forms_unique y z1 z2
893
- > in ?hole
894
- > -}
895
-
896
871
897
872
Indeed, something stronger is true for this language (though not
898
873
for all languages): the reduction of _any_ term `t` will
@@ -1018,28 +993,28 @@ The key ideas in the proof can be seen in the following picture:
1018
993
C (n1 + n2)
1019
994
```
1020
995
1021
- That is, the multistep reduction of a term of the form [ P t1 t2]
996
+ That is, the multistep reduction of a term of the form ` P t1 t2`
1022
997
proceeds in three phases:
1023
998
1024
- - First, we use [ ST_Plus1] some number of times to reduce [t1]
1025
- to a normal form, which must (by [ nf_same_as_value] ) be a
1026
- term of the form [ C n1] for some [n1] .
1027
- - Next, we use [ ST_Plus2] some number of times to reduce [t2]
1028
- to a normal form, which must again be a term of the form [ C
1029
- n2] for some [n2] .
1030
- - Finally, we use [ ST_PlusConstConst] one time to reduce [ P (C
1031
- n1) (C n2)] to [ C (n1 + n2)] .
999
+ - First, we use ` ST_Plus1` some number of times to reduce `t1`
1000
+ to a normal form, which must (by ` nf_same_as_value` ) be a
1001
+ term of the form ` C n1` for some `n1` .
1002
+ - Next, we use ` ST_Plus2` some number of times to reduce `t2`
1003
+ to a normal form, which must again be a term of the form ` C
1004
+ n2` for some `n2` .
1005
+ - Finally, we use ` ST_PlusConstConst` one time to reduce ` P (C
1006
+ n1) (C n2)` to ` C (n1 + n2)` .
1032
1007
1033
1008
To formalize this intuition, you'll need to use the congruence
1034
1009
lemmas from above (you might want to review them now, so that
1035
1010
you'll be able to recognize when they are useful), plus some basic
1036
- properties of [ ->>*] : that it is reflexive, transitive, and
1037
- includes [ ->>] .
1011
+ properties of ` ->>*` : that it is reflexive, transitive, and
1012
+ includes ` ->>` .
1038
1013
1039
1014
1040
1015
==== Exercise: 3 stars, advanced (eval__multistep_inf)
1041
1016
1042
- Write a detailed informal version of the proof of [ eval__multistep]
1017
+ Write a detailed informal version of the proof of ` eval__multistep`
1043
1018
1044
1019
(* FILL IN HERE *)
1045
1020
@@ -1058,7 +1033,7 @@ The fact that small-step reduction implies big-step evaluation is
1058
1033
now straightforward to prove, once it is stated correctly.
1059
1034
1060
1035
The proof proceeds by induction on the multi-step reduction
1061
- sequence that is buried in the hypothesis [ normal_form_of t t'] .
1036
+ sequence that is buried in the hypothesis ` normal_form_of t t'` .
1062
1037
1063
1038
Make sure you understand the statement before you start to
1064
1039
work on the proof.
0 commit comments