%%% ATP 2008 %%% Author: Carsten Schuermann i : type. % individuals %name i (T S). o : type. % formulas %name o (A B C) p. and : o -> o -> o. %infix right 11 and. imp : o -> o -> o. %infix right 10 imp. or : o -> o -> o. %infix right 11 or. not : o -> o. %prefix 12 not. true : o. false : o. forall : (i -> o) -> o. exists : (i -> o) -> o. % Natural deduction |- : o -> type. %prefix 11 |-. andi : |- A -> |- B -> |- (A and B). andel: |- (A and B) -> |- A. ander: |- (A and B) -> |- B. impi : (|- A -> |- B) -> |- (A imp B). impe : |- (A imp B) -> |- A -> |- B. oril : |- A -> |- (A or B). orir : |- B -> |- (A or B). ore : |- (A or B) -> (|- A -> |- C) -> (|- B -> |- C) -> |- C. noti : ({p:o}|- A -> |- p) -> |- (not A). note : |- (not A) -> |- A -> |- C. truei : |- true. falsee : |- false -> |- C. alli : ({a:i} |- A a) -> |- forall ([x] A x). alle : |- forall ([x] A x) -> {T:i} |- A T. exi : {T:i} |- A T -> |- exists ([x] A x). exe : |- exists ([x] A x) -> ({a:i} |- A a -> |- C) -> |- C. % Intercalation formulation i- : o -> type. %prefix 11 i-. e- : o -> type. %prefix 11 e-. ie : e- A -> i- A. iandi : i- A -> i- B -> i- (A and B). iandel: e- (A and B) -> e- A. iander: e- (A and B) -> e- B. iimpi : (e- A -> i- B) -> i- (A imp B). iimpe : e- (A imp B) -> i- A -> e- B. ioril : i- A -> i- (A or B). iorir : i- B -> i- (A or B). iore : e- (A or B) -> (e- A -> i- C) -> (e- B -> i- C) -> i- C. inoti : ({p:o} e- A -> i- p) -> i- (not A). inote : e- (not A) -> i- A -> i- C. itruei : i- true. ifalsee : e- false -> i- C. ialli : ({a:i} i- A a) -> i- forall ([x] A x). ialle : e- forall ([x] A x) -> {T:i} e- A T. iexi : {T:i} i- A T -> i- exists ([x] A x). iexe : e- exists ([x] A x) -> ({a:i} e- A a -> i- C) -> i- C. % Sequent formulation hyp : o -> type. %name hyp H. conc : o -> type. %name conc D. axiom : (hyp A -> conc A). andr : conc A -> conc B -> conc (A and B). andl1 : (hyp A -> conc C) -> (hyp (A and B) -> conc C). andl2 : (hyp B -> conc C) -> (hyp (A and B) -> conc C). impr : (hyp A -> conc B) -> conc (A imp B). impl : conc A -> (hyp B -> conc C) -> (hyp (A imp B) -> conc C). orr1 : conc A -> conc (A or B). orr2 : conc B -> conc (A or B). orl : (hyp A -> conc C) -> (hyp B -> conc C) -> (hyp (A or B) -> conc C). notr : ({p:o} hyp A -> conc p) -> conc (not A). notl : conc A -> (hyp (not A) -> conc C). truer : conc (true). falsel : (hyp (false) -> conc C). forallr : ({a:i} conc (A a)) -> conc (forall A). foralll : {T:i} (hyp (A T) -> conc C) -> (hyp (forall A) -> conc C). existsr : {T:i} conc (A T) -> conc (exists A). existsl : ({a:i} hyp (A a) -> conc C) -> (hyp (exists A) -> conc C). % Theorem 3.1: Soundness of normal deductions soundi : i- A -> |- A -> type. sounde : e- A -> |- A -> type. %mode (soundi +I -D) (sounde +E -D). soundi/ie : soundi (ie E) D <- sounde E D. soundi/iandi : soundi (iandi I1 I2) (andi D1 D2) <- soundi I1 D1 <- soundi I2 D2. soundi/iandel: sounde (iandel E) (andel D) <- sounde E D. soundi/iander: sounde (iander E) (ander D) <- sounde E D. soundi/iimpi : soundi (iimpi I) (impi D) <- ({u:e- A} {v:|- A} sounde u v -> soundi (I u) (D v)). soundi/iimpe : sounde (iimpe E1 I2) (impe D1 D2) <- sounde E1 D1 <- soundi I2 D2. soundi/ioril : soundi (ioril I) (oril D) <- soundi I D. soundi/iorir : soundi (iorir I) (orir D) <- soundi I D. soundi/iore : soundi (iore E1 I2 I3) (ore D1 D2 D3) <- sounde E1 D1 <- ({u:e- A} {v :|- A} sounde u v -> soundi (I2 u) (D2 v)) <- ({u:e- B} {v :|- B} sounde u v -> soundi (I3 u) (D3 v)). soundi/inoti : soundi (inoti I) (noti D) <- ({p:o}{u:e- A} {v :|- A} sounde u v -> soundi (I p u) (D p v)). soundi/inote : soundi (inote E1 I2) (note D1 D2) <- sounde E1 D1 <- soundi I2 D2. soundi/itruei : soundi itruei truei. soundi/ifalsee : soundi (ifalsee E) (falsee D) <- sounde E D. soundi/ialli : soundi (ialli I) (alli D) <- ({a:i} soundi (I a) (D a)). soundi/ialle : sounde (ialle E T) (alle D T) <- sounde E D. soundi/iexi : soundi (iexi T I) (exi T D) <- soundi I D. soundi/iexe : soundi (iexe E1 I2) (exe D1 D2) <- sounde E1 D1 <- ({a:i} {u} {v} sounde u v -> soundi (I2 a u) (D2 a v)). %block l1 : some {A:o} block {u: e- A}{v: |- A}{w:sounde u v}. %block l2 : block {p:o}. %block l3 : block {a:i}. %worlds (l1 | l2 | l3) (soundi _ _) (sounde _ _). %total (I E) (soundi I _) (sounde E _). % Theorem 3.6 seqintc : conc A -> i- A -> type. seqinth : hyp A -> e- A -> type. %mode (seqintc +C -I) (seqinth +H -E). seqintc/axiom : seqintc (axiom H) (ie E) <- seqinth H E. seqintc/andr : seqintc (andr C1 C2) (iandi I1 I2) <- seqintc C1 I1 <- seqintc C2 I2. seqintc/andl1 : seqintc (andl1 C H) (I (iandel E)) <- ({h}{u} seqinth h u -> seqintc (C h) (I u)) <- seqinth H E. seqintc/andl2 : seqintc (andl2 C H) (I (iander E)) <- ({h}{u} seqinth h u -> seqintc (C h) (I u)) <- seqinth H E. seqintc/impr : seqintc (impr C) (iimpi I) <- ({h}{u} seqinth h u -> seqintc (C h) (I u)). seqintc/impl : seqintc (impl C1 C2 H3) (I2 (iimpe E3 I1)) <- seqintc C1 I1 <- ({h}{u} seqinth h u -> seqintc (C2 h) (I2 u)) <- seqinth H3 E3. seqintc/orr1 : seqintc (orr1 C) (ioril I) <- seqintc C I. seqintc/orr2 : seqintc (orr2 C) (iorir I) <- seqintc C I. seqintc/orl : seqintc (orl C1 C2 H3) (iore E3 I1 I2) <- ({h}{u} seqinth h u -> seqintc (C1 h) (I1 u)) <- ({h}{u} seqinth h u -> seqintc (C2 h) (I2 u)) <- seqinth H3 E3. seqintc/notr : seqintc (notr C) (inoti I) <- ({p}{h}{u} seqinth h u -> seqintc (C p h) (I p u)). seqintc/notl : seqintc (notl C H) (inote E I) <- seqintc C I <- seqinth H E. seqintc/truer : seqintc truer itruei. seqintc/falsel : seqintc (falsel H) (ifalsee E) <- seqinth H E. seqintc/forallr : seqintc (forallr C) (ialli I) <- ({a} seqintc (C a) (I a)). seqintc/foralll : seqintc (foralll T C H) (I (ialle E T)) <- ({h}{u} seqinth h u -> seqintc (C h) (I u)) <- seqinth H E. seqintc/existsr : seqintc (existsr T C) (iexi T I) <- seqintc C I. seqintc/existsl : seqintc (existsl C H) (iexe E I) <- ({a}{h}{u} seqinth h u -> seqintc (C a h) (I a u)) <- seqinth H E. %block l4 : some {A:o} block {h: hyp A} {u: e- A}{w:seqinth h u}. %worlds (l4 | l2 | l3) (seqintc _ _) (seqinth _ _). %total (I E) (seqintc I _) (seqinth E _). % Theorem 3.8 intseqi : i- C -> conc C -> type. intseqe : e- A -> (hyp A -> conc C) -> conc C -> type. %mode (intseqi +I -C) (intseqe +E +C1 -C2). intseqi/ie : intseqi (ie E) C <- intseqe E ([u] axiom u) C. intseqi/iandi : intseqi (iandi I1 I2) (andr C1 C2) <- intseqi I1 C1 <- intseqi I2 C2. intseqe/iandel: intseqe (iandel E1) C2 C1 <- intseqe E1 ([u] andl1 C2 u) C1. intseqe/iandel: intseqe (iander E1) C2 C1 <- intseqe E1 ([u] andl2 C2 u) C1. intseqi/iimpi : intseqi (iimpi I) (impr C) <- ({u}{h} ({B}{C':hyp A -> conc B} intseqe u C' (C' h)) -> intseqi (I u) (C h)). intseqe/iimpe : intseqe (iimpe E1 I2) C3 C1 <- intseqi I2 C2 <- intseqe E1 ([u] impl C2 C3 u) C1. intseqi/ioril : intseqi (ioril I) (orr1 C) <- intseqi I C. intseqi/iorir : intseqi (iorir I) (orr2 C) <- intseqi I C. intseqi/iore : intseqi (iore E1 I2 I3) C1 <- ({u}{h} ({C}{C':hyp A -> conc C} intseqe u C' (C' h)) -> intseqi (I2 u) (C2 h)) <- ({u}{h} ({C}{C':hyp B -> conc C} intseqe u C' (C' h)) -> intseqi (I3 u) (C3 h)) <- intseqe E1 ([u] orl C2 C3 u) C1. intseqi/inoti : intseqi (inoti I) (notr C) <- ({p}{u}{h} ({B}{C':hyp A -> conc B} intseqe u C' (C' h)) -> intseqi (I p u) (C p h)). intseqi/inote : intseqi (inote E1 I2) C1 <- intseqi I2 C2 <- intseqe E1 ([u] notl C2 u) C1. intseqi/itruei : intseqi itruei truer. intseqi/ifalsee : intseqi (ifalsee E) C <- intseqe E ([u] falsel u) C. intseqi/ialli : intseqi (ialli I) (forallr C) <- ({a:i} intseqi (I a) (C a)). intseqe/ialle : intseqe (ialle E1 T2) C3 C <- intseqe E1 ([u] foralll T2 C3 u) C. intseqi/iexi : intseqi (iexi T1 I2) (existsr T1 C2) <- intseqi I2 C2. intseqi/iexe : intseqi (iexe E1 I2) C1 <- ({a:i} {u} {h} ({B}{C':hyp _ -> conc B} intseqe u C' (C' h)) -> intseqi (I2 a u) (C2 a h)) <- intseqe E1 ([u] existsl C2 u) C1. %block l5 : some {A:o} block {u: e- A} {h: hyp A} {w:{B}{C':hyp A -> conc B} intseqe u C' (C' h)}. %worlds (l5 | l2 | l3) (intseqi _ _) (intseqe _ _ _). %total (I E) (intseqi I _) (intseqe E _ _).