Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -443,3 +443,9 @@ Additions to existing modules
StarRightDestructive : ∀ (_+_ _*_ : Fun₂ A) (_⋆ : Fun₁ A) → Set _
StarDestructive : ∀ (_+_ _*_ : Fun₂ A) (_⋆ : Fun₁ A) → Set _
```

* In `Relation.Binary.Reasoning.PartialOrder`:
```agda
antisym-syntax = antisym
syntax antisym-syntax x≤y y≤x = x≤y ⟨⟩ y≤x
```
15 changes: 10 additions & 5 deletions src/Algebra/Properties/KleeneAlgebra.agda
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,16 @@ x⋆≈1+xx⋆ x = ≤-antisym (⋆-elimˡ (x≤x+y _ _) $ begin
1# + x * x ⋆ ∎) $ starExpansiveʳ _

x⋆≈1+x⋆x : ∀ x → x ⋆ ≈ 1# + x ⋆ * x
x⋆≈1+x⋆x x = ≤-antisym (⋆-elimʳ (x≤x+y _ _) $ begin
(1# + x ⋆ * x) * x ≤⟨ *-monoʳ _ $ +-monoˡ _ $ x⋆x≤x⋆ _ ⟩
(1# + x ⋆) * x ≈⟨ *-congʳ (1+x⋆≈x⋆ _) ⟩
x ⋆ * x ≤⟨ y≤x+y _ _ ⟩
1# + x ⋆ * x ∎) $ starExpansiveˡ _
x⋆≈1+x⋆x x = begin-equality
x ⋆ ≈⟨ ⋆-elimʳ (x≤x+y _ _) lemma ⟨⟩ starExpansiveˡ _ ⟩
1# + x ⋆ * x ∎
where
lemma : (1# + x ⋆ * x) * x ≤ 1# + x ⋆ * x
lemma = begin
(1# + x ⋆ * x) * x ≤⟨ *-monoʳ _ $ +-monoˡ _ $ x⋆x≤x⋆ _ ⟩
(1# + x ⋆) * x ≈⟨ *-congʳ (1+x⋆≈x⋆ _) ⟩
x ⋆ * x ≤⟨ y≤x+y _ _ ⟩
1# + x ⋆ * x ∎

-- special cases for 0# and 1#

Expand Down
4 changes: 4 additions & 0 deletions src/Relation/Binary/Reasoning/PartialOrder.agda
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
{-# OPTIONS --without-K --safe #-}

open import Relation.Binary.Bundles using (Poset)
--open import Relation.Binary.Structures using (IsPartialOrder)

module Relation.Binary.Reasoning.PartialOrder
{p₁ p₂ p₃} (P : Poset p₁ p₂ p₃) where
Expand All @@ -49,6 +50,9 @@ open import Relation.Binary.Construct.NonStrictToStrict _≈_ _≤_
as Strict
using (_<_)

antisym-syntax = antisym
syntax antisym-syntax x≤y y≤x = x≤y ⟨⟩ y≤x

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So... I suppose something like

Suggested change
syntax antisym-syntax x≤y y≤x = x≤y ⟨⟩ y≤x
syntax antisym-syntax x≤y y≤x = x≤y ≤≥ y≤x

might achieve greater consensus?


------------------------------------------------------------------------
-- Re-export contents of base module

Expand Down
Loading