<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="es">
	<id>https://www.glc.us.es/~jalonso/RA2015/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jalonso</id>
	<title>Razonamiento automático (2015-16) - Contribuciones del usuario [es]</title>
	<link rel="self" type="application/atom+xml" href="https://www.glc.us.es/~jalonso/RA2015/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jalonso"/>
	<link rel="alternate" type="text/html" href="https://www.glc.us.es/~jalonso/RA2015/index.php/Especial:Contribuciones/Jalonso"/>
	<updated>2026-07-19T00:48:37Z</updated>
	<subtitle>Contribuciones del usuario</subtitle>
	<generator>MediaWiki 1.31.14</generator>
	<entry>
		<id>https://www.glc.us.es/~jalonso/RA2015/index.php?title=Documentaci%C3%B3n&amp;diff=76</id>
		<title>Documentación</title>
		<link rel="alternate" type="text/html" href="https://www.glc.us.es/~jalonso/RA2015/index.php?title=Documentaci%C3%B3n&amp;diff=76"/>
		<updated>2022-02-08T17:22:32Z</updated>

		<summary type="html">&lt;p&gt;Jalonso: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;En esta página se recogen en enlaces que sirven de documentación al curso de demostración asistida por ordenador (DAO). Los enlaces están actualizados en el [https://www.glc.us.es/~jalonso/RA2019/index.php/Documentaci%C3%B3n curso 2019-20].&lt;br /&gt;
&lt;br /&gt;
== Visiones generales de la DAO ==&lt;br /&gt;
&lt;br /&gt;
# J.A. Alonso. [http://goo.gl/NWk7b Razonamiento formalizado: Del sueño a la realidad de las pruebas]. &amp;#039;&amp;#039;Vestigium&amp;#039;&amp;#039;, 26 de diciembre de 2012.&lt;br /&gt;
# J. Avigad. [http://www.andrew.cmu.edu/user/avigad/Talks/icerm.pdf Interactive theorem proving, automated reasoning, and mathematical computation]. ICERM, 14 de diciembre de 2012. &lt;br /&gt;
# M. Davis. [http://www.cs.nyu.edu/cs/faculty/davism/early.ps The early history of automated deduction].&lt;br /&gt;
# J.P. Delahaye [http://interstices.info/jcms/int_63417/du-reve-a-la-realite-des-preuves Du rêve à la réalité des preuves]. &amp;#039;&amp;#039;Interstices&amp;#039;&amp;#039;, 8 de julio de 2012.&lt;br /&gt;
# J. Germoni [http://images.math.cnrs.fr/Coq-et-caracteres.html Coq et caractères: Preuve formelle du théorème de Feit et Thompson]. &amp;#039;&amp;#039;Images des Mathématiques&amp;#039;&amp;#039;, CNRS, 23 de noviembre de 2012. &lt;br /&gt;
# H. Geuvers [http://www.ias.ac.in/sadhana/Pdf2009Feb/3.pdf Proof assistants: History, ideas and future]. &amp;#039;&amp;#039;Sadhana&amp;#039;&amp;#039;, Vol. 34-1, pp. 3-25, février 2009.&lt;br /&gt;
# G. Gonthier [http://www.ams.org/notices/200811/tx081101382p.pdf The four-color theorem]. &amp;#039;&amp;#039;Notices of the AMS&amp;#039;&amp;#039;, Vol. 55, n° 11, pp. 1382-1393, 2008.&lt;br /&gt;
# T. Hales. [http://www.ams.org/notices/200811/tx081101370p.pdf Formal proof]. &amp;#039;&amp;#039;Notices of AMS&amp;#039;&amp;#039;, Vol. 55, N. 11 (2008) pp. 1370-1380.&lt;br /&gt;
# J. Harrison. [http://www.cl.cam.ac.uk/~jrh13/papers/ab.html A short survey of automated reasoning]. &amp;#039;&amp;#039;Lecture Notes in Computer Science&amp;#039;&amp;#039;, Vol. 4545, pp. 334-349, 2007.&lt;br /&gt;
# J. Harrison. [http://www.ams.org/notices/200811/tx081101395p.pdf Formal proof: Theory and practice]. &amp;#039;&amp;#039;Notices of the AMS&amp;#039;&amp;#039;, Vol. 55, N. 11 (2008) p.1395-1406. &lt;br /&gt;
# G. Kolata. [http://www.nytimes.com/library/cyber/week/1210math.html Computer math proof shows reasoning power]. &amp;#039;&amp;#039;The New York Times&amp;#039;&amp;#039;, 10 de diciembre de 1996.&lt;br /&gt;
# D. MacKenzie [https://backspaces.net/temp/Spring2010Seminar/18%20unconventional%20essays%20on%20the%20nature%20of%20mathematics.pdf#page=147 Computers and the sociology of mathematical proof].&lt;br /&gt;
# G. Sutcliffe. [http://tptp.org/OverviewOfATP.html What is automated theorem proving?].&lt;br /&gt;
# F. Wiedijk [http://www.cs.ru.nl/~freek/100/ Formalizing the «top 100» of mathematical theorems].&lt;br /&gt;
# F. Wiedijk [http://www.ams.org/notices/200811/tx081101408p.pdf Formal proof - Getting started]. &amp;#039;&amp;#039;Notices of the AMS&amp;#039;&amp;#039;, Vol. 55, n° 11, pp. 1408-1414, 2008.&lt;br /&gt;
# F. Wiedijk, [https://www.cs.ru.nl/F.Wiedijk/pubs/qed2.pdf The QED manifesto revisited]. &amp;#039;&amp;#039;Studies in Logic, Grammar and Rhetoric&amp;#039;&amp;#039;, Vol. 10(23), pp. 121-133, 2007.&lt;br /&gt;
&lt;br /&gt;
== Referencias sobre Isabelle/HOL ==&lt;br /&gt;
# B. Grechuk [https://web.cs.wpi.edu/~dd/resources_isabelle/isabelle_primer_mathematicians.pdf Isabelle primer for mathematicians].&lt;br /&gt;
# T. Nipkow [https://isabelle.in.tum.de/doc/prog-prove.pdf Programming and proving in Isabelle/HOL]. &lt;br /&gt;
# T. Nipkow, M. Wenzel y L.C. Paulson [https://isabelle.in.tum.de/website-Isabelle2009/dist/Isabelle/doc/tutorial.pdf A proof assistant for higher-order logic]. &lt;br /&gt;
# [http://www.cl.cam.ac.uk/research/hvg/Isabelle/dist/library/HOL/HOL/document.pdf Isabelle/HOL — Higher-Order Logic]. &lt;br /&gt;
# [http://www.cl.cam.ac.uk/research/hvg/Isabelle/documentation.html Tutorials and manuals for Isabelle].&lt;br /&gt;
&lt;br /&gt;
== Lecturas complementarias ==&lt;br /&gt;
=== Programación funcional ===&lt;br /&gt;
# J.A. Alonso [http://www.cs.us.es/~jalonso/cursos/i1m-12/temas/2012-13-IM-temas-PF.pdf  Temas de &amp;quot;Programación funcional&amp;quot;]. Publicaciones del Grupo de Lógica Computacional. Universidad de Sevilla, 2012.&lt;br /&gt;
# J.A. Alonso y M.J. Hidalgo [http://www.cs.us.es/~jalonso/publicaciones/Piensa_en_Haskell.pdf Piensa en Haskell (Ejercicios de programación funcional con Haskell)]. Publicaciones del Grupo de Lógica Computacional. Universidad de Sevilla, 2012.&lt;br /&gt;
# G. Hutton [http://goo.gl/pKqG Programming in Haskell]. Cambridge University Press, 2007. &lt;br /&gt;
# M. Lipovača [http://aprendehaskell.es ¡Aprende Haskell por el bien de todos!].&lt;br /&gt;
&lt;br /&gt;
=== Lógica computacional ===&lt;br /&gt;
# J.A. Alonso [http://www.cs.us.es/~jalonso/cursos/li-12/temas/temas-LI-2012-13.pdf Temas de &amp;quot;Lógica informática&amp;quot; (2012-13)]. Publicaciones del Grupo de Lógica Computacional. Universidad de Sevilla, 2012.&lt;br /&gt;
# R. Bornat [http://bit.ly/oithic Proof and disproof in formal logic: an introduction for programmers]. Oxford University Press, 2005.&lt;br /&gt;
# K. Broda, S. Eisenbach, H. Khoshnevisan y S. Vickers [https://www.doc.ic.ac.uk/~susan/firstyearbook.pdf Reasoned programming]. Imperial College, 1994.&lt;br /&gt;
# K. Doets y J. van Eijck [https://books.google.es/books?id=YCC6lwEACAAJ&amp;amp;dq=The+Haskell+Road+to+Logic,+Maths+and+Programming&amp;amp;hl=es&amp;amp;sa=X&amp;amp;redir_esc=y The Haskell Road to Logic, Maths and Programming].&lt;br /&gt;
# M. Huth y M. Ryan [http://goo.gl/TMqOo Logic in computer science: Modelling and reasoning about systems]. Cambridge University Press, 2004. (Incluye el [http://www.cs.bham.ac.uk/research/lics/tutor/index.html tutor en la Red]).&lt;br /&gt;
&lt;br /&gt;
== Cursos relacionados ==&lt;br /&gt;
=== Cursos con Isabelle/HOL ===&lt;br /&gt;
# Clemens Ballarin. [http://cl-informatik.uibk.ac.at/teaching/ss08/atp/introduction.php Automatic Deduction]. (Univ de Innsbruck, 2008).&lt;br /&gt;
# Clemens Ballarin y Gerwin Klein [http://isabelle.in.tum.de/coursematerial/IJCAR04 Introduction to the Isabelle Proof Assistant]. (en el IJCAR-2004).&lt;br /&gt;
# Clemens Ballarin y Tjark Weber. [http://cl-informatik.uibk.ac.at/teaching/ws06/atp/introduction.php Automated Theorem Proving in Isabelle/HOL]. (Univ. de Innsbruck, 2006-07).&lt;br /&gt;
# A.D. Brucker, D. Basin, J.G. Smaus y B. Wolff. [http://archiv.infsec.ethz.ch/education/permanent/csmr.html Computer-supported Modeling and Reasoning]. (ETH Zurich, 2011).&lt;br /&gt;
# Mads Dam. [http://www.csc.kth.se/utbildning/kth/kurser/DD2453/aform07/ Advanced formal methods]. (KTH Royal Institute of Technology, 2007).&lt;br /&gt;
# Jacques Fleuriot y Paul Jackson. [http://www.inf.ed.ac.uk/teaching/courses/ar/slides/ Automated reasoning]. (Univ. de Edimburgo, 2012-13).&lt;br /&gt;
# Thomas Genet [http://www.irisa.fr/celtique/genet/ACF Software formal analysis and design]. (Univ. de Rennes)&lt;br /&gt;
# Gerwin Klein. [http://www.cse.unsw.edu.au/~kleing/teaching/thprv-04 Theorem Proving - Principles, Techniques, Applications]. (NICTA, 2004).&lt;br /&gt;
# Gerwin Klein. [http://www.cse.unsw.edu.au/~cs4161/index.html Advanced Topics in Software Verification]. (NICTA, 2012).&lt;br /&gt;
# Joao Marcos. [http://www.dimap.ufrn.br/~jmarcos/courses/LC/Ementa.htm Lógica computacional: Demonstração assistida e semi-automática de teoremas].(UFRN, 2000).&lt;br /&gt;
# Tobias Nipkow. [https://www21.in.tum.de/teaching/semantics/WS1920/ Semantics of programming languages]. (Univ. de Munich, 2012-13).&lt;br /&gt;
# Tobias Nipkow [http://isabelle.in.tum.de/coursematerial/PSV2009-1 Theorem Proving with Isabelle/HOL An Intensive Course]. &lt;br /&gt;
# Larry Paulson. [http://www.cl.cam.ac.uk/teaching/0910/L21/ Interactive Formal Verification]. (Univ. de Cambridge, 2009-10).&lt;br /&gt;
# Jan-Georg Smaus. [http://www.informatik.uni-freiburg.de/~ki/teaching/ws0910/csmr/lecture.html Computer-supported modeling and reasoning]. (Univ. de Feiburgo, 2009).&lt;br /&gt;
# Christian Sternagel [http://cl-informatik.uibk.ac.at/teaching/ss11/eve/content.php Experiments in Verification – Introduction to Isabelle/HOL]. (Univ. de Innsbruck, 2011-12).&lt;br /&gt;
# Tjark Weber. [http://www.cl.cam.ac.uk/teaching/1011/L21/ Interactive Formal Verification]. (Univ. de Cambridge, 2010-11).&lt;br /&gt;
&lt;br /&gt;
=== Otros cursos ===&lt;br /&gt;
# José A. Alonso [http://www.cs.us.es/~jalonso/cursos/li-12/ Lógica informática] (Univ. de Sevilla, 2012-13).&lt;br /&gt;
# Yves Bertot, Pierre Casteran, Benjamin Gregoire, Pierre Letouzey y Assia Mahboubi [http://www.di.ens.fr/~zappa/teaching/coq/ecole11 Modelling and verifying algorithms in Coq: an introduction]. (INRIA Paris-Rocquencourt, 14-18 noviembre 2011).&lt;br /&gt;
# Pierre Castéran [http://www.labri.fr/perso/casteran/FM/Logique/index.html Logic (Master In Verification)] (Univ. de Burdeos, 2011-12).&lt;br /&gt;
# Ian Hodkinson [http://www.doc.ic.ac.uk/~imh/teaching/140_logic/logic.html Logic] (Imperial College, Londres, 2010-11).&lt;br /&gt;
# Peter Lucas [http://www.cs.ru.nl/~peterl/teaching/KeR/ Knowledge Representation and Reasoning] (Radboud University # egen, 2011-12).&lt;br /&gt;
# Larry Paulson [http://www.cl.cam.ac.uk/Teaching/current/LogicProof/ Logic and Proof] (Univ. de Cambridge, 2011-12).&lt;br /&gt;
# Riccardo Pucella [http://www.ccs.neu.edu/home/riccardo/courses/csu290-sp09/index.html Logic and Computation] (Northeastern University, 2009). Curso con ACL2.&lt;br /&gt;
&lt;br /&gt;
== Bibliotecas de ejemplos de verificación ==&lt;br /&gt;
# [http://afp.sourceforge.net Archive of Formal Proofs].&lt;br /&gt;
# [http://www.cs.ru.nl/~freek/100 Formalizing 100 Theorems].&lt;br /&gt;
# [http://toccata.lri.fr/gallery Gallery of verified programs].&lt;/div&gt;</summary>
		<author><name>Jalonso</name></author>
		
	</entry>
	<entry>
		<id>https://www.glc.us.es/~jalonso/RA2015/index.php?title=Sistemas&amp;diff=75</id>
		<title>Sistemas</title>
		<link rel="alternate" type="text/html" href="https://www.glc.us.es/~jalonso/RA2015/index.php?title=Sistemas&amp;diff=75"/>
		<updated>2022-02-08T12:52:13Z</updated>

		<summary type="html">&lt;p&gt;Jalonso: Página creada con «== Temas utilizados en &amp;#039;&amp;#039;Razonamiento automático (2015-16)&amp;#039;&amp;#039; ==  En esta página se irá escribiendo enlaces a los sistemas utilizados en el curso # [http://www.cl.cam.ac.…»&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Temas utilizados en &amp;#039;&amp;#039;Razonamiento automático (2015-16)&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
En esta página se irá escribiendo enlaces a los sistemas utilizados en el curso&lt;br /&gt;
# [http://www.cl.cam.ac.uk/research/hvg/Isabelle Isabelle/HOL].&lt;/div&gt;</summary>
		<author><name>Jalonso</name></author>
		
	</entry>
	<entry>
		<id>https://www.glc.us.es/~jalonso/RA2015/index.php?title=Documentaci%C3%B3n&amp;diff=74</id>
		<title>Documentación</title>
		<link rel="alternate" type="text/html" href="https://www.glc.us.es/~jalonso/RA2015/index.php?title=Documentaci%C3%B3n&amp;diff=74"/>
		<updated>2022-02-08T12:50:32Z</updated>

		<summary type="html">&lt;p&gt;Jalonso: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;En esta página se recogen en enlaces que sirven de documentación al curso de demostración asistida por ordenador (DAO).&lt;br /&gt;
&lt;br /&gt;
== Visiones generales de la DAO ==&lt;br /&gt;
&lt;br /&gt;
# J.A. Alonso. [http://goo.gl/NWk7b Razonamiento formalizado: Del sueño a la realidad de las pruebas]. &amp;#039;&amp;#039;Vestigium&amp;#039;&amp;#039;, 26 de diciembre de 2012.&lt;br /&gt;
# J. Avigad. [http://www.andrew.cmu.edu/user/avigad/Talks/icerm.pdf Interactive theorem proving, automated reasoning, and mathematical computation]. ICERM, 14 de diciembre de 2012. &lt;br /&gt;
# M. Davis. [http://www.cs.nyu.edu/cs/faculty/davism/early.ps The early history of automated deduction].&lt;br /&gt;
# J.P. Delahaye [http://interstices.info/jcms/int_63417/du-reve-a-la-realite-des-preuves Du rêve à la réalité des preuves]. &amp;#039;&amp;#039;Interstices&amp;#039;&amp;#039;, 8 de julio de 2012.&lt;br /&gt;
# J. Germoni [http://images.math.cnrs.fr/Coq-et-caracteres.html Coq et caractères: Preuve formelle du théorème de Feit et Thompson]. &amp;#039;&amp;#039;Images des Mathématiques&amp;#039;&amp;#039;, CNRS, 23 de noviembre de 2012. &lt;br /&gt;
# H. Geuvers [http://www.ias.ac.in/sadhana/Pdf2009Feb/3.pdf Proof assistants: History, ideas and future]. &amp;#039;&amp;#039;Sadhana&amp;#039;&amp;#039;, Vol. 34-1, pp. 3-25, février 2009.&lt;br /&gt;
# G. Gonthier [http://www.ams.org/notices/200811/tx081101382p.pdf The four-color theorem]. &amp;#039;&amp;#039;Notices of the AMS&amp;#039;&amp;#039;, Vol. 55, n° 11, pp. 1382-1393, 2008.&lt;br /&gt;
# T. Hales. [http://www.ams.org/notices/200811/tx081101370p.pdf Formal proof]. &amp;#039;&amp;#039;Notices of AMS&amp;#039;&amp;#039;, Vol. 55, N. 11 (2008) pp. 1370-1380.&lt;br /&gt;
# J. Harrison. [http://www.cl.cam.ac.uk/~jrh13/papers/ab.html A short survey of automated reasoning]. &amp;#039;&amp;#039;Lecture Notes in Computer Science&amp;#039;&amp;#039;, Vol. 4545, pp. 334-349, 2007.&lt;br /&gt;
# J. Harrison. [http://www.ams.org/notices/200811/tx081101395p.pdf Formal proof: Theory and practice]. &amp;#039;&amp;#039;Notices of the AMS&amp;#039;&amp;#039;, Vol. 55, N. 11 (2008) p.1395-1406. &lt;br /&gt;
# G. Kolata. [http://www.nytimes.com/library/cyber/week/1210math.html Computer math proof shows reasoning power]. &amp;#039;&amp;#039;The New York Times&amp;#039;&amp;#039;, 10 de diciembre de 1996.&lt;br /&gt;
# D. MacKenzie [https://backspaces.net/temp/Spring2010Seminar/18%20unconventional%20essays%20on%20the%20nature%20of%20mathematics.pdf#page=147 Computers and the sociology of mathematical proof].&lt;br /&gt;
# G. Sutcliffe. [http://tptp.org/OverviewOfATP.html What is automated theorem proving?].&lt;br /&gt;
# F. Wiedijk [http://www.cs.ru.nl/~freek/100/ Formalizing the «top 100» of mathematical theorems].&lt;br /&gt;
# F. Wiedijk [http://www.ams.org/notices/200811/tx081101408p.pdf Formal proof - Getting started]. &amp;#039;&amp;#039;Notices of the AMS&amp;#039;&amp;#039;, Vol. 55, n° 11, pp. 1408-1414, 2008.&lt;br /&gt;
# F. Wiedijk, [https://www.cs.ru.nl/F.Wiedijk/pubs/qed2.pdf The QED manifesto revisited]. &amp;#039;&amp;#039;Studies in Logic, Grammar and Rhetoric&amp;#039;&amp;#039;, Vol. 10(23), pp. 121-133, 2007.&lt;br /&gt;
&lt;br /&gt;
== Referencias sobre Isabelle/HOL ==&lt;br /&gt;
# B. Grechuk [https://web.cs.wpi.edu/~dd/resources_isabelle/isabelle_primer_mathematicians.pdf Isabelle primer for mathematicians].&lt;br /&gt;
# T. Nipkow [https://isabelle.in.tum.de/doc/prog-prove.pdf Programming and proving in Isabelle/HOL]. &lt;br /&gt;
# T. Nipkow, M. Wenzel y L.C. Paulson [https://isabelle.in.tum.de/website-Isabelle2009/dist/Isabelle/doc/tutorial.pdf A proof assistant for higher-order logic]. &lt;br /&gt;
# [http://www.cl.cam.ac.uk/research/hvg/Isabelle/dist/library/HOL/HOL/document.pdf Isabelle/HOL — Higher-Order Logic]. &lt;br /&gt;
# [http://www.cl.cam.ac.uk/research/hvg/Isabelle/documentation.html Tutorials and manuals for Isabelle].&lt;br /&gt;
&lt;br /&gt;
== Lecturas complementarias ==&lt;br /&gt;
=== Programación funcional ===&lt;br /&gt;
# J.A. Alonso [http://www.cs.us.es/~jalonso/cursos/i1m-12/temas/2012-13-IM-temas-PF.pdf  Temas de &amp;quot;Programación funcional&amp;quot;]. Publicaciones del Grupo de Lógica Computacional. Universidad de Sevilla, 2012.&lt;br /&gt;
# J.A. Alonso y M.J. Hidalgo [http://www.cs.us.es/~jalonso/publicaciones/Piensa_en_Haskell.pdf Piensa en Haskell (Ejercicios de programación funcional con Haskell)]. Publicaciones del Grupo de Lógica Computacional. Universidad de Sevilla, 2012.&lt;br /&gt;
# G. Hutton [http://goo.gl/pKqG Programming in Haskell]. Cambridge University Press, 2007. &lt;br /&gt;
# M. Lipovača [http://aprendehaskell.es ¡Aprende Haskell por el bien de todos!].&lt;br /&gt;
&lt;br /&gt;
=== Lógica computacional ===&lt;br /&gt;
# J.A. Alonso [http://www.cs.us.es/~jalonso/cursos/li-12/temas/temas-LI-2012-13.pdf Temas de &amp;quot;Lógica informática&amp;quot; (2012-13)]. Publicaciones del Grupo de Lógica Computacional. Universidad de Sevilla, 2012.&lt;br /&gt;
# R. Bornat [http://bit.ly/oithic Proof and disproof in formal logic: an introduction for programmers]. Oxford University Press, 2005.&lt;br /&gt;
# K. Broda, S. Eisenbach, H. Khoshnevisan y S. Vickers [https://www.doc.ic.ac.uk/~susan/firstyearbook.pdf Reasoned programming]. Imperial College, 1994.&lt;br /&gt;
# K. Doets y J. van Eijck [https://books.google.es/books?id=YCC6lwEACAAJ&amp;amp;dq=The+Haskell+Road+to+Logic,+Maths+and+Programming&amp;amp;hl=es&amp;amp;sa=X&amp;amp;redir_esc=y The Haskell Road to Logic, Maths and Programming].&lt;br /&gt;
# M. Huth y M. Ryan [http://goo.gl/TMqOo Logic in computer science: Modelling and reasoning about systems]. Cambridge University Press, 2004. (Incluye el [http://www.cs.bham.ac.uk/research/lics/tutor/index.html tutor en la Red]).&lt;br /&gt;
&lt;br /&gt;
== Cursos relacionados ==&lt;br /&gt;
=== Cursos con Isabelle/HOL ===&lt;br /&gt;
# Clemens Ballarin. [http://cl-informatik.uibk.ac.at/teaching/ss08/atp/introduction.php Automatic Deduction]. (Univ de Innsbruck, 2008).&lt;br /&gt;
# Clemens Ballarin y Gerwin Klein [http://isabelle.in.tum.de/coursematerial/IJCAR04 Introduction to the Isabelle Proof Assistant]. (en el IJCAR-2004).&lt;br /&gt;
# Clemens Ballarin y Tjark Weber. [http://cl-informatik.uibk.ac.at/teaching/ws06/atp/introduction.php Automated Theorem Proving in Isabelle/HOL]. (Univ. de Innsbruck, 2006-07).&lt;br /&gt;
# A.D. Brucker, D. Basin, J.G. Smaus y B. Wolff. [http://archiv.infsec.ethz.ch/education/permanent/csmr.html Computer-supported Modeling and Reasoning]. (ETH Zurich, 2011).&lt;br /&gt;
# Mads Dam. [http://www.csc.kth.se/utbildning/kth/kurser/DD2453/aform07/ Advanced formal methods]. (KTH Royal Institute of Technology, 2007).&lt;br /&gt;
# Jacques Fleuriot y Paul Jackson. [http://www.inf.ed.ac.uk/teaching/courses/ar/slides/ Automated reasoning]. (Univ. de Edimburgo, 2012-13).&lt;br /&gt;
# Thomas Genet [http://www.irisa.fr/celtique/genet/ACF Software formal analysis and design]. (Univ. de Rennes)&lt;br /&gt;
# Gerwin Klein. [http://www.cse.unsw.edu.au/~kleing/teaching/thprv-04 Theorem Proving - Principles, Techniques, Applications]. (NICTA, 2004).&lt;br /&gt;
# Gerwin Klein. [http://www.cse.unsw.edu.au/~cs4161/index.html Advanced Topics in Software Verification]. (NICTA, 2012).&lt;br /&gt;
# Joao Marcos. [http://www.dimap.ufrn.br/~jmarcos/courses/LC/Ementa.htm Lógica computacional: Demonstração assistida e semi-automática de teoremas].(UFRN, 2000).&lt;br /&gt;
# Tobias Nipkow. [https://www21.in.tum.de/teaching/semantics/WS1920/ Semantics of programming languages]. (Univ. de Munich, 2012-13).&lt;br /&gt;
# Tobias Nipkow [http://isabelle.in.tum.de/coursematerial/PSV2009-1 Theorem Proving with Isabelle/HOL An Intensive Course]. &lt;br /&gt;
# Larry Paulson. [http://www.cl.cam.ac.uk/teaching/0910/L21/ Interactive Formal Verification]. (Univ. de Cambridge, 2009-10).&lt;br /&gt;
# Jan-Georg Smaus. [http://www.informatik.uni-freiburg.de/~ki/teaching/ws0910/csmr/lecture.html Computer-supported modeling and reasoning]. (Univ. de Feiburgo, 2009).&lt;br /&gt;
# Christian Sternagel [http://cl-informatik.uibk.ac.at/teaching/ss11/eve/content.php Experiments in Verification – Introduction to Isabelle/HOL]. (Univ. de Innsbruck, 2011-12).&lt;br /&gt;
# Tjark Weber. [http://www.cl.cam.ac.uk/teaching/1011/L21/ Interactive Formal Verification]. (Univ. de Cambridge, 2010-11).&lt;br /&gt;
&lt;br /&gt;
=== Otros cursos ===&lt;br /&gt;
# José A. Alonso [http://www.cs.us.es/~jalonso/cursos/li-12/ Lógica informática] (Univ. de Sevilla, 2012-13).&lt;br /&gt;
# Yves Bertot, Pierre Casteran, Benjamin Gregoire, Pierre Letouzey y Assia Mahboubi [http://www.di.ens.fr/~zappa/teaching/coq/ecole11 Modelling and verifying algorithms in Coq: an introduction]. (INRIA Paris-Rocquencourt, 14-18 noviembre 2011).&lt;br /&gt;
# Pierre Castéran [http://www.labri.fr/perso/casteran/FM/Logique/index.html Logic (Master In Verification)] (Univ. de Burdeos, 2011-12).&lt;br /&gt;
# Ian Hodkinson [http://www.doc.ic.ac.uk/~imh/teaching/140_logic/logic.html Logic] (Imperial College, Londres, 2010-11).&lt;br /&gt;
# Peter Lucas [http://www.cs.ru.nl/~peterl/teaching/KeR/ Knowledge Representation and Reasoning] (Radboud University # egen, 2011-12).&lt;br /&gt;
# Larry Paulson [http://www.cl.cam.ac.uk/Teaching/current/LogicProof/ Logic and Proof] (Univ. de Cambridge, 2011-12).&lt;br /&gt;
# Riccardo Pucella [http://www.ccs.neu.edu/home/riccardo/courses/csu290-sp09/index.html Logic and Computation] (Northeastern University, 2009). Curso con ACL2.&lt;br /&gt;
&lt;br /&gt;
== Bibliotecas de ejemplos de verificación ==&lt;br /&gt;
# [http://afp.sourceforge.net Archive of Formal Proofs].&lt;br /&gt;
# [http://www.cs.ru.nl/~freek/100 Formalizing 100 Theorems].&lt;br /&gt;
# [http://toccata.lri.fr/gallery Gallery of verified programs].&lt;/div&gt;</summary>
		<author><name>Jalonso</name></author>
		
	</entry>
	<entry>
		<id>https://www.glc.us.es/~jalonso/RA2015/index.php?title=Documentaci%C3%B3n&amp;diff=63</id>
		<title>Documentación</title>
		<link rel="alternate" type="text/html" href="https://www.glc.us.es/~jalonso/RA2015/index.php?title=Documentaci%C3%B3n&amp;diff=63"/>
		<updated>2015-12-23T15:16:56Z</updated>

		<summary type="html">&lt;p&gt;Jalonso: /* Referencias sobre Isabelle/HOL */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;En esta página se recogen en enlaces que sirven de documentación al curso de demostración asistida por ordenador (DAO).&lt;br /&gt;
&lt;br /&gt;
== Visiones generales de la DAO ==&lt;br /&gt;
&lt;br /&gt;
# J.A. Alonso. [http://goo.gl/NWk7b Razonamiento formalizado: Del sueño a la realidad de las pruebas]. &amp;#039;&amp;#039;Vestigium&amp;#039;&amp;#039;, 26 de diciembre de 2012.&lt;br /&gt;
# J. Avigad. [http://www.andrew.cmu.edu/user/avigad/Talks/icerm.pdf Interactive theorem proving, automated reasoning, and mathematical computation]. ICERM, 14 de diciembre de 2012. &lt;br /&gt;
# M. Davis. [http://www.cs.nyu.edu/cs/faculty/davism/early.ps The early history of automated deduction].&lt;br /&gt;
# J.P. Delahaye [http://interstices.info/jcms/int_63417/du-reve-a-la-realite-des-preuves Du rêve à la réalité des preuves]. &amp;#039;&amp;#039;Interstices&amp;#039;&amp;#039;, 8 de julio de 2012.&lt;br /&gt;
# J. Germoni [http://images.math.cnrs.fr/Coq-et-caracteres.html Coq et caractères: Preuve formelle du théorème de Feit et Thompson]. &amp;#039;&amp;#039;Images des Mathématiques&amp;#039;&amp;#039;, CNRS, 23 de noviembre de 2012. &lt;br /&gt;
# H. Geuvers [http://www.ias.ac.in/sadhana/Pdf2009Feb/3.pdf Proof assistants: History, ideas and future]. &amp;#039;&amp;#039;Sadhana&amp;#039;&amp;#039;, Vol. 34-1, pp. 3-25, février 2009.&lt;br /&gt;
# G. Gonthier [http://www.ams.org/notices/200811/tx081101382p.pdf The four-color theorem]. &amp;#039;&amp;#039;Notices of the AMS&amp;#039;&amp;#039;, Vol. 55, n° 11, pp. 1382-1393, 2008.&lt;br /&gt;
# T. Hales. [http://www.ams.org/notices/200811/tx081101370p.pdf Formal proof]. &amp;#039;&amp;#039;Notices of AMS&amp;#039;&amp;#039;, Vol. 55, N. 11 (2008) pp. 1370-1380.&lt;br /&gt;
# J. Harrison. [http://www.cl.cam.ac.uk/~jrh13/papers/ab.html A short survey of automated reasoning]. &amp;#039;&amp;#039;Lecture Notes in Computer Science&amp;#039;&amp;#039;, Vol. 4545, pp. 334-349, 2007.&lt;br /&gt;
# J. Harrison. [http://www.ams.org/notices/200811/tx081101395p.pdf Formal proof: Theory and practice]. &amp;#039;&amp;#039;Notices of the AMS&amp;#039;&amp;#039;, Vol. 55, N. 11 (2008) p.1395-1406. &lt;br /&gt;
# G. Kolata. [http://www.nytimes.com/library/cyber/week/1210math.html Computer math proof shows reasoning power]. &amp;#039;&amp;#039;The New York Times&amp;#039;&amp;#039;, 10 de diciembre de 1996.&lt;br /&gt;
# D. MacKenzie [http://www.bcs.org/server.php?show=ConWebDoc.4364 Computers and the sociology of mathematical proof].&lt;br /&gt;
# G. Sutcliffe. [http://www.cs.miami.edu/~tptp/OverviewOfATP.html What is automated theorem proving?].&lt;br /&gt;
# F. Wiedijk [http://www.cs.ru.nl/~freek/100/ Formalizing the «top 100» of mathematical theorems].&lt;br /&gt;
# F. Wiedijk [http://www.ams.org/notices/200811/tx081101408p.pdf Formal proof - Getting started]. &amp;#039;&amp;#039;Notices of the AMS&amp;#039;&amp;#039;, Vol. 55, n° 11, pp. 1408-1414, 2008.&lt;br /&gt;
# F. Wiedijk, [http://www.cs.ru.nl/~freek/pubs/qed2.ps.gz The QED manifesto revisited]. &amp;#039;&amp;#039;Studies in Logic, Grammar and Rhetoric&amp;#039;&amp;#039;, Vol. 10(23), pp. 121-133, 2007.&lt;br /&gt;
&lt;br /&gt;
== Referencias sobre Isabelle/HOL ==&lt;br /&gt;
# B. Grechuk [http://dream.inf.ed.ac.uk/projects/isabelle/Isabelle_Primer.pdf Isabelle primer for mathematicians].&lt;br /&gt;
# T. Nipkow [http://www.cl.cam.ac.uk/research/hvg/Isabelle/dist/Isabelle2015/doc/prog-prove.pdf Programming and proving in Isabelle/HOL]. 25 de mayo de 2015&lt;br /&gt;
# T. Nipkow, M. Wenzel y L.C. Paulson [http://www.cl.cam.ac.uk/research/hvg/Isabelle/dist/Isabelle2015/doc/tutorial.pdf A proof assistant for higher-order logic]. Springer-Verlag. 25 de mayo de 2015&lt;br /&gt;
# [http://www.cl.cam.ac.uk/research/hvg/Isabelle/dist/library/HOL/HOL/document.pdf Isabelle/HOL — Higher-Order Logic]. 25 de mayo de 2015&lt;br /&gt;
# M. Wenzel [http://www.cl.cam.ac.uk/research/hvg/Isabelle/dist/Isabelle2015/doc/isar-ref.pdf The Isabelle/Isar Reference Manual]. 25 de mayo de 2015&lt;br /&gt;
# M. Wenzel [https://www.lri.fr/~wenzel/Isabelle2011-Paris/quickref.pdf The  Isabelle/Isar quick reference].&lt;br /&gt;
# J. Siek [http://ecee.colorado.edu/~siek/ecen3703/spring10/quick-ref.pdf Quick Reference for Isabelle/Isar Propositional Logic].&lt;br /&gt;
# J. Siek [http://ecee.colorado.edu/~siek/ecen3703/spring10/quick-ref2.pdf Quick Reference for Isabelle/Isar More Proof Techniques].&lt;br /&gt;
# J. Siek [http://ecee.colorado.edu/~siek/ecen3703/spring10/quick-ref3.pdf Quick Reference for Isabelle/Isar First-Order Logic].&lt;br /&gt;
# [http://www.cl.cam.ac.uk/research/hvg/Isabelle/documentation.html Tutorials and manuals for Isabelle].&lt;br /&gt;
&lt;br /&gt;
== Lecturas complementarias ==&lt;br /&gt;
=== Programación funcional ===&lt;br /&gt;
# J.A. Alonso [http://www.cs.us.es/~jalonso/cursos/i1m/temas/2012-13-IM-temas-PF.pdf  Temas de &amp;quot;Programación funcional&amp;quot;]. Publicaciones del Grupo de Lógica Computacional. Universidad de Sevilla, 2012.&lt;br /&gt;
# J.A. Alonso y M.J. Hidalgo [http://www.cs.us.es/~jalonso/publicaciones/Piensa_en_Haskell.pdf Piensa en Haskell (Ejercicios de programación funcional con Haskell)]. Publicaciones del Grupo de Lógica Computacional. Universidad de Sevilla, 2012.&lt;br /&gt;
# G. Hutton [http://goo.gl/pKqG Programming in Haskell]. Cambridge University Press, 2007. &lt;br /&gt;
# M. Lipovača [http://aprendehaskell.es ¡Aprende Haskell por el bien de todos!].&lt;br /&gt;
&lt;br /&gt;
=== Lógica computacional ===&lt;br /&gt;
# J.A. Alonso [http://www.cs.us.es/~jalonso/cursos/li/temas/temas-LI-2012-13.pdf Temas de &amp;quot;Lógica informática&amp;quot; (2012-13)]. Publicaciones del Grupo de Lógica Computacional. Universidad de Sevilla, 2012.&lt;br /&gt;
# R. Bornat [http://bit.ly/oithic Proof and disproof in formal logic: an introduction for programmers]. Oxford University Press, 2005.&lt;br /&gt;
# K. Broda, S. Eisenbach, H. Khoshnevisan y S. Vickers [http://pubs.doc.ic.ac.uk/reasoned-programming/reasoned-programming.pdf Reasoned programming]. Imperial College, 1994.&lt;br /&gt;
# K. Doets y J. van Eijck [http://www.ldc.usb.ve/~astorga/Haskell.Road.pdf The Haskell Road to Logic, Maths and Programming].&lt;br /&gt;
# M. Huth y M. Ryan [http://goo.gl/TMqOo Logic in computer science: Modelling and reasoning about systems]. Cambridge University Press, 2004. (Incluye el [http://www.cs.bham.ac.uk/research/lics/tutor/index.html tutor en la Red]).&lt;br /&gt;
&lt;br /&gt;
== Cursos relacionados ==&lt;br /&gt;
=== Cursos con Isabelle/HOL ===&lt;br /&gt;
# Jeremy Avigad. [http://www.phil.cmu.edu/~avigad/formal/ Logic and Formal Verification]. (Carnegie Mellon, 2009).&lt;br /&gt;
# Clemens Ballarin. [http://cl-informatik.uibk.ac.at/teaching/ss08/atp/introduction.php Automatic Deduction]. (Univ de Innsbruck, 2008).&lt;br /&gt;
# Clemens Ballarin. [http://www4.in.tum.de/~ballarin/belgrade08-tut/ Introduction to the Isabelle Proof Assistant]. (Belgrado, 2008). &lt;br /&gt;
# Clemens Ballarin y Gerwin Klein [http://isabelle.in.tum.de/coursematerial/IJCAR04 Introduction to the Isabelle Proof Assistant]. (en el IJCAR-2004).&lt;br /&gt;
# Clemens Ballarin y Tjark Weber. [http://cl-informatik.uibk.ac.at/teaching/ws06/atp/introduction.php Automated Theorem Proving in Isabelle/HOL]. (Univ. de Innsbruck, 2006-07).&lt;br /&gt;
# A.D. Brucker, D. Basin, J.G. Smaus y B. Wolff. [http://archiv.infsec.ethz.ch/education/permanent/csmr.html Computer-supported Modeling and Reasoning]. (ETH Zurich, 2011).&lt;br /&gt;
# Mads Dam. [http://www.csc.kth.se/utbildning/kth/kurser/DD2453/aform07/ Advanced formal methods]. (KTH Royal Institute of Technology, 2007).&lt;br /&gt;
# Jacques Fleuriot y Paul Jackson. [http://www.inf.ed.ac.uk/teaching/courses/ar/slides/ Automated reasoning]. (Univ. de Edimburgo, 2012-13).&lt;br /&gt;
# Thomas Genet [http://www.irisa.fr/celtique/genet/ACF Software formal analysis and design]. (Univ. de Rennes)&lt;br /&gt;
# Gerwin Klein. [http://www.cse.unsw.edu.au/~kleing/teaching/thprv-04 Theorem Proving - Principles, Techniques, Applications]. (NICTA, 2004).&lt;br /&gt;
# Gerwin Klein. [http://www.cse.unsw.edu.au/~cs4161/index.html Advanced Topics in Software Verification]. (NICTA, 2012).&lt;br /&gt;
# Joao Marcos. [http://www.dimap.ufrn.br/~jmarcos/courses/LC/Ementa.htm Lógica computacional: Demonstração assistida e semi-automática de teoremas].(UFRN, 2000).&lt;br /&gt;
# Tobias Nipkow. [http://www4.informatik.tu-muenchen.de/~nipkow/semantics/ Semantics of programming languages]. (Univ. de Munich, 2012-13).&lt;br /&gt;
# Tobias Nipkow [http://isabelle.in.tum.de/coursematerial/PSV2009-1 Theorem Proving with Isabelle/HOL An Intensive Course]. &lt;br /&gt;
# Larry Paulson. [http://www.cl.cam.ac.uk/teaching/0910/L21/ Interactive Formal Verification]. (Univ. de Cambridge, 2009-10).&lt;br /&gt;
# Arnd Poetzsch-Heffter. [https://softech.informatik.uni-kl.de/Homepage/SVHOL10 Specification and Verification with Higher-Order Logic]. &lt;br /&gt;
# Viorel Preoteasa, Ralph-Johan Back y Charmi Panchal. [http://users.abo.fi/vpreotea/isabelle-2012 Introduction to mechanized reasoning with Isabelle/HOL]. (Åbo Akademi University, 2012).&lt;br /&gt;
# Jeremy G. Siek. [http://www.cs.colorado.edu/~siek/7000/spring07/ Practical Theorem Proving with Isabelle/Isar]. (Univ. de Colorado, 2007).&lt;br /&gt;
# Jeremy G. Siek. [http://ecee.colorado.edu/~siek/ecen5013/spring11/ Theorem proving in Isabelle]. (Univ. de Colorado, 2011).&lt;br /&gt;
# Jan-Georg Smaus. [http://www.informatik.uni-freiburg.de/~ki/teaching/ws0910/csmr/lecture.html Computer-supported modeling and reasoning]. (Univ. de Feiburgo, 2009).&lt;br /&gt;
# Christian Sternagel [http://cl-informatik.uibk.ac.at/teaching/ss11/eve/content.php Experiments in Verification – Introduction to Isabelle/HOL]. (Univ. de Innsbruck, 2011-12).&lt;br /&gt;
# Tjark Weber. [http://www.cl.cam.ac.uk/teaching/1011/L21/ Interactive Formal Verification]. (Univ. de Cambridge, 2010-11).&lt;br /&gt;
&lt;br /&gt;
=== Otros cursos ===&lt;br /&gt;
# José A. Alonso [http://www.cs.us.es/~jalonso/cursos/li/ Lógica informática] (Univ. de Sevilla, 2012-13).&lt;br /&gt;
# Thorsten Altenkirch y Peter Morris [http://www.cs.nott.ac.uk/~txa/g52ifr Introduction to formal reasoning] (Univ. de Nottingham, 2010-11).&lt;br /&gt;
# Yves Bertot, Pierre Casteran, Benjamin Gregoire, Pierre Letouzey y Assia Mahboubi [http://www.di.ens.fr/~zappa/teaching/coq/ecole11 Modelling and verifying algorithms in Coq: an introduction]. (INRIA Paris-Rocquencourt, 14-18 noviembre 2011).&lt;br /&gt;
# Pierre Castéran [http://www.labri.fr/perso/casteran/FM/Logique/index.html Logic (Master In Verification)] (Univ. de Burdeos, 2011-12).&lt;br /&gt;
# Adam Chlipala [http://stellar.mit.edu/S/course/6/fa11/6.892/ Interactive computer theorem proving]. (MIT, 2012-13).&lt;br /&gt;
# Adam Chlipala y Armando Solar Lezama [https://stellar.mit.edu/S/course/6/fa13/6.820/index.html Foundations of program analysis]. (MIT, 2013-14).&lt;br /&gt;
# Robby Findler [http://www.eecs.northwestern.edu/~robby/courses/395-495-2013-fall Certified programming with dependent types]. (Northwestern, 2013-14).&lt;br /&gt;
# Nuno Gaspar [http://www-sop.inria.fr/members/Nuno.Gaspar/teaching/coq2012.php Verification with the Coq Proof Assistant] (INRIA Sophia Antipolis, 2012-13).&lt;br /&gt;
# Carlos Luna y Gustavo Betarte. [https://eva.fing.edu.uy/course/view.php?id=363 Construcción formal de programas en teoría de tipos]. (Univ. de la República, Uruguay, 2013-14).&lt;br /&gt;
# Michael Genesereth [http://logic.stanford.edu/classes/cs157/2011/cs157.html Computational Logic] (Univ. de Stanford, 2011-12).&lt;br /&gt;
# Ian Hodkinson [http://www.doc.ic.ac.uk/~imh/teaching/140_logic/logic.html Logic] (Imperial College, Londres, 2010-11).&lt;br /&gt;
# Peter Lucas [http://www.cs.ru.nl/~peterl/teaching/KeR/ Knowledge Representation and Reasoning] (Radboud University # egen, 2011-12).&lt;br /&gt;
# Larry Paulson [http://www.cl.cam.ac.uk/Teaching/current/LogicProof/ Logic and Proof] (Univ. de Cambridge, 2011-12).&lt;br /&gt;
# David Pichardie [http://www.irisa.fr/celtique/pichardie/teaching/M2/MDV/ Méthode de vérification] (Universidad de Rennes, 2006-07).&lt;br /&gt;
# Michael Winter [Logic in Computer Science] (Brock University, Ontario, Canada, 2010-11).&lt;br /&gt;
&lt;br /&gt;
== Bibliotecas de ejemplos de verificación ==&lt;br /&gt;
# [http://afp.sourceforge.net Archive of Formal Proofs].&lt;br /&gt;
# [http://www.cs.ru.nl/~freek/100 Formalizing 100 Theorems].&lt;br /&gt;
# [http://toccata.lri.fr/gallery Gallery of verified programs].&lt;br /&gt;
# [http://www.cs.nott.ac.uk/~lad/research/challenges/ Induction Challenge Problems].&lt;br /&gt;
# [http://automatedreasoning.net/ Larry Wos&amp;#039; Notebooks].&lt;br /&gt;
# [http://www.cs.miami.edu/~tptp/ The TPTP Problem Library for Automated Theorem Proving].&lt;br /&gt;
# [http://www.macs.hw.ac.uk/vstte10/Competition.html The 1st Verified Software Competition].&lt;br /&gt;
# [https://sites.google.com/site/vstte2012/compet The 2nd Verified Software Competition].&lt;br /&gt;
# [http://verifythis.cost-ic0701.org VerifyThis (A collection of verification benchmarks].&lt;br /&gt;
&lt;br /&gt;
== Artículos recientes ==&lt;br /&gt;
Están en orden cronológico inverso a la fecha de su reseña en [http://www.glc.us.es/~jalonso/vestigium/tag/resena Vestigium]:&lt;br /&gt;
# [http://bit.ly/1iZjgqN Proof Pearl: A probabilistic proof for the Girth-Chromatic number theorem]. L. Noschinski &lt;br /&gt;
# [http://bit.ly/1iJ8uVz A graph library for Isabelle]. ~ L. Noschinski &lt;br /&gt;
# [http://bit.ly/I0CU80 Gödel’s incompleteness theorems]. ~ L.C. Paulson &lt;br /&gt;
# [http://bit.ly/I0CPRN The hereditarily finite sets]. ~ L.C. Paulson &lt;br /&gt;
# [http://bit.ly/HBiIJI Applications of real number theorem proving in PVS]. ~ H. Gottliebsen, R. Hardy, O. Lightfoot y U. Martin &lt;br /&gt;
# [http://bit.ly/1awnMLB A machine-assisted proof of Gödel’s incompleteness theorems for the theory of hereditarily finite sets]. ~ L.C. Paulson &lt;br /&gt;
# [http://bit.ly/19lWeYy Verified AIG algorithms in ACL2]. ~ J. Davis y S. Swords &lt;br /&gt;
# [http://bit.ly/GAhC00 A formal model and correctness proof for an access control policy framework]. ~ C. Wu, X. Zhang y C. Urban &lt;br /&gt;
# [http://bit.ly/16SMvSS The ontological argument in PVS]. ~ J. Rushby &lt;br /&gt;
# [http://bit.ly/1dRt9n0  Formalizing Moessner’s theorem and generalizations in Nuprl]. ~ M. Bickford, D. Kozen y A. Silva &lt;br /&gt;
# [http://bit.ly/1bSeDNB Formalization in PVS of balancing properties necessary for the security of the Dolev-Yao cascade protocol model]. ~ M. Ayala y Y. Santos &lt;br /&gt;
# [http://bit.ly/1feFqWE Proof assistant based on didactic considerations]. ~ J. Pais y A Tasistro &lt;br /&gt;
# [http://bit.ly/18tHNBi Theory exploration for interactive theorem proving]. ~ M. Johansson &lt;br /&gt;
# [http://bit.ly/1b0242s From Tarski to Hilbert]. ~ G. Braun y J. Narboux &lt;br /&gt;
# [http://bit.ly/18HaXaR Formal verification of language-based concurrent noninterference]. ~ A. Popescu, J. Hölzl y T. Nipkow &lt;br /&gt;
# [http://bit.ly/1aRTQsU A Traffic Alert and Collision Avoidance System(TCAS-II) Resolution Advisory Algorithm]. ~ C. Muñoz, A. Narkawicz y J. Chamberlain &lt;br /&gt;
# [http://bit.ly/1dNwhDI Formal verification of cryptographic security proofs]. ~ M. Berg &lt;br /&gt;
# [http://bit.ly/17muAUv Polygonal numbers in Mizar]. ~ A. Grabowski &lt;br /&gt;
# [http://bit.ly/1hk5z6L A mechanised proof of Gödel’s incompleteness theorems using Nominal Isabelle]. ~ L.C. Paulson &lt;br /&gt;
# [http://bit.ly/1cSL0wE Steps towards verified implementations of HOL Light]. ~ M.O. Myreen, S. Owens y R. Kumar &lt;br /&gt;
# [http://bit.ly/16Kbgm0 Generic datatypes à la carte]. ~ S. Keuchel y T. Schrijvers &lt;br /&gt;
# [http://bit.ly/1bqJGx4 Proof pearl: A verified bignum implementation in x86-64 machine code]. ~ M.O. Myreen y G. Curello &lt;br /&gt;
# [http://bit.ly/142ow2Q Mechanized metatheory for a λ λ-calculus with trust types]. ~ R. Ribeiro, C. Camarão y L. Figueiredo &lt;br /&gt;
# [http://bit.ly/15WZBDy Proving soundness of combinatorial Vickrey auctions and generating verified executable code]. ~ M.B. Caminati, M. Kerber, C. Lange y C. Rowat &lt;br /&gt;
# [http://bit.ly/198g4n9 A computer-assisted proof of correctness of a marching cubes algorithm]. ~ A.N. Chernikov y J. Xu &lt;br /&gt;
# [http://bit.ly/11QA5g7 Verifying the bridge between simplicial topology and algebra: the Eilenberg-Zilber algorithm]. ~ L. Lambán, J. Rubio, F.J. Martín y J.L. Ruiz &lt;br /&gt;
# [http://bit.ly/1cJAXYk The Königsberg bridge problem and the friendship theorem]. ~ W. Li &lt;br /&gt;
# [http://bit.ly/13DBK9R Formal verification of a proof procedure for the description logic ALC]. ~ M. Chaabani, M. Mezghiche y M. Strecker &lt;br /&gt;
# [http://bit.ly/1ep2ex9 Pratt’s primality certificates]. ~ S. Wimmer y L. Noschinski &lt;br /&gt;
# [http://bit.ly/13C95Ci Reasoning about higher-order relational specifications]. ~ Y. Wang, K. Chaudhuri, A. Gacek y G. Nadathur &lt;br /&gt;
# [http://bit.ly/18QQLcL Proofs you can believe in – Proving equivalences between Prolog semantics in Coq]. ~ J. Kriener, A. King y S. Blazy &lt;br /&gt;
# [http://bit.ly/19uc82J Certified, efficient and sharp univariate Taylor models in Coq]. ~ E. Martin-Dorel, L. Rideau, L. Théry, M. Mayero y I. Paşca &lt;br /&gt;
# [http://bit.ly/1c4Rzel Ordinals in HOL: Transfinite arithmetic up to (and beyond) ω₁]. ~ M. Norrish y B. Huffman   &lt;br /&gt;
# [http://bit.ly/14b4Akz Program verification based on Kleene algebra in Isabelle/HOL] ~ A. Armstrong, G. Struth y T. Weber &lt;br /&gt;
# [http://bit.ly/1aOgRKx Reading an algebra textbook (by translating it to a formal document in the Isabelle/Isar language)]. ~ C. Ballarin &lt;br /&gt;
# [http://bit.ly/11HKixj Computational verification of network programs in Coq]. ~ G. Stewart &lt;br /&gt;
# [http://www.glc.us.es/~jalonso/vestigium/resena-certifying-homological-algorithms-to-study-biomedical-images Certifying homological algorithms to study biomedical images]. ~ M. Poza &lt;br /&gt;
# [http://bit.ly/16Nks9m Formalizing cut elimination of coalgebraic logics in Coq]. ~ H. Tews &lt;br /&gt;
# [http://www.glc.us.es/~jalonso/vestigium/resena-the-formalization-of-syntax-based-mathematical-algorithms-using-quotation-and-evaluation/ The formalization of syntax-based mathematical algorithms using quotation and evaluation]. ~ W.M. Farmer &lt;br /&gt;
# [http://www.glc.us.es/~jalonso/vestigium/resena-certified-symbolic-manipulation-bivariate-simplicial-polynomials/ Certified symbolic manipulation: Bivariate simplicial polynomials]. ~ L. Lambán, F.J. Martín, J. Rubio y J.L. Ruiz &lt;br /&gt;
# [http://www.glc.us.es/~jalonso/vestigium/resena-solveurs-cpfd-verifies-formellement/ Solveurs CP(FD) vérifiés formellement]. ~ C Dubois y A. Gotlieb &lt;br /&gt;
# [http://www.glc.us.es/~jalonso/vestigium/resena-formalizing-bounded-increase/ Formalizing bounded increase]. ~ R. Thiemann &lt;br /&gt;
# [http://www.glc.us.es/~jalonso/vestigium/resena-formal-mathematics-on-display-a-wiki-for-flyspeck/ Formal mathematics on display: A wiki for Flyspeck]. ~ C. Tankink, C. Kaliszyk, J. Urban y H. Geuvers &lt;br /&gt;
# [http://www.glc.us.es/~jalonso/vestigium/resena-theorem-of-three-circles-in-coq Theorem of three circles in Coq]. ~ J. Zsidó &lt;br /&gt;
# [http://bit.ly/19fiWAY Certified HLints with Isabelle/HOLCF-Prelude]. ~ J. Breitner, B. Huffman, N. Mitchell y C. Sternagel &lt;br /&gt;
# [http://bit.ly/ZfSQrQ Automatic data refinement]. ~ P. Lammich &lt;br /&gt;
# [http://bit.ly/18vyjm7 The rooster and the butterflies (a machine-checked proof of the Jordan-Hölder theorem for finite groups)]. ~ A. Mahboubi &lt;br /&gt;
# [http://bit.ly/114oyZV Mechanical verification of SAT refutations with extended resolution]. ~ N. Wetzler, M.J.H. Heule y W.A. Hunt Jr. &lt;br /&gt;
# [http://bit.ly/13H0REu Type classes and filters for mathematical analysis in Isabelle/HOL] ~ J. Hölzl, F. Immler y B. Huffman &lt;br /&gt;
# [http://bit.ly/10fv8wO Verifying refutations with extended resolution]. ~ M. J. H. Heule, W. A. Hunt, Jr. y N. Wetzler  &lt;br /&gt;
# [http://bit.ly/10EcFWj A Web interface for Isabelle: The next generation]. ~ C. Lüth y M. Ring  &lt;br /&gt;
# [http://bit.ly/18P9CSv On the formalization of continuous-time Markov chains in HOL]. ~ L. Liu, O. Hasan y S. Tahar &lt;br /&gt;
# [http://bit.ly/17H2mqy Formalizing Turing machines]. ~ A. Asperti y W. Ricciotti &lt;br /&gt;
# [http://bit.ly/YwuCeL Light-weight containers for Isabelle: efficient, extensible, nestable]. ~ A. Lochbihler &lt;br /&gt;
# [http://bit.ly/10XLrRA Graph theory]. ~ L. Noschinski &lt;br /&gt;
# [http://bit.ly/19kPEP4 A machine-checked proof of the odd order theorem]. ~ G. Gonthier et als. &lt;br /&gt;
# [http://goo.gl/LdihL A constructive theory of regular languages in Coq]. ~ C. Doczkal, J.O. Kaiser y G. Smolka &lt;br /&gt;
# [http://goo.gl/gwcwL A formal proof of Kruskal’s tree theorem in Isabelle/HOL]. ~ C. Sternagel &lt;br /&gt;
# [http://goo.gl/CUF3e Formalizing Knuth-Bendix orders and Knuth-Bendix completion]. ~ C. Sternagel y R. Thiemann  &lt;br /&gt;
# [http://goo.gl/9JAfX Developing an auction theory toolbox]. ~ C. Lange, C. Rowat, W. Windsteiger y M. Kerber &lt;br /&gt;
# [http://goo.gl/6OfmQ Formalization of incremental simplex algorithm by stepwise refinement]. ~ M. Spasić y F. Marić  &lt;br /&gt;
# [http://goo.gl/Guxky Coinductive pearl: Modular first-order logic completeness]. ~ J.C. Blanchette, A. Popescu y D. Traytel &lt;br /&gt;
# [http://goo.gl/HUOl8 A fully verified executable LTL model checker]. ~ J. Esparza et als. &lt;br /&gt;
# [http://goo.gl/RV54S ForMaRE - formal mathematical reasoning in economics]. ~ M. Kerber, C. Lange y C. Rowat. &lt;br /&gt;
# [http://goo.gl/Y7sIq AI over large formal knowledge bases: The first decade]. ~ J. Urban. &lt;br /&gt;
# [http://goo.gl/vvqNg Formalization of real analysis: A survey of proof assistants and libraries]. ~ S. Boldo, C. Lelay y G. Melquiond. &lt;br /&gt;
# [http://goo.gl/bEFYa Data refinement in Isabelle/HOL]. ~ F. Haftmann, A. Krauss, O. Kunčar y T. Nipkow &lt;br /&gt;
# [http://goo.gl/xTyvE Formalizing the confluence of orthogonal rewriting systems]. ~ A.C. Rocha y M. Ayala. &lt;br /&gt;
# [http://goo.gl/zCYHj Formalization of the complex number theory in HOL4]. ~ Z. Shi et als. &lt;br /&gt;
# [http://goo.gl/kM0dI Programming and reasonning with PowerLists in Coq]. ~ F. Loulergue y V. Niculescu  &lt;br /&gt;
# [http://goo.gl/KkU6s A hierarchy of mathematical structures in ACL2]. ~ J. Heras, F.J. Martín y V. Pascual. &lt;br /&gt;
# [http://www.inf.kcl.ac.uk/staff/urbanc/Publications/tm.pdf Mechanising Turing Machines and Computability Theory in Isabelle/HOL] ~ J. Xu, X. Zhang y C. Urban&lt;/div&gt;</summary>
		<author><name>Jalonso</name></author>
		
	</entry>
	<entry>
		<id>https://www.glc.us.es/~jalonso/RA2015/index.php?title=Documentaci%C3%B3n&amp;diff=62</id>
		<title>Documentación</title>
		<link rel="alternate" type="text/html" href="https://www.glc.us.es/~jalonso/RA2015/index.php?title=Documentaci%C3%B3n&amp;diff=62"/>
		<updated>2015-12-23T15:15:40Z</updated>

		<summary type="html">&lt;p&gt;Jalonso: /* Referencias sobre Isabelle/HOL */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;En esta página se recogen en enlaces que sirven de documentación al curso de demostración asistida por ordenador (DAO).&lt;br /&gt;
&lt;br /&gt;
== Visiones generales de la DAO ==&lt;br /&gt;
&lt;br /&gt;
# J.A. Alonso. [http://goo.gl/NWk7b Razonamiento formalizado: Del sueño a la realidad de las pruebas]. &amp;#039;&amp;#039;Vestigium&amp;#039;&amp;#039;, 26 de diciembre de 2012.&lt;br /&gt;
# J. Avigad. [http://www.andrew.cmu.edu/user/avigad/Talks/icerm.pdf Interactive theorem proving, automated reasoning, and mathematical computation]. ICERM, 14 de diciembre de 2012. &lt;br /&gt;
# M. Davis. [http://www.cs.nyu.edu/cs/faculty/davism/early.ps The early history of automated deduction].&lt;br /&gt;
# J.P. Delahaye [http://interstices.info/jcms/int_63417/du-reve-a-la-realite-des-preuves Du rêve à la réalité des preuves]. &amp;#039;&amp;#039;Interstices&amp;#039;&amp;#039;, 8 de julio de 2012.&lt;br /&gt;
# J. Germoni [http://images.math.cnrs.fr/Coq-et-caracteres.html Coq et caractères: Preuve formelle du théorème de Feit et Thompson]. &amp;#039;&amp;#039;Images des Mathématiques&amp;#039;&amp;#039;, CNRS, 23 de noviembre de 2012. &lt;br /&gt;
# H. Geuvers [http://www.ias.ac.in/sadhana/Pdf2009Feb/3.pdf Proof assistants: History, ideas and future]. &amp;#039;&amp;#039;Sadhana&amp;#039;&amp;#039;, Vol. 34-1, pp. 3-25, février 2009.&lt;br /&gt;
# G. Gonthier [http://www.ams.org/notices/200811/tx081101382p.pdf The four-color theorem]. &amp;#039;&amp;#039;Notices of the AMS&amp;#039;&amp;#039;, Vol. 55, n° 11, pp. 1382-1393, 2008.&lt;br /&gt;
# T. Hales. [http://www.ams.org/notices/200811/tx081101370p.pdf Formal proof]. &amp;#039;&amp;#039;Notices of AMS&amp;#039;&amp;#039;, Vol. 55, N. 11 (2008) pp. 1370-1380.&lt;br /&gt;
# J. Harrison. [http://www.cl.cam.ac.uk/~jrh13/papers/ab.html A short survey of automated reasoning]. &amp;#039;&amp;#039;Lecture Notes in Computer Science&amp;#039;&amp;#039;, Vol. 4545, pp. 334-349, 2007.&lt;br /&gt;
# J. Harrison. [http://www.ams.org/notices/200811/tx081101395p.pdf Formal proof: Theory and practice]. &amp;#039;&amp;#039;Notices of the AMS&amp;#039;&amp;#039;, Vol. 55, N. 11 (2008) p.1395-1406. &lt;br /&gt;
# G. Kolata. [http://www.nytimes.com/library/cyber/week/1210math.html Computer math proof shows reasoning power]. &amp;#039;&amp;#039;The New York Times&amp;#039;&amp;#039;, 10 de diciembre de 1996.&lt;br /&gt;
# D. MacKenzie [http://www.bcs.org/server.php?show=ConWebDoc.4364 Computers and the sociology of mathematical proof].&lt;br /&gt;
# G. Sutcliffe. [http://www.cs.miami.edu/~tptp/OverviewOfATP.html What is automated theorem proving?].&lt;br /&gt;
# F. Wiedijk [http://www.cs.ru.nl/~freek/100/ Formalizing the «top 100» of mathematical theorems].&lt;br /&gt;
# F. Wiedijk [http://www.ams.org/notices/200811/tx081101408p.pdf Formal proof - Getting started]. &amp;#039;&amp;#039;Notices of the AMS&amp;#039;&amp;#039;, Vol. 55, n° 11, pp. 1408-1414, 2008.&lt;br /&gt;
# F. Wiedijk, [http://www.cs.ru.nl/~freek/pubs/qed2.ps.gz The QED manifesto revisited]. &amp;#039;&amp;#039;Studies in Logic, Grammar and Rhetoric&amp;#039;&amp;#039;, Vol. 10(23), pp. 121-133, 2007.&lt;br /&gt;
&lt;br /&gt;
== Referencias sobre Isabelle/HOL ==&lt;br /&gt;
# B. Grechuk [http://dream.inf.ed.ac.uk/projects/isabelle/Isabelle_Primer.pdf Isabelle primer for mathematicians].&lt;br /&gt;
# T. Nipkow [http://www.cl.cam.ac.uk/research/hvg/Isabelle/dist/Isabelle2015/doc/prog-prove.pdf Programming and proving in Isabelle/HOL]. 25 de mayo de 2015&lt;br /&gt;
# T. Nipkow, M. Wenzel y L.C. Paulson [http://www.cl.cam.ac.uk/research/hvg/Isabelle/dist/Isabelle2015/doc/tutorial.pdf A proof assistant for higher-order logic]. Springer-Verlag. &lt;br /&gt;
# [http://www.cl.cam.ac.uk/research/hvg/Isabelle/dist/library/HOL/HOL/document.pdf Isabelle/HOL — Higher-Order Logic]. 5 de diciembre de 2013.&lt;br /&gt;
# M. Wenzel [http://www.cl.cam.ac.uk/research/hvg/Isabelle/dist/Isabelle2015/doc/isar-ref.pdf The Isabelle/Isar Reference Manual]. 5 de diciembre de 2013.&lt;br /&gt;
# M. Wenzel [https://www.lri.fr/~wenzel/Isabelle2011-Paris/quickref.pdf The  Isabelle/Isar quick reference].&lt;br /&gt;
# J. Siek [http://ecee.colorado.edu/~siek/ecen3703/spring10/quick-ref.pdf Quick Reference for Isabelle/Isar Propositional Logic].&lt;br /&gt;
# J. Siek [http://ecee.colorado.edu/~siek/ecen3703/spring10/quick-ref2.pdf Quick Reference for Isabelle/Isar More Proof Techniques].&lt;br /&gt;
# J. Siek [http://ecee.colorado.edu/~siek/ecen3703/spring10/quick-ref3.pdf Quick Reference for Isabelle/Isar First-Order Logic].&lt;br /&gt;
# [http://www.cl.cam.ac.uk/research/hvg/Isabelle/documentation.html Tutorials and manuals for Isabelle2013].&lt;br /&gt;
&lt;br /&gt;
== Lecturas complementarias ==&lt;br /&gt;
=== Programación funcional ===&lt;br /&gt;
# J.A. Alonso [http://www.cs.us.es/~jalonso/cursos/i1m/temas/2012-13-IM-temas-PF.pdf  Temas de &amp;quot;Programación funcional&amp;quot;]. Publicaciones del Grupo de Lógica Computacional. Universidad de Sevilla, 2012.&lt;br /&gt;
# J.A. Alonso y M.J. Hidalgo [http://www.cs.us.es/~jalonso/publicaciones/Piensa_en_Haskell.pdf Piensa en Haskell (Ejercicios de programación funcional con Haskell)]. Publicaciones del Grupo de Lógica Computacional. Universidad de Sevilla, 2012.&lt;br /&gt;
# G. Hutton [http://goo.gl/pKqG Programming in Haskell]. Cambridge University Press, 2007. &lt;br /&gt;
# M. Lipovača [http://aprendehaskell.es ¡Aprende Haskell por el bien de todos!].&lt;br /&gt;
&lt;br /&gt;
=== Lógica computacional ===&lt;br /&gt;
# J.A. Alonso [http://www.cs.us.es/~jalonso/cursos/li/temas/temas-LI-2012-13.pdf Temas de &amp;quot;Lógica informática&amp;quot; (2012-13)]. Publicaciones del Grupo de Lógica Computacional. Universidad de Sevilla, 2012.&lt;br /&gt;
# R. Bornat [http://bit.ly/oithic Proof and disproof in formal logic: an introduction for programmers]. Oxford University Press, 2005.&lt;br /&gt;
# K. Broda, S. Eisenbach, H. Khoshnevisan y S. Vickers [http://pubs.doc.ic.ac.uk/reasoned-programming/reasoned-programming.pdf Reasoned programming]. Imperial College, 1994.&lt;br /&gt;
# K. Doets y J. van Eijck [http://www.ldc.usb.ve/~astorga/Haskell.Road.pdf The Haskell Road to Logic, Maths and Programming].&lt;br /&gt;
# M. Huth y M. Ryan [http://goo.gl/TMqOo Logic in computer science: Modelling and reasoning about systems]. Cambridge University Press, 2004. (Incluye el [http://www.cs.bham.ac.uk/research/lics/tutor/index.html tutor en la Red]).&lt;br /&gt;
&lt;br /&gt;
== Cursos relacionados ==&lt;br /&gt;
=== Cursos con Isabelle/HOL ===&lt;br /&gt;
# Jeremy Avigad. [http://www.phil.cmu.edu/~avigad/formal/ Logic and Formal Verification]. (Carnegie Mellon, 2009).&lt;br /&gt;
# Clemens Ballarin. [http://cl-informatik.uibk.ac.at/teaching/ss08/atp/introduction.php Automatic Deduction]. (Univ de Innsbruck, 2008).&lt;br /&gt;
# Clemens Ballarin. [http://www4.in.tum.de/~ballarin/belgrade08-tut/ Introduction to the Isabelle Proof Assistant]. (Belgrado, 2008). &lt;br /&gt;
# Clemens Ballarin y Gerwin Klein [http://isabelle.in.tum.de/coursematerial/IJCAR04 Introduction to the Isabelle Proof Assistant]. (en el IJCAR-2004).&lt;br /&gt;
# Clemens Ballarin y Tjark Weber. [http://cl-informatik.uibk.ac.at/teaching/ws06/atp/introduction.php Automated Theorem Proving in Isabelle/HOL]. (Univ. de Innsbruck, 2006-07).&lt;br /&gt;
# A.D. Brucker, D. Basin, J.G. Smaus y B. Wolff. [http://archiv.infsec.ethz.ch/education/permanent/csmr.html Computer-supported Modeling and Reasoning]. (ETH Zurich, 2011).&lt;br /&gt;
# Mads Dam. [http://www.csc.kth.se/utbildning/kth/kurser/DD2453/aform07/ Advanced formal methods]. (KTH Royal Institute of Technology, 2007).&lt;br /&gt;
# Jacques Fleuriot y Paul Jackson. [http://www.inf.ed.ac.uk/teaching/courses/ar/slides/ Automated reasoning]. (Univ. de Edimburgo, 2012-13).&lt;br /&gt;
# Thomas Genet [http://www.irisa.fr/celtique/genet/ACF Software formal analysis and design]. (Univ. de Rennes)&lt;br /&gt;
# Gerwin Klein. [http://www.cse.unsw.edu.au/~kleing/teaching/thprv-04 Theorem Proving - Principles, Techniques, Applications]. (NICTA, 2004).&lt;br /&gt;
# Gerwin Klein. [http://www.cse.unsw.edu.au/~cs4161/index.html Advanced Topics in Software Verification]. (NICTA, 2012).&lt;br /&gt;
# Joao Marcos. [http://www.dimap.ufrn.br/~jmarcos/courses/LC/Ementa.htm Lógica computacional: Demonstração assistida e semi-automática de teoremas].(UFRN, 2000).&lt;br /&gt;
# Tobias Nipkow. [http://www4.informatik.tu-muenchen.de/~nipkow/semantics/ Semantics of programming languages]. (Univ. de Munich, 2012-13).&lt;br /&gt;
# Tobias Nipkow [http://isabelle.in.tum.de/coursematerial/PSV2009-1 Theorem Proving with Isabelle/HOL An Intensive Course]. &lt;br /&gt;
# Larry Paulson. [http://www.cl.cam.ac.uk/teaching/0910/L21/ Interactive Formal Verification]. (Univ. de Cambridge, 2009-10).&lt;br /&gt;
# Arnd Poetzsch-Heffter. [https://softech.informatik.uni-kl.de/Homepage/SVHOL10 Specification and Verification with Higher-Order Logic]. &lt;br /&gt;
# Viorel Preoteasa, Ralph-Johan Back y Charmi Panchal. [http://users.abo.fi/vpreotea/isabelle-2012 Introduction to mechanized reasoning with Isabelle/HOL]. (Åbo Akademi University, 2012).&lt;br /&gt;
# Jeremy G. Siek. [http://www.cs.colorado.edu/~siek/7000/spring07/ Practical Theorem Proving with Isabelle/Isar]. (Univ. de Colorado, 2007).&lt;br /&gt;
# Jeremy G. Siek. [http://ecee.colorado.edu/~siek/ecen5013/spring11/ Theorem proving in Isabelle]. (Univ. de Colorado, 2011).&lt;br /&gt;
# Jan-Georg Smaus. [http://www.informatik.uni-freiburg.de/~ki/teaching/ws0910/csmr/lecture.html Computer-supported modeling and reasoning]. (Univ. de Feiburgo, 2009).&lt;br /&gt;
# Christian Sternagel [http://cl-informatik.uibk.ac.at/teaching/ss11/eve/content.php Experiments in Verification – Introduction to Isabelle/HOL]. (Univ. de Innsbruck, 2011-12).&lt;br /&gt;
# Tjark Weber. [http://www.cl.cam.ac.uk/teaching/1011/L21/ Interactive Formal Verification]. (Univ. de Cambridge, 2010-11).&lt;br /&gt;
&lt;br /&gt;
=== Otros cursos ===&lt;br /&gt;
# José A. Alonso [http://www.cs.us.es/~jalonso/cursos/li/ Lógica informática] (Univ. de Sevilla, 2012-13).&lt;br /&gt;
# Thorsten Altenkirch y Peter Morris [http://www.cs.nott.ac.uk/~txa/g52ifr Introduction to formal reasoning] (Univ. de Nottingham, 2010-11).&lt;br /&gt;
# Yves Bertot, Pierre Casteran, Benjamin Gregoire, Pierre Letouzey y Assia Mahboubi [http://www.di.ens.fr/~zappa/teaching/coq/ecole11 Modelling and verifying algorithms in Coq: an introduction]. (INRIA Paris-Rocquencourt, 14-18 noviembre 2011).&lt;br /&gt;
# Pierre Castéran [http://www.labri.fr/perso/casteran/FM/Logique/index.html Logic (Master In Verification)] (Univ. de Burdeos, 2011-12).&lt;br /&gt;
# Adam Chlipala [http://stellar.mit.edu/S/course/6/fa11/6.892/ Interactive computer theorem proving]. (MIT, 2012-13).&lt;br /&gt;
# Adam Chlipala y Armando Solar Lezama [https://stellar.mit.edu/S/course/6/fa13/6.820/index.html Foundations of program analysis]. (MIT, 2013-14).&lt;br /&gt;
# Robby Findler [http://www.eecs.northwestern.edu/~robby/courses/395-495-2013-fall Certified programming with dependent types]. (Northwestern, 2013-14).&lt;br /&gt;
# Nuno Gaspar [http://www-sop.inria.fr/members/Nuno.Gaspar/teaching/coq2012.php Verification with the Coq Proof Assistant] (INRIA Sophia Antipolis, 2012-13).&lt;br /&gt;
# Carlos Luna y Gustavo Betarte. [https://eva.fing.edu.uy/course/view.php?id=363 Construcción formal de programas en teoría de tipos]. (Univ. de la República, Uruguay, 2013-14).&lt;br /&gt;
# Michael Genesereth [http://logic.stanford.edu/classes/cs157/2011/cs157.html Computational Logic] (Univ. de Stanford, 2011-12).&lt;br /&gt;
# Ian Hodkinson [http://www.doc.ic.ac.uk/~imh/teaching/140_logic/logic.html Logic] (Imperial College, Londres, 2010-11).&lt;br /&gt;
# Peter Lucas [http://www.cs.ru.nl/~peterl/teaching/KeR/ Knowledge Representation and Reasoning] (Radboud University # egen, 2011-12).&lt;br /&gt;
# Larry Paulson [http://www.cl.cam.ac.uk/Teaching/current/LogicProof/ Logic and Proof] (Univ. de Cambridge, 2011-12).&lt;br /&gt;
# David Pichardie [http://www.irisa.fr/celtique/pichardie/teaching/M2/MDV/ Méthode de vérification] (Universidad de Rennes, 2006-07).&lt;br /&gt;
# Michael Winter [Logic in Computer Science] (Brock University, Ontario, Canada, 2010-11).&lt;br /&gt;
&lt;br /&gt;
== Bibliotecas de ejemplos de verificación ==&lt;br /&gt;
# [http://afp.sourceforge.net Archive of Formal Proofs].&lt;br /&gt;
# [http://www.cs.ru.nl/~freek/100 Formalizing 100 Theorems].&lt;br /&gt;
# [http://toccata.lri.fr/gallery Gallery of verified programs].&lt;br /&gt;
# [http://www.cs.nott.ac.uk/~lad/research/challenges/ Induction Challenge Problems].&lt;br /&gt;
# [http://automatedreasoning.net/ Larry Wos&amp;#039; Notebooks].&lt;br /&gt;
# [http://www.cs.miami.edu/~tptp/ The TPTP Problem Library for Automated Theorem Proving].&lt;br /&gt;
# [http://www.macs.hw.ac.uk/vstte10/Competition.html The 1st Verified Software Competition].&lt;br /&gt;
# [https://sites.google.com/site/vstte2012/compet The 2nd Verified Software Competition].&lt;br /&gt;
# [http://verifythis.cost-ic0701.org VerifyThis (A collection of verification benchmarks].&lt;br /&gt;
&lt;br /&gt;
== Artículos recientes ==&lt;br /&gt;
Están en orden cronológico inverso a la fecha de su reseña en [http://www.glc.us.es/~jalonso/vestigium/tag/resena Vestigium]:&lt;br /&gt;
# [http://bit.ly/1iZjgqN Proof Pearl: A probabilistic proof for the Girth-Chromatic number theorem]. L. Noschinski &lt;br /&gt;
# [http://bit.ly/1iJ8uVz A graph library for Isabelle]. ~ L. Noschinski &lt;br /&gt;
# [http://bit.ly/I0CU80 Gödel’s incompleteness theorems]. ~ L.C. Paulson &lt;br /&gt;
# [http://bit.ly/I0CPRN The hereditarily finite sets]. ~ L.C. Paulson &lt;br /&gt;
# [http://bit.ly/HBiIJI Applications of real number theorem proving in PVS]. ~ H. Gottliebsen, R. Hardy, O. Lightfoot y U. Martin &lt;br /&gt;
# [http://bit.ly/1awnMLB A machine-assisted proof of Gödel’s incompleteness theorems for the theory of hereditarily finite sets]. ~ L.C. Paulson &lt;br /&gt;
# [http://bit.ly/19lWeYy Verified AIG algorithms in ACL2]. ~ J. Davis y S. Swords &lt;br /&gt;
# [http://bit.ly/GAhC00 A formal model and correctness proof for an access control policy framework]. ~ C. Wu, X. Zhang y C. Urban &lt;br /&gt;
# [http://bit.ly/16SMvSS The ontological argument in PVS]. ~ J. Rushby &lt;br /&gt;
# [http://bit.ly/1dRt9n0  Formalizing Moessner’s theorem and generalizations in Nuprl]. ~ M. Bickford, D. Kozen y A. Silva &lt;br /&gt;
# [http://bit.ly/1bSeDNB Formalization in PVS of balancing properties necessary for the security of the Dolev-Yao cascade protocol model]. ~ M. Ayala y Y. Santos &lt;br /&gt;
# [http://bit.ly/1feFqWE Proof assistant based on didactic considerations]. ~ J. Pais y A Tasistro &lt;br /&gt;
# [http://bit.ly/18tHNBi Theory exploration for interactive theorem proving]. ~ M. Johansson &lt;br /&gt;
# [http://bit.ly/1b0242s From Tarski to Hilbert]. ~ G. Braun y J. Narboux &lt;br /&gt;
# [http://bit.ly/18HaXaR Formal verification of language-based concurrent noninterference]. ~ A. Popescu, J. Hölzl y T. Nipkow &lt;br /&gt;
# [http://bit.ly/1aRTQsU A Traffic Alert and Collision Avoidance System(TCAS-II) Resolution Advisory Algorithm]. ~ C. Muñoz, A. Narkawicz y J. Chamberlain &lt;br /&gt;
# [http://bit.ly/1dNwhDI Formal verification of cryptographic security proofs]. ~ M. Berg &lt;br /&gt;
# [http://bit.ly/17muAUv Polygonal numbers in Mizar]. ~ A. Grabowski &lt;br /&gt;
# [http://bit.ly/1hk5z6L A mechanised proof of Gödel’s incompleteness theorems using Nominal Isabelle]. ~ L.C. Paulson &lt;br /&gt;
# [http://bit.ly/1cSL0wE Steps towards verified implementations of HOL Light]. ~ M.O. Myreen, S. Owens y R. Kumar &lt;br /&gt;
# [http://bit.ly/16Kbgm0 Generic datatypes à la carte]. ~ S. Keuchel y T. Schrijvers &lt;br /&gt;
# [http://bit.ly/1bqJGx4 Proof pearl: A verified bignum implementation in x86-64 machine code]. ~ M.O. Myreen y G. Curello &lt;br /&gt;
# [http://bit.ly/142ow2Q Mechanized metatheory for a λ λ-calculus with trust types]. ~ R. Ribeiro, C. Camarão y L. Figueiredo &lt;br /&gt;
# [http://bit.ly/15WZBDy Proving soundness of combinatorial Vickrey auctions and generating verified executable code]. ~ M.B. Caminati, M. Kerber, C. Lange y C. Rowat &lt;br /&gt;
# [http://bit.ly/198g4n9 A computer-assisted proof of correctness of a marching cubes algorithm]. ~ A.N. Chernikov y J. Xu &lt;br /&gt;
# [http://bit.ly/11QA5g7 Verifying the bridge between simplicial topology and algebra: the Eilenberg-Zilber algorithm]. ~ L. Lambán, J. Rubio, F.J. Martín y J.L. Ruiz &lt;br /&gt;
# [http://bit.ly/1cJAXYk The Königsberg bridge problem and the friendship theorem]. ~ W. Li &lt;br /&gt;
# [http://bit.ly/13DBK9R Formal verification of a proof procedure for the description logic ALC]. ~ M. Chaabani, M. Mezghiche y M. Strecker &lt;br /&gt;
# [http://bit.ly/1ep2ex9 Pratt’s primality certificates]. ~ S. Wimmer y L. Noschinski &lt;br /&gt;
# [http://bit.ly/13C95Ci Reasoning about higher-order relational specifications]. ~ Y. Wang, K. Chaudhuri, A. Gacek y G. Nadathur &lt;br /&gt;
# [http://bit.ly/18QQLcL Proofs you can believe in – Proving equivalences between Prolog semantics in Coq]. ~ J. Kriener, A. King y S. Blazy &lt;br /&gt;
# [http://bit.ly/19uc82J Certified, efficient and sharp univariate Taylor models in Coq]. ~ E. Martin-Dorel, L. Rideau, L. Théry, M. Mayero y I. Paşca &lt;br /&gt;
# [http://bit.ly/1c4Rzel Ordinals in HOL: Transfinite arithmetic up to (and beyond) ω₁]. ~ M. Norrish y B. Huffman   &lt;br /&gt;
# [http://bit.ly/14b4Akz Program verification based on Kleene algebra in Isabelle/HOL] ~ A. Armstrong, G. Struth y T. Weber &lt;br /&gt;
# [http://bit.ly/1aOgRKx Reading an algebra textbook (by translating it to a formal document in the Isabelle/Isar language)]. ~ C. Ballarin &lt;br /&gt;
# [http://bit.ly/11HKixj Computational verification of network programs in Coq]. ~ G. Stewart &lt;br /&gt;
# [http://www.glc.us.es/~jalonso/vestigium/resena-certifying-homological-algorithms-to-study-biomedical-images Certifying homological algorithms to study biomedical images]. ~ M. Poza &lt;br /&gt;
# [http://bit.ly/16Nks9m Formalizing cut elimination of coalgebraic logics in Coq]. ~ H. Tews &lt;br /&gt;
# [http://www.glc.us.es/~jalonso/vestigium/resena-the-formalization-of-syntax-based-mathematical-algorithms-using-quotation-and-evaluation/ The formalization of syntax-based mathematical algorithms using quotation and evaluation]. ~ W.M. Farmer &lt;br /&gt;
# [http://www.glc.us.es/~jalonso/vestigium/resena-certified-symbolic-manipulation-bivariate-simplicial-polynomials/ Certified symbolic manipulation: Bivariate simplicial polynomials]. ~ L. Lambán, F.J. Martín, J. Rubio y J.L. Ruiz &lt;br /&gt;
# [http://www.glc.us.es/~jalonso/vestigium/resena-solveurs-cpfd-verifies-formellement/ Solveurs CP(FD) vérifiés formellement]. ~ C Dubois y A. Gotlieb &lt;br /&gt;
# [http://www.glc.us.es/~jalonso/vestigium/resena-formalizing-bounded-increase/ Formalizing bounded increase]. ~ R. Thiemann &lt;br /&gt;
# [http://www.glc.us.es/~jalonso/vestigium/resena-formal-mathematics-on-display-a-wiki-for-flyspeck/ Formal mathematics on display: A wiki for Flyspeck]. ~ C. Tankink, C. Kaliszyk, J. Urban y H. Geuvers &lt;br /&gt;
# [http://www.glc.us.es/~jalonso/vestigium/resena-theorem-of-three-circles-in-coq Theorem of three circles in Coq]. ~ J. Zsidó &lt;br /&gt;
# [http://bit.ly/19fiWAY Certified HLints with Isabelle/HOLCF-Prelude]. ~ J. Breitner, B. Huffman, N. Mitchell y C. Sternagel &lt;br /&gt;
# [http://bit.ly/ZfSQrQ Automatic data refinement]. ~ P. Lammich &lt;br /&gt;
# [http://bit.ly/18vyjm7 The rooster and the butterflies (a machine-checked proof of the Jordan-Hölder theorem for finite groups)]. ~ A. Mahboubi &lt;br /&gt;
# [http://bit.ly/114oyZV Mechanical verification of SAT refutations with extended resolution]. ~ N. Wetzler, M.J.H. Heule y W.A. Hunt Jr. &lt;br /&gt;
# [http://bit.ly/13H0REu Type classes and filters for mathematical analysis in Isabelle/HOL] ~ J. Hölzl, F. Immler y B. Huffman &lt;br /&gt;
# [http://bit.ly/10fv8wO Verifying refutations with extended resolution]. ~ M. J. H. Heule, W. A. Hunt, Jr. y N. Wetzler  &lt;br /&gt;
# [http://bit.ly/10EcFWj A Web interface for Isabelle: The next generation]. ~ C. Lüth y M. Ring  &lt;br /&gt;
# [http://bit.ly/18P9CSv On the formalization of continuous-time Markov chains in HOL]. ~ L. Liu, O. Hasan y S. Tahar &lt;br /&gt;
# [http://bit.ly/17H2mqy Formalizing Turing machines]. ~ A. Asperti y W. Ricciotti &lt;br /&gt;
# [http://bit.ly/YwuCeL Light-weight containers for Isabelle: efficient, extensible, nestable]. ~ A. Lochbihler &lt;br /&gt;
# [http://bit.ly/10XLrRA Graph theory]. ~ L. Noschinski &lt;br /&gt;
# [http://bit.ly/19kPEP4 A machine-checked proof of the odd order theorem]. ~ G. Gonthier et als. &lt;br /&gt;
# [http://goo.gl/LdihL A constructive theory of regular languages in Coq]. ~ C. Doczkal, J.O. Kaiser y G. Smolka &lt;br /&gt;
# [http://goo.gl/gwcwL A formal proof of Kruskal’s tree theorem in Isabelle/HOL]. ~ C. Sternagel &lt;br /&gt;
# [http://goo.gl/CUF3e Formalizing Knuth-Bendix orders and Knuth-Bendix completion]. ~ C. Sternagel y R. Thiemann  &lt;br /&gt;
# [http://goo.gl/9JAfX Developing an auction theory toolbox]. ~ C. Lange, C. Rowat, W. Windsteiger y M. Kerber &lt;br /&gt;
# [http://goo.gl/6OfmQ Formalization of incremental simplex algorithm by stepwise refinement]. ~ M. Spasić y F. Marić  &lt;br /&gt;
# [http://goo.gl/Guxky Coinductive pearl: Modular first-order logic completeness]. ~ J.C. Blanchette, A. Popescu y D. Traytel &lt;br /&gt;
# [http://goo.gl/HUOl8 A fully verified executable LTL model checker]. ~ J. Esparza et als. &lt;br /&gt;
# [http://goo.gl/RV54S ForMaRE - formal mathematical reasoning in economics]. ~ M. Kerber, C. Lange y C. Rowat. &lt;br /&gt;
# [http://goo.gl/Y7sIq AI over large formal knowledge bases: The first decade]. ~ J. Urban. &lt;br /&gt;
# [http://goo.gl/vvqNg Formalization of real analysis: A survey of proof assistants and libraries]. ~ S. Boldo, C. Lelay y G. Melquiond. &lt;br /&gt;
# [http://goo.gl/bEFYa Data refinement in Isabelle/HOL]. ~ F. Haftmann, A. Krauss, O. Kunčar y T. Nipkow &lt;br /&gt;
# [http://goo.gl/xTyvE Formalizing the confluence of orthogonal rewriting systems]. ~ A.C. Rocha y M. Ayala. &lt;br /&gt;
# [http://goo.gl/zCYHj Formalization of the complex number theory in HOL4]. ~ Z. Shi et als. &lt;br /&gt;
# [http://goo.gl/kM0dI Programming and reasonning with PowerLists in Coq]. ~ F. Loulergue y V. Niculescu  &lt;br /&gt;
# [http://goo.gl/KkU6s A hierarchy of mathematical structures in ACL2]. ~ J. Heras, F.J. Martín y V. Pascual. &lt;br /&gt;
# [http://www.inf.kcl.ac.uk/staff/urbanc/Publications/tm.pdf Mechanising Turing Machines and Computability Theory in Isabelle/HOL] ~ J. Xu, X. Zhang y C. Urban&lt;/div&gt;</summary>
		<author><name>Jalonso</name></author>
		
	</entry>
	<entry>
		<id>https://www.glc.us.es/~jalonso/RA2015/index.php?title=Documentaci%C3%B3n&amp;diff=61</id>
		<title>Documentación</title>
		<link rel="alternate" type="text/html" href="https://www.glc.us.es/~jalonso/RA2015/index.php?title=Documentaci%C3%B3n&amp;diff=61"/>
		<updated>2015-12-23T15:12:14Z</updated>

		<summary type="html">&lt;p&gt;Jalonso: /* Referencias sobre Isabelle/HOL */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;En esta página se recogen en enlaces que sirven de documentación al curso de demostración asistida por ordenador (DAO).&lt;br /&gt;
&lt;br /&gt;
== Visiones generales de la DAO ==&lt;br /&gt;
&lt;br /&gt;
# J.A. Alonso. [http://goo.gl/NWk7b Razonamiento formalizado: Del sueño a la realidad de las pruebas]. &amp;#039;&amp;#039;Vestigium&amp;#039;&amp;#039;, 26 de diciembre de 2012.&lt;br /&gt;
# J. Avigad. [http://www.andrew.cmu.edu/user/avigad/Talks/icerm.pdf Interactive theorem proving, automated reasoning, and mathematical computation]. ICERM, 14 de diciembre de 2012. &lt;br /&gt;
# M. Davis. [http://www.cs.nyu.edu/cs/faculty/davism/early.ps The early history of automated deduction].&lt;br /&gt;
# J.P. Delahaye [http://interstices.info/jcms/int_63417/du-reve-a-la-realite-des-preuves Du rêve à la réalité des preuves]. &amp;#039;&amp;#039;Interstices&amp;#039;&amp;#039;, 8 de julio de 2012.&lt;br /&gt;
# J. Germoni [http://images.math.cnrs.fr/Coq-et-caracteres.html Coq et caractères: Preuve formelle du théorème de Feit et Thompson]. &amp;#039;&amp;#039;Images des Mathématiques&amp;#039;&amp;#039;, CNRS, 23 de noviembre de 2012. &lt;br /&gt;
# H. Geuvers [http://www.ias.ac.in/sadhana/Pdf2009Feb/3.pdf Proof assistants: History, ideas and future]. &amp;#039;&amp;#039;Sadhana&amp;#039;&amp;#039;, Vol. 34-1, pp. 3-25, février 2009.&lt;br /&gt;
# G. Gonthier [http://www.ams.org/notices/200811/tx081101382p.pdf The four-color theorem]. &amp;#039;&amp;#039;Notices of the AMS&amp;#039;&amp;#039;, Vol. 55, n° 11, pp. 1382-1393, 2008.&lt;br /&gt;
# T. Hales. [http://www.ams.org/notices/200811/tx081101370p.pdf Formal proof]. &amp;#039;&amp;#039;Notices of AMS&amp;#039;&amp;#039;, Vol. 55, N. 11 (2008) pp. 1370-1380.&lt;br /&gt;
# J. Harrison. [http://www.cl.cam.ac.uk/~jrh13/papers/ab.html A short survey of automated reasoning]. &amp;#039;&amp;#039;Lecture Notes in Computer Science&amp;#039;&amp;#039;, Vol. 4545, pp. 334-349, 2007.&lt;br /&gt;
# J. Harrison. [http://www.ams.org/notices/200811/tx081101395p.pdf Formal proof: Theory and practice]. &amp;#039;&amp;#039;Notices of the AMS&amp;#039;&amp;#039;, Vol. 55, N. 11 (2008) p.1395-1406. &lt;br /&gt;
# G. Kolata. [http://www.nytimes.com/library/cyber/week/1210math.html Computer math proof shows reasoning power]. &amp;#039;&amp;#039;The New York Times&amp;#039;&amp;#039;, 10 de diciembre de 1996.&lt;br /&gt;
# D. MacKenzie [http://www.bcs.org/server.php?show=ConWebDoc.4364 Computers and the sociology of mathematical proof].&lt;br /&gt;
# G. Sutcliffe. [http://www.cs.miami.edu/~tptp/OverviewOfATP.html What is automated theorem proving?].&lt;br /&gt;
# F. Wiedijk [http://www.cs.ru.nl/~freek/100/ Formalizing the «top 100» of mathematical theorems].&lt;br /&gt;
# F. Wiedijk [http://www.ams.org/notices/200811/tx081101408p.pdf Formal proof - Getting started]. &amp;#039;&amp;#039;Notices of the AMS&amp;#039;&amp;#039;, Vol. 55, n° 11, pp. 1408-1414, 2008.&lt;br /&gt;
# F. Wiedijk, [http://www.cs.ru.nl/~freek/pubs/qed2.ps.gz The QED manifesto revisited]. &amp;#039;&amp;#039;Studies in Logic, Grammar and Rhetoric&amp;#039;&amp;#039;, Vol. 10(23), pp. 121-133, 2007.&lt;br /&gt;
&lt;br /&gt;
== Referencias sobre Isabelle/HOL ==&lt;br /&gt;
# B. Grechuk [http://dream.inf.ed.ac.uk/projects/isabelle/Isabelle_Primer.pdf Isabelle primer for mathematicians].&lt;br /&gt;
# T. Nipkow [http://www.cl.cam.ac.uk/research/hvg/Isabelle/dist/Isabelle2015/doc/prog-prove.pdf Programming and proving in Isabelle/HOL]. 25 de mayo de 2015&lt;br /&gt;
# T. Nipkow, M. Wenzel y L.C. Paulson [http://www.cl.cam.ac.uk/research/hvg/Isabelle/dist/Isabelle2013-2/doc/tutorial.pdf A proof assistant for higher-order logic]. Springer-Verlag. 5 de diciembre de   2013.&lt;br /&gt;
# [http://www.cl.cam.ac.uk/research/hvg/Isabelle/dist/library/HOL/HOL/document.pdf Isabelle/HOL — Higher-Order Logic]. 5 de diciembre de 2013.&lt;br /&gt;
# M. Wenzel [http://www.cl.cam.ac.uk/research/hvg/Isabelle/dist/Isabelle2013-2/doc/isar-ref.pdf The Isabelle/Isar Reference Manual]. 5 de diciembre de 2013.&lt;br /&gt;
# M. Wenzel [https://www.lri.fr/~wenzel/Isabelle2011-Paris/quickref.pdf The  Isabelle/Isar quick reference].&lt;br /&gt;
# J. Siek [http://ecee.colorado.edu/~siek/ecen3703/spring10/quick-ref.pdf Quick Reference for Isabelle/Isar Propositional Logic].&lt;br /&gt;
# J. Siek [http://ecee.colorado.edu/~siek/ecen3703/spring10/quick-ref2.pdf Quick Reference for Isabelle/Isar More Proof Techniques].&lt;br /&gt;
# J. Siek [http://ecee.colorado.edu/~siek/ecen3703/spring10/quick-ref3.pdf Quick Reference for Isabelle/Isar First-Order Logic].&lt;br /&gt;
# [http://www.cl.cam.ac.uk/research/hvg/Isabelle/documentation.html Tutorials and manuals for Isabelle2013].&lt;br /&gt;
&lt;br /&gt;
== Lecturas complementarias ==&lt;br /&gt;
=== Programación funcional ===&lt;br /&gt;
# J.A. Alonso [http://www.cs.us.es/~jalonso/cursos/i1m/temas/2012-13-IM-temas-PF.pdf  Temas de &amp;quot;Programación funcional&amp;quot;]. Publicaciones del Grupo de Lógica Computacional. Universidad de Sevilla, 2012.&lt;br /&gt;
# J.A. Alonso y M.J. Hidalgo [http://www.cs.us.es/~jalonso/publicaciones/Piensa_en_Haskell.pdf Piensa en Haskell (Ejercicios de programación funcional con Haskell)]. Publicaciones del Grupo de Lógica Computacional. Universidad de Sevilla, 2012.&lt;br /&gt;
# G. Hutton [http://goo.gl/pKqG Programming in Haskell]. Cambridge University Press, 2007. &lt;br /&gt;
# M. Lipovača [http://aprendehaskell.es ¡Aprende Haskell por el bien de todos!].&lt;br /&gt;
&lt;br /&gt;
=== Lógica computacional ===&lt;br /&gt;
# J.A. Alonso [http://www.cs.us.es/~jalonso/cursos/li/temas/temas-LI-2012-13.pdf Temas de &amp;quot;Lógica informática&amp;quot; (2012-13)]. Publicaciones del Grupo de Lógica Computacional. Universidad de Sevilla, 2012.&lt;br /&gt;
# R. Bornat [http://bit.ly/oithic Proof and disproof in formal logic: an introduction for programmers]. Oxford University Press, 2005.&lt;br /&gt;
# K. Broda, S. Eisenbach, H. Khoshnevisan y S. Vickers [http://pubs.doc.ic.ac.uk/reasoned-programming/reasoned-programming.pdf Reasoned programming]. Imperial College, 1994.&lt;br /&gt;
# K. Doets y J. van Eijck [http://www.ldc.usb.ve/~astorga/Haskell.Road.pdf The Haskell Road to Logic, Maths and Programming].&lt;br /&gt;
# M. Huth y M. Ryan [http://goo.gl/TMqOo Logic in computer science: Modelling and reasoning about systems]. Cambridge University Press, 2004. (Incluye el [http://www.cs.bham.ac.uk/research/lics/tutor/index.html tutor en la Red]).&lt;br /&gt;
&lt;br /&gt;
== Cursos relacionados ==&lt;br /&gt;
=== Cursos con Isabelle/HOL ===&lt;br /&gt;
# Jeremy Avigad. [http://www.phil.cmu.edu/~avigad/formal/ Logic and Formal Verification]. (Carnegie Mellon, 2009).&lt;br /&gt;
# Clemens Ballarin. [http://cl-informatik.uibk.ac.at/teaching/ss08/atp/introduction.php Automatic Deduction]. (Univ de Innsbruck, 2008).&lt;br /&gt;
# Clemens Ballarin. [http://www4.in.tum.de/~ballarin/belgrade08-tut/ Introduction to the Isabelle Proof Assistant]. (Belgrado, 2008). &lt;br /&gt;
# Clemens Ballarin y Gerwin Klein [http://isabelle.in.tum.de/coursematerial/IJCAR04 Introduction to the Isabelle Proof Assistant]. (en el IJCAR-2004).&lt;br /&gt;
# Clemens Ballarin y Tjark Weber. [http://cl-informatik.uibk.ac.at/teaching/ws06/atp/introduction.php Automated Theorem Proving in Isabelle/HOL]. (Univ. de Innsbruck, 2006-07).&lt;br /&gt;
# A.D. Brucker, D. Basin, J.G. Smaus y B. Wolff. [http://archiv.infsec.ethz.ch/education/permanent/csmr.html Computer-supported Modeling and Reasoning]. (ETH Zurich, 2011).&lt;br /&gt;
# Mads Dam. [http://www.csc.kth.se/utbildning/kth/kurser/DD2453/aform07/ Advanced formal methods]. (KTH Royal Institute of Technology, 2007).&lt;br /&gt;
# Jacques Fleuriot y Paul Jackson. [http://www.inf.ed.ac.uk/teaching/courses/ar/slides/ Automated reasoning]. (Univ. de Edimburgo, 2012-13).&lt;br /&gt;
# Thomas Genet [http://www.irisa.fr/celtique/genet/ACF Software formal analysis and design]. (Univ. de Rennes)&lt;br /&gt;
# Gerwin Klein. [http://www.cse.unsw.edu.au/~kleing/teaching/thprv-04 Theorem Proving - Principles, Techniques, Applications]. (NICTA, 2004).&lt;br /&gt;
# Gerwin Klein. [http://www.cse.unsw.edu.au/~cs4161/index.html Advanced Topics in Software Verification]. (NICTA, 2012).&lt;br /&gt;
# Joao Marcos. [http://www.dimap.ufrn.br/~jmarcos/courses/LC/Ementa.htm Lógica computacional: Demonstração assistida e semi-automática de teoremas].(UFRN, 2000).&lt;br /&gt;
# Tobias Nipkow. [http://www4.informatik.tu-muenchen.de/~nipkow/semantics/ Semantics of programming languages]. (Univ. de Munich, 2012-13).&lt;br /&gt;
# Tobias Nipkow [http://isabelle.in.tum.de/coursematerial/PSV2009-1 Theorem Proving with Isabelle/HOL An Intensive Course]. &lt;br /&gt;
# Larry Paulson. [http://www.cl.cam.ac.uk/teaching/0910/L21/ Interactive Formal Verification]. (Univ. de Cambridge, 2009-10).&lt;br /&gt;
# Arnd Poetzsch-Heffter. [https://softech.informatik.uni-kl.de/Homepage/SVHOL10 Specification and Verification with Higher-Order Logic]. &lt;br /&gt;
# Viorel Preoteasa, Ralph-Johan Back y Charmi Panchal. [http://users.abo.fi/vpreotea/isabelle-2012 Introduction to mechanized reasoning with Isabelle/HOL]. (Åbo Akademi University, 2012).&lt;br /&gt;
# Jeremy G. Siek. [http://www.cs.colorado.edu/~siek/7000/spring07/ Practical Theorem Proving with Isabelle/Isar]. (Univ. de Colorado, 2007).&lt;br /&gt;
# Jeremy G. Siek. [http://ecee.colorado.edu/~siek/ecen5013/spring11/ Theorem proving in Isabelle]. (Univ. de Colorado, 2011).&lt;br /&gt;
# Jan-Georg Smaus. [http://www.informatik.uni-freiburg.de/~ki/teaching/ws0910/csmr/lecture.html Computer-supported modeling and reasoning]. (Univ. de Feiburgo, 2009).&lt;br /&gt;
# Christian Sternagel [http://cl-informatik.uibk.ac.at/teaching/ss11/eve/content.php Experiments in Verification – Introduction to Isabelle/HOL]. (Univ. de Innsbruck, 2011-12).&lt;br /&gt;
# Tjark Weber. [http://www.cl.cam.ac.uk/teaching/1011/L21/ Interactive Formal Verification]. (Univ. de Cambridge, 2010-11).&lt;br /&gt;
&lt;br /&gt;
=== Otros cursos ===&lt;br /&gt;
# José A. Alonso [http://www.cs.us.es/~jalonso/cursos/li/ Lógica informática] (Univ. de Sevilla, 2012-13).&lt;br /&gt;
# Thorsten Altenkirch y Peter Morris [http://www.cs.nott.ac.uk/~txa/g52ifr Introduction to formal reasoning] (Univ. de Nottingham, 2010-11).&lt;br /&gt;
# Yves Bertot, Pierre Casteran, Benjamin Gregoire, Pierre Letouzey y Assia Mahboubi [http://www.di.ens.fr/~zappa/teaching/coq/ecole11 Modelling and verifying algorithms in Coq: an introduction]. (INRIA Paris-Rocquencourt, 14-18 noviembre 2011).&lt;br /&gt;
# Pierre Castéran [http://www.labri.fr/perso/casteran/FM/Logique/index.html Logic (Master In Verification)] (Univ. de Burdeos, 2011-12).&lt;br /&gt;
# Adam Chlipala [http://stellar.mit.edu/S/course/6/fa11/6.892/ Interactive computer theorem proving]. (MIT, 2012-13).&lt;br /&gt;
# Adam Chlipala y Armando Solar Lezama [https://stellar.mit.edu/S/course/6/fa13/6.820/index.html Foundations of program analysis]. (MIT, 2013-14).&lt;br /&gt;
# Robby Findler [http://www.eecs.northwestern.edu/~robby/courses/395-495-2013-fall Certified programming with dependent types]. (Northwestern, 2013-14).&lt;br /&gt;
# Nuno Gaspar [http://www-sop.inria.fr/members/Nuno.Gaspar/teaching/coq2012.php Verification with the Coq Proof Assistant] (INRIA Sophia Antipolis, 2012-13).&lt;br /&gt;
# Carlos Luna y Gustavo Betarte. [https://eva.fing.edu.uy/course/view.php?id=363 Construcción formal de programas en teoría de tipos]. (Univ. de la República, Uruguay, 2013-14).&lt;br /&gt;
# Michael Genesereth [http://logic.stanford.edu/classes/cs157/2011/cs157.html Computational Logic] (Univ. de Stanford, 2011-12).&lt;br /&gt;
# Ian Hodkinson [http://www.doc.ic.ac.uk/~imh/teaching/140_logic/logic.html Logic] (Imperial College, Londres, 2010-11).&lt;br /&gt;
# Peter Lucas [http://www.cs.ru.nl/~peterl/teaching/KeR/ Knowledge Representation and Reasoning] (Radboud University # egen, 2011-12).&lt;br /&gt;
# Larry Paulson [http://www.cl.cam.ac.uk/Teaching/current/LogicProof/ Logic and Proof] (Univ. de Cambridge, 2011-12).&lt;br /&gt;
# David Pichardie [http://www.irisa.fr/celtique/pichardie/teaching/M2/MDV/ Méthode de vérification] (Universidad de Rennes, 2006-07).&lt;br /&gt;
# Michael Winter [Logic in Computer Science] (Brock University, Ontario, Canada, 2010-11).&lt;br /&gt;
&lt;br /&gt;
== Bibliotecas de ejemplos de verificación ==&lt;br /&gt;
# [http://afp.sourceforge.net Archive of Formal Proofs].&lt;br /&gt;
# [http://www.cs.ru.nl/~freek/100 Formalizing 100 Theorems].&lt;br /&gt;
# [http://toccata.lri.fr/gallery Gallery of verified programs].&lt;br /&gt;
# [http://www.cs.nott.ac.uk/~lad/research/challenges/ Induction Challenge Problems].&lt;br /&gt;
# [http://automatedreasoning.net/ Larry Wos&amp;#039; Notebooks].&lt;br /&gt;
# [http://www.cs.miami.edu/~tptp/ The TPTP Problem Library for Automated Theorem Proving].&lt;br /&gt;
# [http://www.macs.hw.ac.uk/vstte10/Competition.html The 1st Verified Software Competition].&lt;br /&gt;
# [https://sites.google.com/site/vstte2012/compet The 2nd Verified Software Competition].&lt;br /&gt;
# [http://verifythis.cost-ic0701.org VerifyThis (A collection of verification benchmarks].&lt;br /&gt;
&lt;br /&gt;
== Artículos recientes ==&lt;br /&gt;
Están en orden cronológico inverso a la fecha de su reseña en [http://www.glc.us.es/~jalonso/vestigium/tag/resena Vestigium]:&lt;br /&gt;
# [http://bit.ly/1iZjgqN Proof Pearl: A probabilistic proof for the Girth-Chromatic number theorem]. L. Noschinski &lt;br /&gt;
# [http://bit.ly/1iJ8uVz A graph library for Isabelle]. ~ L. Noschinski &lt;br /&gt;
# [http://bit.ly/I0CU80 Gödel’s incompleteness theorems]. ~ L.C. Paulson &lt;br /&gt;
# [http://bit.ly/I0CPRN The hereditarily finite sets]. ~ L.C. Paulson &lt;br /&gt;
# [http://bit.ly/HBiIJI Applications of real number theorem proving in PVS]. ~ H. Gottliebsen, R. Hardy, O. Lightfoot y U. Martin &lt;br /&gt;
# [http://bit.ly/1awnMLB A machine-assisted proof of Gödel’s incompleteness theorems for the theory of hereditarily finite sets]. ~ L.C. Paulson &lt;br /&gt;
# [http://bit.ly/19lWeYy Verified AIG algorithms in ACL2]. ~ J. Davis y S. Swords &lt;br /&gt;
# [http://bit.ly/GAhC00 A formal model and correctness proof for an access control policy framework]. ~ C. Wu, X. Zhang y C. Urban &lt;br /&gt;
# [http://bit.ly/16SMvSS The ontological argument in PVS]. ~ J. Rushby &lt;br /&gt;
# [http://bit.ly/1dRt9n0  Formalizing Moessner’s theorem and generalizations in Nuprl]. ~ M. Bickford, D. Kozen y A. Silva &lt;br /&gt;
# [http://bit.ly/1bSeDNB Formalization in PVS of balancing properties necessary for the security of the Dolev-Yao cascade protocol model]. ~ M. Ayala y Y. Santos &lt;br /&gt;
# [http://bit.ly/1feFqWE Proof assistant based on didactic considerations]. ~ J. Pais y A Tasistro &lt;br /&gt;
# [http://bit.ly/18tHNBi Theory exploration for interactive theorem proving]. ~ M. Johansson &lt;br /&gt;
# [http://bit.ly/1b0242s From Tarski to Hilbert]. ~ G. Braun y J. Narboux &lt;br /&gt;
# [http://bit.ly/18HaXaR Formal verification of language-based concurrent noninterference]. ~ A. Popescu, J. Hölzl y T. Nipkow &lt;br /&gt;
# [http://bit.ly/1aRTQsU A Traffic Alert and Collision Avoidance System(TCAS-II) Resolution Advisory Algorithm]. ~ C. Muñoz, A. Narkawicz y J. Chamberlain &lt;br /&gt;
# [http://bit.ly/1dNwhDI Formal verification of cryptographic security proofs]. ~ M. Berg &lt;br /&gt;
# [http://bit.ly/17muAUv Polygonal numbers in Mizar]. ~ A. Grabowski &lt;br /&gt;
# [http://bit.ly/1hk5z6L A mechanised proof of Gödel’s incompleteness theorems using Nominal Isabelle]. ~ L.C. Paulson &lt;br /&gt;
# [http://bit.ly/1cSL0wE Steps towards verified implementations of HOL Light]. ~ M.O. Myreen, S. Owens y R. Kumar &lt;br /&gt;
# [http://bit.ly/16Kbgm0 Generic datatypes à la carte]. ~ S. Keuchel y T. Schrijvers &lt;br /&gt;
# [http://bit.ly/1bqJGx4 Proof pearl: A verified bignum implementation in x86-64 machine code]. ~ M.O. Myreen y G. Curello &lt;br /&gt;
# [http://bit.ly/142ow2Q Mechanized metatheory for a λ λ-calculus with trust types]. ~ R. Ribeiro, C. Camarão y L. Figueiredo &lt;br /&gt;
# [http://bit.ly/15WZBDy Proving soundness of combinatorial Vickrey auctions and generating verified executable code]. ~ M.B. Caminati, M. Kerber, C. Lange y C. Rowat &lt;br /&gt;
# [http://bit.ly/198g4n9 A computer-assisted proof of correctness of a marching cubes algorithm]. ~ A.N. Chernikov y J. Xu &lt;br /&gt;
# [http://bit.ly/11QA5g7 Verifying the bridge between simplicial topology and algebra: the Eilenberg-Zilber algorithm]. ~ L. Lambán, J. Rubio, F.J. Martín y J.L. Ruiz &lt;br /&gt;
# [http://bit.ly/1cJAXYk The Königsberg bridge problem and the friendship theorem]. ~ W. Li &lt;br /&gt;
# [http://bit.ly/13DBK9R Formal verification of a proof procedure for the description logic ALC]. ~ M. Chaabani, M. Mezghiche y M. Strecker &lt;br /&gt;
# [http://bit.ly/1ep2ex9 Pratt’s primality certificates]. ~ S. Wimmer y L. Noschinski &lt;br /&gt;
# [http://bit.ly/13C95Ci Reasoning about higher-order relational specifications]. ~ Y. Wang, K. Chaudhuri, A. Gacek y G. Nadathur &lt;br /&gt;
# [http://bit.ly/18QQLcL Proofs you can believe in – Proving equivalences between Prolog semantics in Coq]. ~ J. Kriener, A. King y S. Blazy &lt;br /&gt;
# [http://bit.ly/19uc82J Certified, efficient and sharp univariate Taylor models in Coq]. ~ E. Martin-Dorel, L. Rideau, L. Théry, M. Mayero y I. Paşca &lt;br /&gt;
# [http://bit.ly/1c4Rzel Ordinals in HOL: Transfinite arithmetic up to (and beyond) ω₁]. ~ M. Norrish y B. Huffman   &lt;br /&gt;
# [http://bit.ly/14b4Akz Program verification based on Kleene algebra in Isabelle/HOL] ~ A. Armstrong, G. Struth y T. Weber &lt;br /&gt;
# [http://bit.ly/1aOgRKx Reading an algebra textbook (by translating it to a formal document in the Isabelle/Isar language)]. ~ C. Ballarin &lt;br /&gt;
# [http://bit.ly/11HKixj Computational verification of network programs in Coq]. ~ G. Stewart &lt;br /&gt;
# [http://www.glc.us.es/~jalonso/vestigium/resena-certifying-homological-algorithms-to-study-biomedical-images Certifying homological algorithms to study biomedical images]. ~ M. Poza &lt;br /&gt;
# [http://bit.ly/16Nks9m Formalizing cut elimination of coalgebraic logics in Coq]. ~ H. Tews &lt;br /&gt;
# [http://www.glc.us.es/~jalonso/vestigium/resena-the-formalization-of-syntax-based-mathematical-algorithms-using-quotation-and-evaluation/ The formalization of syntax-based mathematical algorithms using quotation and evaluation]. ~ W.M. Farmer &lt;br /&gt;
# [http://www.glc.us.es/~jalonso/vestigium/resena-certified-symbolic-manipulation-bivariate-simplicial-polynomials/ Certified symbolic manipulation: Bivariate simplicial polynomials]. ~ L. Lambán, F.J. Martín, J. Rubio y J.L. Ruiz &lt;br /&gt;
# [http://www.glc.us.es/~jalonso/vestigium/resena-solveurs-cpfd-verifies-formellement/ Solveurs CP(FD) vérifiés formellement]. ~ C Dubois y A. Gotlieb &lt;br /&gt;
# [http://www.glc.us.es/~jalonso/vestigium/resena-formalizing-bounded-increase/ Formalizing bounded increase]. ~ R. Thiemann &lt;br /&gt;
# [http://www.glc.us.es/~jalonso/vestigium/resena-formal-mathematics-on-display-a-wiki-for-flyspeck/ Formal mathematics on display: A wiki for Flyspeck]. ~ C. Tankink, C. Kaliszyk, J. Urban y H. Geuvers &lt;br /&gt;
# [http://www.glc.us.es/~jalonso/vestigium/resena-theorem-of-three-circles-in-coq Theorem of three circles in Coq]. ~ J. Zsidó &lt;br /&gt;
# [http://bit.ly/19fiWAY Certified HLints with Isabelle/HOLCF-Prelude]. ~ J. Breitner, B. Huffman, N. Mitchell y C. Sternagel &lt;br /&gt;
# [http://bit.ly/ZfSQrQ Automatic data refinement]. ~ P. Lammich &lt;br /&gt;
# [http://bit.ly/18vyjm7 The rooster and the butterflies (a machine-checked proof of the Jordan-Hölder theorem for finite groups)]. ~ A. Mahboubi &lt;br /&gt;
# [http://bit.ly/114oyZV Mechanical verification of SAT refutations with extended resolution]. ~ N. Wetzler, M.J.H. Heule y W.A. Hunt Jr. &lt;br /&gt;
# [http://bit.ly/13H0REu Type classes and filters for mathematical analysis in Isabelle/HOL] ~ J. Hölzl, F. Immler y B. Huffman &lt;br /&gt;
# [http://bit.ly/10fv8wO Verifying refutations with extended resolution]. ~ M. J. H. Heule, W. A. Hunt, Jr. y N. Wetzler  &lt;br /&gt;
# [http://bit.ly/10EcFWj A Web interface for Isabelle: The next generation]. ~ C. Lüth y M. Ring  &lt;br /&gt;
# [http://bit.ly/18P9CSv On the formalization of continuous-time Markov chains in HOL]. ~ L. Liu, O. Hasan y S. Tahar &lt;br /&gt;
# [http://bit.ly/17H2mqy Formalizing Turing machines]. ~ A. Asperti y W. Ricciotti &lt;br /&gt;
# [http://bit.ly/YwuCeL Light-weight containers for Isabelle: efficient, extensible, nestable]. ~ A. Lochbihler &lt;br /&gt;
# [http://bit.ly/10XLrRA Graph theory]. ~ L. Noschinski &lt;br /&gt;
# [http://bit.ly/19kPEP4 A machine-checked proof of the odd order theorem]. ~ G. Gonthier et als. &lt;br /&gt;
# [http://goo.gl/LdihL A constructive theory of regular languages in Coq]. ~ C. Doczkal, J.O. Kaiser y G. Smolka &lt;br /&gt;
# [http://goo.gl/gwcwL A formal proof of Kruskal’s tree theorem in Isabelle/HOL]. ~ C. Sternagel &lt;br /&gt;
# [http://goo.gl/CUF3e Formalizing Knuth-Bendix orders and Knuth-Bendix completion]. ~ C. Sternagel y R. Thiemann  &lt;br /&gt;
# [http://goo.gl/9JAfX Developing an auction theory toolbox]. ~ C. Lange, C. Rowat, W. Windsteiger y M. Kerber &lt;br /&gt;
# [http://goo.gl/6OfmQ Formalization of incremental simplex algorithm by stepwise refinement]. ~ M. Spasić y F. Marić  &lt;br /&gt;
# [http://goo.gl/Guxky Coinductive pearl: Modular first-order logic completeness]. ~ J.C. Blanchette, A. Popescu y D. Traytel &lt;br /&gt;
# [http://goo.gl/HUOl8 A fully verified executable LTL model checker]. ~ J. Esparza et als. &lt;br /&gt;
# [http://goo.gl/RV54S ForMaRE - formal mathematical reasoning in economics]. ~ M. Kerber, C. Lange y C. Rowat. &lt;br /&gt;
# [http://goo.gl/Y7sIq AI over large formal knowledge bases: The first decade]. ~ J. Urban. &lt;br /&gt;
# [http://goo.gl/vvqNg Formalization of real analysis: A survey of proof assistants and libraries]. ~ S. Boldo, C. Lelay y G. Melquiond. &lt;br /&gt;
# [http://goo.gl/bEFYa Data refinement in Isabelle/HOL]. ~ F. Haftmann, A. Krauss, O. Kunčar y T. Nipkow &lt;br /&gt;
# [http://goo.gl/xTyvE Formalizing the confluence of orthogonal rewriting systems]. ~ A.C. Rocha y M. Ayala. &lt;br /&gt;
# [http://goo.gl/zCYHj Formalization of the complex number theory in HOL4]. ~ Z. Shi et als. &lt;br /&gt;
# [http://goo.gl/kM0dI Programming and reasonning with PowerLists in Coq]. ~ F. Loulergue y V. Niculescu  &lt;br /&gt;
# [http://goo.gl/KkU6s A hierarchy of mathematical structures in ACL2]. ~ J. Heras, F.J. Martín y V. Pascual. &lt;br /&gt;
# [http://www.inf.kcl.ac.uk/staff/urbanc/Publications/tm.pdf Mechanising Turing Machines and Computability Theory in Isabelle/HOL] ~ J. Xu, X. Zhang y C. Urban&lt;/div&gt;</summary>
		<author><name>Jalonso</name></author>
		
	</entry>
	<entry>
		<id>https://www.glc.us.es/~jalonso/RA2015/index.php?title=Relaci%C3%B3n_2&amp;diff=57</id>
		<title>Relación 2</title>
		<link rel="alternate" type="text/html" href="https://www.glc.us.es/~jalonso/RA2015/index.php?title=Relaci%C3%B3n_2&amp;diff=57"/>
		<updated>2015-12-15T11:25:25Z</updated>

		<summary type="html">&lt;p&gt;Jalonso: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;source lang=&amp;quot;isar&amp;quot;&amp;gt;&lt;br /&gt;
header {* R2: Razonamiento sobre programas en Isabelle/HOL *}&lt;br /&gt;
&lt;br /&gt;
theory R2&lt;br /&gt;
imports Main &lt;br /&gt;
begin&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 1. Definir la función&lt;br /&gt;
     sumaImpares :: nat ⇒ nat&lt;br /&gt;
  tal que (sumaImpares n) es la suma de los n primeros números&lt;br /&gt;
  impares. Por ejemplo,&lt;br /&gt;
     sumaImpares 5  =  25&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;angfraalv jospalhid marsoldia2&amp;quot;&lt;br /&gt;
fun sumaImpares :: &amp;quot;nat ⇒ nat&amp;quot; where&lt;br /&gt;
  &amp;quot;sumaImpares 0       = 0&amp;quot; |&lt;br /&gt;
  &amp;quot;sumaImpares (Suc n) = ((2*(Suc n)) - 1) + sumaImpares n&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
value &amp;quot;sumaImpares 5&amp;quot; -- &amp;quot;= 25&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 2. Demostrar que &lt;br /&gt;
     sumaImpares n = n*n&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;angfraalv&amp;quot;&lt;br /&gt;
lemma &amp;quot;sumaImpares n = n*n&amp;quot;&lt;br /&gt;
by (induct n) simp_all&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;jospalhid marsoldia2&amp;quot;&lt;br /&gt;
lemma &amp;quot;sumaImpares n = n*n&amp;quot;&lt;br /&gt;
by (induct n) auto&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 3. Definir la función&lt;br /&gt;
     sumaPotenciasDeDosMasUno :: nat ⇒ nat&lt;br /&gt;
  tal que &lt;br /&gt;
     (sumaPotenciasDeDosMasUno n) = 1 + 2^0 + 2^1 + 2^2 + ... + 2^n. &lt;br /&gt;
  Por ejemplo, &lt;br /&gt;
     sumaPotenciasDeDosMasUno 3  =  16&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;angfraalv jospalhid marsoldia2&amp;quot;&lt;br /&gt;
fun sumaPotenciasDeDosMasUno :: &amp;quot;nat ⇒ nat&amp;quot; where&lt;br /&gt;
   &amp;quot;sumaPotenciasDeDosMasUno 0       = 2 &amp;quot; |&lt;br /&gt;
   &amp;quot;sumaPotenciasDeDosMasUno (Suc n) = sumaPotenciasDeDosMasUno n + 2^(Suc n)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;sumaPotenciasDeDosMasUno 3&amp;quot; -- &amp;quot;= 16&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 4. Demostrar que &lt;br /&gt;
     sumaPotenciasDeDosMasUno n = 2^(n+1)&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;angfraalv&amp;quot;&lt;br /&gt;
lemma &amp;quot;sumaPotenciasDeDosMasUno n = 2^(n+1)&amp;quot;&lt;br /&gt;
by (induct n) simp_all&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;jospalhid marsoldia2&amp;quot;&lt;br /&gt;
lemma &amp;quot;sumaPotenciasDeDosMasUno n = 2^(n+1)&amp;quot;&lt;br /&gt;
by (induct n) auto&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 5. Definir la función&lt;br /&gt;
     copia :: nat ⇒ &amp;#039;a ⇒ &amp;#039;a list&lt;br /&gt;
  tal que (copia n x) es la lista formado por n copias del elemento&lt;br /&gt;
  x. Por ejemplo, &lt;br /&gt;
     copia 3 x = [x,x,x]&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;angfraalv marsoldia2&amp;quot;&lt;br /&gt;
fun copia :: &amp;quot;nat ⇒ &amp;#039;a ⇒ &amp;#039;a list&amp;quot; where&lt;br /&gt;
  &amp;quot;copia 0       x = []&amp;quot; |&lt;br /&gt;
  &amp;quot;copia (Suc n) x = (copia n x)@[x]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;copia 3 x&amp;quot; -- &amp;quot;= [x,x,x]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;jospalhid&amp;quot;&lt;br /&gt;
fun copia2 :: &amp;quot;nat ⇒ &amp;#039;a ⇒ &amp;#039;a list&amp;quot; where&lt;br /&gt;
  &amp;quot;copia2 0 _       = []&amp;quot;|&lt;br /&gt;
  &amp;quot;copia2 (Suc n) x = x#copia2 n x&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;copia2 3 x&amp;quot; -- &amp;quot;=[x,x,x]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 6. Definir la función&lt;br /&gt;
     todos :: (&amp;#039;a ⇒ bool) ⇒ &amp;#039;a list ⇒ bool&lt;br /&gt;
  tal que (todos p xs) se verifica si todos los elementos de xs cumplen&lt;br /&gt;
  la propiedad p. Por ejemplo,&lt;br /&gt;
     todos (λx. x&amp;gt;(1::nat)) [2,6,4] = True&lt;br /&gt;
     todos (λx. x&amp;gt;(2::nat)) [2,6,4] = False&lt;br /&gt;
  Nota: La conjunción se representa por ∧&lt;br /&gt;
  ----------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;angfraalv jospalhid marsoldia2&amp;quot;&lt;br /&gt;
fun todos :: &amp;quot;(&amp;#039;a ⇒ bool) ⇒ &amp;#039;a list ⇒ bool&amp;quot; where&lt;br /&gt;
  &amp;quot;todos _ []     = True &amp;quot; |&lt;br /&gt;
  &amp;quot;todos p (x#xs) = (p x ∧ todos p xs)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;todos (λx. x&amp;gt;(1::nat)) [2,6,4]&amp;quot; -- &amp;quot;= True&amp;quot;&lt;br /&gt;
value &amp;quot;todos (λx. x&amp;gt;(2::nat)) [2,6,4]&amp;quot; -- &amp;quot;= False&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 7. Demostrar que todos los elementos de (copia n x) son&lt;br /&gt;
  iguales a x. &lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;jospalhid marsoldia2&amp;quot;&lt;br /&gt;
lemma &amp;quot;todos (λy. y=x) (copia2 n x)&amp;quot;&lt;br /&gt;
by (induct n) auto&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 8. Definir la función&lt;br /&gt;
    factR :: nat ⇒ nat&lt;br /&gt;
  tal que (factR n) es el factorial de n. Por ejemplo,&lt;br /&gt;
    factR 4 = 24&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
--&amp;quot;angfraalv jospalhid marsoldia2&amp;quot;&lt;br /&gt;
fun factR :: &amp;quot;nat ⇒ nat&amp;quot; where&lt;br /&gt;
  &amp;quot;factR 0       = 1&amp;quot; |&lt;br /&gt;
  &amp;quot;factR (Suc n) = Suc n * factR n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;factR 4&amp;quot; -- &amp;quot;= 24&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 9. Se considera la siguiente definición iterativa de la&lt;br /&gt;
  función factorial &lt;br /&gt;
     factI :: &amp;quot;nat ⇒ nat&amp;quot; where&lt;br /&gt;
     factI n = factI&amp;#039; n 1&lt;br /&gt;
     &lt;br /&gt;
     factI&amp;#039; :: nat ⇒ nat ⇒ nat&amp;quot; where&lt;br /&gt;
     factI&amp;#039; 0       x = x&lt;br /&gt;
     factI&amp;#039; (Suc n) x = factI&amp;#039; n (Suc n)*x&lt;br /&gt;
  Demostrar que, para todo n y todo x, se tiene &lt;br /&gt;
     factI&amp;#039; n x = x * factR n&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
fun factI&amp;#039; :: &amp;quot;nat ⇒ nat ⇒ nat&amp;quot; where&lt;br /&gt;
  &amp;quot;factI&amp;#039; 0       x = x&amp;quot;&lt;br /&gt;
| &amp;quot;factI&amp;#039; (Suc n) x = factI&amp;#039; n (Suc n)*x&amp;quot;&lt;br /&gt;
&lt;br /&gt;
fun factI :: &amp;quot;nat ⇒ nat&amp;quot; where&lt;br /&gt;
  &amp;quot;factI n = factI&amp;#039; n 1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;factI 4&amp;quot; -- &amp;quot;= 24&amp;quot;&lt;br /&gt;
     &lt;br /&gt;
-- &amp;quot;jospalhid&amp;quot;&lt;br /&gt;
lemma fact: &amp;quot;factI&amp;#039; n x = x * factR n&amp;quot;&lt;br /&gt;
by (induct n arbitrary: x) auto&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 10. Demostrar que&lt;br /&gt;
     factI n = factR n&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;jospalhid&amp;quot;&lt;br /&gt;
corollary &amp;quot;factI n = factR n&amp;quot;&lt;br /&gt;
by (simp add:fact)&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 11. Definir, recursivamente y sin usar (@), la función&lt;br /&gt;
     amplia :: &amp;#039;a list ⇒ &amp;#039;a ⇒ &amp;#039;a list&lt;br /&gt;
  tal que (amplia xs y) es la lista obtenida añadiendo el elemento y al&lt;br /&gt;
  final de la lista xs. Por ejemplo,&lt;br /&gt;
     amplia [d,a] t = [d,a,t]&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;angfraalv marsoldia2&amp;quot;&lt;br /&gt;
fun amplia :: &amp;quot;&amp;#039;a list ⇒ &amp;#039;a ⇒ &amp;#039;a list&amp;quot; where&lt;br /&gt;
  &amp;quot;amplia []     y = y#[]&amp;quot; |&lt;br /&gt;
  &amp;quot;amplia (x#xs) y = x#(amplia xs y)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;jospalhid&amp;quot;&lt;br /&gt;
fun amplia2 :: &amp;quot;&amp;#039;a list ⇒ &amp;#039;a ⇒ &amp;#039;a list&amp;quot; where&lt;br /&gt;
  &amp;quot;amplia2 [] y     = [y]&amp;quot;|&lt;br /&gt;
  &amp;quot;amplia2 (x#xs) y = x#(amplia xs y)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;amplia [d,a] t&amp;quot; -- &amp;quot;= [d,a,t]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 12. Demostrar que &lt;br /&gt;
     amplia xs y = xs @ [y]&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;jospalhid&amp;quot;&lt;br /&gt;
lemma &amp;quot;amplia xs y = xs @ [y]&amp;quot;&lt;br /&gt;
by (induct xs) auto&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jalonso</name></author>
		
	</entry>
	<entry>
		<id>https://www.glc.us.es/~jalonso/RA2015/index.php?title=Relaci%C3%B3n_3&amp;diff=52</id>
		<title>Relación 3</title>
		<link rel="alternate" type="text/html" href="https://www.glc.us.es/~jalonso/RA2015/index.php?title=Relaci%C3%B3n_3&amp;diff=52"/>
		<updated>2015-12-14T16:06:39Z</updated>

		<summary type="html">&lt;p&gt;Jalonso: Página creada con &amp;#039;&amp;lt;source lang=&amp;quot;isar&amp;quot;&amp;gt; header {* R3: Razonamiento sobre programas en Isabelle/HOL *}  theory R3 imports Main  begin  text {* ------------------------------------------------------...&amp;#039;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;source lang=&amp;quot;isar&amp;quot;&amp;gt;&lt;br /&gt;
header {* R3: Razonamiento sobre programas en Isabelle/HOL *}&lt;br /&gt;
&lt;br /&gt;
theory R3&lt;br /&gt;
imports Main &lt;br /&gt;
begin&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 1. Definir la función&lt;br /&gt;
     sumaImpares :: nat ⇒ nat&lt;br /&gt;
  tal que (sumaImpares n) es la suma de los n primeros números&lt;br /&gt;
  impares. Por ejemplo,&lt;br /&gt;
     sumaImpares 5  =  25&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
fun sumaImpares :: &amp;quot;nat ⇒ nat&amp;quot; where&lt;br /&gt;
  &amp;quot;sumaImpares n = undefined&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;sumaImpares 5&amp;quot; -- &amp;quot;= 25&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 2. Demostrar que &lt;br /&gt;
     sumaImpares n = n*n&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
lemma &amp;quot;sumaImpares n = n*n&amp;quot;&lt;br /&gt;
oops&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 3. Definir la función&lt;br /&gt;
     sumaPotenciasDeDosMasUno :: nat ⇒ nat&lt;br /&gt;
  tal que &lt;br /&gt;
     (sumaPotenciasDeDosMasUno n) = 1 + 2^0 + 2^1 + 2^2 + ... + 2^n. &lt;br /&gt;
  Por ejemplo, &lt;br /&gt;
     sumaPotenciasDeDosMasUno 3  =  16&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
fun sumaPotenciasDeDosMasUno :: &amp;quot;nat ⇒ nat&amp;quot; where&lt;br /&gt;
  &amp;quot;sumaPotenciasDeDosMasUno n = undefined&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;sumaPotenciasDeDosMasUno 3&amp;quot; -- &amp;quot;= 16&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 4. Demostrar que &lt;br /&gt;
     sumaPotenciasDeDosMasUno n = 2^(n+1)&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
lemma &amp;quot;sumaPotenciasDeDosMasUno n = 2^(n+1)&amp;quot;&lt;br /&gt;
oops&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 5. Definir la función&lt;br /&gt;
     copia :: nat ⇒ &amp;#039;a ⇒ &amp;#039;a list&lt;br /&gt;
  tal que (copia n x) es la lista formado por n copias del elemento&lt;br /&gt;
  x. Por ejemplo, &lt;br /&gt;
     copia 3 x = [x,x,x]&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
fun copia :: &amp;quot;nat ⇒ &amp;#039;a ⇒ &amp;#039;a list&amp;quot; where&lt;br /&gt;
  &amp;quot;copia n x = undefined&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;copia 3 x&amp;quot; -- &amp;quot;= [x,x,x]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 6. Definir la función&lt;br /&gt;
     todos :: (&amp;#039;a ⇒ bool) ⇒ &amp;#039;a list ⇒ bool&lt;br /&gt;
  tal que (todos p xs) se verifica si todos los elementos de xs cumplen&lt;br /&gt;
  la propiedad p. Por ejemplo,&lt;br /&gt;
     todos (λx. x&amp;gt;(1::nat)) [2,6,4] = True&lt;br /&gt;
     todos (λx. x&amp;gt;(2::nat)) [2,6,4] = False&lt;br /&gt;
  Nota: La conjunción se representa por ∧&lt;br /&gt;
  ----------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
fun todos :: &amp;quot;(&amp;#039;a ⇒ bool) ⇒ &amp;#039;a list ⇒ bool&amp;quot; where&lt;br /&gt;
  &amp;quot;todos p xs = undefined&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;todos (λx. x&amp;gt;(1::nat)) [2,6,4]&amp;quot; -- &amp;quot;= True&amp;quot;&lt;br /&gt;
value &amp;quot;todos (λx. x&amp;gt;(2::nat)) [2,6,4]&amp;quot; -- &amp;quot;= False&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 7. Demostrar que todos los elementos de (copia n x) son&lt;br /&gt;
  iguales a x. &lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
lemma &amp;quot;todos (λy. y=x) (copia n x)&amp;quot;&lt;br /&gt;
oops&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 8. Definir la función&lt;br /&gt;
    factR :: nat ⇒ nat&lt;br /&gt;
  tal que (factR n) es el factorial de n. Por ejemplo,&lt;br /&gt;
    factR 4 = 24&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
fun factR :: &amp;quot;nat ⇒ nat&amp;quot; where&lt;br /&gt;
  &amp;quot;factR n = undefined&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;factR 4&amp;quot; -- &amp;quot;= 24&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 9. Se considera la siguiente definición iterativa de la&lt;br /&gt;
  función factorial &lt;br /&gt;
     factI :: &amp;quot;nat ⇒ nat&amp;quot; where&lt;br /&gt;
     factI n = factI&amp;#039; n 1&lt;br /&gt;
     &lt;br /&gt;
     factI&amp;#039; :: nat ⇒ nat ⇒ nat&amp;quot; where&lt;br /&gt;
     factI&amp;#039; 0       x = x&lt;br /&gt;
     factI&amp;#039; (Suc n) x = factI&amp;#039; n (Suc n)*x&lt;br /&gt;
  Demostrar que, para todo n y todo x, se tiene &lt;br /&gt;
     factI&amp;#039; n x = x * factR n&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
fun factI&amp;#039; :: &amp;quot;nat ⇒ nat ⇒ nat&amp;quot; where&lt;br /&gt;
  &amp;quot;factI&amp;#039; 0       x = x&amp;quot;&lt;br /&gt;
| &amp;quot;factI&amp;#039; (Suc n) x = factI&amp;#039; n (Suc n)*x&amp;quot;&lt;br /&gt;
&lt;br /&gt;
fun factI :: &amp;quot;nat ⇒ nat&amp;quot; where&lt;br /&gt;
  &amp;quot;factI n = factI&amp;#039; n 1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;factI 4&amp;quot; -- &amp;quot;= 24&amp;quot;&lt;br /&gt;
     &lt;br /&gt;
lemma fact: &amp;quot;factI&amp;#039; n x = x * factR n&amp;quot;&lt;br /&gt;
oops&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 10. Demostrar que&lt;br /&gt;
     factI n = factR n&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
corollary &amp;quot;factI n = factR n&amp;quot;&lt;br /&gt;
oops&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 11. Definir, recursivamente y sin usar (@), la función&lt;br /&gt;
     amplia :: &amp;#039;a list ⇒ &amp;#039;a ⇒ &amp;#039;a list&lt;br /&gt;
  tal que (amplia xs y) es la lista obtenida añadiendo el elemento y al&lt;br /&gt;
  final de la lista xs. Por ejemplo,&lt;br /&gt;
     amplia [d,a] t = [d,a,t]&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
fun amplia :: &amp;quot;&amp;#039;a list ⇒ &amp;#039;a ⇒ &amp;#039;a list&amp;quot; where&lt;br /&gt;
  &amp;quot;amplia xs y = undefined&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;amplia [d,a] t&amp;quot; -- &amp;quot;= [d,a,t]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 12. Demostrar que &lt;br /&gt;
     amplia xs y = xs @ [y]&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
lemma &amp;quot;amplia xs y = xs @ [y]&amp;quot;&lt;br /&gt;
oops&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jalonso</name></author>
		
	</entry>
	<entry>
		<id>https://www.glc.us.es/~jalonso/RA2015/index.php?title=R3&amp;diff=51</id>
		<title>R3</title>
		<link rel="alternate" type="text/html" href="https://www.glc.us.es/~jalonso/RA2015/index.php?title=R3&amp;diff=51"/>
		<updated>2015-12-14T16:06:23Z</updated>

		<summary type="html">&lt;p&gt;Jalonso: Protegió «R3» ([edit=sysop] (indefinido) [move=sysop] (indefinido))&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;source lang=&amp;quot;isar&amp;quot;&amp;gt;&lt;br /&gt;
header {* R3: Razonamiento sobre programas en Isabelle/HOL *}&lt;br /&gt;
&lt;br /&gt;
theory R3&lt;br /&gt;
imports Main &lt;br /&gt;
begin&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 1. Definir la función&lt;br /&gt;
     sumaImpares :: nat ⇒ nat&lt;br /&gt;
  tal que (sumaImpares n) es la suma de los n primeros números&lt;br /&gt;
  impares. Por ejemplo,&lt;br /&gt;
     sumaImpares 5  =  25&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
fun sumaImpares :: &amp;quot;nat ⇒ nat&amp;quot; where&lt;br /&gt;
  &amp;quot;sumaImpares n = undefined&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;sumaImpares 5&amp;quot; -- &amp;quot;= 25&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 2. Demostrar que &lt;br /&gt;
     sumaImpares n = n*n&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
lemma &amp;quot;sumaImpares n = n*n&amp;quot;&lt;br /&gt;
oops&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 3. Definir la función&lt;br /&gt;
     sumaPotenciasDeDosMasUno :: nat ⇒ nat&lt;br /&gt;
  tal que &lt;br /&gt;
     (sumaPotenciasDeDosMasUno n) = 1 + 2^0 + 2^1 + 2^2 + ... + 2^n. &lt;br /&gt;
  Por ejemplo, &lt;br /&gt;
     sumaPotenciasDeDosMasUno 3  =  16&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
fun sumaPotenciasDeDosMasUno :: &amp;quot;nat ⇒ nat&amp;quot; where&lt;br /&gt;
  &amp;quot;sumaPotenciasDeDosMasUno n = undefined&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;sumaPotenciasDeDosMasUno 3&amp;quot; -- &amp;quot;= 16&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 4. Demostrar que &lt;br /&gt;
     sumaPotenciasDeDosMasUno n = 2^(n+1)&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
lemma &amp;quot;sumaPotenciasDeDosMasUno n = 2^(n+1)&amp;quot;&lt;br /&gt;
oops&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 5. Definir la función&lt;br /&gt;
     copia :: nat ⇒ &amp;#039;a ⇒ &amp;#039;a list&lt;br /&gt;
  tal que (copia n x) es la lista formado por n copias del elemento&lt;br /&gt;
  x. Por ejemplo, &lt;br /&gt;
     copia 3 x = [x,x,x]&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
fun copia :: &amp;quot;nat ⇒ &amp;#039;a ⇒ &amp;#039;a list&amp;quot; where&lt;br /&gt;
  &amp;quot;copia n x = undefined&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;copia 3 x&amp;quot; -- &amp;quot;= [x,x,x]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 6. Definir la función&lt;br /&gt;
     todos :: (&amp;#039;a ⇒ bool) ⇒ &amp;#039;a list ⇒ bool&lt;br /&gt;
  tal que (todos p xs) se verifica si todos los elementos de xs cumplen&lt;br /&gt;
  la propiedad p. Por ejemplo,&lt;br /&gt;
     todos (λx. x&amp;gt;(1::nat)) [2,6,4] = True&lt;br /&gt;
     todos (λx. x&amp;gt;(2::nat)) [2,6,4] = False&lt;br /&gt;
  Nota: La conjunción se representa por ∧&lt;br /&gt;
  ----------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
fun todos :: &amp;quot;(&amp;#039;a ⇒ bool) ⇒ &amp;#039;a list ⇒ bool&amp;quot; where&lt;br /&gt;
  &amp;quot;todos p xs = undefined&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;todos (λx. x&amp;gt;(1::nat)) [2,6,4]&amp;quot; -- &amp;quot;= True&amp;quot;&lt;br /&gt;
value &amp;quot;todos (λx. x&amp;gt;(2::nat)) [2,6,4]&amp;quot; -- &amp;quot;= False&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 7. Demostrar que todos los elementos de (copia n x) son&lt;br /&gt;
  iguales a x. &lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
lemma &amp;quot;todos (λy. y=x) (copia n x)&amp;quot;&lt;br /&gt;
oops&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 8. Definir la función&lt;br /&gt;
    factR :: nat ⇒ nat&lt;br /&gt;
  tal que (factR n) es el factorial de n. Por ejemplo,&lt;br /&gt;
    factR 4 = 24&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
fun factR :: &amp;quot;nat ⇒ nat&amp;quot; where&lt;br /&gt;
  &amp;quot;factR n = undefined&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;factR 4&amp;quot; -- &amp;quot;= 24&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 9. Se considera la siguiente definición iterativa de la&lt;br /&gt;
  función factorial &lt;br /&gt;
     factI :: &amp;quot;nat ⇒ nat&amp;quot; where&lt;br /&gt;
     factI n = factI&amp;#039; n 1&lt;br /&gt;
     &lt;br /&gt;
     factI&amp;#039; :: nat ⇒ nat ⇒ nat&amp;quot; where&lt;br /&gt;
     factI&amp;#039; 0       x = x&lt;br /&gt;
     factI&amp;#039; (Suc n) x = factI&amp;#039; n (Suc n)*x&lt;br /&gt;
  Demostrar que, para todo n y todo x, se tiene &lt;br /&gt;
     factI&amp;#039; n x = x * factR n&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
fun factI&amp;#039; :: &amp;quot;nat ⇒ nat ⇒ nat&amp;quot; where&lt;br /&gt;
  &amp;quot;factI&amp;#039; 0       x = x&amp;quot;&lt;br /&gt;
| &amp;quot;factI&amp;#039; (Suc n) x = factI&amp;#039; n (Suc n)*x&amp;quot;&lt;br /&gt;
&lt;br /&gt;
fun factI :: &amp;quot;nat ⇒ nat&amp;quot; where&lt;br /&gt;
  &amp;quot;factI n = factI&amp;#039; n 1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;factI 4&amp;quot; -- &amp;quot;= 24&amp;quot;&lt;br /&gt;
     &lt;br /&gt;
lemma fact: &amp;quot;factI&amp;#039; n x = x * factR n&amp;quot;&lt;br /&gt;
oops&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 10. Demostrar que&lt;br /&gt;
     factI n = factR n&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
corollary &amp;quot;factI n = factR n&amp;quot;&lt;br /&gt;
oops&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 11. Definir, recursivamente y sin usar (@), la función&lt;br /&gt;
     amplia :: &amp;#039;a list ⇒ &amp;#039;a ⇒ &amp;#039;a list&lt;br /&gt;
  tal que (amplia xs y) es la lista obtenida añadiendo el elemento y al&lt;br /&gt;
  final de la lista xs. Por ejemplo,&lt;br /&gt;
     amplia [d,a] t = [d,a,t]&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
fun amplia :: &amp;quot;&amp;#039;a list ⇒ &amp;#039;a ⇒ &amp;#039;a list&amp;quot; where&lt;br /&gt;
  &amp;quot;amplia xs y = undefined&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;amplia [d,a] t&amp;quot; -- &amp;quot;= [d,a,t]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 12. Demostrar que &lt;br /&gt;
     amplia xs y = xs @ [y]&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
lemma &amp;quot;amplia xs y = xs @ [y]&amp;quot;&lt;br /&gt;
oops&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jalonso</name></author>
		
	</entry>
	<entry>
		<id>https://www.glc.us.es/~jalonso/RA2015/index.php?title=R3&amp;diff=50</id>
		<title>R3</title>
		<link rel="alternate" type="text/html" href="https://www.glc.us.es/~jalonso/RA2015/index.php?title=R3&amp;diff=50"/>
		<updated>2015-12-14T16:06:11Z</updated>

		<summary type="html">&lt;p&gt;Jalonso: Página creada con &amp;#039;&amp;lt;source lang=&amp;quot;isar&amp;quot;&amp;gt; header {* R3: Razonamiento sobre programas en Isabelle/HOL *}  theory R3 imports Main  begin  text {* ------------------------------------------------------...&amp;#039;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;source lang=&amp;quot;isar&amp;quot;&amp;gt;&lt;br /&gt;
header {* R3: Razonamiento sobre programas en Isabelle/HOL *}&lt;br /&gt;
&lt;br /&gt;
theory R3&lt;br /&gt;
imports Main &lt;br /&gt;
begin&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 1. Definir la función&lt;br /&gt;
     sumaImpares :: nat ⇒ nat&lt;br /&gt;
  tal que (sumaImpares n) es la suma de los n primeros números&lt;br /&gt;
  impares. Por ejemplo,&lt;br /&gt;
     sumaImpares 5  =  25&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
fun sumaImpares :: &amp;quot;nat ⇒ nat&amp;quot; where&lt;br /&gt;
  &amp;quot;sumaImpares n = undefined&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;sumaImpares 5&amp;quot; -- &amp;quot;= 25&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 2. Demostrar que &lt;br /&gt;
     sumaImpares n = n*n&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
lemma &amp;quot;sumaImpares n = n*n&amp;quot;&lt;br /&gt;
oops&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 3. Definir la función&lt;br /&gt;
     sumaPotenciasDeDosMasUno :: nat ⇒ nat&lt;br /&gt;
  tal que &lt;br /&gt;
     (sumaPotenciasDeDosMasUno n) = 1 + 2^0 + 2^1 + 2^2 + ... + 2^n. &lt;br /&gt;
  Por ejemplo, &lt;br /&gt;
     sumaPotenciasDeDosMasUno 3  =  16&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
fun sumaPotenciasDeDosMasUno :: &amp;quot;nat ⇒ nat&amp;quot; where&lt;br /&gt;
  &amp;quot;sumaPotenciasDeDosMasUno n = undefined&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;sumaPotenciasDeDosMasUno 3&amp;quot; -- &amp;quot;= 16&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 4. Demostrar que &lt;br /&gt;
     sumaPotenciasDeDosMasUno n = 2^(n+1)&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
lemma &amp;quot;sumaPotenciasDeDosMasUno n = 2^(n+1)&amp;quot;&lt;br /&gt;
oops&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 5. Definir la función&lt;br /&gt;
     copia :: nat ⇒ &amp;#039;a ⇒ &amp;#039;a list&lt;br /&gt;
  tal que (copia n x) es la lista formado por n copias del elemento&lt;br /&gt;
  x. Por ejemplo, &lt;br /&gt;
     copia 3 x = [x,x,x]&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
fun copia :: &amp;quot;nat ⇒ &amp;#039;a ⇒ &amp;#039;a list&amp;quot; where&lt;br /&gt;
  &amp;quot;copia n x = undefined&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;copia 3 x&amp;quot; -- &amp;quot;= [x,x,x]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 6. Definir la función&lt;br /&gt;
     todos :: (&amp;#039;a ⇒ bool) ⇒ &amp;#039;a list ⇒ bool&lt;br /&gt;
  tal que (todos p xs) se verifica si todos los elementos de xs cumplen&lt;br /&gt;
  la propiedad p. Por ejemplo,&lt;br /&gt;
     todos (λx. x&amp;gt;(1::nat)) [2,6,4] = True&lt;br /&gt;
     todos (λx. x&amp;gt;(2::nat)) [2,6,4] = False&lt;br /&gt;
  Nota: La conjunción se representa por ∧&lt;br /&gt;
  ----------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
fun todos :: &amp;quot;(&amp;#039;a ⇒ bool) ⇒ &amp;#039;a list ⇒ bool&amp;quot; where&lt;br /&gt;
  &amp;quot;todos p xs = undefined&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;todos (λx. x&amp;gt;(1::nat)) [2,6,4]&amp;quot; -- &amp;quot;= True&amp;quot;&lt;br /&gt;
value &amp;quot;todos (λx. x&amp;gt;(2::nat)) [2,6,4]&amp;quot; -- &amp;quot;= False&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 7. Demostrar que todos los elementos de (copia n x) son&lt;br /&gt;
  iguales a x. &lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
lemma &amp;quot;todos (λy. y=x) (copia n x)&amp;quot;&lt;br /&gt;
oops&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 8. Definir la función&lt;br /&gt;
    factR :: nat ⇒ nat&lt;br /&gt;
  tal que (factR n) es el factorial de n. Por ejemplo,&lt;br /&gt;
    factR 4 = 24&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
fun factR :: &amp;quot;nat ⇒ nat&amp;quot; where&lt;br /&gt;
  &amp;quot;factR n = undefined&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;factR 4&amp;quot; -- &amp;quot;= 24&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 9. Se considera la siguiente definición iterativa de la&lt;br /&gt;
  función factorial &lt;br /&gt;
     factI :: &amp;quot;nat ⇒ nat&amp;quot; where&lt;br /&gt;
     factI n = factI&amp;#039; n 1&lt;br /&gt;
     &lt;br /&gt;
     factI&amp;#039; :: nat ⇒ nat ⇒ nat&amp;quot; where&lt;br /&gt;
     factI&amp;#039; 0       x = x&lt;br /&gt;
     factI&amp;#039; (Suc n) x = factI&amp;#039; n (Suc n)*x&lt;br /&gt;
  Demostrar que, para todo n y todo x, se tiene &lt;br /&gt;
     factI&amp;#039; n x = x * factR n&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
fun factI&amp;#039; :: &amp;quot;nat ⇒ nat ⇒ nat&amp;quot; where&lt;br /&gt;
  &amp;quot;factI&amp;#039; 0       x = x&amp;quot;&lt;br /&gt;
| &amp;quot;factI&amp;#039; (Suc n) x = factI&amp;#039; n (Suc n)*x&amp;quot;&lt;br /&gt;
&lt;br /&gt;
fun factI :: &amp;quot;nat ⇒ nat&amp;quot; where&lt;br /&gt;
  &amp;quot;factI n = factI&amp;#039; n 1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;factI 4&amp;quot; -- &amp;quot;= 24&amp;quot;&lt;br /&gt;
     &lt;br /&gt;
lemma fact: &amp;quot;factI&amp;#039; n x = x * factR n&amp;quot;&lt;br /&gt;
oops&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 10. Demostrar que&lt;br /&gt;
     factI n = factR n&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
corollary &amp;quot;factI n = factR n&amp;quot;&lt;br /&gt;
oops&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 11. Definir, recursivamente y sin usar (@), la función&lt;br /&gt;
     amplia :: &amp;#039;a list ⇒ &amp;#039;a ⇒ &amp;#039;a list&lt;br /&gt;
  tal que (amplia xs y) es la lista obtenida añadiendo el elemento y al&lt;br /&gt;
  final de la lista xs. Por ejemplo,&lt;br /&gt;
     amplia [d,a] t = [d,a,t]&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
fun amplia :: &amp;quot;&amp;#039;a list ⇒ &amp;#039;a ⇒ &amp;#039;a list&amp;quot; where&lt;br /&gt;
  &amp;quot;amplia xs y = undefined&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;amplia [d,a] t&amp;quot; -- &amp;quot;= [d,a,t]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 12. Demostrar que &lt;br /&gt;
     amplia xs y = xs @ [y]&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
lemma &amp;quot;amplia xs y = xs @ [y]&amp;quot;&lt;br /&gt;
oops&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jalonso</name></author>
		
	</entry>
	<entry>
		<id>https://www.glc.us.es/~jalonso/RA2015/index.php?title=Ejercicios&amp;diff=49</id>
		<title>Ejercicios</title>
		<link rel="alternate" type="text/html" href="https://www.glc.us.es/~jalonso/RA2015/index.php?title=Ejercicios&amp;diff=49"/>
		<updated>2015-12-14T16:05:38Z</updated>

		<summary type="html">&lt;p&gt;Jalonso: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Relaciones de ejercicios ==&lt;br /&gt;
&lt;br /&gt;
En esta sección se publicarán las relaciones de ejercicios. Las soluciones se escriben de forma colaborativa por los alumnos del curso y no deben tomarse como definitivas.&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Relación 1&amp;#039;&amp;#039;&amp;#039;: Programación funcional en Isabelle/HOL. ([[R1 |Enunciado]] y [[Relación 1 | Solución colaborativa]]).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Relación 2&amp;#039;&amp;#039;&amp;#039;: Razonamiento automático sobre programas en Isabelle/HOL. ([[R2 |Enunciado]] y [[Relación 2 | Solución colaborativa]]).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Relación 3&amp;#039;&amp;#039;&amp;#039;: Razonamiento estructurado sobre programas en Isabelle/HOL. ([[R3 |Enunciado]] y [[Relación 3 | Solución colaborativa]]).&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Relación 4&amp;#039;&amp;#039;&amp;#039;: Cons inverso. ([[R4 |Enunciado]] y [[Relación 4 | Solución colaborativa]]).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Relación 5&amp;#039;&amp;#039;&amp;#039;: Cuantificadores sobre listas. ([[R5 |Enunciado]] y [[Relación 5 | Solución colaborativa]]).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Relación 6&amp;#039;&amp;#039;&amp;#039;: Sustitución, inversión y eliminación. ([[R6 |Enunciado]] y [[Relación 6 | Solución colaborativa]]).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Relación 7&amp;#039;&amp;#039;&amp;#039;: Recorridos de árboles. ([[R7 |Enunciado]] y [[Relación 7 | Solución colaborativa]]).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Relación 8&amp;#039;&amp;#039;&amp;#039;: Árboles binarios completos. ([[R8 |Enunciado]] y [[Relación 8 | Solución colaborativa]]).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Relación 9&amp;#039;&amp;#039;&amp;#039;: Deducción natural en Isabelle/HOL. ([[R9 |Enunciado]] y [[Relación 9 | Solución colaborativa]]).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Relación 10&amp;#039;&amp;#039;&amp;#039;: Formalización y argumentación en Isabelle/HOL. ([[R10 |Enunciado]] y [[Relación 10 | Solución colaborativa]]).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Relación 11&amp;#039;&amp;#039;&amp;#039;: Plegados de listas y de árboles. ([[R11 |Enunciado]] y [[Relación 11 | Solución colaborativa]]).&lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jalonso</name></author>
		
	</entry>
	<entry>
		<id>https://www.glc.us.es/~jalonso/RA2015/index.php?title=Tema_3:_Razonamiento_estructurado_sobre_programas_en_Isabelle/HOL&amp;diff=48</id>
		<title>Tema 3: Razonamiento estructurado sobre programas en Isabelle/HOL</title>
		<link rel="alternate" type="text/html" href="https://www.glc.us.es/~jalonso/RA2015/index.php?title=Tema_3:_Razonamiento_estructurado_sobre_programas_en_Isabelle/HOL&amp;diff=48"/>
		<updated>2015-12-14T16:04:15Z</updated>

		<summary type="html">&lt;p&gt;Jalonso: Página creada con &amp;#039;&amp;lt;source lang=&amp;quot;isar&amp;quot;&amp;gt; header {* Tema 3: Razonamiento sobre programas *}  theory T3_Razonamiento_sobre_programas imports Main  begin  text {*    En este tema se demuestra con Isab...&amp;#039;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;source lang=&amp;quot;isar&amp;quot;&amp;gt;&lt;br /&gt;
header {* Tema 3: Razonamiento sobre programas *}&lt;br /&gt;
&lt;br /&gt;
theory T3_Razonamiento_sobre_programas&lt;br /&gt;
imports Main &lt;br /&gt;
begin&lt;br /&gt;
&lt;br /&gt;
text {* &lt;br /&gt;
  En este tema se demuestra con Isabelle las propiedades de los&lt;br /&gt;
  programas funcionales como se expone en el tema 2a y se demostraron&lt;br /&gt;
  automáticamente en el tema 2b. A diferencia del tema 2b, ahora&lt;br /&gt;
  nos fijamos no sólo en el método de demostración sino en la estructura&lt;br /&gt;
  de la prueba resaltando su semejanza con las del tema 2a. *}&lt;br /&gt;
&lt;br /&gt;
section {* Razonamiento ecuacional *}&lt;br /&gt;
&lt;br /&gt;
text {* ----------------------------------------------------------------&lt;br /&gt;
  Ejemplo 1. Definir, por recursión, la función&lt;br /&gt;
     longitud :: &amp;#039;a list ⇒ nat&lt;br /&gt;
  tal que (longitud xs) es la longitud de la listas xs. Por ejemplo,&lt;br /&gt;
     longitud [a,c,d] = 3&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
fun longitud :: &amp;quot;&amp;#039;a list ⇒ nat&amp;quot; where&lt;br /&gt;
  &amp;quot;longitud []     = 0&amp;quot;&lt;br /&gt;
| &amp;quot;longitud (x#xs) = 1 + longitud xs&amp;quot;&lt;br /&gt;
   &lt;br /&gt;
value &amp;quot;longitud [a,c,d]&amp;quot; -- &amp;quot;= 3&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejemplo 2. Demostrar que &lt;br /&gt;
     longitud [a,c,d] = 3&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
lemma &amp;quot;longitud [a,c,d] = 3&amp;quot;&lt;br /&gt;
by simp&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejemplo 3. Definir la función&lt;br /&gt;
     fun intercambia :: &amp;#039;a × &amp;#039;b ⇒ &amp;#039;b × &amp;#039;a&lt;br /&gt;
  tal que (intercambia p) es el par obtenido intercambiando las&lt;br /&gt;
  componentes del par p. Por ejemplo,&lt;br /&gt;
     intercambia (u,v) = (v,u)&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
fun intercambia :: &amp;quot;&amp;#039;a × &amp;#039;b ⇒ &amp;#039;b × &amp;#039;a&amp;quot; where&lt;br /&gt;
  &amp;quot;intercambia (x,y) = (y,x)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;intercambia (u,v)&amp;quot; -- &amp;quot;= (v,u)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejemplo 4. (p.6) Demostrar que &lt;br /&gt;
     intercambia (intercambia (x,y)) = (x,y)&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;La demostración detallada es&amp;quot;&lt;br /&gt;
lemma &amp;quot;intercambia (intercambia (x,y)) = (x,y)&amp;quot;&lt;br /&gt;
proof -&lt;br /&gt;
  have &amp;quot;intercambia (intercambia (x,y)) = intercambia (y,x)&amp;quot;  &lt;br /&gt;
    by (simp only: intercambia.simps)&lt;br /&gt;
  also have &amp;quot;... = (x,y)&amp;quot; &lt;br /&gt;
    by (simp only: intercambia.simps)&lt;br /&gt;
  finally show &amp;quot;intercambia (intercambia (x,y)) = (x,y)&amp;quot; by simp&lt;br /&gt;
qed&lt;br /&gt;
&lt;br /&gt;
text {*&lt;br /&gt;
  Notas sobre el lenguaje: En la demostración anterior se ha usado&lt;br /&gt;
  · &amp;quot;proof&amp;quot; para iniciar la prueba,&lt;br /&gt;
  · &amp;quot;-&amp;quot; (después de &amp;quot;proof&amp;quot;) para no usar el método por defecto,&lt;br /&gt;
  · &amp;quot;have&amp;quot; para establecer un paso,&lt;br /&gt;
  · &amp;quot;by (simp only:  intercambia.simps)&amp;quot; para indicar que sólo se usa&lt;br /&gt;
    como regla de escritura la correspondiente a la definición de&lt;br /&gt;
    intercambia,&lt;br /&gt;
  · &amp;quot;also&amp;quot; para encadenar pasos ecuacionales,&lt;br /&gt;
  · &amp;quot;...&amp;quot; para representar la igualdad anterior en un razonamiento&lt;br /&gt;
    ecuacional,&lt;br /&gt;
  · &amp;quot;finally&amp;quot; para indicar el último pasa de un razonamiento ecuacional,&lt;br /&gt;
  · &amp;quot;show&amp;quot; para establecer la conclusión.&lt;br /&gt;
  · &amp;quot;by simp&amp;quot; para indicar el método de demostración por simplificación y &lt;br /&gt;
  · &amp;quot;qed&amp;quot; para terminar la pruebas,&lt;br /&gt;
*}&lt;br /&gt;
&lt;br /&gt;
text {*&lt;br /&gt;
  La definición de la función intercambia genera una regla de&lt;br /&gt;
  simplificación&lt;br /&gt;
  · intercambia.simps: intercambia (x,y) = (y,x)&lt;br /&gt;
  &lt;br /&gt;
  Se puede ver con &lt;br /&gt;
  · thm intercambia.simps &lt;br /&gt;
*}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;La demostración estructurada es&amp;quot;&lt;br /&gt;
lemma &amp;quot;intercambia (intercambia (x,y)) = (x,y)&amp;quot;&lt;br /&gt;
proof -&lt;br /&gt;
  have &amp;quot;intercambia (intercambia (x,y)) = intercambia (y,x)&amp;quot;  by simp&lt;br /&gt;
  also have &amp;quot;... = (x,y)&amp;quot; by simp &lt;br /&gt;
  finally show &amp;quot;intercambia (intercambia (x,y)) = (x,y)&amp;quot; by simp&lt;br /&gt;
qed&lt;br /&gt;
&lt;br /&gt;
text {*&lt;br /&gt;
  Nota: La diferencia entre las dos demostraciones es que en los dos&lt;br /&gt;
  primeros pasos no se explicita la regla de simplificación.&lt;br /&gt;
*}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;La demostración automática es&amp;quot;&lt;br /&gt;
lemma &amp;quot;intercambia (intercambia (x,y)) = (x,y)&amp;quot;&lt;br /&gt;
by simp&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejemplo 5. Definir, por recursión, la función&lt;br /&gt;
     inversa :: &amp;#039;a list ⇒ &amp;#039;a list&lt;br /&gt;
  tal que (inversa xs) es la lista obtenida invirtiendo el orden de los&lt;br /&gt;
  elementos de xs. Por ejemplo,&lt;br /&gt;
     inversa [a,d,c] = [c,d,a]&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
fun inversa :: &amp;quot;&amp;#039;a list ⇒ &amp;#039;a list&amp;quot; where&lt;br /&gt;
  &amp;quot;inversa []     = []&amp;quot;&lt;br /&gt;
| &amp;quot;inversa (x#xs) = inversa xs @ [x]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;inversa [a,d,c]&amp;quot; -- &amp;quot;= [c,d,a]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejemplo 6. (p. 9) Demostrar que &lt;br /&gt;
     inversa [x] = [x]&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;La demostración detallada es&amp;quot;&lt;br /&gt;
lemma &amp;quot;inversa [x] = [x]&amp;quot;&lt;br /&gt;
proof -&lt;br /&gt;
  have &amp;quot;inversa [x] = inversa (x#[])&amp;quot; by simp&lt;br /&gt;
  also have &amp;quot;... = (inversa []) @ [x]&amp;quot; by (simp only: inversa.simps(2))&lt;br /&gt;
  also have &amp;quot;... = [] @ [x]&amp;quot; by (simp only: inversa.simps(1))&lt;br /&gt;
  also have &amp;quot;... = [x]&amp;quot; by (simp only: append_Nil) &lt;br /&gt;
  finally show &amp;quot;inversa [x] = [x]&amp;quot; by simp&lt;br /&gt;
qed&lt;br /&gt;
&lt;br /&gt;
text {*&lt;br /&gt;
  En la demostración anterior se han usado las siguientes reglas:&lt;br /&gt;
  · inversa.simps(1): inversa [] = []&lt;br /&gt;
  · inversa.simps(2): inversa (x#xs) = inversa xs @ [x]&lt;br /&gt;
  · append_Nil:       [] @ ys = ys&lt;br /&gt;
*}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;La demostración estructurada es&amp;quot;&lt;br /&gt;
lemma &amp;quot;inversa [x] = [x]&amp;quot;&lt;br /&gt;
proof -&lt;br /&gt;
  have &amp;quot;inversa [x] = inversa (x#[])&amp;quot; by simp&lt;br /&gt;
  also have &amp;quot;... = (inversa []) @ [x]&amp;quot; by simp&lt;br /&gt;
  also have &amp;quot;... = [] @ [x]&amp;quot; by simp&lt;br /&gt;
  also have &amp;quot;... = [x]&amp;quot; by simp &lt;br /&gt;
  finally show &amp;quot;inversa [x] = [x]&amp;quot; by simp&lt;br /&gt;
qed&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;La demostración automática es&amp;quot;&lt;br /&gt;
lemma &amp;quot;inversa [x] = [x]&amp;quot;&lt;br /&gt;
by simp&lt;br /&gt;
&lt;br /&gt;
section {* Razonamiento por inducción sobre los naturales *}&lt;br /&gt;
&lt;br /&gt;
text {*&lt;br /&gt;
  [Principio de inducción sobre los naturales] Para demostrar una&lt;br /&gt;
  propiedad P para todos los números naturales basta probar que el 0&lt;br /&gt;
  tiene la propiedad P y que si n tiene la propiedad P, entonces n+1&lt;br /&gt;
  también la tiene.  &lt;br /&gt;
     ⟦P 0; ⋀n. P n ⟹ P (Suc n)⟧ ⟹ P m&lt;br /&gt;
&lt;br /&gt;
  En Isabelle el principio de inducción sobre los naturales está&lt;br /&gt;
  formalizado en el teorema nat.induct y puede verse con&lt;br /&gt;
     thm nat.induct&lt;br /&gt;
*}&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejemplo 7. Definir la función&lt;br /&gt;
     repite :: nat ⇒ &amp;#039;a ⇒ &amp;#039;a list&lt;br /&gt;
  tal que (repite n x) es la lista formada por n copias del elemento&lt;br /&gt;
  x. Por ejemplo, &lt;br /&gt;
     repite 3 a = [a,a,a]&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
fun repite :: &amp;quot;nat ⇒ &amp;#039;a ⇒ &amp;#039;a list&amp;quot; where&lt;br /&gt;
  &amp;quot;repite 0 x       = []&amp;quot;&lt;br /&gt;
| &amp;quot;repite (Suc n) x = x # (repite n x)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;repite 3 a&amp;quot; -- &amp;quot;= [a,a,a]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejemplo 8. (p. 18) Demostrar que &lt;br /&gt;
     longitud (repite n x) = n&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;La demostración estructurada es&amp;quot;&lt;br /&gt;
lemma &amp;quot;longitud (repite n x) = n&amp;quot;&lt;br /&gt;
proof (induct n)&lt;br /&gt;
  show &amp;quot;longitud (repite 0 x) = 0&amp;quot; by simp&lt;br /&gt;
next &lt;br /&gt;
  fix n&lt;br /&gt;
  assume HI: &amp;quot;longitud (repite n x) = n&amp;quot;&lt;br /&gt;
  have &amp;quot;longitud (repite (Suc n) x) = longitud (x # (repite n x))&amp;quot; &lt;br /&gt;
    by simp&lt;br /&gt;
  also have &amp;quot;... = 1 + longitud (repite n x)&amp;quot; by simp&lt;br /&gt;
  also have &amp;quot;... = 1 + n&amp;quot; using HI by simp&lt;br /&gt;
  finally show &amp;quot;longitud (repite (Suc n) x) = Suc n&amp;quot; by simp&lt;br /&gt;
qed&lt;br /&gt;
&lt;br /&gt;
text {*&lt;br /&gt;
  Comentarios sobre la demostración anterior:&lt;br /&gt;
  · A la derecha de proof se indica el método de la demostración.&lt;br /&gt;
  · (induct n) indica que la demostración se hará por inducción en n.&lt;br /&gt;
  · Se generan dos subobjetivos correspondientes a la base y el paso de&lt;br /&gt;
    inducción:&lt;br /&gt;
    1. longitud (repite 0 x) = 0&lt;br /&gt;
    2. ⋀n. longitud (repite n x) = n ⟹ longitud (repite (Suc n) x) = Suc n&lt;br /&gt;
    donde ⋀n se lee &amp;quot;para todo n&amp;quot;.  &lt;br /&gt;
  · &amp;quot;next&amp;quot; indica el siguiente subobjetivo.&lt;br /&gt;
  · &amp;quot;fix n&amp;quot; indica &amp;quot;sea n un número natural cualquiera&amp;quot;&lt;br /&gt;
  · assume HI: &amp;quot;longitud (repite n x) = n&amp;quot; indica «supongamos que &lt;br /&gt;
    &amp;quot;longitud (repite n x) = n&amp;quot; y sea HI la etiqueta de este supuesto».&lt;br /&gt;
  · &amp;quot;using HI&amp;quot; usando la propiedad etiquetada con HI. &lt;br /&gt;
*}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;La demostración automática es&amp;quot;&lt;br /&gt;
lemma &amp;quot;longitud (repite n x) = n&amp;quot;&lt;br /&gt;
by (induct n) auto&lt;br /&gt;
&lt;br /&gt;
section {* Razonamiento por inducción sobre listas *}&lt;br /&gt;
&lt;br /&gt;
text {*&lt;br /&gt;
  Para demostrar una propiedad para todas las listas basta demostrar&lt;br /&gt;
  que la lista vacía tiene la propiedad y que al añadir un elemento a una&lt;br /&gt;
  lista que tiene la propiedad se obtiene otra lista que también tiene la&lt;br /&gt;
  propiedad. &lt;br /&gt;
&lt;br /&gt;
  En Isabelle el principio de inducción sobre listas está formalizado&lt;br /&gt;
  mediante el teorema list.induct &lt;br /&gt;
     ⟦P []; &lt;br /&gt;
      ⋀x xs. P xs ⟹ P (x#xs)⟧ &lt;br /&gt;
     ⟹ P xs&lt;br /&gt;
*}&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejemplo 9. Definir la función&lt;br /&gt;
     conc :: &amp;#039;a list ⇒ &amp;#039;a list ⇒ &amp;#039;a list&lt;br /&gt;
  tal que (conc xs ys) es la concatención de las listas xs e ys. Por&lt;br /&gt;
  ejemplo, &lt;br /&gt;
     conc [a,d] [b,d,a,c] = [a,d,b,d,a,c]&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
fun conc :: &amp;quot;&amp;#039;a list ⇒ &amp;#039;a list ⇒ &amp;#039;a list&amp;quot; where&lt;br /&gt;
  &amp;quot;conc []     ys = ys&amp;quot;&lt;br /&gt;
| &amp;quot;conc (x#xs) ys = x # (conc xs ys)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;conc [a,d] [b,d,a,c]&amp;quot; -- &amp;quot;= [a,d,b,d,a,c]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejemplo 10. (p. 24) Demostrar que &lt;br /&gt;
     conc xs (conc ys zs) = (conc xs ys) zs&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;La demostración estructurada es&amp;quot;&lt;br /&gt;
lemma &amp;quot;conc xs (conc ys zs) = conc (conc xs ys) zs&amp;quot;&lt;br /&gt;
proof (induct xs)&lt;br /&gt;
  show &amp;quot;conc [] (conc ys zs) = conc (conc [] ys) zs&amp;quot; by simp&lt;br /&gt;
next&lt;br /&gt;
  fix x xs&lt;br /&gt;
  assume HI: &amp;quot;conc xs (conc ys zs) = conc (conc xs ys) zs&amp;quot; &lt;br /&gt;
  have &amp;quot;conc (x # xs) (conc ys zs) = x # (conc xs (conc ys zs))&amp;quot; by simp&lt;br /&gt;
  also have &amp;quot;... = x # (conc (conc xs ys) zs)&amp;quot; using HI by simp&lt;br /&gt;
  also have &amp;quot;... = conc (conc (x # xs) ys) zs&amp;quot; by simp&lt;br /&gt;
  finally show &amp;quot;conc (x # xs) (conc ys zs) = conc (conc (x # xs) ys) zs&amp;quot; by simp&lt;br /&gt;
qed&lt;br /&gt;
&lt;br /&gt;
text {*&lt;br /&gt;
  Comentario sobre la demostración anterior&lt;br /&gt;
  · (induct xs) genera dos subobjetivos:&lt;br /&gt;
    1. conc [] (conc ys zs) = conc (conc [] ys) zs&lt;br /&gt;
    2. ⋀a xs. conc xs (conc ys zs) = conc (conc xs ys) zs ⟹&lt;br /&gt;
              conc (a#xs) (conc ys zs) = conc (conc (a#xs) ys) zs&lt;br /&gt;
*}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;La demostración automática es&amp;quot;&lt;br /&gt;
lemma &amp;quot;conc xs (conc ys zs) = conc (conc xs ys) zs&amp;quot;&lt;br /&gt;
by (induct xs) auto&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejemplo 11. Refutar que &lt;br /&gt;
     conc xs ys = conc ys xs&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
lemma &amp;quot;conc xs ys = conc ys xs&amp;quot;&lt;br /&gt;
quickcheck&lt;br /&gt;
oops&lt;br /&gt;
&lt;br /&gt;
text {* Encuentra el contraejemplo, &lt;br /&gt;
  xs = [a⇣2]&lt;br /&gt;
  ys = [a⇣1] *}&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejemplo 12. (p. 28) Demostrar que &lt;br /&gt;
     conc xs [] = xs&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;La demostración estructurada es&amp;quot;&lt;br /&gt;
lemma &amp;quot;conc xs [] = xs&amp;quot;&lt;br /&gt;
proof (induct xs)&lt;br /&gt;
  show &amp;quot;conc [] [] = []&amp;quot; by simp&lt;br /&gt;
next &lt;br /&gt;
  fix x xs&lt;br /&gt;
  assume HI: &amp;quot;conc xs [] = xs&amp;quot; &lt;br /&gt;
  have &amp;quot;conc (x # xs) [] = x # (conc xs [])&amp;quot; by simp&lt;br /&gt;
  also have &amp;quot;... = x # xs&amp;quot; using HI by simp&lt;br /&gt;
  finally show &amp;quot;conc (x # xs) [] = x # xs&amp;quot; by simp&lt;br /&gt;
qed&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;La demostración automática es&amp;quot;&lt;br /&gt;
lemma &amp;quot;conc xs [] = xs&amp;quot;&lt;br /&gt;
by (induct xs) auto&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejemplo 13. (p. 30) Demostrar que &lt;br /&gt;
     longitud (conc xs ys) = longitud xs + longitud ys&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;La demostración automática es&amp;quot;&lt;br /&gt;
lemma &amp;quot;longitud (conc xs ys) = longitud xs + longitud ys&amp;quot;&lt;br /&gt;
proof (induct xs)&lt;br /&gt;
  show &amp;quot;longitud (conc [] ys) = longitud [] + longitud ys&amp;quot; by simp&lt;br /&gt;
next&lt;br /&gt;
  fix x xs&lt;br /&gt;
  assume HI: &amp;quot;longitud (conc xs ys) = longitud xs + longitud ys&amp;quot;&lt;br /&gt;
  have &amp;quot;longitud (conc (x # xs) ys) = longitud (x # (conc xs ys))&amp;quot; &lt;br /&gt;
    by simp&lt;br /&gt;
  also have &amp;quot;... = 1 + longitud (conc xs ys)&amp;quot; by simp&lt;br /&gt;
  also have &amp;quot;... = 1 + longitud xs + longitud ys&amp;quot; using HI by simp&lt;br /&gt;
  also have &amp;quot;... = longitud (x # xs) + longitud ys&amp;quot; by simp&lt;br /&gt;
  finally show &amp;quot;longitud (conc (x # xs) ys) = &lt;br /&gt;
                longitud (x # xs) + longitud ys&amp;quot; by simp&lt;br /&gt;
qed&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;La demostración automática es&amp;quot;&lt;br /&gt;
lemma &amp;quot;longitud (conc xs ys) = longitud xs + longitud ys&amp;quot;&lt;br /&gt;
by (induct xs) auto&lt;br /&gt;
&lt;br /&gt;
section {* Inducción correspondiente a la definición recursiva *}&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejemplo 14. Definir la función&lt;br /&gt;
     coge :: nat ⇒ &amp;#039;a list ⇒ &amp;#039;a list&lt;br /&gt;
  tal que (coge n xs) es la lista de los n primeros elementos de xs. Por &lt;br /&gt;
  ejemplo, &lt;br /&gt;
     coge 2 [a,c,d,b,e] = [a,c]&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
fun coge :: &amp;quot;nat ⇒ &amp;#039;a list ⇒ &amp;#039;a list&amp;quot; where&lt;br /&gt;
  &amp;quot;coge n []           = []&amp;quot;&lt;br /&gt;
| &amp;quot;coge 0 xs           = []&amp;quot;&lt;br /&gt;
| &amp;quot;coge (Suc n) (x#xs) = x # (coge n xs)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;coge 2 [a,c,d,b,e]&amp;quot; -- &amp;quot;= [a,c]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejemplo 15. Definir la función&lt;br /&gt;
     elimina :: nat ⇒ &amp;#039;a list ⇒ &amp;#039;a list&lt;br /&gt;
  tal que (elimina n xs) es la lista obtenida eliminando los n primeros&lt;br /&gt;
  elementos de xs. Por ejemplo, &lt;br /&gt;
     elimina 2 [a,c,d,b,e] = [d,b,e]&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
fun elimina :: &amp;quot;nat ⇒ &amp;#039;a list ⇒ &amp;#039;a list&amp;quot; where&lt;br /&gt;
  &amp;quot;elimina n []           = []&amp;quot;&lt;br /&gt;
| &amp;quot;elimina 0 xs           = xs&amp;quot;&lt;br /&gt;
| &amp;quot;elimina (Suc n) (x#xs) = elimina n xs&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;elimina 2 [a,c,d,b,e]&amp;quot; -- &amp;quot;= [d,b,e]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* &lt;br /&gt;
  La definición coge genera el esquema de inducción coge.induct:&lt;br /&gt;
     ⟦⋀n. P n []; &lt;br /&gt;
      ⋀x xs. P 0 (x#xs); &lt;br /&gt;
      ⋀n x xs. P n xs ⟹ P (Suc n) (x#xs)⟧&lt;br /&gt;
     ⟹ P n x&lt;br /&gt;
&lt;br /&gt;
  Puede verse usando &amp;quot;thm coge.induct&amp;quot;. *}&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejemplo 16. (p. 35) Demostrar que &lt;br /&gt;
     conc (coge n xs) (elimina n xs) = xs&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;La demostración estructurada es&amp;quot;&lt;br /&gt;
lemma &amp;quot;conc (coge n xs) (elimina n xs) = xs&amp;quot;&lt;br /&gt;
proof (induct rule: coge.induct)&lt;br /&gt;
  fix n&lt;br /&gt;
  show &amp;quot;conc (coge n []) (elimina n []) = []&amp;quot; by simp&lt;br /&gt;
next&lt;br /&gt;
  fix x xs&lt;br /&gt;
  show &amp;quot;conc (coge 0 (x#xs)) (elimina 0 (x#xs)) = x#xs&amp;quot; by simp&lt;br /&gt;
next&lt;br /&gt;
  fix n x xs&lt;br /&gt;
  assume HI: &amp;quot;conc (coge n xs) (elimina n xs) = xs&amp;quot;&lt;br /&gt;
  have &amp;quot;conc (coge (Suc n) (x#xs)) (elimina (Suc n) (x#xs)) = &lt;br /&gt;
        conc (x#(coge n xs)) (elimina n xs)&amp;quot; by simp&lt;br /&gt;
  also have &amp;quot;... = x#(conc (coge n xs) (elimina n xs))&amp;quot; by simp&lt;br /&gt;
  also have &amp;quot;... = x#xs&amp;quot; using HI by simp  &lt;br /&gt;
  finally show &amp;quot;conc (coge (Suc n) (x#xs)) (elimina (Suc n) (x#xs)) = x#xs&amp;quot;&lt;br /&gt;
    by simp&lt;br /&gt;
qed&lt;br /&gt;
&lt;br /&gt;
text {*&lt;br /&gt;
  Comentario sobre la demostración anterior:&lt;br /&gt;
  · (induct rule: coge.induct) indica que el método de demostración es&lt;br /&gt;
    por el esquema de inducción correspondiente a la definición de la&lt;br /&gt;
    función coge.&lt;br /&gt;
  · Se generan 3 subobjetivos:&lt;br /&gt;
    · 1. ⋀n. conc (coge n []) (elimina n []) = []&lt;br /&gt;
    · 2. ⋀x xs. conc (coge 0 (x#xs)) (elimina 0 (x#xs)) = x#xs&lt;br /&gt;
    · 3. ⋀n x xs. &lt;br /&gt;
            conc (coge n xs) (elimina n xs) = xs ⟹&lt;br /&gt;
            conc (coge (Suc n) (x#xs)) (elimina (Suc n) (x#xs)) = x#xs&lt;br /&gt;
*}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;La demostración automática es&amp;quot;&lt;br /&gt;
lemma &amp;quot;conc (coge n xs) (elimina n xs) = xs&amp;quot;&lt;br /&gt;
by (induct rule: coge.induct) auto&lt;br /&gt;
&lt;br /&gt;
section {* Razonamiento por casos *}&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejemplo 17. Definir la función&lt;br /&gt;
     esVacia :: &amp;#039;a list ⇒ bool&lt;br /&gt;
  tal que (esVacia xs) se verifica si xs es la lista vacía. Por ejemplo,&lt;br /&gt;
     esVacia []  = True&lt;br /&gt;
     esVacia [1] = False&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
fun esVacia :: &amp;quot;&amp;#039;a list ⇒ bool&amp;quot; where&lt;br /&gt;
  &amp;quot;esVacia []     = True&amp;quot;&lt;br /&gt;
| &amp;quot;esVacia (x#xs) = False&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;esVacia []&amp;quot;  -- &amp;quot;= True&amp;quot;&lt;br /&gt;
value &amp;quot;esVacia [1]&amp;quot; -- &amp;quot;= False&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejemplo 18 (p. 39) . Demostrar que &lt;br /&gt;
     esVacia xs = esVacia (conc xs xs)&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;La demostración estructurada es&amp;quot;&lt;br /&gt;
lemma &amp;quot;esVacia xs = esVacia (conc xs xs)&amp;quot;&lt;br /&gt;
proof (cases xs)&lt;br /&gt;
  assume &amp;quot;xs = []&amp;quot;&lt;br /&gt;
  then show &amp;quot;esVacia xs = esVacia (conc xs xs)&amp;quot; by simp&lt;br /&gt;
next&lt;br /&gt;
  fix y ys&lt;br /&gt;
  assume &amp;quot;xs = y#ys&amp;quot;&lt;br /&gt;
  then show &amp;quot;esVacia xs = esVacia (conc xs xs)&amp;quot; by simp&lt;br /&gt;
qed&lt;br /&gt;
&lt;br /&gt;
text {*&lt;br /&gt;
  Comentarios sobre la demostración anterior:&lt;br /&gt;
  · &amp;quot;(cases xs)&amp;quot; es el método de demostración por casos según xs.&lt;br /&gt;
  · Se generan dos subobjetivos  correspondientes a los dos&lt;br /&gt;
    constructores de listas:&lt;br /&gt;
    · 1. xs = [] ⟹ esVacia xs = esVacia (conc xs xs)&lt;br /&gt;
    · 2. ⋀y ys. xs = y#ys ⟹ esVacia xs = esVacia (conc xs xs)&lt;br /&gt;
  · &amp;quot;then&amp;quot; indica &amp;quot;usando la propiedad anterior&amp;quot;&lt;br /&gt;
*}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;La demostración estructurada simplificada es&amp;quot;&lt;br /&gt;
lemma &amp;quot;esVacia xs = esVacia (conc xs xs)&amp;quot;&lt;br /&gt;
proof (cases xs)&lt;br /&gt;
  case Nil&lt;br /&gt;
  thus &amp;quot;esVacia xs = esVacia (conc xs xs)&amp;quot; by simp&lt;br /&gt;
next&lt;br /&gt;
  case Cons&lt;br /&gt;
  thus &amp;quot;esVacia xs = esVacia (conc xs xs)&amp;quot; by simp&lt;br /&gt;
qed&lt;br /&gt;
&lt;br /&gt;
text {*&lt;br /&gt;
  Comentarios sobre la demostración anterior:&lt;br /&gt;
  · &amp;quot;case Nil&amp;quot; es una abreviatura de &amp;quot;assume xs = []&amp;quot;&lt;br /&gt;
  · &amp;quot;case Cons&amp;quot; es una abreviatura de &amp;quot;fix y ys assume xs = y#ys&amp;quot;&lt;br /&gt;
  · &amp;quot;thus&amp;quot; es una abreviatura de &amp;quot;then show&amp;quot;.&lt;br /&gt;
*}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;La demostración automática es&amp;quot;&lt;br /&gt;
lemma &amp;quot;esVacia xs = esVacia (conc xs xs)&amp;quot;&lt;br /&gt;
by (cases xs) auto&lt;br /&gt;
&lt;br /&gt;
section {* Heurística de generalización *}&lt;br /&gt;
&lt;br /&gt;
text {* &lt;br /&gt;
  Heurística de generalización: Cuando se use demostración estructural,&lt;br /&gt;
  cuantificar universalmente las variables libres (o, equivalentemente,&lt;br /&gt;
  considerar las variables libres como variables arbitrarias). *}&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejemplo 19. Definir la función&lt;br /&gt;
     inversaAc :: &amp;#039;a list ⇒ &amp;#039;a list&lt;br /&gt;
  tal que (inversaAc xs) es a inversa de xs calculada usando&lt;br /&gt;
  acumuladores. Por ejemplo, &lt;br /&gt;
     inversaAc [a,c,b,e] = [e,b,c,a]&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
fun inversaAcAux :: &amp;quot;&amp;#039;a list ⇒ &amp;#039;a list ⇒ &amp;#039;a list&amp;quot; where&lt;br /&gt;
  &amp;quot;inversaAcAux [] ys     = ys&amp;quot;&lt;br /&gt;
| &amp;quot;inversaAcAux (x#xs) ys = inversaAcAux xs (x#ys)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
fun inversaAc :: &amp;quot;&amp;#039;a list ⇒ &amp;#039;a list&amp;quot; where&lt;br /&gt;
  &amp;quot;inversaAc xs = inversaAcAux xs []&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;inversaAc [a,c,b,e]&amp;quot; -- &amp;quot;= [e,b,c,a]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejemplo 20. (p. 44) Demostrar que &lt;br /&gt;
     inversaAcAux xs ys = (inversa xs) @ ys&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;La demostración estructurada es&amp;quot;&lt;br /&gt;
lemma inversaAcAux_es_inversa:&lt;br /&gt;
  &amp;quot;inversaAcAux xs ys = (inversa xs) @ ys&amp;quot;&lt;br /&gt;
proof (induct xs arbitrary: ys)&lt;br /&gt;
  show &amp;quot;⋀ys. inversaAcAux [] ys = inversa [] @ ys&amp;quot; by simp&lt;br /&gt;
next&lt;br /&gt;
  fix a xs &lt;br /&gt;
  assume HI: &amp;quot;⋀ys. inversaAcAux xs ys = inversa xs@ys&amp;quot;&lt;br /&gt;
  show &amp;quot;⋀ys. inversaAcAux (a#xs) ys = inversa (a#xs)@ys&amp;quot;&lt;br /&gt;
  proof -&lt;br /&gt;
    fix ys&lt;br /&gt;
    have &amp;quot;inversaAcAux (a#xs) ys = inversaAcAux xs (a#ys)&amp;quot; by simp&lt;br /&gt;
    also have &amp;quot;… = inversa xs@(a#ys)&amp;quot; using HI by simp&lt;br /&gt;
    also have &amp;quot;… = inversa (a#xs)@ys&amp;quot; by simp &lt;br /&gt;
    finally show &amp;quot;inversaAcAux (a#xs) ys = inversa (a#xs)@ys&amp;quot; by simp&lt;br /&gt;
  qed&lt;br /&gt;
qed&lt;br /&gt;
&lt;br /&gt;
text {*&lt;br /&gt;
  Comentarios sobre la demostración anterior:&lt;br /&gt;
  · &amp;quot;(induct xs arbitrary: ys)&amp;quot; es el método de demostración por&lt;br /&gt;
    inducción sobre xs usando ys como variable arbitraria.&lt;br /&gt;
  · Se generan dos subobjetivos:&lt;br /&gt;
    · 1. ⋀ys. inversaAcAux [] ys = inversa [] @ ys&lt;br /&gt;
    · 2. ⋀a xs ys. (⋀ys. inversaAcAux xs ys = inversa xs @ ys) ⟹&lt;br /&gt;
                    inversaAcAux (a # xs) ys = inversa (a # xs) @ ys&lt;br /&gt;
  · Dentro de una demostración se pueden incluir otras demostraciones.&lt;br /&gt;
  · Para demostrar la propiedad universal &amp;quot;⋀ys. P(ys)&amp;quot; se elige una&lt;br /&gt;
    lista arbitraria (con &amp;quot;fix ys&amp;quot;) y se demuestra &amp;quot;P(ys)&amp;quot;. &lt;br /&gt;
*}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;La demostración automática es&amp;quot;&lt;br /&gt;
lemma &amp;quot;inversaAcAux xs ys = (inversa xs)@ys&amp;quot;&lt;br /&gt;
by (induct xs arbitrary: ys) auto&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejemplo 21. (p. 43) Demostrar que &lt;br /&gt;
     inversaAc xs = inversa xs&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;La demostración automática es&amp;quot;&lt;br /&gt;
corollary &amp;quot;inversaAc xs = inversa xs&amp;quot;&lt;br /&gt;
by (simp add: inversaAcAux_es_inversa)&lt;br /&gt;
&lt;br /&gt;
text {*&lt;br /&gt;
  Comentario de la demostración anterior:&lt;br /&gt;
  · &amp;quot;(simp add: inversaAcAux_es_inversa)&amp;quot; es el método de demostración&lt;br /&gt;
    por simplificación usando como regla de simplificación la propiedad&lt;br /&gt;
    inversaAcAux_es_inversa. &lt;br /&gt;
*}&lt;br /&gt;
&lt;br /&gt;
section {* Demostración por inducción para funciones de orden superior *}&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejemplo 22. Definir la función&lt;br /&gt;
     sum :: nat list ⇒ nat&lt;br /&gt;
  tal que (sum xs) es la suma de los elementos de xs. Por ejemplo,&lt;br /&gt;
     sum [3,2,5] = 10&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
fun sum :: &amp;quot;nat list ⇒ nat&amp;quot; where&lt;br /&gt;
  &amp;quot;sum []     = 0&amp;quot;&lt;br /&gt;
| &amp;quot;sum (x#xs) = x + sum xs&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;sum [3,2,5]&amp;quot; -- &amp;quot;= 10&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejemplo 23. Definir la función&lt;br /&gt;
     map :: (&amp;#039;a ⇒ &amp;#039;b) ⇒ &amp;#039;a list ⇒ &amp;#039;b list&lt;br /&gt;
  tal que (map f xs) es la lista obtenida aplicando la función f a los&lt;br /&gt;
  elementos de xs. Por ejemplo,&lt;br /&gt;
     map (λx. 2*x) [3,2,5] = [6,4,10]&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
fun map :: &amp;quot;(&amp;#039;a ⇒ &amp;#039;b) ⇒ &amp;#039;a list ⇒ &amp;#039;b list&amp;quot; where&lt;br /&gt;
  &amp;quot;map f []     = []&amp;quot;&lt;br /&gt;
| &amp;quot;map f (x#xs) = (f x) # map f xs&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;map (λx. 2*x) [3::nat,2,5]&amp;quot; -- &amp;quot;= [6,4,10]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejemplo 24. (p. 45) Demostrar que &lt;br /&gt;
     sum (map (λx. 2*x) xs) = 2 * (sum xs)&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;La demostración estructurada es&amp;quot;&lt;br /&gt;
lemma &amp;quot;sum (map (λx. 2*x) xs) = 2 * (sum xs)&amp;quot;&lt;br /&gt;
proof (induct xs)&lt;br /&gt;
  show &amp;quot;sum (map (λx. 2*x) []) = 2 * (sum [])&amp;quot; by simp&lt;br /&gt;
next&lt;br /&gt;
  fix a xs&lt;br /&gt;
  assume HI: &amp;quot;sum (map (λx. 2*x) xs) = 2 * (sum xs)&amp;quot;&lt;br /&gt;
  have &amp;quot;sum (map (λx. 2*x) (a#xs)) = sum ((2*a)#(map (λx. 2*x) xs))&amp;quot; &lt;br /&gt;
    by simp&lt;br /&gt;
  also have &amp;quot;... = 2*a + sum (map (λx. 2*x) xs)&amp;quot; by simp&lt;br /&gt;
  also have &amp;quot;... = 2*a + 2*(sum xs)&amp;quot; using HI by simp&lt;br /&gt;
  also have &amp;quot;... = 2*(a + sum xs)&amp;quot; by simp&lt;br /&gt;
  also have &amp;quot;... = 2*(sum (a#xs))&amp;quot; by simp&lt;br /&gt;
  finally show &amp;quot;sum (map (λx. 2*x) (a#xs)) = 2*(sum (a#xs))&amp;quot; by simp&lt;br /&gt;
qed&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;La demostración automática es&amp;quot;&lt;br /&gt;
lemma &amp;quot;sum (map (λx. 2*x) xs) = 2 * (sum xs)&amp;quot;&lt;br /&gt;
by (induct xs) auto&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejemplo 25. (p. 48) Demostrar que &lt;br /&gt;
     longitud (map f xs) = longitud xs&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;La demostración estructurada es&amp;quot;&lt;br /&gt;
lemma &amp;quot;longitud (map f xs) = longitud xs&amp;quot;&lt;br /&gt;
proof (induct xs)&lt;br /&gt;
  show &amp;quot;longitud (map f []) = longitud []&amp;quot; by simp&lt;br /&gt;
next&lt;br /&gt;
  fix a xs&lt;br /&gt;
  assume HI: &amp;quot;longitud (map f xs) = longitud xs&amp;quot;&lt;br /&gt;
  have &amp;quot;longitud (map f (a#xs)) = longitud (f a # (map f xs))&amp;quot; by simp&lt;br /&gt;
  also have &amp;quot;... = 1 + longitud (map f xs)&amp;quot; by simp&lt;br /&gt;
  also have &amp;quot;... = 1 + longitud xs&amp;quot; using HI by simp&lt;br /&gt;
  also have &amp;quot;... = longitud (a#xs)&amp;quot; by simp&lt;br /&gt;
  finally show &amp;quot;longitud (map f (a#xs)) = longitud (a#xs)&amp;quot; by simp&lt;br /&gt;
qed&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;La demostración automática es&amp;quot;&lt;br /&gt;
lemma &amp;quot;longitud (map f xs) = longitud xs&amp;quot;&lt;br /&gt;
by (induct xs) auto&lt;br /&gt;
&lt;br /&gt;
section {* Referencias *}&lt;br /&gt;
&lt;br /&gt;
text {*&lt;br /&gt;
  · J.A. Alonso. &amp;quot;Razonamiento sobre programas&amp;quot; http://goo.gl/R06O3&lt;br /&gt;
  · G. Hutton. &amp;quot;Programming in Haskell&amp;quot;. Cap. 13 &amp;quot;Reasoning about&lt;br /&gt;
    programms&amp;quot;. &lt;br /&gt;
  · S. Thompson. &amp;quot;Haskell: the Craft of Functional Programming, 3rd&lt;br /&gt;
    Edition. Cap. 8 &amp;quot;Reasoning about programms&amp;quot;. &lt;br /&gt;
  · L. Paulson. &amp;quot;ML for the Working Programmer, 2nd Edition&amp;quot;. Cap. 6. &lt;br /&gt;
    &amp;quot;Reasoning about functional programs&amp;quot;. &lt;br /&gt;
*}&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jalonso</name></author>
		
	</entry>
	<entry>
		<id>https://www.glc.us.es/~jalonso/RA2015/index.php?title=Temas&amp;diff=47</id>
		<title>Temas</title>
		<link rel="alternate" type="text/html" href="https://www.glc.us.es/~jalonso/RA2015/index.php?title=Temas&amp;diff=47"/>
		<updated>2015-12-14T16:03:21Z</updated>

		<summary type="html">&lt;p&gt;Jalonso: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Temas de &amp;#039;&amp;#039;Razonamiento automático (2014-15)&amp;#039;&amp;#039; ==&lt;br /&gt;
* [[Tema 1: Programación funcional en Isabelle]].&lt;br /&gt;
* Tema 2: Razonamiento sobre programas:&lt;br /&gt;
** [http://www.cs.us.es/~jalonso/cursos/i1m-15/temas/tema-8.pdf Tema 2a: Razonamiento sobre programas Haskell]&lt;br /&gt;
** [[Tema 2b: Razonamiento automático sobre programas en Isabelle/HOL]].&lt;br /&gt;
* [[Tema 3: Razonamiento estructurado sobre programas en Isabelle/HOL]].&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
* [[Tema 4: Razonamiento por casos y por inducción]].&lt;br /&gt;
* Tema 5: Verificación de algoritmos de ordenación:&lt;br /&gt;
** [[Tema 5a: Verificación de la ordenación por inserción]].&lt;br /&gt;
** [[Tema 5b: Verificación de la ordenación por mezcla]].&lt;br /&gt;
* [[Tema 6: Caso de estudio: Compilación de expresiones]].&lt;br /&gt;
* Tema 7: Deducción natural proposicional:&lt;br /&gt;
** [http://www.cs.us.es/~jalonso/cursos/li/temas/tema-2.pdf Tema 7a: Deducción natural proposicional]].&lt;br /&gt;
** [[Tema 7b: Deducción natural proposicional con Isabelle/HOL]].&lt;br /&gt;
* Tema 8: Deducción natural de primer orden:&lt;br /&gt;
** [http://www.cs.us.es/~jalonso/cursos/li/temas/tema-8.pdf Tema 8a: Deducción natural en lógica de primer orden]].&lt;br /&gt;
** [[Tema 8b: Deducción natural en lógica de primer orden con Isabelle/HOL]]&lt;br /&gt;
* [[Tema 9: Conjuntos, funciones y relaciones]].&lt;br /&gt;
* [[Tema 10: Conjuntos definidos inductivamente]].&lt;br /&gt;
* [[Tema 11: Gramáticas libre de contexto]].&lt;br /&gt;
* Tema 12: Misceláneas:&lt;br /&gt;
** [[Tema 12a: Razonamiento modular (Teoría de grupos)]].&lt;br /&gt;
** [[Tema 12b: Razonamiento modular]].&lt;br /&gt;
** [[Tema 12c: Automatización]].&lt;br /&gt;
** [[Tema 12d: Pasos elementales]].&lt;br /&gt;
** [[Tema 12e: Sudoku]].&lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jalonso</name></author>
		
	</entry>
	<entry>
		<id>https://www.glc.us.es/~jalonso/RA2015/index.php?title=Discusi%C3%B3n:Relaci%C3%B3n_1&amp;diff=46</id>
		<title>Discusión:Relación 1</title>
		<link rel="alternate" type="text/html" href="https://www.glc.us.es/~jalonso/RA2015/index.php?title=Discusi%C3%B3n:Relaci%C3%B3n_1&amp;diff=46"/>
		<updated>2015-12-01T15:15:15Z</updated>

		<summary type="html">&lt;p&gt;Jalonso: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;He cambiado el sitio de los nombres de los autores para ponerlo delante de cada definición. También he numerado las distintas versiones de la misma función para que no den problemas al cargar la teoría. [[Usuario:Jalonso|José A. Alonso]] 10:14 30 nov 2015 (CET)&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Jalonso</name></author>
		
	</entry>
	<entry>
		<id>https://www.glc.us.es/~jalonso/RA2015/index.php?title=Discusi%C3%B3n:Relaci%C3%B3n_1&amp;diff=45</id>
		<title>Discusión:Relación 1</title>
		<link rel="alternate" type="text/html" href="https://www.glc.us.es/~jalonso/RA2015/index.php?title=Discusi%C3%B3n:Relaci%C3%B3n_1&amp;diff=45"/>
		<updated>2015-12-01T15:11:31Z</updated>

		<summary type="html">&lt;p&gt;Jalonso: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;He cambiado el sitio de los nombres de los autores para ponerlo delante de cada definición. También he numerado las distintas versiones de la misma función para que no den problemas al cargar la teoría. [[Usuario:Jalonso|José A. Alonso]] 10:14 30 nov 2015 (CET)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Respuesta  ... [[Usuario:Jalonso|José A. Alonso]] 16:11 1 dic 2015 (CET)&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Jalonso</name></author>
		
	</entry>
	<entry>
		<id>https://www.glc.us.es/~jalonso/RA2015/index.php?title=R2&amp;diff=44</id>
		<title>R2</title>
		<link rel="alternate" type="text/html" href="https://www.glc.us.es/~jalonso/RA2015/index.php?title=R2&amp;diff=44"/>
		<updated>2015-12-01T11:55:06Z</updated>

		<summary type="html">&lt;p&gt;Jalonso: Protegió «R2» ([edit=sysop] (indefinido) [move=sysop] (indefinido))&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;source lang=&amp;quot;isar&amp;quot;&amp;gt;&lt;br /&gt;
header {* R2: Razonamiento sobre programas en Isabelle/HOL *}&lt;br /&gt;
&lt;br /&gt;
theory R2&lt;br /&gt;
imports Main &lt;br /&gt;
begin&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 1. Definir la función&lt;br /&gt;
     sumaImpares :: nat ⇒ nat&lt;br /&gt;
  tal que (sumaImpares n) es la suma de los n primeros números&lt;br /&gt;
  impares. Por ejemplo,&lt;br /&gt;
     sumaImpares 5  =  25&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
fun sumaImpares :: &amp;quot;nat ⇒ nat&amp;quot; where&lt;br /&gt;
  &amp;quot;sumaImpares n = undefined&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;sumaImpares 5&amp;quot; -- &amp;quot;= 25&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 2. Demostrar que &lt;br /&gt;
     sumaImpares n = n*n&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
lemma &amp;quot;sumaImpares n = n*n&amp;quot;&lt;br /&gt;
oops&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 3. Definir la función&lt;br /&gt;
     sumaPotenciasDeDosMasUno :: nat ⇒ nat&lt;br /&gt;
  tal que &lt;br /&gt;
     (sumaPotenciasDeDosMasUno n) = 1 + 2^0 + 2^1 + 2^2 + ... + 2^n. &lt;br /&gt;
  Por ejemplo, &lt;br /&gt;
     sumaPotenciasDeDosMasUno 3  =  16&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
fun sumaPotenciasDeDosMasUno :: &amp;quot;nat ⇒ nat&amp;quot; where&lt;br /&gt;
  &amp;quot;sumaPotenciasDeDosMasUno n = undefined&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;sumaPotenciasDeDosMasUno 3&amp;quot; -- &amp;quot;= 16&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 4. Demostrar que &lt;br /&gt;
     sumaPotenciasDeDosMasUno n = 2^(n+1)&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
lemma &amp;quot;sumaPotenciasDeDosMasUno n = 2^(n+1)&amp;quot;&lt;br /&gt;
oops&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 5. Definir la función&lt;br /&gt;
     copia :: nat ⇒ &amp;#039;a ⇒ &amp;#039;a list&lt;br /&gt;
  tal que (copia n x) es la lista formado por n copias del elemento&lt;br /&gt;
  x. Por ejemplo, &lt;br /&gt;
     copia 3 x = [x,x,x]&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
fun copia :: &amp;quot;nat ⇒ &amp;#039;a ⇒ &amp;#039;a list&amp;quot; where&lt;br /&gt;
  &amp;quot;copia n x = undefined&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;copia 3 x&amp;quot; -- &amp;quot;= [x,x,x]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 6. Definir la función&lt;br /&gt;
     todos :: (&amp;#039;a ⇒ bool) ⇒ &amp;#039;a list ⇒ bool&lt;br /&gt;
  tal que (todos p xs) se verifica si todos los elementos de xs cumplen&lt;br /&gt;
  la propiedad p. Por ejemplo,&lt;br /&gt;
     todos (λx. x&amp;gt;(1::nat)) [2,6,4] = True&lt;br /&gt;
     todos (λx. x&amp;gt;(2::nat)) [2,6,4] = False&lt;br /&gt;
  Nota: La conjunción se representa por ∧&lt;br /&gt;
  ----------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
fun todos :: &amp;quot;(&amp;#039;a ⇒ bool) ⇒ &amp;#039;a list ⇒ bool&amp;quot; where&lt;br /&gt;
  &amp;quot;todos p xs = undefined&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;todos (λx. x&amp;gt;(1::nat)) [2,6,4]&amp;quot; -- &amp;quot;= True&amp;quot;&lt;br /&gt;
value &amp;quot;todos (λx. x&amp;gt;(2::nat)) [2,6,4]&amp;quot; -- &amp;quot;= False&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 7. Demostrar que todos los elementos de (copia n x) son&lt;br /&gt;
  iguales a x. &lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
lemma &amp;quot;todos (λy. y=x) (copia n x)&amp;quot;&lt;br /&gt;
oops&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 8. Definir la función&lt;br /&gt;
    factR :: nat ⇒ nat&lt;br /&gt;
  tal que (factR n) es el factorial de n. Por ejemplo,&lt;br /&gt;
    factR 4 = 24&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
fun factR :: &amp;quot;nat ⇒ nat&amp;quot; where&lt;br /&gt;
  &amp;quot;factR n = undefined&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;factR 4&amp;quot; -- &amp;quot;= 24&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 9. Se considera la siguiente definición iterativa de la&lt;br /&gt;
  función factorial &lt;br /&gt;
     factI :: &amp;quot;nat ⇒ nat&amp;quot; where&lt;br /&gt;
     factI n = factI&amp;#039; n 1&lt;br /&gt;
     &lt;br /&gt;
     factI&amp;#039; :: nat ⇒ nat ⇒ nat&amp;quot; where&lt;br /&gt;
     factI&amp;#039; 0       x = x&lt;br /&gt;
     factI&amp;#039; (Suc n) x = factI&amp;#039; n (Suc n)*x&lt;br /&gt;
  Demostrar que, para todo n y todo x, se tiene &lt;br /&gt;
     factI&amp;#039; n x = x * factR n&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
fun factI&amp;#039; :: &amp;quot;nat ⇒ nat ⇒ nat&amp;quot; where&lt;br /&gt;
  &amp;quot;factI&amp;#039; 0       x = x&amp;quot;&lt;br /&gt;
| &amp;quot;factI&amp;#039; (Suc n) x = factI&amp;#039; n (Suc n)*x&amp;quot;&lt;br /&gt;
&lt;br /&gt;
fun factI :: &amp;quot;nat ⇒ nat&amp;quot; where&lt;br /&gt;
  &amp;quot;factI n = factI&amp;#039; n 1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;factI 4&amp;quot; -- &amp;quot;= 24&amp;quot;&lt;br /&gt;
     &lt;br /&gt;
lemma fact: &amp;quot;factI&amp;#039; n x = x * factR n&amp;quot;&lt;br /&gt;
oops&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 10. Demostrar que&lt;br /&gt;
     factI n = factR n&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
corollary &amp;quot;factI n = factR n&amp;quot;&lt;br /&gt;
oops&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 11. Definir, recursivamente y sin usar (@), la función&lt;br /&gt;
     amplia :: &amp;#039;a list ⇒ &amp;#039;a ⇒ &amp;#039;a list&lt;br /&gt;
  tal que (amplia xs y) es la lista obtenida añadiendo el elemento y al&lt;br /&gt;
  final de la lista xs. Por ejemplo,&lt;br /&gt;
     amplia [d,a] t = [d,a,t]&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
fun amplia :: &amp;quot;&amp;#039;a list ⇒ &amp;#039;a ⇒ &amp;#039;a list&amp;quot; where&lt;br /&gt;
  &amp;quot;amplia xs y = undefined&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;amplia [d,a] t&amp;quot; -- &amp;quot;= [d,a,t]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 12. Demostrar que &lt;br /&gt;
     amplia xs y = xs @ [y]&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
lemma &amp;quot;amplia xs y = xs @ [y]&amp;quot;&lt;br /&gt;
oops&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jalonso</name></author>
		
	</entry>
	<entry>
		<id>https://www.glc.us.es/~jalonso/RA2015/index.php?title=Relaci%C3%B3n_2&amp;diff=43</id>
		<title>Relación 2</title>
		<link rel="alternate" type="text/html" href="https://www.glc.us.es/~jalonso/RA2015/index.php?title=Relaci%C3%B3n_2&amp;diff=43"/>
		<updated>2015-12-01T11:54:51Z</updated>

		<summary type="html">&lt;p&gt;Jalonso: Página creada con &amp;#039;&amp;lt;source lang=&amp;quot;isar&amp;quot;&amp;gt; header {* R2: Razonamiento sobre programas en Isabelle/HOL *}  theory R2 imports Main  begin  text {* ------------------------------------------------------...&amp;#039;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;source lang=&amp;quot;isar&amp;quot;&amp;gt;&lt;br /&gt;
header {* R2: Razonamiento sobre programas en Isabelle/HOL *}&lt;br /&gt;
&lt;br /&gt;
theory R2&lt;br /&gt;
imports Main &lt;br /&gt;
begin&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 1. Definir la función&lt;br /&gt;
     sumaImpares :: nat ⇒ nat&lt;br /&gt;
  tal que (sumaImpares n) es la suma de los n primeros números&lt;br /&gt;
  impares. Por ejemplo,&lt;br /&gt;
     sumaImpares 5  =  25&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
fun sumaImpares :: &amp;quot;nat ⇒ nat&amp;quot; where&lt;br /&gt;
  &amp;quot;sumaImpares n = undefined&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;sumaImpares 5&amp;quot; -- &amp;quot;= 25&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 2. Demostrar que &lt;br /&gt;
     sumaImpares n = n*n&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
lemma &amp;quot;sumaImpares n = n*n&amp;quot;&lt;br /&gt;
oops&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 3. Definir la función&lt;br /&gt;
     sumaPotenciasDeDosMasUno :: nat ⇒ nat&lt;br /&gt;
  tal que &lt;br /&gt;
     (sumaPotenciasDeDosMasUno n) = 1 + 2^0 + 2^1 + 2^2 + ... + 2^n. &lt;br /&gt;
  Por ejemplo, &lt;br /&gt;
     sumaPotenciasDeDosMasUno 3  =  16&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
fun sumaPotenciasDeDosMasUno :: &amp;quot;nat ⇒ nat&amp;quot; where&lt;br /&gt;
  &amp;quot;sumaPotenciasDeDosMasUno n = undefined&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;sumaPotenciasDeDosMasUno 3&amp;quot; -- &amp;quot;= 16&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 4. Demostrar que &lt;br /&gt;
     sumaPotenciasDeDosMasUno n = 2^(n+1)&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
lemma &amp;quot;sumaPotenciasDeDosMasUno n = 2^(n+1)&amp;quot;&lt;br /&gt;
oops&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 5. Definir la función&lt;br /&gt;
     copia :: nat ⇒ &amp;#039;a ⇒ &amp;#039;a list&lt;br /&gt;
  tal que (copia n x) es la lista formado por n copias del elemento&lt;br /&gt;
  x. Por ejemplo, &lt;br /&gt;
     copia 3 x = [x,x,x]&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
fun copia :: &amp;quot;nat ⇒ &amp;#039;a ⇒ &amp;#039;a list&amp;quot; where&lt;br /&gt;
  &amp;quot;copia n x = undefined&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;copia 3 x&amp;quot; -- &amp;quot;= [x,x,x]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 6. Definir la función&lt;br /&gt;
     todos :: (&amp;#039;a ⇒ bool) ⇒ &amp;#039;a list ⇒ bool&lt;br /&gt;
  tal que (todos p xs) se verifica si todos los elementos de xs cumplen&lt;br /&gt;
  la propiedad p. Por ejemplo,&lt;br /&gt;
     todos (λx. x&amp;gt;(1::nat)) [2,6,4] = True&lt;br /&gt;
     todos (λx. x&amp;gt;(2::nat)) [2,6,4] = False&lt;br /&gt;
  Nota: La conjunción se representa por ∧&lt;br /&gt;
  ----------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
fun todos :: &amp;quot;(&amp;#039;a ⇒ bool) ⇒ &amp;#039;a list ⇒ bool&amp;quot; where&lt;br /&gt;
  &amp;quot;todos p xs = undefined&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;todos (λx. x&amp;gt;(1::nat)) [2,6,4]&amp;quot; -- &amp;quot;= True&amp;quot;&lt;br /&gt;
value &amp;quot;todos (λx. x&amp;gt;(2::nat)) [2,6,4]&amp;quot; -- &amp;quot;= False&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 7. Demostrar que todos los elementos de (copia n x) son&lt;br /&gt;
  iguales a x. &lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
lemma &amp;quot;todos (λy. y=x) (copia n x)&amp;quot;&lt;br /&gt;
oops&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 8. Definir la función&lt;br /&gt;
    factR :: nat ⇒ nat&lt;br /&gt;
  tal que (factR n) es el factorial de n. Por ejemplo,&lt;br /&gt;
    factR 4 = 24&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
fun factR :: &amp;quot;nat ⇒ nat&amp;quot; where&lt;br /&gt;
  &amp;quot;factR n = undefined&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;factR 4&amp;quot; -- &amp;quot;= 24&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 9. Se considera la siguiente definición iterativa de la&lt;br /&gt;
  función factorial &lt;br /&gt;
     factI :: &amp;quot;nat ⇒ nat&amp;quot; where&lt;br /&gt;
     factI n = factI&amp;#039; n 1&lt;br /&gt;
     &lt;br /&gt;
     factI&amp;#039; :: nat ⇒ nat ⇒ nat&amp;quot; where&lt;br /&gt;
     factI&amp;#039; 0       x = x&lt;br /&gt;
     factI&amp;#039; (Suc n) x = factI&amp;#039; n (Suc n)*x&lt;br /&gt;
  Demostrar que, para todo n y todo x, se tiene &lt;br /&gt;
     factI&amp;#039; n x = x * factR n&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
fun factI&amp;#039; :: &amp;quot;nat ⇒ nat ⇒ nat&amp;quot; where&lt;br /&gt;
  &amp;quot;factI&amp;#039; 0       x = x&amp;quot;&lt;br /&gt;
| &amp;quot;factI&amp;#039; (Suc n) x = factI&amp;#039; n (Suc n)*x&amp;quot;&lt;br /&gt;
&lt;br /&gt;
fun factI :: &amp;quot;nat ⇒ nat&amp;quot; where&lt;br /&gt;
  &amp;quot;factI n = factI&amp;#039; n 1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;factI 4&amp;quot; -- &amp;quot;= 24&amp;quot;&lt;br /&gt;
     &lt;br /&gt;
lemma fact: &amp;quot;factI&amp;#039; n x = x * factR n&amp;quot;&lt;br /&gt;
oops&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 10. Demostrar que&lt;br /&gt;
     factI n = factR n&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
corollary &amp;quot;factI n = factR n&amp;quot;&lt;br /&gt;
oops&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 11. Definir, recursivamente y sin usar (@), la función&lt;br /&gt;
     amplia :: &amp;#039;a list ⇒ &amp;#039;a ⇒ &amp;#039;a list&lt;br /&gt;
  tal que (amplia xs y) es la lista obtenida añadiendo el elemento y al&lt;br /&gt;
  final de la lista xs. Por ejemplo,&lt;br /&gt;
     amplia [d,a] t = [d,a,t]&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
fun amplia :: &amp;quot;&amp;#039;a list ⇒ &amp;#039;a ⇒ &amp;#039;a list&amp;quot; where&lt;br /&gt;
  &amp;quot;amplia xs y = undefined&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;amplia [d,a] t&amp;quot; -- &amp;quot;= [d,a,t]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 12. Demostrar que &lt;br /&gt;
     amplia xs y = xs @ [y]&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
lemma &amp;quot;amplia xs y = xs @ [y]&amp;quot;&lt;br /&gt;
oops&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jalonso</name></author>
		
	</entry>
	<entry>
		<id>https://www.glc.us.es/~jalonso/RA2015/index.php?title=R2&amp;diff=42</id>
		<title>R2</title>
		<link rel="alternate" type="text/html" href="https://www.glc.us.es/~jalonso/RA2015/index.php?title=R2&amp;diff=42"/>
		<updated>2015-12-01T11:54:35Z</updated>

		<summary type="html">&lt;p&gt;Jalonso: Página creada con &amp;#039;&amp;lt;source lang=&amp;quot;isar&amp;quot;&amp;gt; header {* R2: Razonamiento sobre programas en Isabelle/HOL *}  theory R2 imports Main  begin  text {* ------------------------------------------------------...&amp;#039;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;source lang=&amp;quot;isar&amp;quot;&amp;gt;&lt;br /&gt;
header {* R2: Razonamiento sobre programas en Isabelle/HOL *}&lt;br /&gt;
&lt;br /&gt;
theory R2&lt;br /&gt;
imports Main &lt;br /&gt;
begin&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 1. Definir la función&lt;br /&gt;
     sumaImpares :: nat ⇒ nat&lt;br /&gt;
  tal que (sumaImpares n) es la suma de los n primeros números&lt;br /&gt;
  impares. Por ejemplo,&lt;br /&gt;
     sumaImpares 5  =  25&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
fun sumaImpares :: &amp;quot;nat ⇒ nat&amp;quot; where&lt;br /&gt;
  &amp;quot;sumaImpares n = undefined&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;sumaImpares 5&amp;quot; -- &amp;quot;= 25&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 2. Demostrar que &lt;br /&gt;
     sumaImpares n = n*n&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
lemma &amp;quot;sumaImpares n = n*n&amp;quot;&lt;br /&gt;
oops&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 3. Definir la función&lt;br /&gt;
     sumaPotenciasDeDosMasUno :: nat ⇒ nat&lt;br /&gt;
  tal que &lt;br /&gt;
     (sumaPotenciasDeDosMasUno n) = 1 + 2^0 + 2^1 + 2^2 + ... + 2^n. &lt;br /&gt;
  Por ejemplo, &lt;br /&gt;
     sumaPotenciasDeDosMasUno 3  =  16&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
fun sumaPotenciasDeDosMasUno :: &amp;quot;nat ⇒ nat&amp;quot; where&lt;br /&gt;
  &amp;quot;sumaPotenciasDeDosMasUno n = undefined&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;sumaPotenciasDeDosMasUno 3&amp;quot; -- &amp;quot;= 16&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 4. Demostrar que &lt;br /&gt;
     sumaPotenciasDeDosMasUno n = 2^(n+1)&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
lemma &amp;quot;sumaPotenciasDeDosMasUno n = 2^(n+1)&amp;quot;&lt;br /&gt;
oops&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 5. Definir la función&lt;br /&gt;
     copia :: nat ⇒ &amp;#039;a ⇒ &amp;#039;a list&lt;br /&gt;
  tal que (copia n x) es la lista formado por n copias del elemento&lt;br /&gt;
  x. Por ejemplo, &lt;br /&gt;
     copia 3 x = [x,x,x]&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
fun copia :: &amp;quot;nat ⇒ &amp;#039;a ⇒ &amp;#039;a list&amp;quot; where&lt;br /&gt;
  &amp;quot;copia n x = undefined&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;copia 3 x&amp;quot; -- &amp;quot;= [x,x,x]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 6. Definir la función&lt;br /&gt;
     todos :: (&amp;#039;a ⇒ bool) ⇒ &amp;#039;a list ⇒ bool&lt;br /&gt;
  tal que (todos p xs) se verifica si todos los elementos de xs cumplen&lt;br /&gt;
  la propiedad p. Por ejemplo,&lt;br /&gt;
     todos (λx. x&amp;gt;(1::nat)) [2,6,4] = True&lt;br /&gt;
     todos (λx. x&amp;gt;(2::nat)) [2,6,4] = False&lt;br /&gt;
  Nota: La conjunción se representa por ∧&lt;br /&gt;
  ----------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
fun todos :: &amp;quot;(&amp;#039;a ⇒ bool) ⇒ &amp;#039;a list ⇒ bool&amp;quot; where&lt;br /&gt;
  &amp;quot;todos p xs = undefined&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;todos (λx. x&amp;gt;(1::nat)) [2,6,4]&amp;quot; -- &amp;quot;= True&amp;quot;&lt;br /&gt;
value &amp;quot;todos (λx. x&amp;gt;(2::nat)) [2,6,4]&amp;quot; -- &amp;quot;= False&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 7. Demostrar que todos los elementos de (copia n x) son&lt;br /&gt;
  iguales a x. &lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
lemma &amp;quot;todos (λy. y=x) (copia n x)&amp;quot;&lt;br /&gt;
oops&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 8. Definir la función&lt;br /&gt;
    factR :: nat ⇒ nat&lt;br /&gt;
  tal que (factR n) es el factorial de n. Por ejemplo,&lt;br /&gt;
    factR 4 = 24&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
fun factR :: &amp;quot;nat ⇒ nat&amp;quot; where&lt;br /&gt;
  &amp;quot;factR n = undefined&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;factR 4&amp;quot; -- &amp;quot;= 24&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 9. Se considera la siguiente definición iterativa de la&lt;br /&gt;
  función factorial &lt;br /&gt;
     factI :: &amp;quot;nat ⇒ nat&amp;quot; where&lt;br /&gt;
     factI n = factI&amp;#039; n 1&lt;br /&gt;
     &lt;br /&gt;
     factI&amp;#039; :: nat ⇒ nat ⇒ nat&amp;quot; where&lt;br /&gt;
     factI&amp;#039; 0       x = x&lt;br /&gt;
     factI&amp;#039; (Suc n) x = factI&amp;#039; n (Suc n)*x&lt;br /&gt;
  Demostrar que, para todo n y todo x, se tiene &lt;br /&gt;
     factI&amp;#039; n x = x * factR n&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
fun factI&amp;#039; :: &amp;quot;nat ⇒ nat ⇒ nat&amp;quot; where&lt;br /&gt;
  &amp;quot;factI&amp;#039; 0       x = x&amp;quot;&lt;br /&gt;
| &amp;quot;factI&amp;#039; (Suc n) x = factI&amp;#039; n (Suc n)*x&amp;quot;&lt;br /&gt;
&lt;br /&gt;
fun factI :: &amp;quot;nat ⇒ nat&amp;quot; where&lt;br /&gt;
  &amp;quot;factI n = factI&amp;#039; n 1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;factI 4&amp;quot; -- &amp;quot;= 24&amp;quot;&lt;br /&gt;
     &lt;br /&gt;
lemma fact: &amp;quot;factI&amp;#039; n x = x * factR n&amp;quot;&lt;br /&gt;
oops&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 10. Demostrar que&lt;br /&gt;
     factI n = factR n&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
corollary &amp;quot;factI n = factR n&amp;quot;&lt;br /&gt;
oops&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 11. Definir, recursivamente y sin usar (@), la función&lt;br /&gt;
     amplia :: &amp;#039;a list ⇒ &amp;#039;a ⇒ &amp;#039;a list&lt;br /&gt;
  tal que (amplia xs y) es la lista obtenida añadiendo el elemento y al&lt;br /&gt;
  final de la lista xs. Por ejemplo,&lt;br /&gt;
     amplia [d,a] t = [d,a,t]&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
fun amplia :: &amp;quot;&amp;#039;a list ⇒ &amp;#039;a ⇒ &amp;#039;a list&amp;quot; where&lt;br /&gt;
  &amp;quot;amplia xs y = undefined&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;amplia [d,a] t&amp;quot; -- &amp;quot;= [d,a,t]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 12. Demostrar que &lt;br /&gt;
     amplia xs y = xs @ [y]&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
lemma &amp;quot;amplia xs y = xs @ [y]&amp;quot;&lt;br /&gt;
oops&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jalonso</name></author>
		
	</entry>
	<entry>
		<id>https://www.glc.us.es/~jalonso/RA2015/index.php?title=Ejercicios&amp;diff=41</id>
		<title>Ejercicios</title>
		<link rel="alternate" type="text/html" href="https://www.glc.us.es/~jalonso/RA2015/index.php?title=Ejercicios&amp;diff=41"/>
		<updated>2015-12-01T11:54:03Z</updated>

		<summary type="html">&lt;p&gt;Jalonso: /* Relaciones de ejercicios */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Relaciones de ejercicios ==&lt;br /&gt;
&lt;br /&gt;
En esta sección se publicarán las relaciones de ejercicios. Las soluciones se escriben de forma colaborativa por los alumnos del curso y no deben tomarse como definitivas.&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Relación 1&amp;#039;&amp;#039;&amp;#039;: Programación funcional en Isabelle/HOL. ([[R1 |Enunciado]] y [[Relación 1 | Solución colaborativa]]).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Relación 2&amp;#039;&amp;#039;&amp;#039;: Razonamiento automático sobre programas en Isabelle/HOL. ([[R2 |Enunciado]] y [[Relación 2 | Solución colaborativa]]).&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Relación 3&amp;#039;&amp;#039;&amp;#039;: Razonamiento estructurado sobre programas en Isabelle/HOL. ([[R3 |Enunciado]] y [[Relación 3 | Solución colaborativa]]).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Relación 4&amp;#039;&amp;#039;&amp;#039;: Cons inverso. ([[R4 |Enunciado]] y [[Relación 4 | Solución colaborativa]]).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Relación 5&amp;#039;&amp;#039;&amp;#039;: Cuantificadores sobre listas. ([[R5 |Enunciado]] y [[Relación 5 | Solución colaborativa]]).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Relación 6&amp;#039;&amp;#039;&amp;#039;: Sustitución, inversión y eliminación. ([[R6 |Enunciado]] y [[Relación 6 | Solución colaborativa]]).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Relación 7&amp;#039;&amp;#039;&amp;#039;: Recorridos de árboles. ([[R7 |Enunciado]] y [[Relación 7 | Solución colaborativa]]).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Relación 8&amp;#039;&amp;#039;&amp;#039;: Árboles binarios completos. ([[R8 |Enunciado]] y [[Relación 8 | Solución colaborativa]]).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Relación 9&amp;#039;&amp;#039;&amp;#039;: Deducción natural en Isabelle/HOL. ([[R9 |Enunciado]] y [[Relación 9 | Solución colaborativa]]).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Relación 10&amp;#039;&amp;#039;&amp;#039;: Formalización y argumentación en Isabelle/HOL. ([[R10 |Enunciado]] y [[Relación 10 | Solución colaborativa]]).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Relación 11&amp;#039;&amp;#039;&amp;#039;: Plegados de listas y de árboles. ([[R11 |Enunciado]] y [[Relación 11 | Solución colaborativa]]).&lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jalonso</name></author>
		
	</entry>
	<entry>
		<id>https://www.glc.us.es/~jalonso/RA2015/index.php?title=Tema_2b:_Razonamiento_autom%C3%A1tico_sobre_programas_en_Isabelle/HOL&amp;diff=40</id>
		<title>Tema 2b: Razonamiento automático sobre programas en Isabelle/HOL</title>
		<link rel="alternate" type="text/html" href="https://www.glc.us.es/~jalonso/RA2015/index.php?title=Tema_2b:_Razonamiento_autom%C3%A1tico_sobre_programas_en_Isabelle/HOL&amp;diff=40"/>
		<updated>2015-12-01T11:53:23Z</updated>

		<summary type="html">&lt;p&gt;Jalonso: Página creada con &amp;#039;&amp;lt;source lang=&amp;quot;isar&amp;quot;&amp;gt; header {* Tema 2: Razonamiento automático sobre programas en Isabelle/HOL *}  theory T2_Razonamiento_sobre_programas imports Main  begin  text {*    En est...&amp;#039;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;source lang=&amp;quot;isar&amp;quot;&amp;gt;&lt;br /&gt;
header {* Tema 2: Razonamiento automático sobre programas en Isabelle/HOL *}&lt;br /&gt;
&lt;br /&gt;
theory T2_Razonamiento_sobre_programas&lt;br /&gt;
imports Main &lt;br /&gt;
begin&lt;br /&gt;
&lt;br /&gt;
text {* &lt;br /&gt;
  En este tema se demuestra con Isabelle las propiedades de los&lt;br /&gt;
  programas funcionales como se expone en el tema 8 del curso&lt;br /&gt;
  &amp;quot;Informática&amp;quot; que puede leerse en http://goo.gl/Imvyt *}&lt;br /&gt;
&lt;br /&gt;
section {* Razonamiento ecuacional *}&lt;br /&gt;
&lt;br /&gt;
text {* ----------------------------------------------------------------&lt;br /&gt;
  Ejemplo 1. Definir, por recursión, la función&lt;br /&gt;
     longitud :: &amp;#039;a list ⇒ nat&lt;br /&gt;
  tal que (longitud xs) es la longitud de la listas xs. Por ejemplo,&lt;br /&gt;
     longitud [4,2,5] = 3&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
fun longitud :: &amp;quot;&amp;#039;a list ⇒ nat&amp;quot; where&lt;br /&gt;
  &amp;quot;longitud []     = 0&amp;quot;&lt;br /&gt;
| &amp;quot;longitud (x#xs) = 1 + longitud xs&amp;quot;&lt;br /&gt;
   &lt;br /&gt;
value &amp;quot;longitud [4,2,5]&amp;quot; -- &amp;quot;= 3&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejemplo 2. Demostrar que &lt;br /&gt;
     longitud [4,2,5] = 3&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
lemma &amp;quot;longitud [4,2,5] = 3&amp;quot;&lt;br /&gt;
by simp&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejemplo 3. Definir la función&lt;br /&gt;
     fun intercambia :: &amp;#039;a × &amp;#039;b ⇒ &amp;#039;b × &amp;#039;a&lt;br /&gt;
  tal que (intercambia p) es el par obtenido intercambiando las&lt;br /&gt;
  componentes del par p. Por ejemplo,&lt;br /&gt;
     intercambia (u,v) = (v,u)&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
fun intercambia :: &amp;quot;&amp;#039;a × &amp;#039;b ⇒ &amp;#039;b × &amp;#039;a&amp;quot; where&lt;br /&gt;
  &amp;quot;intercambia (x,y) = (y,x)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;intercambia (u,v)&amp;quot; -- &amp;quot;= (v,u)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejemplo 4. (p.6) Demostrar que &lt;br /&gt;
     intercambia (intercambia (x,y)) = (x,y)&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
lemma &amp;quot;intercambia (intercambia (x,y)) = (x,y)&amp;quot;&lt;br /&gt;
by simp&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejemplo 5. Definir, por recursión, la función&lt;br /&gt;
     inversa :: &amp;#039;a list ⇒ &amp;#039;a list&lt;br /&gt;
  tal que (inversa xs) es la lista obtenida invirtiendo el orden de los&lt;br /&gt;
  elementos de xs. Por ejemplo,&lt;br /&gt;
     inversa [a,d,c] = [c,d,a]&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
fun inversa :: &amp;quot;&amp;#039;a list ⇒ &amp;#039;a list&amp;quot; where&lt;br /&gt;
  &amp;quot;inversa []     = []&amp;quot;&lt;br /&gt;
| &amp;quot;inversa (x#xs) = inversa xs @ [x]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;inversa [a,d,c]&amp;quot; -- &amp;quot;= [c,d,a]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejemplo 6. (p. 9) Demostrar que &lt;br /&gt;
     inversa [x] = [x]&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
lemma &amp;quot;inversa [x] = [x]&amp;quot;&lt;br /&gt;
by simp&lt;br /&gt;
&lt;br /&gt;
section {* Razonamiento por inducción sobre los naturales *}&lt;br /&gt;
&lt;br /&gt;
text {*&lt;br /&gt;
  [Principio de inducción sobre los naturales] Para demostrar una&lt;br /&gt;
  propiedad P para todos los números naturales basta probar que el 0&lt;br /&gt;
  tiene la propiedad P y que si n tiene la propiedad P, entonces n+1&lt;br /&gt;
  también la tiene.  &lt;br /&gt;
     ⟦P 0; ⋀n. P n ⟹ P (Suc n)⟧ ⟹ P m&lt;br /&gt;
&lt;br /&gt;
  En Isabelle el principio de inducción sobre los naturales está&lt;br /&gt;
  formalizado en el teorema nat.induct y puede verse con&lt;br /&gt;
     thm nat.induct&lt;br /&gt;
*}&lt;br /&gt;
&lt;br /&gt;
thm nat.induct&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejemplo 7. Definir la función&lt;br /&gt;
     repite :: nat ⇒ &amp;#039;a ⇒ &amp;#039;a list&lt;br /&gt;
  tal que (repite n x) es la lista formada por n copias del elemento&lt;br /&gt;
  x. Por ejemplo, &lt;br /&gt;
     repite 3 a = [a,a,a]&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
fun repite :: &amp;quot;nat ⇒ &amp;#039;a ⇒ &amp;#039;a list&amp;quot; where&lt;br /&gt;
  &amp;quot;repite 0 x       = []&amp;quot;&lt;br /&gt;
| &amp;quot;repite (Suc n) x = x # (repite n x)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;repite 3 a&amp;quot; -- &amp;quot;= [a,a,a]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejemplo 8. (p. 18) Demostrar que &lt;br /&gt;
     longitud (repite n x) = n&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
lemma &amp;quot;longitud (repite n x) = n&amp;quot;&lt;br /&gt;
by (induct n) auto&lt;br /&gt;
&lt;br /&gt;
section {* Razonamiento por inducción sobre listas *}&lt;br /&gt;
&lt;br /&gt;
text {*&lt;br /&gt;
  Para demostrar una propiedad para todas las listas basta demostrar&lt;br /&gt;
  que la lista vacía tiene la propiedad y que al añadir un elemento a una&lt;br /&gt;
  lista que tiene la propiedad se obtiene otra lista que también tiene la&lt;br /&gt;
  propiedad. &lt;br /&gt;
&lt;br /&gt;
  En Isabelle el principio de inducción sobre listas está formalizado&lt;br /&gt;
  mediante el teorema list.induct que puede verse con &lt;br /&gt;
     thm list.induct&lt;br /&gt;
*}&lt;br /&gt;
&lt;br /&gt;
thm list.induct&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejemplo 9. Definir la función&lt;br /&gt;
     conc :: &amp;#039;a list ⇒ &amp;#039;a list ⇒ &amp;#039;a list&lt;br /&gt;
  tal que (conc xs ys) es la concatención de las listas xs e ys. Por&lt;br /&gt;
  ejemplo, &lt;br /&gt;
     conc [a,d] [b,d,a,c] = [a,d,b,d,a,c]&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
fun conc :: &amp;quot;&amp;#039;a list ⇒ &amp;#039;a list ⇒ &amp;#039;a list&amp;quot; where&lt;br /&gt;
  &amp;quot;conc []     ys = ys&amp;quot;&lt;br /&gt;
| &amp;quot;conc (x#xs) ys = x # (conc xs ys)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;conc [a,d] [b,d,a,c]&amp;quot; -- &amp;quot;= [a,d,b,d,a,c]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejemplo 10. (p. 24) Demostrar que &lt;br /&gt;
     conc xs (conc ys zs) = (conc xs ys) zs&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
lemma &amp;quot;conc xs (conc ys zs) = conc (conc xs ys) zs&amp;quot;&lt;br /&gt;
by (induct xs) auto&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejemplo 11. Refutar que &lt;br /&gt;
     conc xs ys = conc ys xs&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
lemma &amp;quot;conc xs ys = conc ys xs&amp;quot;&lt;br /&gt;
quickcheck&lt;br /&gt;
oops&lt;br /&gt;
&lt;br /&gt;
text {* Encuentra el contraejemplo, &lt;br /&gt;
  xs = [a⇣2]&lt;br /&gt;
  ys = [a⇣1] *}&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejemplo 12. (p. 28) Demostrar que &lt;br /&gt;
     conc xs [] = xs&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
lemma &amp;quot;conc xs [] = xs&amp;quot;&lt;br /&gt;
by (induct xs) auto&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejemplo 13. (p. 30) Demostrar que &lt;br /&gt;
     longitud (conc xs ys) = longitud xs + longitud ys&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
lemma &amp;quot;longitud (conc xs ys) = longitud xs + longitud ys&amp;quot;&lt;br /&gt;
by (induct xs) auto&lt;br /&gt;
&lt;br /&gt;
section {* Inducción correspondiente a la definición recursiva *}&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejemplo 14. Definir la función&lt;br /&gt;
     coge :: nat ⇒ &amp;#039;a list ⇒ &amp;#039;a list&lt;br /&gt;
  tal que (coge n xs) es la lista de los n primeros elementos de xs. Por &lt;br /&gt;
  ejemplo, &lt;br /&gt;
     coge 2 [a,c,d,b,e] = [a,c]&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
fun coge :: &amp;quot;nat ⇒ &amp;#039;a list ⇒ &amp;#039;a list&amp;quot; where&lt;br /&gt;
  &amp;quot;coge n []           = []&amp;quot;&lt;br /&gt;
| &amp;quot;coge 0 xs           = []&amp;quot;&lt;br /&gt;
| &amp;quot;coge (Suc n) (x#xs) = x # (coge n xs)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;coge 2 [a,c,d,b,e]&amp;quot; -- &amp;quot;= [a,c]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejemplo 15. Definir la función&lt;br /&gt;
     elimina :: nat ⇒ &amp;#039;a list ⇒ &amp;#039;a list&lt;br /&gt;
  tal que (elimina n xs) es la lista obtenida eliminando los n primeros&lt;br /&gt;
  elementos de xs. Por ejemplo, &lt;br /&gt;
     elimina 2 [a,c,d,b,e] = [d,b,e]&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
fun elimina :: &amp;quot;nat ⇒ &amp;#039;a list ⇒ &amp;#039;a list&amp;quot; where&lt;br /&gt;
  &amp;quot;elimina n []           = []&amp;quot;&lt;br /&gt;
| &amp;quot;elimina 0 xs           = xs&amp;quot;&lt;br /&gt;
| &amp;quot;elimina (Suc n) (x#xs) = elimina n xs&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;elimina 2 [a,c,d,b,e]&amp;quot; -- &amp;quot;= [d,b,e]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* &lt;br /&gt;
  La definición coge genera el esquema de inducción coge.induct:&lt;br /&gt;
     ⟦⋀n. P n []; &lt;br /&gt;
      ⋀x xs. P 0 (x#xs); &lt;br /&gt;
      ⋀n x xs. P n xs ⟹ P (Suc n) (x#xs)⟧&lt;br /&gt;
     ⟹ P n x&lt;br /&gt;
&lt;br /&gt;
  Puede verse usando &amp;quot;thm coge.induct&amp;quot;. *}&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejemplo 16. (p. 35) Demostrar que &lt;br /&gt;
     conc (coge n xs) (elimina n xs) = xs&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
lemma &amp;quot;conc (coge n xs) (elimina n xs) = xs&amp;quot;&lt;br /&gt;
by (induct rule: coge.induct) auto&lt;br /&gt;
&lt;br /&gt;
section {* Razonamiento por casos *}&lt;br /&gt;
&lt;br /&gt;
text {*&lt;br /&gt;
  Distinción de casos sobre listas:&lt;br /&gt;
  · El método de distinción de casos se activa con (cases xs) donde xs&lt;br /&gt;
    es del tipo lista. &lt;br /&gt;
  · &amp;quot;case Nil&amp;quot; es una abreviatura de &lt;br /&gt;
       &amp;quot;assume Nil: xs =[]&amp;quot;.&lt;br /&gt;
  · &amp;quot;case Cons&amp;quot; es una abreviatura de &lt;br /&gt;
       &amp;quot;fix ? ?? assume Cons: xs = ? # ??&amp;quot;&lt;br /&gt;
    donde ? y ?? son variables anónimas. *}&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejemplo 17. Definir la función&lt;br /&gt;
     esVacia :: &amp;#039;a list ⇒ bool&lt;br /&gt;
  tal que (esVacia xs) se verifica si xs es la lista vacía. Por ejemplo,&lt;br /&gt;
     esVacia []  = True&lt;br /&gt;
     esVacia [1] = False&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
fun esVacia :: &amp;quot;&amp;#039;a list ⇒ bool&amp;quot; where&lt;br /&gt;
  &amp;quot;esVacia []     = True&amp;quot;&lt;br /&gt;
| &amp;quot;esVacia (x#xs) = False&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;esVacia []&amp;quot;  -- &amp;quot;= True&amp;quot;&lt;br /&gt;
value &amp;quot;esVacia [1]&amp;quot; -- &amp;quot;= False&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejemplo 18 (p. 39) . Demostrar que &lt;br /&gt;
     esVacia xs = esVacia (conc xs xs)&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
lemma &amp;quot;esVacia xs = esVacia (conc xs xs)&amp;quot;&lt;br /&gt;
by (cases xs) auto&lt;br /&gt;
&lt;br /&gt;
section {* Heurística de generalización *}&lt;br /&gt;
&lt;br /&gt;
text {* &lt;br /&gt;
  Heurística de generalización: Cuando se use demostración estructural,&lt;br /&gt;
  cuantificar universalmente las variables libres (o, equivalentemente,&lt;br /&gt;
  considerar las variables libres como variables arbitrarias). *}&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejemplo 19. Definir la función&lt;br /&gt;
     inversaAc :: &amp;#039;a list ⇒ &amp;#039;a list&lt;br /&gt;
  tal que (inversaAc xs) es a inversa de xs calculada usando&lt;br /&gt;
  acumuladores. Por ejemplo, &lt;br /&gt;
     inversaAc [a,c,b,e] = [e,b,c,a]&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
fun inversaAcAux :: &amp;quot;&amp;#039;a list ⇒ &amp;#039;a list ⇒ &amp;#039;a list&amp;quot; where&lt;br /&gt;
  &amp;quot;inversaAcAux [] ys     = ys&amp;quot;&lt;br /&gt;
| &amp;quot;inversaAcAux (x#xs) ys = inversaAcAux xs (x#ys)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
fun inversaAc :: &amp;quot;&amp;#039;a list ⇒ &amp;#039;a list&amp;quot; where&lt;br /&gt;
  &amp;quot;inversaAc xs = inversaAcAux xs []&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;inversaAc [a,c,b,e]&amp;quot; -- &amp;quot;= [e,b,c,a]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejemplo 20. (p. 44) Demostrar que &lt;br /&gt;
     inversaAcAux xs ys = (inversa xs) @ ys&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
lemma inversaAcAux_es_inversa:&lt;br /&gt;
  &amp;quot;inversaAcAux xs ys = (inversa xs)@ys&amp;quot;&lt;br /&gt;
by (induct xs arbitrary: ys) auto&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejemplo 21. (p. 43) Demostrar que &lt;br /&gt;
     inversaAc xs = inversa xs&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;La demostración automática es&amp;quot;&lt;br /&gt;
corollary &amp;quot;inversaAc xs = inversa xs&amp;quot;&lt;br /&gt;
by (simp add: inversaAcAux_es_inversa)&lt;br /&gt;
&lt;br /&gt;
section {* Demostración por inducción para funciones de orden superior *}&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejemplo 22. Definir la función&lt;br /&gt;
     sum :: nat list ⇒ nat&lt;br /&gt;
  tal que (sum xs) es la suma de los elementos de xs. Por ejemplo,&lt;br /&gt;
     sum [3,2,5] = 10&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
fun sum :: &amp;quot;nat list ⇒ nat&amp;quot; where&lt;br /&gt;
  &amp;quot;sum []     = 0&amp;quot;&lt;br /&gt;
| &amp;quot;sum (x#xs) = x + sum xs&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;sum [3,2,5]&amp;quot; -- &amp;quot;= 10&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejemplo 23. Definir la función&lt;br /&gt;
     map :: (&amp;#039;a ⇒ &amp;#039;b) ⇒ &amp;#039;a list ⇒ &amp;#039;b list&lt;br /&gt;
  tal que (map f xs) es la lista obtenida aplicando la función f a los&lt;br /&gt;
  elementos de xs. Por ejemplo,&lt;br /&gt;
     map (λx. 2*x) [3,2,5] = [6,4,10]&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
fun map :: &amp;quot;(&amp;#039;a ⇒ &amp;#039;b) ⇒ &amp;#039;a list ⇒ &amp;#039;b list&amp;quot; where&lt;br /&gt;
  &amp;quot;map f []     = []&amp;quot;&lt;br /&gt;
| &amp;quot;map f (x#xs) = (f x) # map f xs&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;map (λx. 2*x) [3::nat,2,5]&amp;quot; -- &amp;quot;= [6,4,10]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejemplo 24. (p. 45) Demostrar que &lt;br /&gt;
     sum (map (λx. 2*x) xs) = 2 * (sum xs)&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
lemma &amp;quot;sum (map (λx. 2*x) xs) = 2 * (sum xs)&amp;quot;&lt;br /&gt;
by (induct xs) auto&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejemplo 25. (p. 48) Demostrar que &lt;br /&gt;
     longitud (map f xs) = longitud xs&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
lemma &amp;quot;longitud (map f xs) = longitud xs&amp;quot;&lt;br /&gt;
by (induct xs) auto&lt;br /&gt;
&lt;br /&gt;
section {* Referencias *}&lt;br /&gt;
&lt;br /&gt;
text {*&lt;br /&gt;
  · J.A. Alonso. &amp;quot;Razonamiento sobre programas&amp;quot; http://goo.gl/R06O3&lt;br /&gt;
  · G. Hutton. &amp;quot;Programming in Haskell&amp;quot;. Cap. 13 &amp;quot;Reasoning about&lt;br /&gt;
    programms&amp;quot;. http://bit.ly/1gMqK0X &lt;br /&gt;
  · S. Thompson. &amp;quot;Haskell: the Craft of Functional Programming, 3rd&lt;br /&gt;
    Edition. Cap. 8 &amp;quot;Reasoning about programms&amp;quot;. &lt;br /&gt;
  · L. Paulson. &amp;quot;ML for the Working Programmer, 2nd Edition&amp;quot;. Cap. 6. &lt;br /&gt;
    &amp;quot;Reasoning about functional programs&amp;quot;. http://bit.ly/1gMqFKI&lt;br /&gt;
*}&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jalonso</name></author>
		
	</entry>
	<entry>
		<id>https://www.glc.us.es/~jalonso/RA2015/index.php?title=Temas&amp;diff=39</id>
		<title>Temas</title>
		<link rel="alternate" type="text/html" href="https://www.glc.us.es/~jalonso/RA2015/index.php?title=Temas&amp;diff=39"/>
		<updated>2015-12-01T11:52:29Z</updated>

		<summary type="html">&lt;p&gt;Jalonso: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Temas de &amp;#039;&amp;#039;Razonamiento automático (2014-15)&amp;#039;&amp;#039; ==&lt;br /&gt;
* [[Tema 1: Programación funcional en Isabelle]].&lt;br /&gt;
* Tema 2: Razonamiento sobre programas:&lt;br /&gt;
** [http://www.cs.us.es/~jalonso/cursos/i1m-15/temas/tema-8.pdf Tema 2a: Razonamiento sobre programas Haskell]&lt;br /&gt;
** [[Tema 2b: Razonamiento automático sobre programas en Isabelle/HOL]].&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
* [[Tema 3: Razonamiento estructurado sobre programas en Isabelle/HOL]].&lt;br /&gt;
* [[Tema 4: Razonamiento por casos y por inducción]].&lt;br /&gt;
* Tema 5: Verificación de algoritmos de ordenación:&lt;br /&gt;
** [[Tema 5a: Verificación de la ordenación por inserción]].&lt;br /&gt;
** [[Tema 5b: Verificación de la ordenación por mezcla]].&lt;br /&gt;
* [[Tema 6: Caso de estudio: Compilación de expresiones]].&lt;br /&gt;
* Tema 7: Deducción natural proposicional:&lt;br /&gt;
** [http://www.cs.us.es/~jalonso/cursos/li/temas/tema-2.pdf Tema 7a: Deducción natural proposicional]].&lt;br /&gt;
** [[Tema 7b: Deducción natural proposicional con Isabelle/HOL]].&lt;br /&gt;
* Tema 8: Deducción natural de primer orden:&lt;br /&gt;
** [http://www.cs.us.es/~jalonso/cursos/li/temas/tema-8.pdf Tema 8a: Deducción natural en lógica de primer orden]].&lt;br /&gt;
** [[Tema 8b: Deducción natural en lógica de primer orden con Isabelle/HOL]]&lt;br /&gt;
* [[Tema 9: Conjuntos, funciones y relaciones]].&lt;br /&gt;
* [[Tema 10: Conjuntos definidos inductivamente]].&lt;br /&gt;
* [[Tema 11: Gramáticas libre de contexto]].&lt;br /&gt;
* Tema 12: Misceláneas:&lt;br /&gt;
** [[Tema 12a: Razonamiento modular (Teoría de grupos)]].&lt;br /&gt;
** [[Tema 12b: Razonamiento modular]].&lt;br /&gt;
** [[Tema 12c: Automatización]].&lt;br /&gt;
** [[Tema 12d: Pasos elementales]].&lt;br /&gt;
** [[Tema 12e: Sudoku]].&lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jalonso</name></author>
		
	</entry>
	<entry>
		<id>https://www.glc.us.es/~jalonso/RA2015/index.php?title=Temas&amp;diff=38</id>
		<title>Temas</title>
		<link rel="alternate" type="text/html" href="https://www.glc.us.es/~jalonso/RA2015/index.php?title=Temas&amp;diff=38"/>
		<updated>2015-12-01T11:51:34Z</updated>

		<summary type="html">&lt;p&gt;Jalonso: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Temas de &amp;#039;&amp;#039;Razonamiento automático (2014-15)&amp;#039;&amp;#039; ==&lt;br /&gt;
* [[Tema 1: Programación funcional en Isabelle]].&lt;br /&gt;
* Tema 2: Razonamiento sobre programas:&lt;br /&gt;
** [http://www.cs.us.es/~jalonso/cursos/i1m-15/temas/tema-8t.pdf Tema 2a: Razonamiento sobre programas Haskell]&lt;br /&gt;
** [[Tema 2b: Razonamiento automático sobre programas en Isabelle/HOL]].&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
* [[Tema 3: Razonamiento estructurado sobre programas en Isabelle/HOL]].&lt;br /&gt;
* [[Tema 4: Razonamiento por casos y por inducción]].&lt;br /&gt;
* Tema 5: Verificación de algoritmos de ordenación:&lt;br /&gt;
** [[Tema 5a: Verificación de la ordenación por inserción]].&lt;br /&gt;
** [[Tema 5b: Verificación de la ordenación por mezcla]].&lt;br /&gt;
* [[Tema 6: Caso de estudio: Compilación de expresiones]].&lt;br /&gt;
* Tema 7: Deducción natural proposicional:&lt;br /&gt;
** [http://www.cs.us.es/~jalonso/cursos/li/temas/tema-2.pdf Tema 7a: Deducción natural proposicional]].&lt;br /&gt;
** [[Tema 7b: Deducción natural proposicional con Isabelle/HOL]].&lt;br /&gt;
* Tema 8: Deducción natural de primer orden:&lt;br /&gt;
** [http://www.cs.us.es/~jalonso/cursos/li/temas/tema-8.pdf Tema 8a: Deducción natural en lógica de primer orden]].&lt;br /&gt;
** [[Tema 8b: Deducción natural en lógica de primer orden con Isabelle/HOL]]&lt;br /&gt;
* [[Tema 9: Conjuntos, funciones y relaciones]].&lt;br /&gt;
* [[Tema 10: Conjuntos definidos inductivamente]].&lt;br /&gt;
* [[Tema 11: Gramáticas libre de contexto]].&lt;br /&gt;
* Tema 12: Misceláneas:&lt;br /&gt;
** [[Tema 12a: Razonamiento modular (Teoría de grupos)]].&lt;br /&gt;
** [[Tema 12b: Razonamiento modular]].&lt;br /&gt;
** [[Tema 12c: Automatización]].&lt;br /&gt;
** [[Tema 12d: Pasos elementales]].&lt;br /&gt;
** [[Tema 12e: Sudoku]].&lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jalonso</name></author>
		
	</entry>
	<entry>
		<id>https://www.glc.us.es/~jalonso/RA2015/index.php?title=Relaci%C3%B3n_1&amp;diff=37</id>
		<title>Relación 1</title>
		<link rel="alternate" type="text/html" href="https://www.glc.us.es/~jalonso/RA2015/index.php?title=Relaci%C3%B3n_1&amp;diff=37"/>
		<updated>2015-12-01T11:50:15Z</updated>

		<summary type="html">&lt;p&gt;Jalonso: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;source lang=&amp;quot;isar&amp;quot;&amp;gt;&lt;br /&gt;
header {* R1: Programación funcional en Isabelle *}&lt;br /&gt;
&lt;br /&gt;
theory R1&lt;br /&gt;
imports Main &lt;br /&gt;
begin&lt;br /&gt;
&lt;br /&gt;
text {* ----------------------------------------------------------------&lt;br /&gt;
  Ejercicio 0. Definir, por recursión, la función&lt;br /&gt;
     factorial :: nat ⇒ nat&lt;br /&gt;
  tal que (factorial n) es el factorial de n. Por ejemplo,&lt;br /&gt;
     factorial 4 = 24&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
 &lt;br /&gt;
-- &amp;quot;jospalhid angfraalv adacieizq&amp;quot;&lt;br /&gt;
fun factorial :: &amp;quot;nat ⇒ nat&amp;quot; where &lt;br /&gt;
  &amp;quot;factorial 0 = 1&amp;quot; |&lt;br /&gt;
  &amp;quot;factorial (Suc n) = Suc n * factorial n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
--&amp;quot;marsoldia2&amp;quot;&lt;br /&gt;
(*&lt;br /&gt;
fun factorial2 :: &amp;quot;nat ⇒ nat&amp;quot; where&lt;br /&gt;
  &amp;quot;factorial2 0 = 1 &amp;quot; |&lt;br /&gt;
  &amp;quot;factorial2 n = n * factorial2 (n-1)&amp;quot;&lt;br /&gt;
*)&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;factorial 4&amp;quot; -- &amp;quot;24&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* ----------------------------------------------------------------&lt;br /&gt;
  Ejercicio 1. Definir, por recursión, la función&lt;br /&gt;
     longitud :: &amp;#039;a list ⇒ nat&lt;br /&gt;
  tal que (longitud xs) es la longitud de la listas xs. Por ejemplo,&lt;br /&gt;
     longitud [4,2,5] = 3&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;jospalhid, marsoldia2&amp;quot;&lt;br /&gt;
fun longitud :: &amp;quot;&amp;#039;a list ⇒ nat&amp;quot; where &lt;br /&gt;
  &amp;quot;longitud [] = 0&amp;quot; |&lt;br /&gt;
  &amp;quot;longitud xs = 1 + longitud (tl xs)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;longitud [4,2,5]&amp;quot; -- &amp;quot;= 3&amp;quot;&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;angfraalv&amp;quot;&lt;br /&gt;
fun longitud2 :: &amp;quot;&amp;#039;a list ⇒ nat&amp;quot; where &lt;br /&gt;
  &amp;quot;longitud2 [] = 0&amp;quot; | &lt;br /&gt;
  &amp;quot;longitud2 (x#xs) = 1 + longitud2 xs&amp;quot;&lt;br /&gt;
   &lt;br /&gt;
value &amp;quot;longitud2 [4,2,5]&amp;quot; -- &amp;quot;= 3&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 2. Definir la función&lt;br /&gt;
     fun intercambia :: &amp;#039;a × &amp;#039;b ⇒ &amp;#039;b × &amp;#039;a&lt;br /&gt;
  tal que (intercambia p) es el par obtenido intercambiando las&lt;br /&gt;
  componentes del par p. Por ejemplo,&lt;br /&gt;
     intercambia (u,v) = (v,u)&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;jospalhid angfraalv adacieizq&amp;quot;&lt;br /&gt;
fun intercambia :: &amp;quot;&amp;#039;a × &amp;#039;b ⇒ &amp;#039;b × &amp;#039;a&amp;quot; where &lt;br /&gt;
  &amp;quot;intercambia (x,y) = (y,x)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;intercambia (u,v)&amp;quot; -- &amp;quot;= (v,u)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
--&amp;quot;marsoldia2&amp;quot;&lt;br /&gt;
fun intercambia2 :: &amp;quot;&amp;#039;a × &amp;#039;b ⇒ &amp;#039;b × &amp;#039;a&amp;quot; where&lt;br /&gt;
  &amp;quot;intercambia2 (x,y) = (snd (x,y),fst (x,y))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;intercambia2 (u,v)&amp;quot; -- &amp;quot;= (v,u)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 3. Definir, por recursión, la función&lt;br /&gt;
     inversa :: &amp;#039;a list ⇒ &amp;#039;a list&lt;br /&gt;
  tal que (inversa xs) es la lista obtenida invirtiendo el orden de los&lt;br /&gt;
  elementos de xs. Por ejemplo,&lt;br /&gt;
     inversa [a,d,c] = [c,d,a]&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;jospalhid angfraalv&amp;quot;&lt;br /&gt;
fun inversa :: &amp;quot;&amp;#039;a list ⇒ &amp;#039;a list&amp;quot; where &lt;br /&gt;
  -- &amp;quot;se pude usar rev xs para invertir la lista directamente&amp;quot;&lt;br /&gt;
  &amp;quot;inversa [] = []&amp;quot; |&lt;br /&gt;
  &amp;quot;inversa xs = last xs # inversa (butlast xs)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;inversa [a,d,c]&amp;quot; -- &amp;quot;= [c,d,a]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 4. Definir la función&lt;br /&gt;
     repite :: nat ⇒ &amp;#039;a ⇒ &amp;#039;a list&lt;br /&gt;
  tal que (repite n x) es la lista formada por n copias del elemento&lt;br /&gt;
  x. Por ejemplo, &lt;br /&gt;
     repite 3 a = [a,a,a]&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;jospalhid angfraalv adacieizq&amp;quot;&lt;br /&gt;
fun repite :: &amp;quot;nat ⇒ &amp;#039;a ⇒ &amp;#039;a list&amp;quot; where &lt;br /&gt;
  &amp;quot;repite 0 x = []&amp;quot; |&lt;br /&gt;
  &amp;quot;repite (Suc n) x = x#(repite n x)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;repite 3 a&amp;quot; -- &amp;quot;= [a,a,a]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;marsoldia2&amp;quot;&lt;br /&gt;
(*&lt;br /&gt;
fun repite2 :: &amp;quot;nat ⇒ &amp;#039;a ⇒ &amp;#039;a list&amp;quot; where&lt;br /&gt;
 &amp;quot;repite2 0 x = []&amp;quot;|&lt;br /&gt;
 &amp;quot;repite2 n x = x # (repite2 (n-1) x)&amp;quot;&lt;br /&gt;
*)&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;repite2 3 a&amp;quot; -- &amp;quot;= [a,a,a]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 5. Definir la función&lt;br /&gt;
     conc :: &amp;#039;a list ⇒ &amp;#039;a list ⇒ &amp;#039;a list&lt;br /&gt;
  tal que (conc xs ys) es la concatención de las listas xs e ys. Por&lt;br /&gt;
  ejemplo, &lt;br /&gt;
     conc [a,d] [b,d,a,c] = [a,d,b,d,a,c]&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;jospalhid&amp;quot;&lt;br /&gt;
fun conc :: &amp;quot;&amp;#039;a list ⇒ &amp;#039;a list ⇒ &amp;#039;a list&amp;quot; where &lt;br /&gt;
  &amp;quot;conc [] [] = []&amp;quot; |&lt;br /&gt;
  &amp;quot;conc [] ys = ys&amp;quot; |&lt;br /&gt;
  &amp;quot;conc xs [] = xs&amp;quot; | &lt;br /&gt;
  &amp;quot;conc xs ys = hd xs # conc (tl xs) ys&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;conc [a,d] [b,d,a,c]&amp;quot; -- &amp;quot;= [a,d,b,d,a,c]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;angfraalv&amp;quot;&lt;br /&gt;
fun conc2 :: &amp;quot;&amp;#039;a list ⇒ &amp;#039;a list ⇒ &amp;#039;a list&amp;quot; where &lt;br /&gt;
  &amp;quot;conc2 [] []     = []&amp;quot; |&lt;br /&gt;
  &amp;quot;conc2 xs []     = xs&amp;quot; |&lt;br /&gt;
  &amp;quot;conc2 [] ys     = ys&amp;quot; |&lt;br /&gt;
  &amp;quot;conc2 (x#xs) ys = x#(conc2 xs ys)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;conc2 [a,d] [b,d,a,c]&amp;quot; -- &amp;quot;= [a,d,b,d,a,c]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 6. Definir la función&lt;br /&gt;
     coge :: nat ⇒ &amp;#039;a list ⇒ &amp;#039;a list&lt;br /&gt;
  tal que (coge n xs) es la lista de los n primeros elementos de xs. Por &lt;br /&gt;
  ejemplo, &lt;br /&gt;
     coge 2 [a,c,d,b,e] = [a,c]&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;jospalhid&amp;quot;&lt;br /&gt;
fun coge :: &amp;quot;nat ⇒ &amp;#039;a list ⇒ &amp;#039;a list&amp;quot; where &lt;br /&gt;
  &amp;quot;coge 0 xs       = []&amp;quot; |&lt;br /&gt;
  &amp;quot;coge n []       = []&amp;quot; |&lt;br /&gt;
  &amp;quot;coge (Suc n) xs = (hd xs) # (coge n (tl xs))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;coge 2 [a,c,d,b,e]&amp;quot; -- &amp;quot;= [a,c]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;angfraalv&amp;quot;&lt;br /&gt;
fun coge2 :: &amp;quot;nat ⇒ &amp;#039;a list ⇒ &amp;#039;a list&amp;quot; where &lt;br /&gt;
  &amp;quot;coge2 0 xs           = []&amp;quot; |&lt;br /&gt;
  &amp;quot;coge2 (Suc n) []     = []&amp;quot; |&lt;br /&gt;
  &amp;quot;coge2 (Suc n) (x#xs) = x # (coge2 n xs)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;coge2 2 [a,c,d,b,e]&amp;quot; -- &amp;quot;= [a,c]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;marsoldia2&amp;quot;&lt;br /&gt;
(*&lt;br /&gt;
fun coge3 :: &amp;quot;nat ⇒ &amp;#039;a list ⇒ &amp;#039;a list&amp;quot; where&lt;br /&gt;
  &amp;quot;coge3 0 xs = []&amp;quot; |&lt;br /&gt;
  &amp;quot;coge3 n [] = []&amp;quot; |&lt;br /&gt;
  &amp;quot;coge3 n xs = (hd xs) # (coge3 (n-1) (tl xs))&amp;quot;&lt;br /&gt;
*)&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 7. Definir la función&lt;br /&gt;
     elimina :: nat ⇒ &amp;#039;a list ⇒ &amp;#039;a list&lt;br /&gt;
  tal que (elimina n xs) es la lista obtenida eliminando los n primeros&lt;br /&gt;
  elementos de xs. Por ejemplo, &lt;br /&gt;
     elimina 2 [a,c,d,b,e] = [d,b,e]&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;jospalhid&amp;quot;&lt;br /&gt;
fun elimina :: &amp;quot;nat ⇒ &amp;#039;a list ⇒ &amp;#039;a list&amp;quot; where &lt;br /&gt;
  &amp;quot;elimina 0 xs       = xs&amp;quot; |&lt;br /&gt;
  &amp;quot;elimina n []       = []&amp;quot; |&lt;br /&gt;
  &amp;quot;elimina (Suc n) xs = elimina n (tl xs)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;elimina 2 [a,c,d,b,e]&amp;quot; -- &amp;quot;= [d,b,e]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;angfraalv&amp;quot;&lt;br /&gt;
fun elimina2 :: &amp;quot;nat ⇒ &amp;#039;a list ⇒ &amp;#039;a list&amp;quot; where &lt;br /&gt;
  &amp;quot;elimina2 n xs = inversa (coge (((length xs) - n)::nat) (inversa xs))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;elimina2 2 [a,c,d,b,e]&amp;quot; -- &amp;quot;= [d,b,e]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;marsoldia2&amp;quot;&lt;br /&gt;
fun elimina3 :: &amp;quot;nat ⇒ &amp;#039;a list ⇒ &amp;#039;a list&amp;quot; where&lt;br /&gt;
  &amp;quot;elimina3 0 xs = xs&amp;quot;|&lt;br /&gt;
  &amp;quot;elimina3 n [] = []&amp;quot;|&lt;br /&gt;
  &amp;quot;elimina3 n xs = elimina3 ( n-1) (tl xs)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;elimina2 2 [a,c,d,b,e]&amp;quot; -- &amp;quot;= [d,b,e]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 8. Definir la función&lt;br /&gt;
     esVacia :: &amp;#039;a list ⇒ bool&lt;br /&gt;
  tal que (esVacia xs) se verifica si xs es la lista vacía. Por ejemplo,&lt;br /&gt;
     esVacia []  = True&lt;br /&gt;
     esVacia [1] = False&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;jospalhid angfraalv&amp;quot;&lt;br /&gt;
fun esVacia :: &amp;quot;&amp;#039;a list ⇒ bool&amp;quot; where &lt;br /&gt;
  &amp;quot;esVacia [] = True&amp;quot; |&lt;br /&gt;
  &amp;quot;esVacia xs = False&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;esVacia []&amp;quot;  -- &amp;quot;= True&amp;quot;&lt;br /&gt;
value &amp;quot;esVacia [1]&amp;quot; -- &amp;quot;= False&amp;quot;&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;marsoldia2&amp;quot;&lt;br /&gt;
fun esVacia2 :: &amp;quot;&amp;#039;a list ⇒ bool&amp;quot; where&lt;br /&gt;
  &amp;quot;esVacia2 [] = True&amp;quot; |&lt;br /&gt;
  &amp;quot;esVacia2 [n] = False&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;esVacia2 []&amp;quot;  -- &amp;quot;= True&amp;quot;&lt;br /&gt;
value &amp;quot;esVacia2 [1]&amp;quot; -- &amp;quot;= False&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 9. Definir la función&lt;br /&gt;
     inversaAc :: &amp;#039;a list ⇒ &amp;#039;a list&lt;br /&gt;
  tal que (inversaAc xs) es a inversa de xs calculada usando&lt;br /&gt;
  acumuladores. Por ejemplo, &lt;br /&gt;
     inversaAc [a,c,b,e] = [e,b,c,a]&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;angfraalv&amp;quot;&lt;br /&gt;
fun inversaAcAux :: &amp;quot;&amp;#039;a list ⇒ &amp;#039;a list ⇒ &amp;#039;a list&amp;quot; where &lt;br /&gt;
  -- &amp;quot;no se si he entendido bien la idea de acumular, pero funciona&amp;quot;&lt;br /&gt;
  &amp;quot;inversaAcAux xs ys = conc ys xs &amp;quot;&lt;br /&gt;
&lt;br /&gt;
fun inversaAc :: &amp;quot;&amp;#039;a list ⇒ &amp;#039;a list&amp;quot; where&lt;br /&gt;
  &amp;quot;inversaAc [] = []&amp;quot; | &lt;br /&gt;
  &amp;quot;inversaAc (x#xs) = inversaAcAux [x] (inversaAc xs)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;inversaAc [a,c,b,e]&amp;quot; -- &amp;quot;= [e,b,c,a]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 10. Definir la función&lt;br /&gt;
     sum :: nat list ⇒ nat&lt;br /&gt;
  tal que (sum xs) es la suma de los elementos de xs. Por ejemplo,&lt;br /&gt;
     sum [3,2,5] = 10&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;jospalhid, marsoldia2&amp;quot;&lt;br /&gt;
fun sum :: &amp;quot;nat list ⇒ nat&amp;quot; where &lt;br /&gt;
  &amp;quot;sum [] = 0&amp;quot; |&lt;br /&gt;
  &amp;quot;sum xs = hd xs + sum (tl xs)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;sum [3,2,5]&amp;quot; -- &amp;quot;= 10&amp;quot;&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;angfraalv&amp;quot;&lt;br /&gt;
fun sum2 :: &amp;quot;nat list ⇒ nat&amp;quot; where &lt;br /&gt;
  &amp;quot;sum2 [] = 0&amp;quot; |&lt;br /&gt;
  &amp;quot;sum2 (x#xs) = x + sum2 xs&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;sum2 [3,2,5]&amp;quot; -- &amp;quot;= 10&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 11. Definir la función&lt;br /&gt;
     map :: (&amp;#039;a ⇒ &amp;#039;b) ⇒ &amp;#039;a list ⇒ &amp;#039;b list&lt;br /&gt;
  tal que (map f xs) es la lista obtenida aplicando la función f a los&lt;br /&gt;
  elementos de xs. Por ejemplo,&lt;br /&gt;
     map (λx. 2*x) [3::int,2,5] = [6,4,10]&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;jospalhid&amp;quot;&lt;br /&gt;
fun map :: &amp;quot;(&amp;#039;a ⇒ &amp;#039;b) ⇒ &amp;#039;a list ⇒ &amp;#039;b list&amp;quot; where &lt;br /&gt;
  &amp;quot;map f [] = []&amp;quot; |&lt;br /&gt;
  &amp;quot;map f xs = f(hd xs) # map f (tl xs)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;map (λx. 2*x) [3::int,2,5]&amp;quot; -- &amp;quot;= [6,4,10]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;angfraalv&amp;quot;&lt;br /&gt;
fun map2 :: &amp;quot;(&amp;#039;a ⇒ &amp;#039;b) ⇒ &amp;#039;a list ⇒ &amp;#039;b list&amp;quot; where &lt;br /&gt;
  &amp;quot;map2 f [] = []&amp;quot; |&lt;br /&gt;
  &amp;quot;map2 f (x#xs) = f(x)#(map2 f xs)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;map2 (λx. 2*x) [3::int,2,5]&amp;quot; -- &amp;quot;= [6,4,10]&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jalonso</name></author>
		
	</entry>
	<entry>
		<id>https://www.glc.us.es/~jalonso/RA2015/index.php?title=Discusi%C3%B3n:Relaci%C3%B3n_1&amp;diff=32</id>
		<title>Discusión:Relación 1</title>
		<link rel="alternate" type="text/html" href="https://www.glc.us.es/~jalonso/RA2015/index.php?title=Discusi%C3%B3n:Relaci%C3%B3n_1&amp;diff=32"/>
		<updated>2015-11-30T09:14:08Z</updated>

		<summary type="html">&lt;p&gt;Jalonso: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;He cambiado el sitio de los nombres de los autores para ponerlo delante de cada definición. También he numerado las distintas versiones de la misma función para que no den problemas al cargar la teoría. [[Usuario:Jalonso|José A. Alonso]] 10:14 30 nov 2015 (CET)&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Jalonso</name></author>
		
	</entry>
	<entry>
		<id>https://www.glc.us.es/~jalonso/RA2015/index.php?title=Discusi%C3%B3n:Relaci%C3%B3n_1&amp;diff=31</id>
		<title>Discusión:Relación 1</title>
		<link rel="alternate" type="text/html" href="https://www.glc.us.es/~jalonso/RA2015/index.php?title=Discusi%C3%B3n:Relaci%C3%B3n_1&amp;diff=31"/>
		<updated>2015-11-30T09:11:46Z</updated>

		<summary type="html">&lt;p&gt;Jalonso: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;He cambiado el sitio de los nombres de los autores para ponerlo delante de cada definición. También he numerado las distintas versiones de la misma función para que no den problemas al cargar la teoría. [[Usuario:Jalonso|Jalonso]] 10:11 30 nov 2015 (CET)&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Jalonso</name></author>
		
	</entry>
	<entry>
		<id>https://www.glc.us.es/~jalonso/RA2015/index.php?title=Discusi%C3%B3n:Relaci%C3%B3n_1&amp;diff=30</id>
		<title>Discusión:Relación 1</title>
		<link rel="alternate" type="text/html" href="https://www.glc.us.es/~jalonso/RA2015/index.php?title=Discusi%C3%B3n:Relaci%C3%B3n_1&amp;diff=30"/>
		<updated>2015-11-30T09:11:24Z</updated>

		<summary type="html">&lt;p&gt;Jalonso: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;He cambiado el sitio de los nombres de los autores para ponerlo delante de cada definición. También he numerado las distintas versiones de la misma función para que no den problemas al cargar la teoría.[[Usuario:Jalonso|Jalonso]]&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Jalonso</name></author>
		
	</entry>
	<entry>
		<id>https://www.glc.us.es/~jalonso/RA2015/index.php?title=Discusi%C3%B3n:Relaci%C3%B3n_1&amp;diff=29</id>
		<title>Discusión:Relación 1</title>
		<link rel="alternate" type="text/html" href="https://www.glc.us.es/~jalonso/RA2015/index.php?title=Discusi%C3%B3n:Relaci%C3%B3n_1&amp;diff=29"/>
		<updated>2015-11-30T09:10:12Z</updated>

		<summary type="html">&lt;p&gt;Jalonso: Página creada con &amp;#039;He cambiado el sitio de los nombres de los autores para ponerlo delante de cada definición. ~~~  ----&amp;#039;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;He cambiado el sitio de los nombres de los autores para ponerlo delante de cada definición. [[Usuario:Jalonso|Jalonso]]&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Jalonso</name></author>
		
	</entry>
	<entry>
		<id>https://www.glc.us.es/~jalonso/RA2015/index.php?title=Relaci%C3%B3n_1&amp;diff=28</id>
		<title>Relación 1</title>
		<link rel="alternate" type="text/html" href="https://www.glc.us.es/~jalonso/RA2015/index.php?title=Relaci%C3%B3n_1&amp;diff=28"/>
		<updated>2015-11-30T09:09:02Z</updated>

		<summary type="html">&lt;p&gt;Jalonso: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;source lang=&amp;quot;isar&amp;quot;&amp;gt;&lt;br /&gt;
header {* R1: Programación funcional en Isabelle *}&lt;br /&gt;
&lt;br /&gt;
theory R1&lt;br /&gt;
imports Main &lt;br /&gt;
begin&lt;br /&gt;
&lt;br /&gt;
text {* ----------------------------------------------------------------&lt;br /&gt;
  Ejercicio 0. Definir, por recursión, la función&lt;br /&gt;
     factorial :: nat ⇒ nat&lt;br /&gt;
  tal que (factorial n) es el factorial de n. Por ejemplo,&lt;br /&gt;
     factorial 4 = 24&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
 &lt;br /&gt;
-- &amp;quot;jospalhid angfraalv adacieizq&amp;quot;&lt;br /&gt;
fun factorial :: &amp;quot;nat ⇒ nat&amp;quot; where &lt;br /&gt;
  &amp;quot;factorial 0 = 1&amp;quot; |&lt;br /&gt;
  &amp;quot;factorial (Suc n) = Suc n * factorial n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;factorial 4&amp;quot; -- &amp;quot;24&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* ----------------------------------------------------------------&lt;br /&gt;
  Ejercicio 1. Definir, por recursión, la función&lt;br /&gt;
     longitud :: &amp;#039;a list ⇒ nat&lt;br /&gt;
  tal que (longitud xs) es la longitud de la listas xs. Por ejemplo,&lt;br /&gt;
     longitud [4,2,5] = 3&lt;br /&gt;
  ------------------------------------------------------------------- *}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;jospalhid&amp;quot;&lt;br /&gt;
fun longitud :: &amp;quot;&amp;#039;a list ⇒ nat&amp;quot; where &lt;br /&gt;
  &amp;quot;longitud [] = 0&amp;quot; |&lt;br /&gt;
  &amp;quot;longitud xs = 1 + longitud (tl xs)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;longitud [4,2,5]&amp;quot; -- &amp;quot;= 3&amp;quot;&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;angfraalv&amp;quot;&lt;br /&gt;
fun longitud2 :: &amp;quot;&amp;#039;a list ⇒ nat&amp;quot; where &lt;br /&gt;
  &amp;quot;longitud2 [] = 0&amp;quot; | &lt;br /&gt;
  &amp;quot;longitud2 (x#xs) = 1 + longitud2 xs&amp;quot;&lt;br /&gt;
   &lt;br /&gt;
value &amp;quot;longitud [4,2,5]&amp;quot; -- &amp;quot;= 3&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 2. Definir la función&lt;br /&gt;
     fun intercambia :: &amp;#039;a × &amp;#039;b ⇒ &amp;#039;b × &amp;#039;a&lt;br /&gt;
  tal que (intercambia p) es el par obtenido intercambiando las&lt;br /&gt;
  componentes del par p. Por ejemplo,&lt;br /&gt;
     intercambia (u,v) = (v,u)&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;jospalhid angfraalv adacieizq&amp;quot;&lt;br /&gt;
fun intercambia :: &amp;quot;&amp;#039;a × &amp;#039;b ⇒ &amp;#039;b × &amp;#039;a&amp;quot; where &lt;br /&gt;
  &amp;quot;intercambia (x,y) = (y,x)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;intercambia (u,v)&amp;quot; -- &amp;quot;= (v,u)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 3. Definir, por recursión, la función&lt;br /&gt;
     inversa :: &amp;#039;a list ⇒ &amp;#039;a list&lt;br /&gt;
  tal que (inversa xs) es la lista obtenida invirtiendo el orden de los&lt;br /&gt;
  elementos de xs. Por ejemplo,&lt;br /&gt;
     inversa [a,d,c] = [c,d,a]&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;jospalhid angfraalv&amp;quot;&lt;br /&gt;
fun inversa :: &amp;quot;&amp;#039;a list ⇒ &amp;#039;a list&amp;quot; where &lt;br /&gt;
  -- &amp;quot;se pude usar rev xs para invertir la lista directamente&amp;quot;&lt;br /&gt;
  &amp;quot;inversa [] = []&amp;quot; |&lt;br /&gt;
  &amp;quot;inversa xs = last xs # inversa (butlast xs)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;inversa [a,d,c]&amp;quot; -- &amp;quot;= [c,d,a]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 4. Definir la función&lt;br /&gt;
     repite :: nat ⇒ &amp;#039;a ⇒ &amp;#039;a list&lt;br /&gt;
  tal que (repite n x) es la lista formada por n copias del elemento&lt;br /&gt;
  x. Por ejemplo, &lt;br /&gt;
     repite 3 a = [a,a,a]&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;jospalhid angfraalv adacieizq&amp;quot;&lt;br /&gt;
fun repite :: &amp;quot;nat ⇒ &amp;#039;a ⇒ &amp;#039;a list&amp;quot; where &lt;br /&gt;
  &amp;quot;repite 0 x = []&amp;quot; |&lt;br /&gt;
  &amp;quot;repite (Suc n) x = x#(repite n x)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;repite 3 a&amp;quot; -- &amp;quot;= [a,a,a]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 5. Definir la función&lt;br /&gt;
     conc :: &amp;#039;a list ⇒ &amp;#039;a list ⇒ &amp;#039;a list&lt;br /&gt;
  tal que (conc xs ys) es la concatención de las listas xs e ys. Por&lt;br /&gt;
  ejemplo, &lt;br /&gt;
     conc [a,d] [b,d,a,c] = [a,d,b,d,a,c]&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;jospalhid&amp;quot;&lt;br /&gt;
fun conc :: &amp;quot;&amp;#039;a list ⇒ &amp;#039;a list ⇒ &amp;#039;a list&amp;quot; where &lt;br /&gt;
  &amp;quot;conc [] [] = []&amp;quot; |&lt;br /&gt;
  &amp;quot;conc [] ys = ys&amp;quot; |&lt;br /&gt;
  &amp;quot;conc xs [] = xs&amp;quot; | &lt;br /&gt;
  &amp;quot;conc xs ys = hd xs # conc (tl xs) ys&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;conc [a,d] [b,d,a,c]&amp;quot; -- &amp;quot;= [a,d,b,d,a,c]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;angfraalv&amp;quot;&lt;br /&gt;
fun conc2 :: &amp;quot;&amp;#039;a list ⇒ &amp;#039;a list ⇒ &amp;#039;a list&amp;quot; where &lt;br /&gt;
  &amp;quot;conc2 [] []     = []&amp;quot; |&lt;br /&gt;
  &amp;quot;conc2 xs []     = xs&amp;quot; |&lt;br /&gt;
  &amp;quot;conc2 [] ys     = ys&amp;quot; |&lt;br /&gt;
  &amp;quot;conc2 (x#xs) ys = x#(conc2 xs ys)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;conc [a,d] [b,d,a,c]&amp;quot; -- &amp;quot;= [a,d,b,d,a,c]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 6. Definir la función&lt;br /&gt;
     coge :: nat ⇒ &amp;#039;a list ⇒ &amp;#039;a list&lt;br /&gt;
  tal que (coge n xs) es la lista de los n primeros elementos de xs. Por &lt;br /&gt;
  ejemplo, &lt;br /&gt;
     coge 2 [a,c,d,b,e] = [a,c]&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;jospalhid&amp;quot;&lt;br /&gt;
fun coge :: &amp;quot;nat ⇒ &amp;#039;a list ⇒ &amp;#039;a list&amp;quot; where &lt;br /&gt;
  &amp;quot;coge 0 xs = []&amp;quot; |&lt;br /&gt;
  &amp;quot;coge n [] = []&amp;quot; |&lt;br /&gt;
  &amp;quot;coge (Suc n) xs = hd xs#coge n (tl xs)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;coge 2 [a,c,d,b,e]&amp;quot; -- &amp;quot;= [a,c]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;angfraalv&amp;quot;&lt;br /&gt;
fun coge2 :: &amp;quot;nat ⇒ &amp;#039;a list ⇒ &amp;#039;a list&amp;quot; where &lt;br /&gt;
  &amp;quot;coge2 0 xs = []&amp;quot; |&lt;br /&gt;
  &amp;quot;coge2 (Suc n) [] = []&amp;quot; |&lt;br /&gt;
  &amp;quot;coge2 (Suc n) (x#xs) = x#(coge2 n xs)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;coge 2 [a,c,d,b,e]&amp;quot; -- &amp;quot;= [a,c]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 7. Definir la función&lt;br /&gt;
     elimina :: nat ⇒ &amp;#039;a list ⇒ &amp;#039;a list&lt;br /&gt;
  tal que (elimina n xs) es la lista obtenida eliminando los n primeros&lt;br /&gt;
  elementos de xs. Por ejemplo, &lt;br /&gt;
     elimina 2 [a,c,d,b,e] = [d,b,e]&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;jospalhid&amp;quot;&lt;br /&gt;
fun elimina :: &amp;quot;nat ⇒ &amp;#039;a list ⇒ &amp;#039;a list&amp;quot; where &lt;br /&gt;
  &amp;quot;elimina 0 xs = xs&amp;quot; |&lt;br /&gt;
  &amp;quot;elimina n [] = []&amp;quot; |&lt;br /&gt;
  &amp;quot;elimina (Suc n) xs = elimina n (tl xs)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;elimina 2 [a,c,d,b,e]&amp;quot; -- &amp;quot;= [d,b,e]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;angfraalv&amp;quot;&lt;br /&gt;
fun elimina2 :: &amp;quot;nat ⇒ &amp;#039;a list ⇒ &amp;#039;a list&amp;quot; where &lt;br /&gt;
  &amp;quot;elimina2 n xs = inversa (coge (((length xs) - n)::nat) (inversa xs))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;elimina 2 [a,c,d,b,e]&amp;quot; -- &amp;quot;= [d,b,e]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 8. Definir la función&lt;br /&gt;
     esVacia :: &amp;#039;a list ⇒ bool&lt;br /&gt;
  tal que (esVacia xs) se verifica si xs es la lista vacía. Por ejemplo,&lt;br /&gt;
     esVacia []  = True&lt;br /&gt;
     esVacia [1] = False&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;jospalhid angfraalv&amp;quot;&lt;br /&gt;
fun esVacia :: &amp;quot;&amp;#039;a list ⇒ bool&amp;quot; where &lt;br /&gt;
  &amp;quot;esVacia [] = True&amp;quot; |&lt;br /&gt;
  &amp;quot;esVacia xs = False&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;esVacia []&amp;quot;  -- &amp;quot;= True&amp;quot;&lt;br /&gt;
value &amp;quot;esVacia [1]&amp;quot; -- &amp;quot;= False&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 9. Definir la función&lt;br /&gt;
     inversaAc :: &amp;#039;a list ⇒ &amp;#039;a list&lt;br /&gt;
  tal que (inversaAc xs) es a inversa de xs calculada usando&lt;br /&gt;
  acumuladores. Por ejemplo, &lt;br /&gt;
     inversaAc [a,c,b,e] = [e,b,c,a]&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;angfraalv&amp;quot;&lt;br /&gt;
fun inversaAcAux :: &amp;quot;&amp;#039;a list ⇒ &amp;#039;a list ⇒ &amp;#039;a list&amp;quot; where &lt;br /&gt;
  -- &amp;quot;no se si he entendido bien la idea de acumular, pero funciona&amp;quot;&lt;br /&gt;
  &amp;quot;inversaAcAux xs ys = conc ys xs &amp;quot;&lt;br /&gt;
&lt;br /&gt;
fun inversaAc :: &amp;quot;&amp;#039;a list ⇒ &amp;#039;a list&amp;quot; where&lt;br /&gt;
  &amp;quot;inversaAc [] = []&amp;quot; | &lt;br /&gt;
  &amp;quot;inversaAc (x#xs) = inversaAcAux [x] (inversaAc xs)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;inversaAc [a,c,b,e]&amp;quot; -- &amp;quot;= [e,b,c,a]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 10. Definir la función&lt;br /&gt;
     sum :: nat list ⇒ nat&lt;br /&gt;
  tal que (sum xs) es la suma de los elementos de xs. Por ejemplo,&lt;br /&gt;
     sum [3,2,5] = 10&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;jospalhid&amp;quot;&lt;br /&gt;
fun sum :: &amp;quot;nat list ⇒ nat&amp;quot; where &lt;br /&gt;
  &amp;quot;sum [] = 0&amp;quot; |&lt;br /&gt;
  &amp;quot;sum xs = hd xs + sum (tl xs)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;sum [3,2,5]&amp;quot; -- &amp;quot;= 10&amp;quot;&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;angfraalv&amp;quot;&lt;br /&gt;
fun sum2 :: &amp;quot;nat list ⇒ nat&amp;quot; where &lt;br /&gt;
  &amp;quot;sum2 [] = 0&amp;quot; |&lt;br /&gt;
  &amp;quot;sum2 (x#xs) = x + sum2 xs&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;sum [3,2,5]&amp;quot; -- &amp;quot;= 10&amp;quot;&lt;br /&gt;
&lt;br /&gt;
text {* --------------------------------------------------------------- &lt;br /&gt;
  Ejercicio 11. Definir la función&lt;br /&gt;
     map :: (&amp;#039;a ⇒ &amp;#039;b) ⇒ &amp;#039;a list ⇒ &amp;#039;b list&lt;br /&gt;
  tal que (map f xs) es la lista obtenida aplicando la función f a los&lt;br /&gt;
  elementos de xs. Por ejemplo,&lt;br /&gt;
     map (λx. 2*x) [3,2,5] = [6,4,10]&lt;br /&gt;
  ------------------------------------------------------------------ *}&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;jospalhid&amp;quot;&lt;br /&gt;
fun map :: &amp;quot;(&amp;#039;a ⇒ &amp;#039;b) ⇒ &amp;#039;a list ⇒ &amp;#039;b list&amp;quot; where &lt;br /&gt;
  &amp;quot;map f [] = []&amp;quot; |&lt;br /&gt;
  &amp;quot;map f xs = f(hd xs) # map f (tl xs)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;map (λx. 2*x) [3::nat,2,5]&amp;quot; -- &amp;quot;= [6,4,10]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
-- &amp;quot;angfraalv&amp;quot;&lt;br /&gt;
fun map2 :: &amp;quot;(&amp;#039;a ⇒ &amp;#039;b) ⇒ &amp;#039;a list ⇒ &amp;#039;b list&amp;quot; where &lt;br /&gt;
  &amp;quot;map2 f [] = []&amp;quot; |&lt;br /&gt;
  &amp;quot;map2 f (x#xs) = f(x)#(map2 f xs)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
value &amp;quot;map (λx. 2*x) [3::nat,2,5]&amp;quot; -- &amp;quot;= [6,4,10]&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jalonso</name></author>
		
	</entry>
</feed>