-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathp85.prf
More file actions
202 lines (201 loc) · 8.42 KB
/
p85.prf
File metadata and controls
202 lines (201 loc) · 8.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
(p85
(sumdig_TCC1 0
(sumdig_TCC1-1 nil 3885157133 ("" (subtype-tcc) nil nil) nil nil
(sumdig subtype "p85.d" "nat")))
(sumdig_TCC2 0
(sumdig_TCC2-1 nil 3885157133 ("" (termination-tcc) nil nil) nil nil
(sumdig termination "p85.sumdig(p85.d)" "nil")))
(ten_vs_three 0
(ten_vs_three-1 nil 3885158346
("" (grind)
(("" (lemma "same_remainder")
(("" (inst?)
(("" (prop)
(("" (expand "divides")
(("" (inst 1 "-3 * n!1") (("" (ground) nil nil)) nil))
nil))
nil))
nil))
nil))
nil)
((same_remainder formula-decl nil modulo_arithmetic nil)
(- const-decl "[numfield -> numfield]" number_fields nil)
(minus_odd_is_odd application-judgement "odd_int" integers nil)
(divides const-decl "bool" divides nil)
(nonneg_int nonempty-type-eq-decl nil integers nil)
(> const-decl "bool" reals nil)
(posnat nonempty-type-eq-decl nil integers nil)
(numfield nonempty-type-eq-decl nil number_fields nil)
(* const-decl "[numfield, numfield -> numfield]" number_fields nil)
(nnint_times_nnint_is_nnint application-judgement "nonneg_int"
integers nil)
(even_times_int_is_even application-judgement "even_int" integers
nil)
(real_ge_is_total_order name-judgement "(total_order?[real])"
real_props nil)
(int_times_int_is_int application-judgement "int" integers nil)
(boolean nonempty-type-decl nil booleans nil)
(bool nonempty-type-eq-decl nil booleans nil)
(NOT const-decl "[bool -> bool]" booleans nil)
(number nonempty-type-decl nil numbers nil)
(number_field_pred const-decl "[number -> boolean]" number_fields
nil)
(number_field nonempty-type-from-decl nil number_fields nil)
(real_pred const-decl "[number_field -> boolean]" reals nil)
(real nonempty-type-from-decl nil reals nil)
(>= const-decl "bool" reals nil)
(rational_pred const-decl "[real -> boolean]" rationals nil)
(rational nonempty-type-from-decl nil rationals nil)
(integer_pred const-decl "[rational -> boolean]" integers nil)
(int nonempty-type-eq-decl nil integers nil)
(nat nonempty-type-eq-decl nil naturalnumbers nil))
shostak))
(sumdig_mod_three 0
(sumdig_mod_three-1 nil 3885157396
("" (induct "n" :name "NAT_induction")
(("" (skosimp)
(("" (expand "sumdig" 1)
(("" (lift-if)
(("" (ground)
(("" (inst -2 "ndiv(j!1, 10)")
(("" (ground)
(("" (lemma "rem_sum2")
((""
(inst -1 "3" "rem(10)(j!1)"
"sumdig(ndiv(j!1, 10))")
(("" (replace -2 -1 LR)
(("" (replace -1 1 RL)
(("" (lemma "rem_sum2")
(("" (lemma "ten_vs_three")
(("" (inst -1 "ndiv(j!1,10)")
((""
(replace -1 1 LR)
((""
(inst
-2
"3"
"rem(10)(j!1)"
"10 * ndiv(j!1, 10)")
((""
(replace -2 1 LR)
((""
(case
"j!1 = rem(10)(j!1) + 10 * ndiv(j!1, 10)")
(("1" (ground) nil nil)
("2"
(delete - 2)
(("2" (grind) nil nil))
nil))
nil))
nil))
nil))
nil))
nil))
nil))
nil))
nil))
nil))
nil))
nil))
nil))
nil))
nil))
nil))
nil))
nil))
nil)
((int_times_int_is_int application-judgement "int" integers nil)
(number nonempty-type-decl nil numbers nil)
(boolean nonempty-type-decl nil booleans nil)
(number_field_pred const-decl "[number -> boolean]" number_fields
nil)
(number_field nonempty-type-from-decl nil number_fields nil)
(real_pred const-decl "[number_field -> boolean]" reals nil)
(real nonempty-type-from-decl nil reals nil)
(rational_pred const-decl "[real -> boolean]" rationals nil)
(rational nonempty-type-from-decl nil rationals nil)
(integer_pred const-decl "[rational -> boolean]" integers nil)
(int nonempty-type-eq-decl nil integers nil)
(bool nonempty-type-eq-decl nil booleans nil)
(>= const-decl "bool" reals nil)
(nat nonempty-type-eq-decl nil naturalnumbers nil)
(pred type-eq-decl nil defined_types nil)
(= const-decl "[T, T -> boolean]" equalities nil)
(posnat nonempty-type-eq-decl nil integers nil)
(< const-decl "bool" reals nil)
(nonneg_int nonempty-type-eq-decl nil integers nil)
(> const-decl "bool" reals nil)
(mod nonempty-type-eq-decl nil euclidean_division nil)
(numfield nonempty-type-eq-decl nil number_fields nil)
(+ const-decl "[numfield, numfield -> numfield]" number_fields nil)
(* const-decl "[numfield, numfield -> numfield]" number_fields nil)
(rem const-decl "{r: mod(b) | EXISTS q: x = b * q + r}"
modulo_arithmetic nil)
(sumdig def-decl "nat" p85 nil)
(NAT_induction formula-decl nil naturalnumbers nil)
(even_times_int_is_even application-judgement "even_int" integers
nil)
(nnint_plus_nnint_is_nnint application-judgement "nonneg_int"
integers nil)
(nnint_times_nnint_is_nnint application-judgement "nonneg_int"
integers nil)
(nil application-judgement "upto(n)" modulo_arithmetic nil)
(real_gt_is_strict_total_order name-judgement
"(strict_total_order?[real])" real_props nil)
(real_lt_is_strict_total_order name-judgement
"(strict_total_order?[real])" real_props nil)
(ten_vs_three formula-decl nil p85 nil)
(rem_sum2 formula-decl nil modulo_arithmetic nil)
(ndiv const-decl "{q: int | x = b * q + rem(b)(x)}"
modulo_arithmetic nil))
shostak))
(three_divides_nat 0
(three_divides_nat-1 nil 3885157146
("" (lemma "sumdig_mod_three")
(("" (skosimp)
(("" (inst?)
(("" (lemma "same_remainder")
(("" (inst?)
(("" (ground)
(("1" (lemma "divides_sum")
(("1" (inst -1 "sumdig(n!1) - n!1" "n!1" "3")
(("1" (ground) nil nil)) nil))
nil)
("2" (lemma "divides_diff")
(("2" (inst -1 "sumdig(n!1) - n!1" "sumdig(n!1)" "3")
(("2" (assert) nil nil)) nil))
nil))
nil))
nil))
nil))
nil))
nil))
nil)
((same_remainder formula-decl nil modulo_arithmetic nil)
(int_minus_int_is_int application-judgement "int" integers nil)
(- const-decl "[numfield, numfield -> numfield]" number_fields nil)
(numfield nonempty-type-eq-decl nil number_fields nil)
(int_plus_int_is_int application-judgement "int" integers nil)
(divides_sum formula-decl nil divides nil)
(divides_diff formula-decl nil divides nil)
(sumdig def-decl "nat" p85 nil)
(posnat nonempty-type-eq-decl nil integers nil)
(> const-decl "bool" reals nil)
(nonneg_int nonempty-type-eq-decl nil integers nil)
(nat nonempty-type-eq-decl nil naturalnumbers nil)
(>= const-decl "bool" reals nil)
(bool nonempty-type-eq-decl nil booleans nil)
(int nonempty-type-eq-decl nil integers nil)
(integer_pred const-decl "[rational -> boolean]" integers nil)
(rational nonempty-type-from-decl nil rationals nil)
(rational_pred const-decl "[real -> boolean]" rationals nil)
(real nonempty-type-from-decl nil reals nil)
(real_pred const-decl "[number_field -> boolean]" reals nil)
(number_field nonempty-type-from-decl nil number_fields nil)
(number_field_pred const-decl "[number -> boolean]" number_fields
nil)
(boolean nonempty-type-decl nil booleans nil)
(number nonempty-type-decl nil numbers nil)
(int_times_int_is_int application-judgement "int" integers nil)
(sumdig_mod_three formula-decl nil p85 nil))
shostak)))