Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
63d6ca0
basic result
jamesmckinna Oct 7, 2023
d549c62
added missing lemma; is there a better name for this?
jamesmckinna Oct 7, 2023
60d22e6
renamed lemma
jamesmckinna Oct 7, 2023
ec09669
final tidying up; `CHANGELOG`
jamesmckinna Oct 7, 2023
26dfcc5
final tidying up
jamesmckinna Oct 7, 2023
00e0083
missing `CHANGELOG` entry
jamesmckinna Oct 7, 2023
c1b3ed9
`InfiniteDescent` definition and proof
jamesmckinna Oct 8, 2023
d310349
revised `InfiniteDescent` definition and proof
jamesmckinna Oct 8, 2023
b028dc9
major revision: renames things, plus additional corollaries
jamesmckinna Oct 9, 2023
8dec2ee
spacing
jamesmckinna Oct 9, 2023
17cc4b4
added `NoSmallestCounterExample` principles for `Stable` predicates
jamesmckinna Oct 15, 2023
fb8480b
refactoring; move `Stable` to `Relation.Unary`
jamesmckinna Oct 15, 2023
96175ed
refactoring; remove explicit definition of `CounterExample`
jamesmckinna Oct 15, 2023
e37fe2a
refactoring; rename qualified `import`
jamesmckinna Oct 15, 2023
596aac2
[fixes #2130] Moving `Properties.HeytingAlgebra` from `Relation.Binar…
jamesmckinna Oct 11, 2023
e06c02a
[fixes #2127] Fixes #1930 `import` bug (#2128)
jamesmckinna Oct 11, 2023
eee9f58
[fixes #1214] Add negated ordering relation symbols systematically to…
jamesmckinna Oct 12, 2023
81a7b28
Refactoring (inversion) properties of `_<_` on `Nat`, plus consequenc…
jamesmckinna Oct 12, 2023
d39b849
Bump CI tests to Agda-2.6.4 (#2134)
MatthewDaggitt Oct 12, 2023
cb92af1
Remove `Algebra.Ordered` (#2133)
MatthewDaggitt Oct 12, 2023
135951f
[ fix ] missing name in LICENCE file (#2139)
gallais Oct 12, 2023
a843d0d
Add new blocking primitives to `Reflection.TCM` (#1972)
plt-amy Oct 13, 2023
aa6ef23
Change definition of `IsStrictTotalOrder` (#2137)
MatthewDaggitt Oct 13, 2023
6e375c2
Add _<$>_ operator for Function bundle (#2144)
MatthewDaggitt Oct 14, 2023
222c238
[ fix #2086 ] new web deployment strategy (#2147)
gallais Oct 14, 2023
347a079
[ admin ] fix sorting logic (#2151)
gallais Oct 15, 2023
d91e21d
Add coincidence law to modules (#1898)
Taneb Oct 16, 2023
010498b
Make reasoning modular by adding new `Reasoning.Syntax` module (#2152)
MatthewDaggitt Oct 16, 2023
9bf34e0
Fixes typos identified in #2154 (#2158)
jamesmckinna Oct 16, 2023
b0c95bc
tackles #2124 as regards `case_return_of_` (#2157)
jamesmckinna Oct 16, 2023
ef66f77
Rename preorder ~ relation reasoning combinators (#2156)
MatthewDaggitt Oct 16, 2023
33811e5
Move ≡-Reasoning from Core to Properties and implement using syntax (…
MatthewDaggitt Oct 17, 2023
cc0749c
Add consistent deprecation warnings to old function hierarchy (#2163)
MatthewDaggitt Oct 18, 2023
fe5fddc
Rename symmetric reasoning combinators. Minimal set of changes (#2160)
MatthewDaggitt Oct 19, 2023
6367fd5
Restore 'return' as an alias for 'pure' (#2164)
MatthewDaggitt Oct 19, 2023
ce4bd12
[ fix #2153 ] Properly re-export specialised combinators (#2161)
gallais Oct 19, 2023
c5a3693
Connect `LeftInverse` with (`Split`)`Surjection` (#2054)
laMudri Oct 19, 2023
eb5f308
Added remaining flipped and negated relations to binary relation bund…
MatthewDaggitt Oct 19, 2023
aeed7d5
Tidy up CHANGELOG in preparation for release candidate (#2165)
MatthewDaggitt Oct 19, 2023
d2e94ef
Spellcheck CHANGELOG (#2167)
jamesmckinna Oct 20, 2023
0befc0d
Fixed Agda version typo in README (#2176)
jamesmckinna Oct 21, 2023
cd34417
Fixed in deprecation warning for `<-transˡ` (#2173)
jamesmckinna Oct 21, 2023
496eded
Bump Haskell CI (original!) to latest minor GHC versions (#2187)
andreasabel Nov 1, 2023
2fda34d
[fixes #2175] Documentation misc. typos etc. for RC1 (#2183)
jamesmckinna Nov 1, 2023
188f74c
[fixes #2178] regularise and specify/systematise, the conventions for…
jamesmckinna Nov 1, 2023
200ef72
Move `T?` to `Relation.Nullary.Decidable.Core` (#2189)
MatthewDaggitt Nov 1, 2023
9be7cea
Make decidable versions of sublist functions the default (#2186)
MatthewDaggitt Nov 3, 2023
8270e59
Merge branch 'master' into NoInfiniteDescent
jamesmckinna Nov 4, 2023
a45f04d
new `CHANGELOG`
jamesmckinna Dec 14, 2023
10fa8ed
Merge branch 'master' into NoInfiniteDescent
jamesmckinna Dec 14, 2023
fe3123d
Merge branch 'master' into NoInfiniteDescent
jamesmckinna Dec 14, 2023
0c2288f
resolved merge conflict
jamesmckinna Dec 17, 2023
d074a0d
resolved merge conflict, this time
jamesmckinna Dec 17, 2023
5e66965
revised in line with review comments
jamesmckinna Dec 31, 2023
9de7d0f
Merge branch 'master' into NoInfiniteDescent
jamesmckinna Dec 31, 2023
2f1fa64
tweaked `export`s; does that fix things now?
jamesmckinna Dec 31, 2023
0295bb7
Merge branch 'master' into NoInfiniteDescent
jamesmckinna Jan 31, 2024
cc280a4
Merge branch 'master' into NoInfiniteDescent
MatthewDaggitt Feb 25, 2024
4518858
Fix merge mistake
MatthewDaggitt Feb 25, 2024
f84d319
Refactored to remove a indirection and nested modules
MatthewDaggitt Feb 25, 2024
7bc76dd
Touch up names
MatthewDaggitt Feb 25, 2024
88452ff
Reintroduce anonymous module for descent
MatthewDaggitt Feb 25, 2024
07f1a00
cosmetics asper final comment
jamesmckinna Feb 26, 2024
e3fa327
Merge branch 'master' into NoInfiniteDescent
MatthewDaggitt Mar 16, 2024
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
30 changes: 20 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ Non-backwards compatible changes
with the consequence that all arguments involving about accesibility and
wellfoundedness proofs were polluted by almost-always-inferrable explicit
arguments for the `y` position. The definition has now been changed to
make that argument *implicit*, as
make that argument *implicit*, as
```agda
WfRec : Rel A r → ∀ {ℓ} → RecStruct A ℓ _
WfRec _<_ P x = ∀ {y} → y < x → P y
Expand All @@ -621,7 +621,7 @@ Non-backwards compatible changes
raw bundles to `Data.X.Base`, this definition can now be made directly. Knock-on
consequences include the need to retain the old constructor name, now introduced
as a pattern synonym, and introduction of (a function equivalent to) the former
field name/projection function `proof` as `≤″-proof` in `Data.Nat.Properties`.
field name/projection function `proof` as `≤″-proof` in `Data.Nat.Properties`.

* Accordingly, the definition has been changed to:
```agda
Expand Down Expand Up @@ -879,12 +879,12 @@ Non-backwards compatible changes
```
_─_ ↦ removeAt
```

* In `Data.Vec.Base`:
```agda
insert ↦ insertAt
remove ↦ removeAt

updateAt : Fin n → (A → A) → Vec A n → Vec A n
updateAt : Vec A n → Fin n → (A → A) → Vec A n
Expand All @@ -895,12 +895,12 @@ Non-backwards compatible changes
remove : Fin (suc n) → Vector A (suc n) → Vector A n
removeAt : Vector A (suc n) → Fin (suc n) → Vector A n

updateAt : Fin n → (A → A) → Vector A n → Vector A n
updateAt : Vector A n → Fin n → (A → A) → Vector A n
```

* The old names (and the names of all proofs about these functions) have been deprecated appropriately.

### Changes to triple reasoning interface
Expand All @@ -925,7 +925,7 @@ Non-backwards compatible changes
Data.Vec.Relation.Binary.Lex.NonStrict
Relation.Binary.Reasoning.StrictPartialOrder
Relation.Binary.Reasoning.PartialOrder
```
```

### Other

Expand Down Expand Up @@ -1103,7 +1103,7 @@ Non-backwards compatible changes
* `excluded-middle` in `Relation.Nullary.Decidable.Core` has been renamed to
`¬¬-excluded-middle`.

* `iterate` and `replicate` in `Data.Vec.Base` and `Data.Vec.Functional`
* `iterate` and `replicate` in `Data.Vec.Base` and `Data.Vec.Functional`
now take the length of vector, `n`, as an explicit rather than an implicit argument.
```agda
iterate : (A → A) → A → ∀ n → Vec A n
Expand Down Expand Up @@ -1658,7 +1658,7 @@ Deprecated names
take-drop-id ↦ take++drop≡id

map-insert ↦ map-insertAt

insert-lookup ↦ insertAt-lookup
insert-punchIn ↦ insertAt-punchIn
remove-PunchOut ↦ removeAt-punchOut
Expand All @@ -1684,7 +1684,7 @@ Deprecated names
updateAt-cong-relative ↦ updateAt-cong-local

map-updateAt ↦ map-updateAt-local

insert-lookup ↦ insertAt-lookup
insert-punchIn ↦ insertAt-punchIn
remove-punchOut ↦ removeAt-punchOut
Expand Down Expand Up @@ -1904,6 +1904,11 @@ New modules
Function.Properties.Surjection
```

* The 'no infinite descent' principle for (accessible elements of) well-founded relations:
```
Induction.NoInfiniteDescent
```

* In order to improve modularity, the contents of `Relation.Binary.Lattice` has been
split out into the standard:
```
Expand Down Expand Up @@ -3162,6 +3167,11 @@ Additions to existing modules
_⋆ : _⟶₁_ ⇒ SymClosure _⟶₂_ → SymClosure _⟶₁_ ⇒ SymClosure _⟶₂_
```

* Added new proof in `Relation.Binary.Construct.Closure.Transitive`:
```
transitive⁻ : Transitive _∼_ → TransClosure _∼_ ⇒ _∼_
```

* Added new proofs to `Relation.Binary.Lattice.Properties.{Join,Meet}Semilattice`:
```agda
isPosemigroup : IsPosemigroup _≈_ _≤_ _∨_
Expand Down
81 changes: 81 additions & 0 deletions src/Induction/NoInfiniteDescent.agda
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
------------------------------------------------------------------------
-- The Agda standard library
--
-- A standard consequence of accessibility/well-foundedness:
-- the impossibility of 'infinite descent' from any (accessible)
-- element x satisfying P to 'smaller' y also satisfying P
------------------------------------------------------------------------

{-# OPTIONS --cubical-compatible --safe #-}

module Induction.NoInfiniteDescent where

open import Data.Product.Base using (_,_; ∃-syntax; _×_)
open import Function.Base using (_∘_)
open import Induction.WellFounded using (WellFounded; Acc; acc-inverse; module Some)
open import Level using (Level)
open import Relation.Binary.Core using (Rel)
open import Relation.Nullary.Negation.Core using (¬_)
open import Relation.Unary using (Pred; _∩_)

private
variable
a r ℓ : Level
A : Set a

------------------------------------------------------------------------
-- Definitions

module InfiniteDescent (_<_ : Rel A r) (P : Pred A ℓ) where

DescentAt : Pred A _
DescentAt x = P x ∃[ y ] y < x × P y

InfiniteDescent : Set _
InfiniteDescent = {x} DescentAt x

AccInfiniteDescent : Set _
AccInfiniteDescent = {x} Acc _<_ x DescentAt x

------------------------------------------------------------------------
-- Basic result: assumes unrestricted descent

module Lemma (descent : InfiniteDescent) where

accNoInfiniteDescent : {x} Acc _<_ x ¬ (P x)
accNoInfiniteDescent = Some.wfRec (¬_ ∘ P)
(λ _ hy py let z , z<y , pz = descent py in hy z<y pz) _

wfNoInfiniteDescent : WellFounded _<_ {x} ¬ (P x)
wfNoInfiniteDescent wf = accNoInfiniteDescent (wf _)

------------------------------------------------------------------------
-- Extended result: assumes descent only for accessible elements

module _ {_<_ : Rel A r} (P : Pred A ℓ) where

open InfiniteDescent _<_ P hiding (module Lemma)

module Corollary (descent : AccInfiniteDescent) where

accNoInfiniteDescent : {x} Acc _<_ x ¬ (P x)
accNoInfiniteDescent ax px = ID∩.Lemma.accNoInfiniteDescent descent∩ ax (px , ax)

where
P∩Acc : Pred A _
P∩Acc = P ∩ (Acc _<_)

module ID∩ = InfiniteDescent _<_ P∩Acc

descent∩ : ID∩.InfiniteDescent
descent∩ (px , ax) = let y , y<x , py = descent ax px in
y , y<x , py , acc-inverse ax y<x

wfNoInfiniteDescent : WellFounded _<_ {x} ¬ (P x)
wfNoInfiniteDescent wf = accNoInfiniteDescent (wf _)

------------------------------------------------------------------------
-- Exports

open InfiniteDescent public using (InfiniteDescent; AccInfiniteDescent; module Lemma)
open Corollary public
7 changes: 7 additions & 0 deletions src/Relation/Binary/Construct/Closure/Transitive.agda
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@ module _ (_∼_ : Rel A ℓ) where
transitive : Transitive _∼⁺_
transitive = _++_

transitive⁻ : Transitive _∼_ → _∼⁺_ ⇒ _∼_
transitive⁻ trans = ∼⁺⊆∼
where
∼⁺⊆∼ : _∼⁺_ ⇒ _∼_
∼⁺⊆∼ [ x∼y ] = x∼y
∼⁺⊆∼ (x∼y ∷ x∼⁺y) = trans x∼y (∼⁺⊆∼ x∼⁺y)

accessible⁻ : ∀ {x} → Acc _∼⁺_ x → Acc _∼_ x
accessible⁻ = ∼⊆∼⁺.accessible

Expand Down