This theory file is about properties of loops (the algebraic structures introduced in IsarMathLib in the Loop_ZF theory) with an additional order relation that is in a way compatible with the loop's binary operation. The oldest reference I have found on the subject is \cite{Zelinski1948}.
An ordered loop \((G,A)\) is a loop with a partial order relation r that is "translation invariant" with respect to the loop operation \(A\).
A triple \((G,A,r)\) is an ordered loop if \((G,A)\) is a loop and \(r\) is a relation on \(G\) (i.e. a subset of \(G\times G\) with is a partial order and for all elements \(x,y,z \in G\) the condition \(\langle x,y\rangle \in r\) is equivalent to both \(\langle A\langle x,z\rangle, A\langle x,z\rangle\rangle \in r\) and \(\langle A\langle z,x\rangle, A\langle z,x\rangle\rangle \in r\). This looks a bit awkward in the basic set theory notation, but using the additive notation for the group operation and \(x\leq y\) to instead of \(\langle x,y \rangle \in r\) this just means that \(x\leq y\) if and only if \(x+z\leq y+z\) and \(x\leq y\) if and only if \(z+x\leq z+y\).
definition
\( \text{IsAnOrdLoop}(L,A,r) \equiv \) \( \text{IsAloop}(L,A) \wedge r\subseteq L\times L \wedge \text{IsPartOrder}(L,r) \wedge (\forall x\in L.\ \forall y\in L.\ \forall z\in L.\ \) \( ((\langle x,y\rangle \in r \longleftrightarrow \langle A\langle x,z\rangle ,A\langle y,z\rangle \rangle \in r) \wedge (\langle x,y\rangle \in r \longleftrightarrow \langle A\langle z,x\rangle ,A\langle z,y\rangle \rangle \in r ))) \)
We define the set of nonnegative elements in the obvious way as \(L^+ =\{x\in L: 0 \leq x\}\).
definition
\( \text{Nonnegative}(L,A,r) \equiv \{x\in L.\ \langle \text{ TheNeutralElement}(L,A),x\rangle \in r\} \)
The \( \text{PositiveSet}(L,A,r) \) is a set similar to \( \text{Nonnegative}(L,A,r) \), but without the neutral element.
definition
\( \text{PositiveSet}(L,A,r) \equiv \) \( \{x\in L.\ \langle \text{ TheNeutralElement}(L,A),x\rangle \in r \wedge \text{ TheNeutralElement}(L,A)\neq x\} \)
We will use the additive notation for ordered loops.
locale loop1
assumes ordLoopAssum: \( \text{IsAnOrdLoop}(L,A,r) \)
defines \( 0 \equiv \text{ TheNeutralElement}(L,A) \)
defines \( x + y \equiv A\langle x,y\rangle \)
defines \( x \leq y \equiv \langle x,y\rangle \in r \)
defines \( x \lt y \equiv x\leq y \wedge x\neq y \)
defines \( L^+ \equiv \text{Nonnegative}(L,A,r) \)
defines \( L_+ \equiv \text{PositiveSet}(L,A,r) \)
defines \( - x + y \equiv \text{ LeftDiv}(L,A)\langle x,y\rangle \)
defines \( x - y \equiv \text{ RightDiv}(L,A)\langle y,x\rangle \)
Theorems proven in the loop0 locale are valid in the loop1 locale
using ordLoopAssum, loop_loop0_valid unfolding IsAnOrdLoop_def
The notation \(-x+y\) and \(x-y\) denotes left and right division, resp. These two operations are closed in a loop, see lemma lrdiv_binop in the Quasigroup_ZF theory. The next lemma reiterates that fact using the notation of the loop1 context.
lemma (in loop1) left_right_sub_closed:
assumes \( x\in L \), \( y\in L \)
shows \( ( - x + y) \in L \) and \( x - y \in L \)proofIn this context \(x \leq y\) implies that both \(x\) and \(y\) belong to \(L\).
lemma (in loop1) lsq_members:
assumes \( x\leq y \)
shows \( x\in L \) and \( y\in L \) using ordLoopAssum, assms, IsAnOrdLoop_defIn this context \(x < y\) implies that both \(x\) and \(y\) belong to \(L\).
lemma (in loop1) less_members:
assumes \( x \lt y \)
shows \( x\in L \) and \( y\in L \) using ordLoopAssum, assms, IsAnOrdLoop_defIn an ordered loop the order is translation invariant.
lemma (in loop1) ord_trans_inv:
assumes \( x\leq y \), \( z\in L \)
shows \( x + z \leq y + z \) and \( z + x \leq z + y \)proofIn an ordered loop the strict order is translation invariant.
lemma (in loop1) strict_ord_trans_inv:
assumes \( x \lt y \), \( z\in L \)
shows \( x + z \lt y + z \) and \( z + x \lt z + y \)proofWe can cancel an element from both sides of an inequality on the right side.
lemma (in loop1) ineq_cancel_right:
assumes \( x\in L \), \( y\in L \), \( z\in L \) and \( x + z \leq y + z \)
shows \( x\leq y \)proofWe can cancel an element from both sides of a strict inequality on the right side.
lemma (in loop1) strict_ineq_cancel_right:
assumes \( x\in L \), \( y\in L \), \( z\in L \) and \( x + z \lt y + z \)
shows \( x \lt y \) using assms, ineq_cancel_rightWe can cancel an element from both sides of an inequality on the left side.
lemma (in loop1) ineq_cancel_left:
assumes \( x\in L \), \( y\in L \), \( z\in L \) and \( z + x \leq z + y \)
shows \( x\leq y \)proofWe can cancel an element from both sides of a strict inequality on the left side.
lemma (in loop1) strict_ineq_cancel_left:
assumes \( x\in L \), \( y\in L \), \( z\in L \) and \( z + x \lt z + y \)
shows \( x \lt y \) using assms, ineq_cancel_leftThe definition of the nonnegative set in the notation used in the loop1 locale:
lemma (in loop1) nonneg_definition:
shows \( x \in L^+ \longleftrightarrow 0 \leq x \) using ordLoopAssum, IsAnOrdLoop_def, Nonnegative_defThe nonnegative set is contained in the loop.
lemma (in loop1) nonneg_subset:
shows \( L^+ \subseteq L \) using Nonnegative_defThe positive set is contained in the loop.
lemma (in loop1) positive_subset:
shows \( L_+ \subseteq L \) using PositiveSet_defThe definition of the positive set in the notation used in the loop1 locale:
lemma (in loop1) posset_definition:
shows \( x \in L_+ \longleftrightarrow ( 0 \leq x \wedge x\neq 0 ) \) using ordLoopAssum, IsAnOrdLoop_def, PositiveSet_defAnother form of the definition of the positive set in the notation used in the loop1 locale:
lemma (in loop1) posset_definition1:
shows \( x \in L_+ \longleftrightarrow 0 \lt x \) using ordLoopAssum, IsAnOrdLoop_def, PositiveSet_defThe order in an ordered loop is antisymmeric.
lemma (in loop1) loop_ord_antisym:
assumes \( x\leq y \) and \( y\leq x \)
shows \( x=y \)proofThe loop order is transitive.
lemma (in loop1) loop_ord_trans:
assumes \( x\leq y \) and \( y\leq z \)
shows \( x\leq z \)proofThe loop order is reflexive.
lemma (in loop1) loop_ord_refl:
assumes \( x\in L \)
shows \( x\leq x \) using assms, ordLoopAssum unfolding IsAnOrdLoop_def, IsPartOrder_def, refl_defThe neutral element is nonnegative.
lemma (in loop1) loop_zero_nonneg:
shows \( 0 \in L^+ \) using neut_props_loop(1), loop_ord_refl, nonneg_definitionA form of mixed transitivity for the strict order:
lemma (in loop1) loop_strict_ord_trans:
assumes \( x\leq y \) and \( y \lt z \)
shows \( x \lt z \)proofAnother form of mixed transitivity for the strict order:
lemma (in loop1) loop_strict_ord_trans1:
assumes \( x \lt y \) and \( y\leq z \)
shows \( x \lt z \)proofYet another form of mixed transitivity for the strict order:
lemma (in loop1) loop_strict_ord_trans2:
assumes \( x \lt y \) and \( y \lt z \)
shows \( x \lt z \)proofWe can move an element to the other side of an inequality. Well, not exactly, but our notation creates an illusion to that effect.
lemma (in loop1) lsq_other_side:
assumes \( x\leq y \)
shows \( 0 \leq - x + y \), \( ( - x + y) \in L^+ \), \( 0 \leq y - x \), \( (y - x) \in L^+ \)proofWe can move an element to the other side of a strict inequality.
lemma (in loop1) ls_other_side:
assumes \( x \lt y \)
shows \( 0 \lt - x + y \), \( ( - x + y) \in L_+ \), \( 0 \lt y - x \), \( (y - x) \in L_+ \)proofWe can add sides of inequalities.
lemma (in loop1) add_ineq:
assumes \( x\leq y \), \( z\leq t \)
shows \( x + z \leq y + t \)proofWe can add sides of strict inequalities. The proof uses a lemma that relies on the antisymmetry of the order relation.
lemma (in loop1) add_ineq_strict:
assumes \( x \lt y \), \( z \lt t \)
shows \( x + z \lt y + t \)proofWe can add sides of inequalities one of which is strict.
lemma (in loop1) add_ineq_strict1:
assumes \( x\leq y \), \( z \lt t \)
shows \( x + z \lt y + t \) and \( z + x \lt t + y \)proofSubtracting a positive element decreases the value, while adding a positive element increases the value.
lemma (in loop1) add_subtract_pos:
assumes \( x\in L \), \( 0 \lt y \)
shows \( x - y \lt x \), \( ( - y + x) \lt x \), \( x \lt x + y \), \( x \lt y + x \)proofassumes \( \text{IsAloop}(G,A) \)
shows \( loop0(G,A) \)assumes \( \text{IsAquasigroup}(G,A) \)
shows \( \text{ LeftDiv}(G,A):G\times G\rightarrow G \) and \( \text{ RightDiv}(G,A):G\times G\rightarrow G \)assumes \( x\leq y \)
shows \( x\in L \) and \( y\in L \)assumes \( x\leq y \), \( z\in L \)
shows \( x + z \leq y + z \) and \( z + x \leq z + y \)assumes \( x \lt y \)
shows \( x\in L \) and \( y\in L \)assumes \( x\in G \), \( y\in G \), \( z\in G \) and \( y\cdot x = z\cdot x \)
shows \( y=z \)assumes \( x\in G \), \( y\in G \), \( z\in G \) and \( x\cdot y = x\cdot z \)
shows \( y=z \)assumes \( a\in G \), \( b\in G \), \( c\in G \) and \( a\cdot b \leq c\cdot b \)
shows \( a\leq c \)assumes \( x\in L \), \( y\in L \), \( z\in L \) and \( z + x \leq z + y \)
shows \( x\leq y \)assumes \( \text{antisym}(r) \) and \( \langle a,b\rangle \in r \), \( \langle b,a\rangle \in r \)
shows \( a=b \)assumes \( \text{trans}(r) \) and \( \langle a,b\rangle \in r \wedge \langle b,c\rangle \in r \)
shows \( \langle a,c\rangle \in r \)assumes \( x\in L \)
shows \( x\leq x \)assumes \( x\leq y \) and \( y\leq z \)
shows \( x\leq z \)assumes \( x\leq y \) and \( y\leq x \)
shows \( x=y \)assumes \( x\in G \), \( y\in G \)
shows \( \exists !z.\ z\in G \wedge z\cdot x = y \), \( y/ x \in G \), \( (y/ x)\cdot x = y \) and \( \exists !z.\ z\in G \wedge x\cdot z = y \), \( x\backslash y \in G \), \( x\cdot (x\backslash y) = y \)assumes \( x\in G \), \( y\in G \)
shows \( \exists !z.\ z\in G \wedge z\cdot x = y \), \( y/ x \in G \), \( (y/ x)\cdot x = y \) and \( \exists !z.\ z\in G \wedge x\cdot z = y \), \( x\backslash y \in G \), \( x\cdot (x\backslash y) = y \)assumes \( x\in G \), \( y\in G \)
shows \( \exists !z.\ z\in G \wedge z\cdot x = y \), \( y/ x \in G \), \( (y/ x)\cdot x = y \) and \( \exists !z.\ z\in G \wedge x\cdot z = y \), \( x\backslash y \in G \), \( x\cdot (x\backslash y) = y \)assumes \( x\in L \), \( y\in L \), \( z\in L \) and \( z + x \lt z + y \)
shows \( x \lt y \)assumes \( x\in L \), \( y\in L \), \( z\in L \) and \( x + z \lt y + z \)
shows \( x \lt y \)assumes \( x\leq y \)
shows \( x\in L \) and \( y\in L \)assumes \( x\leq y \), \( z\in L \)
shows \( x + z \leq y + z \) and \( z + x \leq z + y \)assumes \( x\leq y \)
shows \( x\in L \) and \( y\in L \)assumes \( x\leq y \), \( z\in L \)
shows \( x + z \leq y + z \) and \( z + x \leq z + y \)assumes \( x \lt y \)
shows \( x\in L \) and \( y\in L \)assumes \( x \lt y \), \( z\in L \)
shows \( x + z \lt y + z \) and \( z + x \lt z + y \)assumes \( x \lt y \)
shows \( x\in L \) and \( y\in L \)assumes \( x \lt y \), \( z\in L \)
shows \( x + z \lt y + z \) and \( z + x \lt z + y \)assumes \( x \lt y \) and \( y \lt z \)
shows \( x \lt z \)assumes \( x\leq y \) and \( y \lt z \)
shows \( x \lt z \)assumes \( x \lt y \) and \( y\leq z \)
shows \( x \lt z \)assumes \( x\leq y \), \( z \lt t \)
shows \( x + z \lt y + t \) and \( z + x \lt t + y \)assumes \( x\in G \), \( y\in G \)
shows \( \exists !z.\ z\in G \wedge z\cdot x = y \), \( y/ x \in G \), \( (y/ x)\cdot x = y \) and \( \exists !z.\ z\in G \wedge x\cdot z = y \), \( x\backslash y \in G \), \( x\cdot (x\backslash y) = y \)assumes \( x\leq y \), \( z \lt t \)
shows \( x + z \lt y + t \) and \( z + x \lt t + y \)assumes \( x\in G \), \( y\in G \)
shows \( \exists !z.\ z\in G \wedge z\cdot x = y \), \( y/ x \in G \), \( (y/ x)\cdot x = y \) and \( \exists !z.\ z\in G \wedge x\cdot z = y \), \( x\backslash y \in G \), \( x\cdot (x\backslash y) = y \)