Formalising LPOs and invariants in Coq door H. Korver