@@ -171,32 +171,14 @@ theorem DirSupClosedOn.union (hDL : IsLowerSet D)
171171 (hs : DirSupClosedOn D s) (ht : DirSupClosedOn D t) : DirSupClosedOn D (s ∪ t) := by
172172 intro d hD hdu hd₀ hd₁ a ha
173173 have hdst : d ∩ s ∪ d ∩ t = d := by grind
174- rw [← hdst] at hd₀ hd₁
175- wlog h : DirectedOn (· ≤ ·) (d ∩ s) ∧ (d ∩ s).Nonempty
176- · rw [union_comm] at hdu hd₀ hd₁ hdst ⊢
174+ wlog h : DirectedOn (· ≤ ·) (d ∩ s) ∧ IsCofinalFor (d ∩ t) (d ∩ s)
175+ · rw [union_comm] at hdu hdst ⊢
177176 exact this hDL ht hs hD hdu hd₀ hd₁ ha hdst <|
178- (directedOn_or_directedOn_of_union' hd₀ hd₁).resolve_right h
179- obtain ⟨hds, hn⟩ := h
180- by_cases had : a ∈ lowerBounds (upperBounds (d ∩ s))
181- · exact .inl <| hs (hDL inter_subset_left hD) inter_subset_right hn hds
182- ⟨fun b hb ↦ ha.1 hb.1 , had⟩
183- · simp only [lowerBounds, mem_setOf_eq, not_forall] at had
184- obtain ⟨b, hb, hb'⟩ := had
185- have key : {x ∈ d | ¬ x ≤ b} ⊆ d ∩ t := fun a ⟨had, hab⟩ ↦
186- ⟨had, (hdu had).resolve_left fun has ↦ hab <| hb ⟨had, has⟩⟩
187- obtain ⟨w, hw⟩ : {x ∈ d | ¬ x ≤ b}.Nonempty := by
188- contrapose! hb'
189- apply ha.2
190- aesop
191- refine Or.inr <| ht (hDL inter_subset_left hD) (key.trans inter_subset_right)
192- ⟨w, hw⟩ (fun x hx y hy ↦ ?_) ?_
193- · obtain ⟨z, hz, hz'⟩ := hd₁ _ (.inr (key hx)) _ (.inr (key hy))
194- exact ⟨z, ⟨⟨hdst ▸ hz, mt hz'.1 .trans hx.2 ⟩, hz'⟩⟩
195- · refine ⟨fun x hx ↦ ha.1 hx.1 , fun x hx ↦ ha.2 fun y hy ↦ ?_⟩
196- by_cases hyb : y ≤ b
197- · obtain ⟨z, hz, hxz, hyz⟩ := hd₁ _ (hdst ▸ hy) _ (.inr (key hw))
198- exact hxz.trans (hx ⟨hdst ▸ hz, fun hzb ↦ hw.2 (hyz.trans hzb)⟩)
199- exact hx ⟨hy, hyb⟩
177+ (directedOn_union_iff.mp (by rwa [hdst])).resolve_right h
178+ obtain ⟨hds, hcof⟩ := h
179+ have hcof' : IsCofinalFor d (d ∩ s) := hcof.union_right.mono_left hdst.ge
180+ exact .inl <| hs (hDL inter_subset_left hD) inter_subset_right
181+ (hcof'.nonempty hd₀) hds (ha.of_isCofinalFor inter_subset_left hcof')
200182
201183theorem DirSupInaccOn.inter (hDL : IsLowerSet D)
202184 (hs : DirSupInaccOn D s) (ht : DirSupInaccOn D t) : DirSupInaccOn D (s ∩ t) := by
@@ -228,18 +210,11 @@ theorem dirSupInaccOn_iff_inter_subset (hDL : IsLowerSet D) :
228210 mpr := .of_inter_subset
229211 mp h t hD ht₀ ht₁ a ha has := by
230212 by_contra! H
231- have H : ∀ b : t, ∃ c, b.1 ≤ c ∧ c ∈ t ∧ c ∉ s := by simpa [not_subset, and_assoc] using H
232- choose f hf using H
233- have := ht₀.to_subtype
234- have hft : range f ⊆ t := by grind
235- apply (h (hDL hft hD) (range_nonempty f) _ _ has).ne_empty
236- · aesop
237- · intro a ha b hb
238- obtain ⟨c, hc, _, _⟩ := ht₁ _ (hft ha) _ (hft hb)
239- have := hf ⟨c, hc⟩
240- grind
241- · exact ⟨upperBounds_mono_set hft ha.1 ,
242- fun b hb ↦ ha.2 fun c hc ↦ (hf ⟨c, hc⟩).1 .trans (hb <| by simp)⟩
213+ have hcof : IsCofinalFor t (t \ s) := by grind [IsCofinalFor, not_subset]
214+ obtain ⟨x, hx, hxs⟩ := h (hDL sdiff_subset hD) (hcof.nonempty ht₀)
215+ (ht₁.of_isCofinalFor sdiff_subset hcof)
216+ (ha.of_isCofinalFor sdiff_subset hcof) has
217+ exact hx.2 hxs
243218
244219/-- The condition `(d ∩ s).Nonempty` in `DirSupInacc` can be replaced with the stronger
245220`∃ b ∈ d, Ici b ∩ d ⊆ s`. -/
0 commit comments