CAPITULO II: OBJETIVOS E HIPÓTESIS
TRATAMIENTO DE LOS RESULTADOS
5.1. RESULTADOS Y DISCUSIÓN
Luo supplies dependent pairs, or -types, as basic features of ECC, equipped with first
and second projections. However, with our facility for datatypes, it seems preferable to present pairing as a parameterised record type. Also, pairs might as well acquire the apparatus we shall shortly build for other datatypes.
record former . ;78 ¬ u[wyxTz . ;=u[wyxTz fields bò;78 v; . b
+ ;Wbb &U/ ;;vv
#EM5 ;;vv
Table 4.1: standard finite types
/ 10 ;=u[wyxTz / , 0 ;2u[wyxTz 2 ;=u[wyxTz ,M5OQ2 2 ;2u[wyxTz S; / 43 S; / , 0 äÒ; 0 ' äÒ; / , 0 Pk; 2 O oP;=,óM5OQ2 2 m;=,MOK2 2
Table 4.2: , and,MOK2
H ;=u[wyxTz J.; ECKJ»;=u[wyxTz ) C; aCGF ? ;[H @; S ECeJ ) ? @; S ECGvJ Table 4.3: vectors
intro- raise- BP';Ô ; Z P è ; P'; Z · ¼ P ¸ ; P; Z è BP';Ô ; Z P'6I°ab ± ²&°v ± PW²Å
Table 4.4: tactics for -types in goals
The only penalty we risk paying is slightly clumsy syntax, but it is in our power to sugar this problem away. Let us have lots.
+Pk; 6 Z X è md("=PÌ; 6 Z
f is a fake binding operator
c Z X è ; 6 Z
the usual special case
· ¼ @ ¸ X è · bKX ¼ vX^@ ¸ unlabelled pairs Þ ß à X è
bb empty telescope gives unit type
< ¼ Z X è +PSR; R{6A67676yêPWVe; V6 Z
nonempty telescope gives -type
5 Þ ß à76 X è
+ empty sequence gives void
· < ¼ @ ¸ X è · R ¼ · 67676 · V ¼ @ ¸ 676[6 ¸¸
nonempty sequence gives pair
There is no conflict between using both for binding and as an operator which turns
telescopes into the types of tuples, represented as pairs nested to the right. Also, we still have the dot-notation from record types as sugar for
, . Our cunning choice
of field names gives us the familiar d
æ
f{6Ib and d
æ
f~6v projections as a special case.
We should equip OLEG with the tactics for dragging -bindings through our fake -
bindings. See table 4.4. Both are replacements. Applied recursively, intro-q and intro-
turn a goal full ofq s and s into a partial proof full of " s and s. Correspondingly,
raise- combines with raise-q to allow multiple subgoals to retreat from a partial
contruction as a single outstanding proof obligation.
4.3.1
the blunderbuss tactic
intro- caters for -types in goals, allowing us to solve them piecewise. What about -types in hypotheses? Although we usually try to curry them away wherever possible,
we do still find -types in inductive hypotheses, for example, when the original goal
It is awkward to exploit such hypotheses with tactics such as LEGO’sRefinewhich are specifically geared to use functional information. I therefore propose the following ‘blunderbuss’ tactic,3which will search inside as well as underq : . .
TACTIC: blunderbuss
This tactic tries to use some
to solve a¬©7|ª by a depth-
first search strategy. The nodes of the search tree are given by
-bindings of proofs to try. Initially, the root node is set to . äß©©>@rX ; 6¬©7|ªo;¨ At each J9©5>X ;
, starting withä ©©9@, blunderbuss behaves as follows:
try to unifyJ9©5> with¬©7|ª—if successful, stop, otherwise6[676
reduce
to weak head-normal form
generate subnodes by the type-directed methods given in table 4.5 and try blunderbuss with each in turn—blunder-
subnodes are tried before blunder-q subnodes
We recover exactly LEGO’sRefinetactic if we only have blunder-q . However, now
we can just as well blunder under a .
I have taken this opportunity to sneak in blunder-
. Recall that when eliminate generates a constrained scheme, the equations generated appear as a matching problem in any inductive hypotheses which may arise. blunder-
is intended to make it easier to exploit such hypotheses whenever the matching problem has an obvious solution.
Hence, whenever an equational premise is required, blunderbuss tries to unify the two sides in order to supply a
proof. If this fails, then blunder-q introduces the premise
as normal. It would be very unusual if making a possible unification turned out to be an unfortunate choice.
The construction of the ‘guarded fixpoint’ operator in the next section uses a style of hypothesis for whose exploitation blunderbuss is exactly the right tactic.
3
A blunderbuss is an old-fashioned kind of gun with a barrel which opens out like a horn. It fires almost anything at almost everyone in a wide spread. The phrase ‘blunderbuss tactics’ is used to describe the technique of throwing everything you have got at a problem in the hope that something will work.
blunder- ø ü â ?E E E E E E E @ J9©+5> X ;AqP';Í@o @ Á . .. . -¬©[|ªK;f¨ ý AG G G G G G G B è ø Á ü â Á ?E E E E E @ 9ÓX d$ @ôf ;ΰ @ ± P² . .. . 6¬©7|ªo;¨ ý AG G G G G B @ and@ Á unify, ie ø ø Á ø Á â â Á ø Á¼ â Á ¿ @ Ö X @ Á blunder-q ø ü â ?E E E E E E E @ J9©+5> X ;AqP';B8 . .. . -¬©[|ªK;f¨ ý AHG G G G G G G B è ø ü â ?E E E E E E E @ P ;+8 9X P ; . .. . -¬©[|ªn;f¨ ý AHG G G G G G G B blunder- ø ü â ?E E E E E E E @ J9©+5> X ;êP';B8 . .. . -¬©[|ªK;f¨ ý AG G G G G G G B è ø ü â ?E E E E E E E @ 9=RBX 6Eb;78 9 X 6v ;ΰ 9=R ± PW² . .. . -¬©[|ª;¨ ý AG G G G G G G B