Created
October 24, 2018 19:15
-
-
Save thosakwe/e8f89c1ca6ef3b998a89908a627aa238 to your computer and use it in GitHub Desktop.
Proof-based language
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
property transitive { | |
let r(a) : Relation on a. | |
let x, y, z : in r. | |
assume (x, y) in r. | |
assume (y, z) in r. | |
declare (x, z) in r. | |
} |
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
law DeMorgan { | |
let a : Bool. | |
let b : Bool. | |
declare ~(a | b) == (~a & ~b). | |
} | |
proof main proves ~(x | y) { | |
val x = True. | |
val y = True. | |
val z = print(~(x | y)). | |
} |
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
property symmetric { | |
let r(a) : Relation on a. | |
declare every a, b[ | |
if (a, b) in r | |
then (b, a) in r | |
]. | |
} | |
// Proofs can be anonymous. | |
proof proves if (a, b) in r then (a, b) in r^-1 { | |
let r(a): Relation on a. | |
let a, b : in r. | |
assume (a, b) in r. | |
(b, a) in r. | |
(a, b) in r^-1. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment