Result of trimming the shorter blockchain.
This is the counterpart of trim-blocks-for-round-of-longer,
but for the shorter blockchain.
The result is the same, i.e. the shorter blockchain itself.
The core theorem is trim-blocks-for-round-no-change,
which is expressed in terms of append,
so again we use the list equivalence theorem.
We also need to appeal to the theorem that,
in an ordered
The theorem says that the trimming of the shorter blockchain reduces to the shorter blockchain.
Theorem:
(defthm trim-blocks-for-round-of-shorter (implies (and (blocks-orderedp blocks2) (< (len blocks1) (len blocks2)) (equal blocks1 (nthcdr (- (len blocks2) (len blocks1)) blocks2))) (equal (trim-blocks-for-round (block->round (nth (1- (- (len blocks2) (len blocks1))) blocks2)) blocks1) (block-list-fix blocks1))))