Extensibella Example: mtc:bool

Language Specification

File: defs.sos

[Reduce File] [Raw File]
Module mtc:bool

Builds on mtc:shared_declarations

e ::= ...
    | trueE
    | falseE
    | ifThenElse(e, e, e)

v ::= ...
    | trueVal
    | falseVal

ty ::= ...
     | boolTy


--------------------- [T-True]
typeOf G trueE boolTy


---------------------- [T-False]
typeOf G falseE boolTy


typeOf G C boolTy
typeOf G T Ty
typeOf G F Ty
------------------------------- [T-IfThenElse]
typeOf G ifThenElse(C, T, F) Ty



-------------------- [E-True]
eval G trueE trueVal


---------------------- [E-False]
eval G falseE falseVal


eval G C trueVal
eval G T V
---------------------------- [E-IfThenElse-True]
eval G ifThenElse(C, T, F) V


eval G C falseVal
eval G F V
---------------------------- [E-IfThenElse-False]
eval G ifThenElse(C, T, F) V



------------------------ [VT-True]
valueType trueVal boolTy


------------------------- [VT-False]
valueType falseVal boolTy



evalStep C C1
------------------------------------------------- [ES-If-Step]
evalStep ifThenElse(C, T, F) ifThenElse(C1, T, F)


---------------------------------- [ES-If-True]
evalStep ifThenElse(trueE, T, F) T


----------------------------------- [ES-If-False]
evalStep ifThenElse(falseE, T, F) F



----------- [V-True]
value trueE


------------ [V-False]
value falseE



--------------------- [S-True]
subst X R trueE trueE


----------------------- [S-False]
subst X R falseE falseE


subst X R C C1
subst X R T T1
subst X R F F1
---------------------------------------------------- [S-If]
subst X R ifThenElse(C, T, F) ifThenElse(C1, T1, F1)



------------------ [C-BoolTy-True]
canon boolTy trueE


------------------- [T-BoolTy-False]
canon boolTy falseE






-------------------- [Proj-True]
|{e}- trueE ~~> nilE


--------------------- [Proj-False]
|{e}- falseE ~~> nilE


---------------------------------- [Proj-IfThenElse]
|{e}- ifThenElse(C, T, F) ~~> nilE


---------------------- [Proj-TrueVal]
|{v}- trueVal ~~> nilV


----------------------- [Proj-FalseVal]
|{v}- falseVal ~~> nilV


----------------------- [Proj-BoolTy]
|{ty}- boolTy ~~> nilTy

Reasoning

[Show All Proofs] [Hide All Proofs] [Raw File]

Click on a command or tactic to see a detailed view of its use.

Module mtc:bool.

Prove mtc:shared_declarations:type_preservation. [Show Proof]



Prove mtc:shared_declarations:value_evalStep_false. [Show Proof]



Prove mtc:shared_declarations:subst_unique. [Show Proof]



Prove mtc:shared_declarations:evalStep_unique. [Show Proof]



Prove mtc:shared_declarations:ty_lookup. [Show Proof]



Prove mtc:shared_declarations:subst_preservation. [Show Proof]



Prove mtc:shared_declarations:evalStep_type_preservation. [Show Proof]



Prove mtc:shared_declarations:canonical_form. [Show Proof]



Prove mtc:shared_declarations:subst_is. [Show Proof]



Prove mtc:shared_declarations:evalStep_is. [Show Proof]



Prove mtc:shared_declarations:subst_total. [Show Proof]



Prove mtc:shared_declarations:progress. [Show Proof]


Back to example home