Imagen inversa de la imagen de aplicaciones inyectivas
Demostrar que si f es inyectiva, entonces
1 |
f⁻¹[f[s]] ⊆ s |
Para ello, completar la siguiente teoría de Lean:
1 2 3 4 5 6 7 8 9 10 11 12 |
import data.set.basic open set function variables {α : Type*} {β : Type*} variable f : α → β variable s : set α example (h : injective f) : f ⁻¹' (f '' s) ⊆ s := sorry |
[expand title=»Soluciones con Lean»]
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
import data.set.basic open set function variables {α : Type*} {β : Type*} variable f : α → β variable s : set α -- 1ª demostración -- =============== example (h : injective f) : f ⁻¹' (f '' s) ⊆ s := begin intros x hx, rw mem_preimage at hx, rw mem_image_eq at hx, cases hx with y hy, cases hy with ys fyx, unfold injective at h, have h1 : y = x := h fyx, rw ← h1, exact ys, end -- 2ª demostración -- =============== example (h : injective f) : f ⁻¹' (f '' s) ⊆ s := begin intros x hx, rw mem_preimage at hx, rcases hx with ⟨y, ys, fyx⟩, rw ← h fyx, exact ys, end -- 3ª demostración -- =============== example (h : injective f) : f ⁻¹' (f '' s) ⊆ s := begin rintros x ⟨y, ys, hy⟩, rw ← h hy, exact ys, end |
Se puede interactuar con la prueba anterior en esta sesión con Lean,
[/expand]
[expand title=»Soluciones con Isabelle/HOL»]
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
theory Imagen_inversa_de_la_imagen_de_aplicaciones_inyectivas imports Main begin section ‹?ª demostración› lemma assumes "inj f" shows "f -` (f ` s) ⊆ s" proof (rule subsetI) fix x assume "x ∈ f -` (f ` s)" then have "f x ∈ f ` s" by (rule vimageD) then show "x ∈ s" proof (rule imageE) fix y assume "f x = f y" assume "y ∈ s" have "x = y" using ‹inj f› ‹f x = f y› by (rule injD) then show "x ∈ s" using ‹y ∈ s› by (rule ssubst) qed qed section ‹2ª demostración› lemma assumes "inj f" shows "f -` (f ` s) ⊆ s" proof fix x assume "x ∈ f -` (f ` s)" then have "f x ∈ f ` s" by simp then show "x ∈ s" proof fix y assume "f x = f y" assume "y ∈ s" have "x = y" using ‹inj f› ‹f x = f y› by (rule injD) then show "x ∈ s" using ‹y ∈ s› by simp qed qed section ‹3ª demostración› lemma assumes "inj f" shows "f -` (f ` s) ⊆ s" using assms unfolding inj_def by auto section ‹4ª demostración› lemma assumes "inj f" shows "f -` (f ` s) ⊆ s" using assms by (simp only: inj_vimage_image_eq) end |
[/expand]
[expand title=»Nuevas soluciones»]
- En los comentarios se pueden escribir nuevas soluciones.
- El código se debe escribir entre una línea con <pre lang="isar"> y otra con </pre>
[/expand]