-
Notifications
You must be signed in to change notification settings - Fork 1
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
Jean-Philippe Bernardy
committed
Oct 24, 2023
1 parent
95e40c3
commit def7f96
Showing
6 changed files
with
90 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,3 @@ | ||
module All where | ||
import Simple | ||
import SimpleEnum |
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 Simple where | ||
|
||
open import SimpleLib | ||
|
||
Theorem1 : Set | ||
Theorem1 = A -> B | ||
|
||
theorem : Theorem1 | ||
theorem = lemma1 | ||
|
||
theorem1 : A -> B | ||
theorem1 = lemma1 | ||
|
||
Theorem2 : Set | ||
Theorem2 = B -> A | ||
|
||
theorem2 : B -> C | ||
theorem2 = lemma2 | ||
|
||
theorem3 : A -> C | ||
theorem3 x = lemma2 (lemma1 x) | ||
|
||
|
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,14 @@ | ||
module SimpleEnum where | ||
|
||
open import SimpleEnumLib | ||
|
||
theorem : A -> B | ||
theorem = lemma1 | ||
|
||
theorem2 : B -> C | ||
theorem2 = lemma2 | ||
|
||
theorem3 : A -> C | ||
theorem3 x = lemma2 (lemma1 x) | ||
|
||
|
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,19 @@ | ||
module SimpleEnumLib where | ||
|
||
data A : Set where | ||
aa : A | ||
|
||
data B : Set where | ||
bb bb1 : B | ||
|
||
data C : Set where | ||
cc cc2 cc3 : C | ||
|
||
lemma1 : A -> B | ||
lemma1 aa = bb | ||
|
||
lemma2 : B -> C | ||
lemma2 bb = cc | ||
lemma2 bb1 = cc2 | ||
|
||
|
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,25 @@ | ||
module SimpleLib where | ||
|
||
data A : Set where | ||
aa : A | ||
-- in the nominal approach (which is true to Agda), it is as if we had: | ||
|
||
-- A : Set | ||
-- A = <name "A"> | ||
|
||
-- aa : A | ||
-- aa = <name "aa"> | ||
|
||
data B : Set where | ||
bb : B | ||
|
||
data C : Set where | ||
cc : C | ||
|
||
lemma1 : A -> B | ||
lemma1 aa = bb | ||
|
||
lemma2 : B -> C | ||
lemma2 bb = cc | ||
|
||
|