Last active
December 19, 2017 16:05
-
-
Save adept/4a9db2223f593fda021903dedfa103a8 to your computer and use it in GitHub Desktop.
And is symmetric
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 andsym where | |
| Path (A : U) (a b : A) : U = PathP (<_> A) a b | |
| data bool = true | false | |
| and (x:bool) : bool -> bool = split | |
| true -> x | |
| false -> false | |
| andtrue : (x:bool) -> Path bool (and true x) x = split | |
| true -> <i> true | |
| false -> <i> false | |
| andfalse : (x:bool) -> Path bool (and false x) false = split | |
| true -> <i> false | |
| false -> <i> false | |
| andsym (a:bool) : (b:bool) -> Path bool (and a b) (and b a) = split | |
| true -> <i> andtrue a @ -i | |
| false -> <i> andfalse a @ -i |
Cимметричный вариант док-ва
andtruesym : (x:bool) -> Path bool (and true x) (and x true) = split
true -> <i> true
false -> <i> false
andfalsesym : (x:bool) -> Path bool (and false x) (and x false) = split
true -> <i> false
false -> <i> false
andsym: (a b: bool) -> Path bool (and a b) (and b a) = split
true -> andtruesym
false -> andfalsesym
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Держи рабочее док-во: