Ejercicio 5 (a)
De Lógica matemática y fundamentos (2014-15)
Revisión del 19:49 3 jun 2015 de Jalonso (discusión | contribuciones) (Página creada con '<source lang="isar"> header {* Examen de Lógica Matemática y Fundamentos (6 de abril de 2015) *} theory e5_1_sol imports Main begin text {* Apellidos: Nombre: *} tex...')
header {* Examen de Lógica Matemática y Fundamentos (6 de abril de 2015) *}
theory e5_1_sol
imports Main
begin
text {*
Apellidos:
Nombre:
*}
text {* Sustituye la palabra uvus por tu usuario de la Universidad de
Sevilla y graba el fichero con dicho usuario .thy
*}
text {*
Demostrar o refutar los siguientes lemas usando sólo las reglas
básicas de deducción natural de la lógica proposicional, de los
cuantificadores y de la igualdad:
· conjI: \<lbrakk>P; Q\<rbrakk> \<Longrightarrow> P \<and> Q
· conjunct1: P \<and> Q \<Longrightarrow> P
· conjunct2: P \<and> Q \<Longrightarrow> Q
· notnotD: \<not>\<not> P \<Longrightarrow> P
· mp: \<lbrakk>P \<longrightarrow> Q; P\<rbrakk> \<Longrightarrow> Q
· impI: (P \<Longrightarrow> Q) \<Longrightarrow> P \<longrightarrow> Q
· disjI1: P \<Longrightarrow> P \<or> Q
· disjI2: Q \<Longrightarrow> P \<or> Q
· disjE: \<lbrakk>P \<or> Q; P \<Longrightarrow> R; Q \<Longrightarrow> R\<rbrakk> \<Longrightarrow> R
· FalseE: False \<Longrightarrow> P
· notE: \<lbrakk>\<not>P; P\<rbrakk> \<Longrightarrow> R
· notI: (P \<Longrightarrow> False) \<Longrightarrow> \<not>P
· iffI: \<lbrakk>P \<Longrightarrow> Q; Q \<Longrightarrow> P\<rbrakk> \<Longrightarrow> P = Q
· iffD1: \<lbrakk>Q = P; Q\<rbrakk> \<Longrightarrow> P
· iffD2: \<lbrakk>P = Q; Q\<rbrakk> \<Longrightarrow> P
· ccontr: (\<not>P \<Longrightarrow> False) \<Longrightarrow> P
. excluded_middle:(\<not>P \<or> P)
· allE: \<lbrakk>\<forall>x. P x; P x \<Longrightarrow> R\<rbrakk> \<Longrightarrow> R
· allI: (\<And>x. P x) \<Longrightarrow> \<forall>x. P x
· exI: P x \<Longrightarrow> \<exists>x. P x
· exE: \<lbrakk>\<exists>x. P x; \<And>x. P x \<Longrightarrow> Q\<rbrakk> \<Longrightarrow> Q
· refl: t = t
· subst: \<lbrakk>s = t; P s\<rbrakk> \<Longrightarrow> P t
· trans: \<lbrakk>r = s; s = t\<rbrakk> \<Longrightarrow> r = t
· sym: s = t \<Longrightarrow> t = s
· not_sym: t \<noteq> s \<Longrightarrow> s \<noteq> t
· ssubst: \<lbrakk>t = s; P s\<rbrakk> \<Longrightarrow> P t
· box_equals: \<lbrakk>a = b; a = c; b = d\<rbrakk> \<Longrightarrow> a: = d
· arg_cong: x = y \<Longrightarrow> f x = f y
· fun_cong: f = g \<Longrightarrow> f x = g x
· cong: \<lbrakk>f = g; x = y\<rbrakk> \<Longrightarrow> f x = g y
*}
text {*
Se usarán las reglas notnotI y mt que demostramos a continuación.
*}
lemma notnotI: "P \<Longrightarrow> \<not>\<not> P"
by auto
lemma mt: "\<lbrakk>F \<longrightarrow> G; \<not>G\<rbrakk> \<Longrightarrow> \<not>F"
by auto
lemma Ejercicio5:
shows "(\<exists>x. \<forall>y. \<not>(P(y) \<longrightarrow> R(x,y))) \<longrightarrow> \<not>(\<forall>x. P(x) \<longrightarrow> R(x,x))"
proof (rule impI)
assume "\<exists>x. \<forall>y. \<not>(P(y) \<longrightarrow> R(x,y))"
then obtain a where "\<forall>y. \<not>(P(y) \<longrightarrow> R(a,y))" by (rule exE)
show "\<not>(\<forall>x. P(x) \<longrightarrow> R(x,x))"
proof (rule notI)
assume "\<forall>x. P(x) \<longrightarrow> R(x,x)"
then have "P(a) \<longrightarrow> R(a,a)" by (rule allE)
have "\<not>(P(a) \<longrightarrow> R(a,a))" using `\<forall>y. \<not>(P(y) \<longrightarrow> R(a,y))` by (rule allE)
then show False using `P(a) \<longrightarrow> R(a,a)` by (rule notE)
qed
qed
end