{-# OPTIONS --cubical --safe --guardedness #-} -- Sprint 5 / real arithmetic: NEGATION on the analytic real line. The first -- real-arithmetic operation -- (-ℝ x) just swaps and flips x's two cuts, so each -- Dedekind-cut law follows from x's own law by symmetry. This is the on-ramp to -- Dedekind addition and, ultimately, φ as a located real. No postulates. module corpus.cubical_agda.RealCohesion.RealNegation where open import Cubical.Foundations.Prelude open import Cubical.Data.Rationals open import Cubical.Data.Rationals.Order using (_<_; <-+o-cancel) -- the order-flip: q < r ⟹ - r < - q. neg-flip : (q r : ℚ) → q < r → (- r) < (- q) neg-flip q r q