{"id":7518,"date":"2020-11-02T19:06:31","date_gmt":"2020-11-02T18:06:31","guid":{"rendered":"https:\/\/www.glc.us.es\/~jalonso\/vestigium\/?p=7518"},"modified":"2020-12-21T19:07:40","modified_gmt":"2020-12-21T18:07:40","slug":"formatus-pruebas-en-lean-de-que-las-equivalencias-son-los-preordenes-simetricos","status":"publish","type":"post","link":"https:\/\/www.glc.us.es\/~jalonso\/vestigium\/formatus-pruebas-en-lean-de-que-las-equivalencias-son-los-preordenes-simetricos\/","title":{"rendered":"ForMatUS: Pruebas en Lean de que las equivalencias son los pre\u00f3rdenes sim\u00e9tricos"},"content":{"rendered":"<p>He a\u00f1adido a la lista <a href=\"https:\/\/bit.ly\/2FcUrwQ\">L\u00f3gica con Lean<\/a> el <a href=\"https:\/\/youtu.be\/fhMF-JcSlKc\">v\u00eddeo<\/a> en el que se comentan 5 pruebas en Lean de que las equivalencias son los pre\u00f3rdenes sim\u00e9tricos, usando los estilos declarativos, aplicativos, funcional y autom\u00e1tico.<\/p>\n<p>A continuaci\u00f3n, se muestra el v\u00eddeo<\/p>\n<p><center><\/p>\n<p><iframe loading=\"lazy\" src=\"https:\/\/www.youtube.com\/embed\/fhMF-JcSlKc\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\" data-mce-fragment=\"1\"><\/iframe><\/p>\n<p><\/center>y el <a href=\"https:\/\/github.com\/jaalonso\/Logica_con_Lean\/blob\/master\/src\/4_Relaciones\/Las_equivalencias_son_preordenes_simetricos.lean\">c\u00f3digo<\/a> de la teor\u00eda utilizada<\/p>\n<pre lang=\"lean\">-- ----------------------------------------------------\n-- Ej. 1. Un preorden es una relaci\u00f3n reflexiva y\n-- transitiva.\n--\n-- Demostrar que las relaciones de equivalencias son\n-- los pr\u00f3rdenes sim\u00e9tricos.\n-- ----------------------------------------------------\n\nimport tactic\n\nvariable {A : Type}\nvariable R : A \u2192 A \u2192 Prop\n\ndef preorden (R : A \u2192 A \u2192 Prop) : Prop :=\n  reflexive R \u2227 transitive R\n\n-- #print equivalence\n-- #print symmetric\n\n-- 1\u00aa demostraci\u00f3n\nexample :\n  equivalence R \u2194 preorden R \u2227 symmetric R :=\nbegin\n  split,\n  { rintros \u27e8h1, h2, h3\u27e9,\n    exact \u27e8\u27e8h1, h3\u27e9, h2\u27e9, },\n  { rintros \u27e8\u27e8h1, h3\u27e9, h2\u27e9,\n    exact \u27e8h1, h2, h3\u27e9, },\nend\n\n-- 2\u00aa demostraci\u00f3n\nexample :\n  equivalence R \u2194 preorden R \u2227 symmetric R :=\n\u27e8\u03bb \u27e8h1, h2, h3\u27e9, \u27e8\u27e8h1, h3\u27e9, h2\u27e9,\n \u03bb \u27e8\u27e8h1, h3\u27e9, h2\u27e9, \u27e8h1, h2, h3\u27e9\u27e9\n\n-- 3\u00aa demostraci\u00f3n\nexample :\n  equivalence R \u2194 preorden R \u2227 symmetric R :=\niff.intro\n  ( assume h1 : equivalence R,\n    have h2 : reflexive R, from and.left h1,\n    have h3 : symmetric R, from and.left (and.right h1),\n    have h4 : transitive R, from and.right (and.right h1),\n    show preorden R \u2227 symmetric R,\n      from and.intro (and.intro h2 h4) h3)\n  ( assume h1 : preorden R \u2227 symmetric R,\n    have h2 : preorden R, from and.left h1,\n    show equivalence R,\n      from and.intro (and.left h2)\n             (and.intro (and.right h1) (and.right h2)))\n\n-- 4\u00aa demostraci\u00f3n\nexample :\n  equivalence R \u2194 preorden R \u2227 symmetric R :=\nbegin\n  unfold equivalence preorden,\n  tauto,\nend\n\n-- 5\u00aa demostraci\u00f3n\nexample :\n  equivalence R \u2194 preorden R \u2227 symmetric R :=\nby finish [preorden]\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>He a\u00f1adido a la lista L\u00f3gica con Lean el v\u00eddeo en el que se comentan 5 pruebas en Lean de que las equivalencias son los pre\u00f3rdenes sim\u00e9tricos, usando los estilos declarativos, aplicativos, funcional y autom\u00e1tico. A continuaci\u00f3n, se muestra el v\u00eddeo y el c\u00f3digo de la teor\u00eda utilizada &#8212; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- &#8212; Ej. 1. Un preorden&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"footnotes":"","_jetpack_memberships_contains_paid_content":false},"categories":[335],"tags":[166,336],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_likes_enabled":false,"_links":{"self":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/vestigium\/wp-json\/wp\/v2\/posts\/7518"}],"collection":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/vestigium\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/vestigium\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/vestigium\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/vestigium\/wp-json\/wp\/v2\/comments?post=7518"}],"version-history":[{"count":1,"href":"https:\/\/www.glc.us.es\/~jalonso\/vestigium\/wp-json\/wp\/v2\/posts\/7518\/revisions"}],"predecessor-version":[{"id":7519,"href":"https:\/\/www.glc.us.es\/~jalonso\/vestigium\/wp-json\/wp\/v2\/posts\/7518\/revisions\/7519"}],"wp:attachment":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/vestigium\/wp-json\/wp\/v2\/media?parent=7518"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/vestigium\/wp-json\/wp\/v2\/categories?post=7518"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/vestigium\/wp-json\/wp\/v2\/tags?post=7518"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}