{-# OPTIONS --safe --cubical-compatible --guardedness --exact-split --double-check #-}
module Real.Interval.Reasoning where
open import Data.Rational using (ℚ; _≤_; _<_)
open import Data.Rational.Properties using
(≤-refl; ≤-reflexive; ≤-trans; <-trans; <-≤-trans; ≤-<-trans)
open import Relation.Binary.PropositionalEquality using (_≡_)
infix 1 begin≤_ begin<_
infixr 2 _≈⟨_⟩_ _≤⟨_⟩_ _≤⟨_⟩<_ _<⟨_⟩<_ _<⟨_⟩≤[_]
infix 3 _≤∎
begin≤_ : ∀ {x y : ℚ} → x ≤ y → x ≤ y
begin≤ x≤y = x≤y
begin<_ : ∀ {x y : ℚ} → x < y → x < y
begin< x<y = x<y
_≈⟨_⟩_ : ∀ (x {y z} : ℚ) → x ≡ y → y ≤ z → x ≤ z
x ≈⟨ p ⟩ q = ≤-trans (≤-reflexive p) q
_≤⟨_⟩_ : ∀ (x {y z} : ℚ) → x ≤ y → y ≤ z → x ≤ z
x ≤⟨ p ⟩ q = ≤-trans p q
_≤∎ : ∀ (x : ℚ) → x ≤ x
x ≤∎ = ≤-refl
_≤⟨_⟩<_ : ∀ (x {y z} : ℚ) → x ≤ y → y < z → x < z
x ≤⟨ p ⟩< q = ≤-<-trans p q
_<⟨_⟩<_ : ∀ (x {y z} : ℚ) → x < y → y < z → x < z
x <⟨ p ⟩< q = <-trans p q
_<⟨_⟩≤[_] : ∀ (x {y z} : ℚ) → x < y → y ≤ z → x < z
x <⟨ p ⟩≤[ q ] = <-≤-trans p q