Exchanging two adjacent entries of a list #
The lists u ++ b :: a :: v and u ++ a :: b :: v have the same entries, except that the two
adjacent entries a and b trade places. This file records the induced identification of their
index types, which exchanges the two positions u.length and u.length + 1 and fixes every other
position. It is used to compare a construction built from a list with the same construction built
after exchanging two adjacent entries.
Main definitions #
List.swapIndexEquiv: identify the entries ofu ++ b :: a :: vwith those ofu ++ a :: b :: v.
Main results #
List.val_swapIndexEquiv: the swap exchanges the positionsu.lengthandu.length + 1.List.getElem_swapIndexEquiv: the identification sends each entry to the same entry.
The equivalence which sends the index of an entry of u ++ b :: a :: v to the index of the
same entry of u ++ a :: b :: v. It exchanges the positions u.length and u.length + 1 of the
two entries a and b and fixes every other position.
Instances For
@[simp]
The swap of indices of u ++ b :: a :: v is inverse to the swap of indices of
u ++ a :: b :: v.