Last active
March 28, 2017 05:57
-
-
Save zelinskiy/14b167d6af849efb52bc353b6c9c187f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| module lol where | |
| open import Level | |
| open import Relation.Binary.Core | |
| --------------BOOL--------------------------------------- | |
| data πΉ : Set where | |
| tt : πΉ | |
| ff : πΉ | |
| infix 7 Β¬_ | |
| Β¬_ : πΉ β πΉ | |
| Β¬ tt = ff | |
| Β¬ ff = tt | |
| if_then_else_ : β {β} {A : Set β} β πΉ β A β A β A | |
| if tt then aβ else aβ = aβ | |
| if ff then aβ else aβ = aβ | |
| infixl 5 _β§_ | |
| _β§_ : πΉ β πΉ β πΉ | |
| tt β§ tt = tt | |
| a β§ b = ff | |
| infixl 4 _β¨_ | |
| _β¨_ : πΉ β πΉ β πΉ | |
| tt β¨ b = tt | |
| ff β¨ b = b | |
| infixl 5 _β_ | |
| _β_ : πΉ β πΉ β πΉ | |
| tt β b = tt | |
| a β tt = tt | |
| a β b = ff | |
| ¬¬-elim : β (x : πΉ) β Β¬ Β¬ x β‘ x | |
| ¬¬-elim tt = refl | |
| ¬¬-elim ff = refl | |
| β§-refl : β (x : πΉ) β x β§ x β‘ x | |
| β§-refl tt = refl | |
| β§-refl ff = refl | |
| β§-elimβ : β {x y} β x β§ y β‘ tt β x β‘ tt | |
| β§-elimβ {tt} proof = refl | |
| β§-elimβ {ff} () | |
| β§-elimβ : β {x y} β x β§ y β‘ tt β y β‘ tt | |
| β§-elimβ {tt} {tt} proof = refl | |
| β§-elimβ {tt} {ff} () | |
| β§-elimβ {ff} () | |
| β¨-β§-absorp : β {a b} β (a β¨ (a β§ b)) β‘ tt β a β‘ tt | |
| β¨-β§-absorp {tt} p = refl | |
| β¨-β§-absorp {ff} () | |
| β§-β¨-absorp : β {a b} β (a β§ (a β¨ b)) β‘ tt β a β‘ tt | |
| β§-β¨-absorp {tt} p = refl | |
| β§-β¨-absorp {ff} () | |
| β§-comm : β {a b} β (a β§ b) β‘ tt β (b β§ a) β‘ tt | |
| β§-comm {tt} {tt} p = refl | |
| β§-comm {tt} {ff} () | |
| β§-comm {ff} () | |
| β¨-comm : β {a b} β (a β¨ b) β‘ tt β (b β¨ a) β‘ tt | |
| β¨-comm {tt} {tt} p = refl | |
| β¨-comm {tt} {ff} p = refl | |
| β¨-comm {ff} {tt} p = refl | |
| β¨-comm {ff} {ff} () | |
| --------------NATS--------------------------------------- | |
| data β : Set where | |
| β€ : β | |
| π : β β β | |
| infixl 5 _+_ | |
| _+_ : β β β β β | |
| a + β€ = a | |
| a + (π b) = (π a) + b | |
| infixl 3 _>_ | |
| _>_ : β β β β πΉ | |
| β€ > (π x) = ff | |
| (π x) > β€ = tt | |
| (π a) > (π b) = a > b | |
| β€ > β€ = ff | |
| infixl 3 _β₯_ | |
| _β₯_ : β β β β πΉ | |
| β€ β₯ β€ = tt | |
| β€ β₯ (π x) = ff | |
| (π x) β₯ β€ = tt | |
| (π a) β₯ (π b) = a β₯ b | |
| infixl 2 _β_ | |
| _β_ : β β β β πΉ | |
| β€ β β€ = tt | |
| (π a) β (π b) = a β b | |
| _β_ a b = ff | |
| three : β | |
| three = π (π (π β€)) | |
| four : β | |
| four = π three | |
| --β₯-antisymm : β {a b} β (a β₯ b) β‘ tt β (b β₯ a) β‘ tt β (a β b) β‘ tt | |
| -->-implies-β₯ : β {a b} β (a > b) β‘ tt β (a β₯ b) β‘ tt | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment