(only non hidden objects are presented)
| COM | bar_primitives | The four basic primitives of the partial type library are:
|
| DISP | bar | bar( < T:type:* > )== bar( < T > ) |
| DISP | halt | Parens ::Prec(atomrel)::Index 0 :: {[SOFT} < e:term:L > {\\ }in! {- > 0} < T:type:L > { < -}{]} == < e > in! < T > Parens ::Prec(postop):: < e:term:E > halts== < e > halts |
| DISP | admiss | Parens ::Prec(postop):: < T:type:E > admissible== < T > admissible |
| DISP | total | Parens ::Prec(postop):: < T:Type:E > total== < T > total |
| COM | bar_com | We want to be able to form halting assertions |
| RULE | barEquality | H |
| RULE | barInclusion | H |
| RULE | bar_memberEquality | H |
| COM | halt_com | We use a typed halting assertion |
| RULE | haltEquality | H |
| RULE | halt_axiomEquality | H |
| RULE | haltUniversal | H |
| RULE | termination | H |
| RULE | member_termination | H |
| COM | bottom_com | Introducing special rules for bottom are just for convenience. It would have been possible to prove the existence of a divergent term (say, the fixpoint of the flip function), which by bar_memberEquality would have been divergent in every bar type. |
| RULE | bottomEquality | H |
| RULE | bottomDivergent | H |
| COM | total_com | Totality has to be primitive. If we tried to define it as
|
| RULE | totalEquality | H |
| RULE | total_axiomEquality | H |
| RULE | totality | H |
| COM | admiss_com | The admissibility assertion, |
| RULE | admissEquality | H |
| RULE | admiss_axiomEquality | H |
| COM | fixpoint_com | This is the critical rule to the theory of partial types, but semantically speaking it says nothing, since admissibility means that fixpoint induction may be performed. So this is just the elimination form for admissibility. |
| RULE | fixpoint_induction | H |
| COM | totality_com | Most types are total. In particular, unions, products and functions are total since the intro forms are canonical and halt computation. This specifies that this is a lazy computation system. In an eager system computation would continue within product and union intros at least. Set and quotient types are total when their underlying types are. |
| RULE | voidTotal | H |
| RULE | intTotal | H |
| RULE | atomTotal | H |
| RULE | equalityTotal | H |
| RULE | unionTotal | H |
| RULE | productTotal | H |
| RULE | functionTotal | H |
| RULE | setTotal | H |
| RULE | quotientTotal | H |
| COM | admissibility_com | At present there are no rules showing admissibility for dependent products, sets or quotients, but we want some. The present situation is particularly unsatisfying since it makes it impossible to perform t he usual predicate fixpoint induction. |
| RULE | intAdmissible | H |
| RULE | atomAdmissible | H |
| RULE | equalityAdmissible | H |
| RULE | unionAdmissible | H |
| RULE | functionAdmissible | H |
| RULE | prodAdmissible | H |
| THM | total_wf | |
| THM | bar_wf | |
| THM | halt_wf | |
| THM | admiss_wf | |
| DISP | bottom_df | Bot== Bot |
| ABS | bottom | Bot == Y ( |
| THM | bottom_wf | |
| THM | bottom_diverge | |
| COM | partial_term_com | For any strict n-place operator there will need to be n+2 partial term rules: 1) a rule for membership in the bar type op(t1, ..., tn) in bar(T) if for each i, ti in bar(Si) 2) a rule for halting op(t1, ..., tn) in! T if for each i, ti in! Si 3) n rules for inducement ti in! Si if op(t1, ..., tn) in! T None of these rules are derivable from the original typing rule op(t1, ..., tn) in T if for each i, ti in Si but the original typing rule is derivable from the halting rule and the totality and member_termination rules, so long as each Si is total. If op is nonstrict in position k, the kth subgoal of the halting rule would be dropped, as well as the kth inducement rule. At present, partial term rules are only in place for subtraction. They need to be put in for every operator. |
| RULE | subtract_barEquality | H |
| RULE | subtractHalt | H |
| RULE | subtractInduceLeft | H |
| RULE | subtractInduceRight | H |
| RULE | apply_barEquality | H |
| RULE | applyInduceArg | H |
| ML | ApplyInduceArg | let ApplyInduceArg B f = Refine `applyInduceArg` [mk_term_arg B; mk_term_arg f] THENL [Reduce 0; FoldTop `member` 0 THEN AddHiddenLabel `wf`];; |
| RULE | decide_barEquality | H
|
| RULE | spread_barEquality | H |
| RULE | spreadInduce | H |
| ML | SpreadInduce | let SpreadInduce x y b B = Refine `spreadInduce` [mk_var_arg x; mk_var_arg y; mk_term_arg b; mk_term_arg B] THENL [Reduce 0; FoldTop `member` 0 THEN AddHiddenLabel `wf`] ;; |
| ML | bar_eq_tac | let EqCDBar p = let T,t,t' = dest_equal (concl p) in let opid = opid_of_term t in if not opid = opid_of_term t' then failwith `EqCDBar: outermost constructors do not match` else if opid_of_term T = `bar` then if opid = `decide` then let [(),a; [x],(); [y],()] = bterms_of_term t in let using_term = get_using_type p a in let z,over_term = get_over_pair t T in let new_var_args = mk_new_var_args [[x];[y];[]] p in Refine `decide_barEquality` (mk_bterm_arg [z] over_term . mk_term_arg (mk_std_term `bar` [[],using_term]) . new_var_args ) p else if opid = `spread` then let [(),a; [x;y],()] = bterms_of_term t in let using_term = get_using_type p a in let z,over_term = get_over_pair t T in let new_var_args = mk_new_var_args [[x];[y];[]] p in message (term_to_string using_term); Refine `spread_barEquality` (mk_bterm_arg [z] over_term . mk_term_arg using_term % (mk_std_term `bar` [[],using_t erm])% . new_var_args ) p else failwith `EqCDBar : unknown opid` else failwith `EqCDBar : not a bar type` ;; update_EqCD_additions `EqCDBar` EqCDBar;; let MemCDBar = Unfold `member` 0 THEN EqCDBar THEN Fold `member` 0 ;; let CDBar = EqCDBar ORELSE MemCDBar ;; |
| ML | auto_t | let AutoT = Auto THEN Try Termination THEN Auto;; |
| THM | bar_eq_lemma | |
| THM | bar_eq_lemma_rev |