Subconjunto de la imagen inversa
Demostrar que
1 |
f[s] ⊆ u ↔ s ⊆ f⁻¹[u] |
Para ello, completar la siguiente teoría de Lean:
1 2 3 4 5 6 7 8 9 10 11 |
import data.set.basic open set variables {α : Type*} {β : Type*} variable f : α → β variable s : set α variable u : set β example : f '' s ⊆ u ↔ s ⊆ f ⁻¹' u := 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 variables {α : Type*} {β : Type*} variable f : α → β variable s : set α variable u : set β -- 1ª demostración -- =============== example : f '' s ⊆ u ↔ s ⊆ f ⁻¹' u := begin split, { intros h x xs, apply mem_preimage.mpr, apply h, apply mem_image_of_mem, exact xs, }, { intros h y hy, rcases hy with ⟨x, xs, fxy⟩, rw ← fxy, exact h xs, }, end -- 2ª demostración -- =============== example : f '' s ⊆ u ↔ s ⊆ f ⁻¹' u := begin split, { intros h x xs, apply h, apply mem_image_of_mem, exact xs, }, { rintros h y ⟨x, xs, rfl⟩, exact h xs, }, end -- 3ª demostración -- =============== example : f '' s ⊆ u ↔ s ⊆ f ⁻¹' u := image_subset_iff -- 4ª demostración -- =============== example : f '' s ⊆ u ↔ s ⊆ f ⁻¹' u := by simp |
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 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
theory Subconjunto_de_la_imagen_inversa imports Main begin section ‹1ª demostración› lemma "f ` s ⊆ u ⟷ s ⊆ f -` u" proof (rule iffI) assume "f ` s ⊆ u" show "s ⊆ f -` u" proof (rule subsetI) fix x assume "x ∈ s" then have "f x ∈ f ` s" by (simp only: imageI) then have "f x ∈ u" using ‹f ` s ⊆ u› by (rule set_rev_mp) then show "x ∈ f -` u" by (simp only: vimageI) qed next assume "s ⊆ f -` u" show "f ` s ⊆ u" proof (rule subsetI) fix y assume "y ∈ f ` s" then show "y ∈ u" proof fix x assume "y = f x" assume "x ∈ s" then have "x ∈ f -` u" using ‹s ⊆ f -` u› by (rule set_rev_mp) then have "f x ∈ u" by (rule vimageD) with ‹y = f x› show "y ∈ u" by (rule ssubst) qed qed qed section ‹2ª demostración› lemma "f ` s ⊆ u ⟷ s ⊆ f -` u" proof assume "f ` s ⊆ u" show "s ⊆ f -` u" proof fix x assume "x ∈ s" then have "f x ∈ f ` s" by simp then have "f x ∈ u" using ‹f ` s ⊆ u› by (simp add: set_rev_mp) then show "x ∈ f -` u" by simp qed next assume "s ⊆ f -` u" show "f ` s ⊆ u" proof fix y assume "y ∈ f ` s" then show "y ∈ u" proof fix x assume "y = f x" assume "x ∈ s" then have "x ∈ f -` u" using ‹s ⊆ f -` u› by (simp only: set_rev_mp) then have "f x ∈ u" by simp with ‹y = f x› show "y ∈ u" by simp qed qed qed section ‹3ª demostración› lemma "f ` s ⊆ u ⟷ s ⊆ f -` u" by (simp only: image_subset_iff_subset_vimage) section ‹4ª demostración› lemma "f ` s ⊆ u ⟷ s ⊆ f -` u" by auto 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]