In my Isabelle formalisation I'm dealing with finite sets of natural numbers, and on these sets I'd like to consider functions that have the property of being a linear order.
I see that there are several different formalisations of orders in the library, but I'm not sure which one to reuse. In most cases those functions of which I'd like to check whether they are linear orders will simply be defined by using library operators such as <
(less
), but in some cases they might be defined as more complex combinations of library functions.
I tried HOL/Library/Order_Relation
, but that doesn't seem to be connected to <
; e.g. I'm unable to have the following lemma proved automatically:
lemma "linear_order_on {1::nat, 2} {(a::nat, b) . {a, b} ⊆ {1::nat, 2} ∧ a < b}"
(I'm sure there are nicer ways of converting a function to a relation, but that's not the main point here.)
If there were some ready-to-reuse library could I'd appreciate if you could let me know. Modelling this in a mathematically elegant way is not of utmost importance to me right now, so for now I'm considering to resort to functions that assign rational or real numbers to the natural numbers in my sets, and then using <
on these rational/real numbers.