-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e9a6009
commit 021f77a
Showing
2 changed files
with
39 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module test082; | ||
|
||
trait | ||
type Suc (a : Type) := mkSuc a; | ||
|
||
trait | ||
type Zero := mkZero; | ||
|
||
trait | ||
type Add (a : Type) (b : Type) := mkAdd a b; | ||
|
||
instance | ||
addZeroI {B} {b : B} : Add Zero B := mkAdd mkZero b; | ||
|
||
instance | ||
addSucI {B} {b : B} {{Add Zero B}} : Add (Suc Zero) B := mkAdd (mkSuc mkZero) b; |
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 @@ | ||
module test083; | ||
|
||
trait | ||
type Suc (a : Type) := mkSuc a; | ||
|
||
trait | ||
type Zero := mkZero; | ||
|
||
trait | ||
type Add (a : Type) (b : Type) := mkAdd a b; | ||
|
||
trait | ||
type Add' (a : Type) (b : Type) := mkAdd' a b; | ||
|
||
|
||
instance | ||
addZeroI {B} {b : B} : Add Zero B := mkAdd mkZero b; | ||
|
||
instance | ||
addSucI' {B} {b : B} {{Add' (Suc Zero) B}} : Add (Suc Zero) B := mkAdd (mkSuc mkZero) b; | ||
|
||
instance | ||
addSucI {B} {b : B} {{Add Zero B}} : Add (Suc Zero) B := mkAdd (mkSuc mkZero) b; |