From 6c3702b9ab5abe2a6bcf61a4c63a3e20bc7a87c8 Mon Sep 17 00:00:00 2001 From: favonia Date: Fri, 24 Nov 2023 11:59:50 -0600 Subject: [PATCH] fix(StrictOrder): remove trichotomy --- .../Algebra/Displacement/FiniteSupport.agda | 43 +++++----- .../Algebra/Displacement/NearlyConstant.agda | 83 ++++++++----------- src/Mugen/Order/StrictOrder.agda | 25 ------ 3 files changed, 57 insertions(+), 94 deletions(-) diff --git a/src/Mugen/Algebra/Displacement/FiniteSupport.agda b/src/Mugen/Algebra/Displacement/FiniteSupport.agda index 030fe87..4a79373 100644 --- a/src/Mugen/Algebra/Displacement/FiniteSupport.agda +++ b/src/Mugen/Algebra/Displacement/FiniteSupport.agda @@ -27,11 +27,10 @@ open import Mugen.Data.List -- These are a special case of the Nearly Constant functions where the base is always Ξ΅ -- and are implemented as such. -module FinSupport {o r} (π’Ÿ : Displacement-algebra o r) (cmp : βˆ€ x y β†’ Tri (Displacement-algebra._<_ π’Ÿ) x y) where +module FinSupport {o r} (π’Ÿ : Displacement-algebra o r) (_≑?_ : Discrete ⌞ π’Ÿ ⌟) where private module π’Ÿ = Displacement-algebra π’Ÿ - open π’Ÿ using (Ξ΅; _βŠ—_) - module 𝒩 = NearlyConst π’Ÿ cmp + module 𝒩 = NearlyConst π’Ÿ _≑?_ -------------------------------------------------------------------------------- -- Finite Support Lists @@ -47,7 +46,7 @@ module FinSupport {o r} (π’Ÿ : Displacement-algebra o r) (cmp : βˆ€ x y β†’ Tri open 𝒩.SupportList support public field - is-Ξ΅ : base ≑ Ξ΅ + is-Ξ΅ : base ≑ π’Ÿ.Ξ΅ open FinSupportList @@ -63,12 +62,12 @@ module FinSupport {o r} (π’Ÿ : Displacement-algebra o r) (cmp : βˆ€ x y β†’ Tri FinSupportList-is-set = is-hlevel≃ 2 (Isoβ†’Equiv eqv) $ Ξ£-is-hlevel 2 𝒩.SupportList-is-set Ξ» support β†’ - is-hlevel-suc 2 π’Ÿ.has-is-set (𝒩.SupportList.base support) Ξ΅ + is-hlevel-suc 2 π’Ÿ.has-is-set (𝒩.SupportList.base support) π’Ÿ.Ξ΅ merge-fin : FinSupportList β†’ FinSupportList β†’ FinSupportList merge-fin xs ys .FinSupportList.support = 𝒩.merge (xs .support) (ys .support) merge-fin xs ys .FinSupportList.is-Ξ΅ = - 𝒩.base-merge (xs .support) (ys .support) βˆ™ apβ‚‚ _βŠ—_ (xs .is-Ξ΅) (ys .is-Ξ΅) βˆ™ π’Ÿ.idl + 𝒩.base-merge (xs .support) (ys .support) βˆ™ apβ‚‚ π’Ÿ._βŠ—_ (xs .is-Ξ΅) (ys .is-Ξ΅) βˆ™ π’Ÿ.idl empty-fin : FinSupportList empty-fin .support = 𝒩.empty @@ -83,10 +82,10 @@ module FinSupport {o r} (π’Ÿ : Displacement-algebra o r) (cmp : βˆ€ x y β†’ Tri -------------------------------------------------------------------------------- -- Displacement Algebra -module _ {o r} (π’Ÿ : Displacement-algebra o r) (cmp : βˆ€ x y β†’ Tri (Displacement-algebra._<_ π’Ÿ) x y) where - open FinSupport π’Ÿ cmp +module _ {o r} (π’Ÿ : Displacement-algebra o r) (_≑?_ : Discrete ⌞ π’Ÿ ⌟) where + open FinSupport π’Ÿ _≑?_ open FinSupportList - private module π’©π’Ÿ = Displacement-algebra (NearlyConstant π’Ÿ cmp) + private module π’©π’Ÿ = Displacement-algebra (NearlyConstant π’Ÿ _≑?_) FiniteSupport : Displacement-algebra o (o βŠ” r) FiniteSupport = to-displacement-algebra mk where @@ -116,11 +115,11 @@ module _ {o r} {π’Ÿ : Displacement-algebra o r} (let module π’Ÿ = Displacement-algebra π’Ÿ) - (cmp : βˆ€ x y β†’ Tri π’Ÿ._<_ x y) + (_≑?_ : Discrete ⌞ π’Ÿ ⌟) where - open FinSupport π’Ÿ cmp + open FinSupport π’Ÿ _≑?_ - FinSupportβŠ†NearlyConstant : is-displacement-subalgebra (FiniteSupport π’Ÿ cmp) (NearlyConstant π’Ÿ cmp) + FinSupportβŠ†NearlyConstant : is-displacement-subalgebra (FiniteSupport π’Ÿ _≑?_) (NearlyConstant π’Ÿ _≑?_) FinSupportβŠ†NearlyConstant = to-displacement-subalgebra mk where mk : make-displacement-subalgebra _ _ mk .make-displacement-subalgebra.into = FinSupportList.support @@ -129,11 +128,11 @@ module _ mk .make-displacement-subalgebra.strictly-mono _ _ xs