------------------------------------------------------------------------ -- Agda Helium -- -- Relations between algebraic properties of ordered structures ------------------------------------------------------------------------ {-# OPTIONS --safe --without-K #-} open import Relation.Binary module Helium.Algebra.Ordered.StrictTotal.Consequences {a ℓ₁ ℓ₂} (strictTotalOrder : StrictTotalOrder a ℓ₁ ℓ₂) where open StrictTotalOrder strictTotalOrder renaming ( Carrier to A ; trans to <-trans ; irrefl to <-irrefl ; asym to <-asym ) open import Helium.Relation.Binary.Properties.StrictTotalOrder strictTotalOrder open import Relation.Binary.Reasoning.StrictPartialOrder strictPartialOrder open import Algebra.Core open import Algebra.Definitions open import Data.Product using (_,_) open import Data.Sum using (inj₁; inj₂) open import Function using (_∘_) open import Function.Definitions open import Helium.Algebra.Ordered.Definitions open import Relation.Nullary using (¬_) ---- -- Consequences for a single unary operation module _ {f : Op₁ A} where cong₁+mono₁-<⇒mono₁-≤ : Congruent₁ _≈_ f → Congruent₁ _<_ f → Congruent₁ _≤_ f cong₁+mono₁-<⇒mono₁-≤ cong mono (inj₁ x_ → f Preserves _≤_ ⟶ _≥_ cong₁+anti-mono₁-<⇒anti-mono₁-≤ cong anti-mono (inj₁ x (<⇒≱ fx (<⇒≱ x_ → Injective _≤_ _≥_ f anti-mono₁-<⇒anti-cancel₁-≤ anti-mono fx≥fy = ≮⇒≥ (≤⇒≯ fx≥fy ∘ anti-mono) anti-mono₁-≤⇒anti-cancel₁-< : f Preserves _≤_ ⟶ _≥_ → Injective _<_ _>_ f anti-mono₁-≤⇒anti-cancel₁-< anti-mono fx>fy = ≰⇒> (<⇒≱ fx>fy ∘ anti-mono) mono₁-<⇒cancel₁ : Congruent₁ _<_ f → Injective _≈_ _≈_ f mono₁-<⇒cancel₁ mono fx≈fy = ≮∧≯⇒≈ (<-irrefl fx≈fy ∘ mono) (<-irrefl (Eq.sym fx≈fy) ∘ mono) anti-mono₁-<⇒cancel₁ : f Preserves _<_ ⟶ _>_ → Injective _≈_ _≈_ f anti-mono₁-<⇒cancel₁ anti-mono fx≈fy = ≮∧≯⇒≈ (<-irrefl (Eq.sym fx≈fy) ∘ anti-mono) (<-irrefl fx≈fy ∘ anti-mono) ---- -- Consequences for a single binary operation module _ {_∙_ : Op₂ A} where invariant⇒mono-< : Invariant _<_ _∙_ → Congruent₂ _<_ _∙_ invariant⇒mono-< (invˡ , invʳ) {x} {y} {u} {v} x