Theory Util_MinMax
section ‹Order and linear order: min and max›
theory Util_MinMax
imports Main
begin
subsection ‹Additional lemmata about @{term min} and @{term max}›
lemma min_less_imp_conj: "(z::'a::linorder) < min x y ⟹ z < x ∧ z < y" by simp
lemma conj_less_imp_min: "⟦ z < x; z < y ⟧ ⟹ (z::'a::linorder) < min x y" by simp
lemmas min_le_iff_conj = min.bounded_iff
lemma min_le_imp_conj: "(z::'a::linorder) ≤ min x y ⟹ z ≤ x ∧ z ≤ y" by simp
lemmas conj_le_imp_min = min.boundedI
lemmas min_eqL = min.absorb1
lemmas min_eqR = min.absorb2
lemmas min_eq = min_eqL min_eqR
lemma max_less_imp_conj:"max x y < b ⟹ x < (b::('a::linorder)) ∧ y < b" by simp
lemma conj_less_imp_max:"⟦ x < (b::('a::linorder)); y < b ⟧ ⟹ max x y < b" by simp
lemmas max_le_iff_conj = max.bounded_iff
lemma max_le_imp_conj:"max x y ≤ b ⟹ x ≤ (b::('a::linorder)) ∧ y ≤ b" by simp
lemmas conj_le_imp_max = max.boundedI
lemmas max_eqL = max.absorb1
lemmas max_eqR = max.absorb2
lemmas max_eq = max_eqL max_eqR
lemmas le_minI1 = min.cobounded1
lemmas le_minI2 = min.cobounded2
lemma
min_le_monoR: "(a::'a::linorder) ≤ b ⟹ min x a ≤ min x b" and
min_le_monoL: "(a::'a::linorder) ≤ b ⟹ min a x ≤ min b x"
by (fastforce simp: min.mono min_def)+
lemma
max_le_monoR: "(a::'a::linorder) ≤ b ⟹ max x a ≤ max x b" and
max_le_monoL: "(a::'a::linorder) ≤ b ⟹ max a x ≤ max b x"
by (fastforce simp: max.mono max_def)+
end