122 "rec_newleft = |
122 "rec_newleft = |
123 (let cond1 = CN rec_disj [CN rec_eq [Id 3 2, Z], CN rec_eq [Id 3 2, constn 1]] in |
123 (let cond1 = CN rec_disj [CN rec_eq [Id 3 2, Z], CN rec_eq [Id 3 2, constn 1]] in |
124 let cond2 = CN rec_eq [Id 3 2, constn 2] in |
124 let cond2 = CN rec_eq [Id 3 2, constn 2] in |
125 let cond3 = CN rec_eq [Id 3 2, constn 3] in |
125 let cond3 = CN rec_eq [Id 3 2, constn 3] in |
126 let case3 = CN rec_add [CN rec_mult [constn 2, Id 3 0], |
126 let case3 = CN rec_add [CN rec_mult [constn 2, Id 3 0], |
127 CN rec_rem [Id 3 1, constn 2]] in |
127 CN rec_mod [Id 3 1, constn 2]] in |
128 CN rec_if [cond1, Id 3 0, |
128 CN rec_if [cond1, Id 3 0, |
129 CN rec_if [cond2, CN rec_quo [Id 3 0, constn 2], |
129 CN rec_if [cond2, CN rec_quo [Id 3 0, constn 2], |
130 CN rec_if [cond3, case3, Id 3 0]]])" |
130 CN rec_if [cond3, case3, Id 3 0]]])" |
131 |
131 |
132 definition |
132 definition |
133 "rec_newright = |
133 "rec_newright = |
134 (let condn = \<lambda>n. CN rec_eq [Id 3 2, constn n] in |
134 (let condn = \<lambda>n. CN rec_eq [Id 3 2, constn n] in |
135 let case0 = CN rec_minus [Id 3 1, CN rec_scan [Id 3 1]] in |
135 let case0 = CN rec_minus [Id 3 1, CN rec_scan [Id 3 1]] in |
136 let case1 = CN rec_minus [CN rec_add [Id 3 1, constn 1], CN rec_scan [Id 3 1]] in |
136 let case1 = CN rec_minus [CN rec_add [Id 3 1, constn 1], CN rec_scan [Id 3 1]] in |
137 let case2 = CN rec_add [CN rec_mult [constn 2, Id 3 1], |
137 let case2 = CN rec_add [CN rec_mult [constn 2, Id 3 1], |
138 CN rec_rem [Id 3 0, constn 2]] in |
138 CN rec_mod [Id 3 0, constn 2]] in |
139 let case3 = CN rec_quo [Id 2 1, constn 2] in |
139 let case3 = CN rec_quo [Id 2 1, constn 2] in |
140 CN rec_if [condn 0, case0, |
140 CN rec_if [condn 0, case0, |
141 CN rec_if [condn 1, case1, |
141 CN rec_if [condn 1, case1, |
142 CN rec_if [condn 2, case2, |
142 CN rec_if [condn 2, case2, |
143 CN rec_if [condn 3, case3, Id 3 1]]]])" |
143 CN rec_if [condn 3, case3, Id 3 1]]]])" |