Theory Simplex_Algebra
section ‹Linearly Ordered Rational Vectors›
theory Simplex_Algebra
imports
HOL.Rat
HOL.Real_Vector_Spaces
begin
class scaleRat =
fixes scaleRat :: "rat ⇒ 'a ⇒ 'a" (infixr "*R" 75)
begin
abbreviation
divideRat :: "'a ⇒ rat ⇒ 'a" (infixl "'/R" 70)
where
"x /R r == scaleRat (inverse r) x"
end
class rational_vector = scaleRat + ab_group_add +
assumes scaleRat_right_distrib: "scaleRat a (x + y) = scaleRat a x + scaleRat a y"
and scaleRat_left_distrib: "scaleRat (a + b) x = scaleRat a x + scaleRat b x"
and scaleRat_scaleRat: "scaleRat a (scaleRat b x) = scaleRat (a * b) x"
and scaleRat_one: "scaleRat 1 x = x"