Skip to content

Instantly share code, notes, and snippets.

@tyabu12
Created April 1, 2018 16:12
Show Gist options
  • Save tyabu12/96368cb1dfd3e2e342651b6c9e6fcfc2 to your computer and use it in GitHub Desktop.
Save tyabu12/96368cb1dfd3e2e342651b6c9e6fcfc2 to your computer and use it in GitHub Desktop.
theory Situation
type person = A | B | C
type status = Honest | Liar
function status (person) : status
axiom Honest_is_the_only_one:
(status A = Honest /\ status B = Liar /\ status C = Liar) \/
(status A = Liar /\ status B = Honest /\ status C = Liar) \/
(status A = Liar /\ status B = Liar /\ status C = Honest)
(* aが「bはsだ」と言った *)
predicate evidence (a b : person) (s : status) =
if status a = Honest then status b = s else status b <> s
(* A「私は正直者です。」 *)
axiom evidence_A: evidence A A Honest
(* B「Aはうそつきです。私が正直者です。」 *)
axiom evidence_B: evidence B A Liar /\ evidence B B Honest
(* C「Bはうそつきです。本当の正直者は私です。」 *)
axiom evidence_C: evidence C B Liar /\ evidence C C Honest
end
theory Goals
use import Situation
(* goal A_is_Honest: status A = Honest *)
goal B_is_Honest: status B = Honest
(* goal C_is_Honest: status C = Honest *)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment