@@ -104,14 +104,6 @@ val num_from_hex_string_alt_side = Q.prove(`
104
104
105
105
val r = translate pure_lexer_implTheory.read_string_def;
106
106
107
- val read_string_side = Q.prove(`
108
- ∀x y l.
109
- read_string_side x y l ⇔ T`,
110
- ho_match_mp_tac pure_lexer_implTheory.read_string_ind>>
111
- rw[]>>
112
- simp[Once (fetch" -" " read_string_side_def" )])
113
- |> update_precondition;
114
-
115
107
val r = translate EL;
116
108
117
109
val el_side = Q.prove(`
@@ -130,12 +122,21 @@ QED
130
122
131
123
val r = translate (pure_lexer_implTheory.next_sym_alt_def |> RW [and_to_if]);
132
124
125
+ Triviality read_while_thm':
126
+ ∀cs s cs' s'. read_while P cs s = (s', cs') ⇒ STRLEN s' ≥ STRLEN s
127
+ Proof
128
+ Induct >> rw[] >>
129
+ gvs[pure_lexer_implTheory.read_while_def, IMPLODE_EXPLODE_I] >>
130
+ gvs[AllCaseEqs()] >> last_x_assum drule >> simp[]
131
+ QED
132
+
133
133
val next_sym_alt_side = Q.prove(`
134
134
∀x l. next_sym_alt_side x l ⇔ T`,
135
135
ho_match_mp_tac pure_lexer_implTheory.next_sym_alt_ind>>rw[]>>
136
136
simp[Once (fetch" -" " next_sym_alt_side_def" ),num_from_dec_string_alt_side,
137
- read_string_side,num_from_hex_string_alt_side]>>
138
- rw[]>> gvs []) |> update_precondition;
137
+ num_from_hex_string_alt_side] >>
138
+ rw[] >> gvs[pure_lexer_implTheory.read_while_def] >>
139
+ imp_res_tac read_while_thm' >> gvs[]) |> update_precondition;
139
140
140
141
val r = translate pure_lexer_implTheory.lexer_fun_def;
141
142
0 commit comments