-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merge: More things in the lib, handle empty patterns (#1095)
- Loading branch information
Showing
6 changed files
with
55 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
public open import arith::nat::base | ||
public open import arith::nat::properties |
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
16 changes: 16 additions & 0 deletions
16
cli-impl/src/test/resources/shared/src/arith/nat/properties.aya
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,16 @@ | ||
open import arith::nat::base | ||
open import data::empty | ||
open import paths | ||
|
||
private def diag Nat : Type | ||
| 0 => Nat | ||
| suc a => Empty | ||
|
||
def z≠s {a : Nat} (p : 0 = suc a) : Empty => coe 0 1 (\i => diag (p i)) a | ||
|
||
private def suc-inj Nat : Nat | ||
| 0 => 114514 | ||
| suc m => m | ||
|
||
def s=s {m n : Nat} (p : suc m = suc n) : m = n => (\i => suc-inj (p i)) | ||
|
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,4 @@ | ||
inductive Empty | ||
variable A : Type | ||
|
||
def exfalso Empty : A | () |
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