@@ -162,9 +162,7 @@ def comap (N : Matroid β) (f : α → β) : Matroid α :=
162
162
@[simp] lemma comap_dep_iff :
163
163
(N.comap f).Dep I ↔ N.Dep (f '' I) ∨ (N.Indep (f '' I) ∧ ¬ InjOn f I) := by
164
164
rw [Dep, comap_indep_iff, not_and, comap_ground_eq, Dep, image_subset_iff]
165
- refine ⟨fun ⟨hi, h⟩ ↦ ?_, ?_⟩
166
- · rw [and_iff_left h, ← imp_iff_not_or]
167
- exact fun hI ↦ ⟨hI, hi hI⟩
165
+ refine ⟨by grind, ?_⟩
168
166
rintro (⟨hI, hIE⟩ | hI)
169
167
· exact ⟨fun h ↦ (hI h).elim, hIE⟩
170
168
rw [iff_true_intro hI.1 , iff_true_intro hI.2 , implies_true, true_and]
@@ -459,9 +457,7 @@ lemma map_comap {f : α → β} (h_range : N.E ⊆ range f) (hf : InjOn f (f ⁻
459
457
(N.comap f).map f hf = N := by
460
458
refine ext_indep (by simpa [image_preimage_eq_iff]) ?_
461
459
simp only [map_ground, comap_ground_eq, map_indep_iff, comap_indep_iff, forall_subset_image_iff]
462
- refine fun I hI ↦ ⟨fun ⟨I₀, ⟨hI₀, _⟩, hII₀⟩ ↦ ?_, fun h ↦ ⟨_, ⟨h, hf.mono hI⟩, rfl⟩⟩
463
- suffices h : I₀ ⊆ f ⁻¹' N.E by rw [InjOn.image_eq_image_iff hf hI h] at hII₀; rwa [hII₀]
464
- exact (subset_preimage_image f I₀).trans <| preimage_mono (f := f) hI₀.subset_ground
460
+ exact fun I hI ↦ ⟨by grind, fun h ↦ ⟨_, ⟨h, hf.mono hI⟩, rfl⟩⟩
465
461
466
462
lemma comap_map {f : α → β} (hf : f.Injective) : (M.map f hf.injOn).comap f = M := by
467
463
simp [ext_iff_indep, preimage_image_eq _ hf, and_iff_left hf.injOn,
0 commit comments