File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -93,12 +93,22 @@ Proof
93
93
QED
94
94
95
95
Definition bool_toString_def:
96
- bool_toString b = if b then strlit " True" else strlit" False"
96
+ bool_toString b = if b then strlit " True" else strlit " False"
97
+ End
98
+
99
+ Definition bool_fromString_def:
100
+ bool_fromString s = if s = strlit " True" then SOME T else
101
+ if s = strlit " False" then SOME F else
102
+ NONE
97
103
End
98
104
99
105
val _ = ml_prog_update (open_module " Bool" );
106
+ val _ = (next_ml_names := [" not" ]);
107
+ val _ = trans " not" ``\x. ~x:bool``;
100
108
val _ = (next_ml_names := [" toString" ]);
101
109
val _ = translate bool_toString_def;
110
+ val _ = (next_ml_names := [" fromString" ]);
111
+ val _ = translate bool_fromString_def;
102
112
val _ = (next_ml_names := [" compare" ]);
103
113
val _ = translate comparisonTheory.bool_cmp_def;
104
114
val _ = ml_prog_update (close_module NONE );
Original file line number Diff line number Diff line change @@ -116,7 +116,9 @@ String.collate: (char -> char -> ordering) -> string -> string -> ordering
116
116
String.char_escape_seq: char -> string option
117
117
String.escape_str: string -> string
118
118
String.escape_char: char -> string
119
+ Bool.not: bool -> bool
119
120
Bool.toString: bool -> string
121
+ Bool.fromString: string -> bool option
120
122
Bool.compare: bool -> bool -> ordering
121
123
Pair.map: ('a -> 'b) -> ('c -> 'd) -> 'a * 'c -> 'b * 'd
122
124
Pair.toString: ('a -> string) -> ('b -> string) -> 'a * 'b -> string
You can’t perform that action at this time.
0 commit comments