Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ Issue 1428 ] Parametrized size postulates considered harmful.
- Loading branch information
1 parent
7c0b70b
commit f2740b9
Showing
3 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
-- Andreas, 2015-03-17 | ||
|
||
open import Common.Size | ||
|
||
data ⊥ : Set where | ||
|
||
data D (i : Size) : Set where | ||
c : Size< i → D i | ||
|
||
-- This definition of size predecessor should be forbidden... | ||
module _ (i : Size) where | ||
postulate | ||
pred : Size< i | ||
|
||
-- ...otherwise the injectivity test loops here. | ||
iter : ∀ i → D i → ⊥ | ||
iter i (c j) = iter j (c (pred j)) | ||
|
||
loop : Size → ⊥ | ||
loop i = iter i (c (pred i)) | ||
|
||
absurd : ⊥ | ||
absurd = loop ∞ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Issue1428c.agda:8,5-19 | ||
We don't like postulated sizes in parametrized modules. |