l3lab/ntp-mathlib huggingface dataset:
/-- If the suprema of columns are pairwise disjoint and suprema of rows as well, then everything is
pairwise disjoint. Not to be confused with `Set.PairwiseDisjoint.prod`. -/
theorem PairwiseDisjoint.prod_left {f : ι × ι' → α}
    (hs : s.PairwiseDisjoint fun i => ⨆ i' ∈ t, f (i, i'))
    (ht : t.PairwiseDisjoint fun i' => ⨆ i ∈ s, f (i, i')) :
    (s ×ˢ t : Set (ι × ι')).PairwiseDisjoint f := by
  rintro ⟨i, i'⟩ hi ⟨j, j'⟩ hj h
  rw [mem_prod] at hi hj
  obtain rfl | hij := eq_or_ne i j
  · refine' (ht hi.2 hj.2 <| (Prod.mk.inj_left _).ne_iff.1 h).mono _ _
    · convert le_iSup₂ (α := α) i hi.1; rfl
    · convert le_iSup₂ (α := α) i hj.1; rfl
  · 

Proof state:
case mk.mk.inr
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
κ : Sort u_6
r p q : α → α → Prop
inst✝ : CompleteLattice α
s : Set ι
t : Set ι'
f : ι × ι' → α
hs : PairwiseDisjoint s fun i => ⨆ i' ∈ t, f (i, i')
ht : PairwiseDisjoint t fun i' => ⨆ i ∈ s, f (i, i')
i : ι
i' : ι'
hi : (i, i').1 ∈ s ∧ (i, i').2 ∈ t
j : ι
j' : ι'
hj : (j, j').1 ∈ s ∧ (j, j').2 ∈ t
h : (i, i') ≠ (j, j')
hij : i ≠ j
⊢ (Disjoint on f) (i, i') (j, j')

Next tactic:
refine' (hs hi.1 hj.1 hij).mono _ _
/-- If the suprema of columns are pairwise disjoint and suprema of rows as well, then everything is
pairwise disjoint. Not to be confused with `Set.PairwiseDisjoint.prod`. -/
theorem PairwiseDisjoint.prod_left {f : ι × ι' → α}
    (hs : s.PairwiseDisjoint fun i => ⨆ i' ∈ t, f (i, i'))
    (ht : t.PairwiseDisjoint fun i' => ⨆ i ∈ s, f (i, i')) :
    (s ×ˢ t : Set (ι × ι')).PairwiseDisjoint f := by
  rintro ⟨i, i'⟩ hi ⟨j, j'⟩ hj h
  rw [mem_prod] at hi hj
  obtain rfl | hij := eq_or_ne i j
  · refine' (ht hi.2 hj.2 <| (Prod.mk.inj_left _).ne_iff.1 h).mono _ _
    · convert le_iSup₂ (α := α) i hi.1; rfl
    · convert le_iSup₂ (α := α) i hj.1; rfl
  · refine' (hs hi.1 hj.1 hij).mono _ _
    · 

Proof state:
case mk.mk.inr.refine'_1
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
κ : Sort u_6
r p q : α → α → Prop
inst✝ : CompleteLattice α
s : Set ι
t : Set ι'
f : ι × ι' → α
hs : PairwiseDisjoint s fun i => ⨆ i' ∈ t, f (i, i')
ht : PairwiseDisjoint t fun i' => ⨆ i ∈ s, f (i, i')
i : ι
i' : ι'
hi : (i, i').1 ∈ s ∧ (i, i').2 ∈ t
j : ι
j' : ι'
hj : (j, j').1 ∈ s ∧ (j, j').2 ∈ t
h : (i, i') ≠ (j, j')
hij : i ≠ j
⊢ f (i, i') ≤ (fun i => ⨆ i' ∈ t, f (i, i')) (i, i').1

Next tactic:
convert le_iSup₂ (α := α) i' hi.2
/-- If the suprema of columns are pairwise disjoint and suprema of rows as well, then everything is
pairwise disjoint. Not to be confused with `Set.PairwiseDisjoint.prod`. -/
theorem PairwiseDisjoint.prod_left {f : ι × ι' → α}
    (hs : s.PairwiseDisjoint fun i => ⨆ i' ∈ t, f (i, i'))
    (ht : t.PairwiseDisjoint fun i' => ⨆ i ∈ s, f (i, i')) :
    (s ×ˢ t : Set (ι × ι')).PairwiseDisjoint f := by
  rintro ⟨i, i'⟩ hi ⟨j, j'⟩ hj h
  rw [mem_prod] at hi hj
  obtain rfl | hij := eq_or_ne i j
  · refine' (ht hi.2 hj.2 <| (Prod.mk.inj_left _).ne_iff.1 h).mono _ _
    · convert le_iSup₂ (α := α) i hi.1; rfl
    · convert le_iSup₂ (α := α) i hj.1; rfl
  · refine' (hs hi.1 hj.1 hij).mono _ _
    · convert le_iSup₂ (α := α) i' hi.2; 

Proof state:
case h.e'_3
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
κ : Sort u_6
r p q : α → α → Prop
inst✝ : CompleteLattice α
s : Set ι
t : Set ι'
f : ι × ι' → α
hs : PairwiseDisjoint s fun i => ⨆ i' ∈ t, f (i, i')
ht : PairwiseDisjoint t fun i' => ⨆ i ∈ s, f (i, i')
i : ι
i' : ι'
hi : (i, i').1 ∈ s ∧ (i, i').2 ∈ t
j : ι
j' : ι'
hj : (j, j').1 ∈ s ∧ (j, j').2 ∈ t
h : (i, i') ≠ (j, j')
hij : i ≠ j
⊢ f (i, i') = f ((i, i').1, i')

Next tactic:
rfl
/-- If the suprema of columns are pairwise disjoint and suprema of rows as well, then everything is
pairwise disjoint. Not to be confused with `Set.PairwiseDisjoint.prod`. -/
theorem PairwiseDisjoint.prod_left {f : ι × ι' → α}
    (hs : s.PairwiseDisjoint fun i => ⨆ i' ∈ t, f (i, i'))
    (ht : t.PairwiseDisjoint fun i' => ⨆ i ∈ s, f (i, i')) :
    (s ×ˢ t : Set (ι × ι')).PairwiseDisjoint f := by
  rintro ⟨i, i'⟩ hi ⟨j, j'⟩ hj h
  rw [mem_prod] at hi hj
  obtain rfl | hij := eq_or_ne i j
  · refine' (ht hi.2 hj.2 <| (Prod.mk.inj_left _).ne_iff.1 h).mono _ _
    · convert le_iSup₂ (α := α) i hi.1; rfl
    · convert le_iSup₂ (α := α) i hj.1; rfl
  · refine' (hs hi.1 hj.1 hij).mono _ _
    · convert le_iSup₂ (α := α) i' hi.2; rfl
    · 

Proof state:
case mk.mk.inr.refine'_2
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
κ : Sort u_6
r p q : α → α → Prop
inst✝ : CompleteLattice α
s : Set ι
t : Set ι'
f : ι × ι' → α
hs : PairwiseDisjoint s fun i => ⨆ i' ∈ t, f (i, i')
ht : PairwiseDisjoint t fun i' => ⨆ i ∈ s, f (i, i')
i : ι
i' : ι'
hi : (i, i').1 ∈ s ∧ (i, i').2 ∈ t
j : ι
j' : ι'
hj : (j, j').1 ∈ s ∧ (j, j').2 ∈ t
h : (i, i') ≠ (j, j')
hij : i ≠ j
⊢ f (j, j') ≤ (fun i => ⨆ i' ∈ t, f (i, i')) (j, j').1

Next tactic:
convert le_iSup₂ (α := α) j' hj.2
/-- If the suprema of columns are pairwise disjoint and suprema of rows as well, then everything is
pairwise disjoint. Not to be confused with `Set.PairwiseDisjoint.prod`. -/
theorem PairwiseDisjoint.prod_left {f : ι × ι' → α}
    (hs : s.PairwiseDisjoint fun i => ⨆ i' ∈ t, f (i, i'))
    (ht : t.PairwiseDisjoint fun i' => ⨆ i ∈ s, f (i, i')) :
    (s ×ˢ t : Set (ι × ι')).PairwiseDisjoint f := by
  rintro ⟨i, i'⟩ hi ⟨j, j'⟩ hj h
  rw [mem_prod] at hi hj
  obtain rfl | hij := eq_or_ne i j
  · refine' (ht hi.2 hj.2 <| (Prod.mk.inj_left _).ne_iff.1 h).mono _ _
    · convert le_iSup₂ (α := α) i hi.1; rfl
    · convert le_iSup₂ (α := α) i hj.1; rfl
  · refine' (hs hi.1 hj.1 hij).mono _ _
    · convert le_iSup₂ (α := α) i' hi.2; rfl
    · convert le_iSup₂ (α := α) j' hj.2; 

Proof state:
case h.e'_3
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
κ : Sort u_6
r p q : α → α → Prop
inst✝ : CompleteLattice α
s : Set ι
t : Set ι'
f : ι × ι' → α
hs : PairwiseDisjoint s fun i => ⨆ i' ∈ t, f (i, i')
ht : PairwiseDisjoint t fun i' => ⨆ i ∈ s, f (i, i')
i : ι
i' : ι'
hi : (i, i').1 ∈ s ∧ (i, i').2 ∈ t
j : ι
j' : ι'
hj : (j, j').1 ∈ s ∧ (j, j').2 ∈ t
h : (i, i') ≠ (j, j')
hij : i ≠ j
⊢ f (j, j') = f ((j, j').1, j')

Next tactic:
rfl
theorem pairwiseDisjoint_prod_left {s : Set ι} {t : Set ι'} {f : ι × ι' → α} :
    (s ×ˢ t : Set (ι × ι')).PairwiseDisjoint f ↔
      (s.PairwiseDisjoint fun i => ⨆ i' ∈ t, f (i, i')) ∧
        t.PairwiseDisjoint fun i' => ⨆ i ∈ s, f (i, i') := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
κ : Sort u_6
r p q : α → α → Prop
inst✝ : Frame α
s : Set ι
t : Set ι'
f : ι × ι' → α
⊢ PairwiseDisjoint (s ×ˢ t) f ↔
    (PairwiseDisjoint s fun i => ⨆ i' ∈ t, f (i, i')) ∧ PairwiseDisjoint t fun i' => ⨆ i ∈ s, f (i, i')

Next tactic:
refine'
        ⟨fun h => ⟨fun i hi j hj hij => _, fun i hi j hj hij => _⟩, fun h => h.1.prod_left h.2⟩
theorem pairwiseDisjoint_prod_left {s : Set ι} {t : Set ι'} {f : ι × ι' → α} :
    (s ×ˢ t : Set (ι × ι')).PairwiseDisjoint f ↔
      (s.PairwiseDisjoint fun i => ⨆ i' ∈ t, f (i, i')) ∧
        t.PairwiseDisjoint fun i' => ⨆ i ∈ s, f (i, i') := by
  refine'
        ⟨fun h => ⟨fun i hi j hj hij => _, fun i hi j hj hij => _⟩, fun h => h.1.prod_left h.2⟩ <;>
      

Proof state:
case refine'_1
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
κ : Sort u_6
r p q : α → α → Prop
inst✝ : Frame α
s : Set ι
t : Set ι'
f : ι × ι' → α
h : PairwiseDisjoint (s ×ˢ t) f
i : ι
hi : i ∈ s
j : ι
hj : j ∈ s
hij : i ≠ j
⊢ (Disjoint on fun i => ⨆ i' ∈ t, f (i, i')) i j

Next tactic:
simp_rw [Function.onFun, iSup_disjoint_iff, disjoint_iSup_iff]
theorem pairwiseDisjoint_prod_left {s : Set ι} {t : Set ι'} {f : ι × ι' → α} :
    (s ×ˢ t : Set (ι × ι')).PairwiseDisjoint f ↔
      (s.PairwiseDisjoint fun i => ⨆ i' ∈ t, f (i, i')) ∧
        t.PairwiseDisjoint fun i' => ⨆ i ∈ s, f (i, i') := by
  refine'
        ⟨fun h => ⟨fun i hi j hj hij => _, fun i hi j hj hij => _⟩, fun h => h.1.prod_left h.2⟩ <;>
      

Proof state:
case refine'_2
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
κ : Sort u_6
r p q : α → α → Prop
inst✝ : Frame α
s : Set ι
t : Set ι'
f : ι × ι' → α
h : PairwiseDisjoint (s ×ˢ t) f
i : ι'
hi : i ∈ t
j : ι'
hj : j ∈ t
hij : i ≠ j
⊢ (Disjoint on fun i' => ⨆ i ∈ s, f (i, i')) i j

Next tactic:
simp_rw [Function.onFun, iSup_disjoint_iff, disjoint_iSup_iff]
theorem pairwiseDisjoint_prod_left {s : Set ι} {t : Set ι'} {f : ι × ι' → α} :
    (s ×ˢ t : Set (ι × ι')).PairwiseDisjoint f ↔
      (s.PairwiseDisjoint fun i => ⨆ i' ∈ t, f (i, i')) ∧
        t.PairwiseDisjoint fun i' => ⨆ i ∈ s, f (i, i') := by
  refine'
        ⟨fun h => ⟨fun i hi j hj hij => _, fun i hi j hj hij => _⟩, fun h => h.1.prod_left h.2⟩ <;>
      simp_rw [Function.onFun, iSup_disjoint_iff, disjoint_iSup_iff] <;>
    

Proof state:
case refine'_1
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
κ : Sort u_6
r p q : α → α → Prop
inst✝ : Frame α
s : Set ι
t : Set ι'
f : ι × ι' → α
h : PairwiseDisjoint (s ×ˢ t) f
i : ι
hi : i ∈ s
j : ι
hj : j ∈ s
hij : i ≠ j
⊢ ∀ i_1 ∈ t, ∀ i_3 ∈ t, Disjoint (f (i, i_1)) (f (j, i_3))

Next tactic:
intro i' hi' j' hj'
theorem pairwiseDisjoint_prod_left {s : Set ι} {t : Set ι'} {f : ι × ι' → α} :
    (s ×ˢ t : Set (ι × ι')).PairwiseDisjoint f ↔
      (s.PairwiseDisjoint fun i => ⨆ i' ∈ t, f (i, i')) ∧
        t.PairwiseDisjoint fun i' => ⨆ i ∈ s, f (i, i') := by
  refine'
        ⟨fun h => ⟨fun i hi j hj hij => _, fun i hi j hj hij => _⟩, fun h => h.1.prod_left h.2⟩ <;>
      simp_rw [Function.onFun, iSup_disjoint_iff, disjoint_iSup_iff] <;>
    

Proof state:
case refine'_2
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
κ : Sort u_6
r p q : α → α → Prop
inst✝ : Frame α
s : Set ι
t : Set ι'
f : ι × ι' → α
h : PairwiseDisjoint (s ×ˢ t) f
i : ι'
hi : i ∈ t
j : ι'
hj : j ∈ t
hij : i ≠ j
⊢ ∀ i_1 ∈ s, ∀ i_3 ∈ s, Disjoint (f (i_1, i)) (f (i_3, j))

Next tactic:
intro i' hi' j' hj'
theorem pairwiseDisjoint_prod_left {s : Set ι} {t : Set ι'} {f : ι × ι' → α} :
    (s ×ˢ t : Set (ι × ι')).PairwiseDisjoint f ↔
      (s.PairwiseDisjoint fun i => ⨆ i' ∈ t, f (i, i')) ∧
        t.PairwiseDisjoint fun i' => ⨆ i ∈ s, f (i, i') := by
  refine'
        ⟨fun h => ⟨fun i hi j hj hij => _, fun i hi j hj hij => _⟩, fun h => h.1.prod_left h.2⟩ <;>
      simp_rw [Function.onFun, iSup_disjoint_iff, disjoint_iSup_iff] <;>
    intro i' hi' j' hj'
  · 

Proof state:
case refine'_1
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
κ : Sort u_6
r p q : α → α → Prop
inst✝ : Frame α
s : Set ι
t : Set ι'
f : ι × ι' → α
h : PairwiseDisjoint (s ×ˢ t) f
i : ι
hi : i ∈ s
j : ι
hj : j ∈ s
hij : i ≠ j
i' : ι'
hi' : i' ∈ t
j' : ι'
hj' : j' ∈ t
⊢ Disjoint (f (i, i')) (f (j, j'))

Next tactic:
exact h (mk_mem_prod hi hi') (mk_mem_prod hj hj') (ne_of_apply_ne Prod.fst hij)
theorem pairwiseDisjoint_prod_left {s : Set ι} {t : Set ι'} {f : ι × ι' → α} :
    (s ×ˢ t : Set (ι × ι')).PairwiseDisjoint f ↔
      (s.PairwiseDisjoint fun i => ⨆ i' ∈ t, f (i, i')) ∧
        t.PairwiseDisjoint fun i' => ⨆ i ∈ s, f (i, i') := by
  refine'
        ⟨fun h => ⟨fun i hi j hj hij => _, fun i hi j hj hij => _⟩, fun h => h.1.prod_left h.2⟩ <;>
      simp_rw [Function.onFun, iSup_disjoint_iff, disjoint_iSup_iff] <;>
    intro i' hi' j' hj'
  · exact h (mk_mem_prod hi hi') (mk_mem_prod hj hj') (ne_of_apply_ne Prod.fst hij)
  · 

Proof state:
case refine'_2
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
κ : Sort u_6
r p q : α → α → Prop
inst✝ : Frame α
s : Set ι
t : Set ι'
f : ι × ι' → α
h : PairwiseDisjoint (s ×ˢ t) f
i : ι'
hi : i ∈ t
j : ι'
hj : j ∈ t
hij : i ≠ j
i' : ι
hi' : i' ∈ s
j' : ι
hj' : j' ∈ s
⊢ Disjoint (f (i', i)) (f (j', j))

Next tactic:
exact h (mk_mem_prod hi' hi) (mk_mem_prod hj' hj) (ne_of_apply_ne Prod.snd hij)
theorem biUnion_diff_biUnion_eq {s t : Set ι} {f : ι → Set α} (h : (s ∪ t).PairwiseDisjoint f) :
    ((⋃ i ∈ s, f i) \ ⋃ i ∈ t, f i) = ⋃ i ∈ s \ t, f i := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
κ : Sort u_6
r p q : α → α → Prop
s t : Set ι
f : ι → Set α
h : PairwiseDisjoint (s ∪ t) f
⊢ (⋃ i ∈ s, f i) \ ⋃ i ∈ t, f i = ⋃ i ∈ s \ t, f i

Next tactic:
refine'
    (biUnion_diff_biUnion_subset f s t).antisymm
      (iUnion₂_subset fun i hi a ha => (mem_diff _).2 ⟨mem_biUnion hi.1 ha, _⟩)
theorem biUnion_diff_biUnion_eq {s t : Set ι} {f : ι → Set α} (h : (s ∪ t).PairwiseDisjoint f) :
    ((⋃ i ∈ s, f i) \ ⋃ i ∈ t, f i) = ⋃ i ∈ s \ t, f i := by
  refine'
    (biUnion_diff_biUnion_subset f s t).antisymm
      (iUnion₂_subset fun i hi a ha => (mem_diff _).2 ⟨mem_biUnion hi.1 ha, _⟩)
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
κ : Sort u_6
r p q : α → α → Prop
s t : Set ι
f : ι → Set α
h : PairwiseDisjoint (s ∪ t) f
i : ι
hi : i ∈ s \ t
a : α
ha : a ∈ f i
⊢ a ∉ ⋃ x ∈ t, f x

Next tactic:
rw [mem_iUnion₂]
theorem biUnion_diff_biUnion_eq {s t : Set ι} {f : ι → Set α} (h : (s ∪ t).PairwiseDisjoint f) :
    ((⋃ i ∈ s, f i) \ ⋃ i ∈ t, f i) = ⋃ i ∈ s \ t, f i := by
  refine'
    (biUnion_diff_biUnion_subset f s t).antisymm
      (iUnion₂_subset fun i hi a ha => (mem_diff _).2 ⟨mem_biUnion hi.1 ha, _⟩)
  rw [mem_iUnion₂]; 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
κ : Sort u_6
r p q : α → α → Prop
s t : Set ι
f : ι → Set α
h : PairwiseDisjoint (s ∪ t) f
i : ι
hi : i ∈ s \ t
a : α
ha : a ∈ f i
⊢ ¬∃ i, ∃ (_ : i ∈ t), a ∈ f i

Next tactic:
rintro ⟨j, hj, haj⟩
theorem biUnion_diff_biUnion_eq {s t : Set ι} {f : ι → Set α} (h : (s ∪ t).PairwiseDisjoint f) :
    ((⋃ i ∈ s, f i) \ ⋃ i ∈ t, f i) = ⋃ i ∈ s \ t, f i := by
  refine'
    (biUnion_diff_biUnion_subset f s t).antisymm
      (iUnion₂_subset fun i hi a ha => (mem_diff _).2 ⟨mem_biUnion hi.1 ha, _⟩)
  rw [mem_iUnion₂]; rintro ⟨j, hj, haj⟩
  

Proof state:
case intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
κ : Sort u_6
r p q : α → α → Prop
s t : Set ι
f : ι → Set α
h : PairwiseDisjoint (s ∪ t) f
i : ι
hi : i ∈ s \ t
a : α
ha : a ∈ f i
j : ι
hj : j ∈ t
haj : a ∈ f j
⊢ False

Next tactic:
exact (h (Or.inl hi.1) (Or.inr hj) (ne_of_mem_of_not_mem hj hi.2).symm).le_bot ⟨ha, haj⟩
theorem Set.PairwiseDisjoint.subset_of_biUnion_subset_biUnion (h₀ : (s ∪ t).PairwiseDisjoint f)
    (h₁ : ∀ i ∈ s, (f i).Nonempty) (h : ⋃ i ∈ s, f i ⊆ ⋃ i ∈ t, f i) : s ⊆ t := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
κ : Sort u_6
r p q : α → α → Prop
f : ι → Set α
s t : Set ι
h₀ : PairwiseDisjoint (s ∪ t) f
h₁ : ∀ i ∈ s, Set.Nonempty (f i)
h : ⋃ i ∈ s, f i ⊆ ⋃ i ∈ t, f i
⊢ s ⊆ t

Next tactic:
rintro i hi
theorem Set.PairwiseDisjoint.subset_of_biUnion_subset_biUnion (h₀ : (s ∪ t).PairwiseDisjoint f)
    (h₁ : ∀ i ∈ s, (f i).Nonempty) (h : ⋃ i ∈ s, f i ⊆ ⋃ i ∈ t, f i) : s ⊆ t := by
  rintro i hi
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
κ : Sort u_6
r p q : α → α → Prop
f : ι → Set α
s t : Set ι
h₀ : PairwiseDisjoint (s ∪ t) f
h₁ : ∀ i ∈ s, Set.Nonempty (f i)
h : ⋃ i ∈ s, f i ⊆ ⋃ i ∈ t, f i
i : ι
hi : i ∈ s
⊢ i ∈ t

Next tactic:
obtain ⟨a, hai⟩ := h₁ i hi
theorem Set.PairwiseDisjoint.subset_of_biUnion_subset_biUnion (h₀ : (s ∪ t).PairwiseDisjoint f)
    (h₁ : ∀ i ∈ s, (f i).Nonempty) (h : ⋃ i ∈ s, f i ⊆ ⋃ i ∈ t, f i) : s ⊆ t := by
  rintro i hi
  obtain ⟨a, hai⟩ := h₁ i hi
  

Proof state:
case intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
κ : Sort u_6
r p q : α → α → Prop
f : ι → Set α
s t : Set ι
h₀ : PairwiseDisjoint (s ∪ t) f
h₁ : ∀ i ∈ s, Set.Nonempty (f i)
h : ⋃ i ∈ s, f i ⊆ ⋃ i ∈ t, f i
i : ι
hi : i ∈ s
a : α
hai : a ∈ f i
⊢ i ∈ t

Next tactic:
obtain ⟨j, hj, haj⟩ := mem_iUnion₂.1 (h <| mem_iUnion₂_of_mem hi hai)
theorem Set.PairwiseDisjoint.subset_of_biUnion_subset_biUnion (h₀ : (s ∪ t).PairwiseDisjoint f)
    (h₁ : ∀ i ∈ s, (f i).Nonempty) (h : ⋃ i ∈ s, f i ⊆ ⋃ i ∈ t, f i) : s ⊆ t := by
  rintro i hi
  obtain ⟨a, hai⟩ := h₁ i hi
  obtain ⟨j, hj, haj⟩ := mem_iUnion₂.1 (h <| mem_iUnion₂_of_mem hi hai)
  

Proof state:
case intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
κ : Sort u_6
r p q : α → α → Prop
f : ι → Set α
s t : Set ι
h₀ : PairwiseDisjoint (s ∪ t) f
h₁ : ∀ i ∈ s, Set.Nonempty (f i)
h : ⋃ i ∈ s, f i ⊆ ⋃ i ∈ t, f i
i : ι
hi : i ∈ s
a : α
hai : a ∈ f i
j : ι
hj : j ∈ t
haj : a ∈ f j
⊢ i ∈ t

Next tactic:
rwa [h₀.eq (subset_union_left _ _ hi) (subset_union_right _ _ hj)
      (not_disjoint_iff.2 ⟨a, hai, haj⟩)]
/-- The equivalence swapping left and right.
-/
def WalkingPair.swap : WalkingPair ≃ WalkingPair
    where
  toFun j := WalkingPair.recOn j right left
  invFun j := WalkingPair.recOn j right left
  left_inv j := by 

Proof state:
j : WalkingPair
⊢ (fun j => WalkingPair.recOn j right left) ((fun j => WalkingPair.recOn j right left) j) = j

Next tactic:
cases j
/-- The equivalence swapping left and right.
-/
def WalkingPair.swap : WalkingPair ≃ WalkingPair
    where
  toFun j := WalkingPair.recOn j right left
  invFun j := WalkingPair.recOn j right left
  left_inv j := by cases j; 

Proof state:
case left
⊢ (fun j => WalkingPair.recOn j right left) ((fun j => WalkingPair.recOn j right left) left) = left
case right ⊢ (fun j => WalkingPair.recOn j right left) ((fun j => WalkingPair.recOn j right left) right) = right

Next tactic:
repeat rfl
/-- The equivalence swapping left and right.
-/
def WalkingPair.swap : WalkingPair ≃ WalkingPair
    where
  toFun j := WalkingPair.recOn j right left
  invFun j := WalkingPair.recOn j right left
  left_inv j := by cases j; repeat 

Proof state:
case left
⊢ (fun j => WalkingPair.recOn j right left) ((fun j => WalkingPair.recOn j right left) left) = left
case right ⊢ (fun j => WalkingPair.recOn j right left) ((fun j => WalkingPair.recOn j right left) right) = right

Next tactic:
rfl
/-- The equivalence swapping left and right.
-/
def WalkingPair.swap : WalkingPair ≃ WalkingPair
    where
  toFun j := WalkingPair.recOn j right left
  invFun j := WalkingPair.recOn j right left
  left_inv j := by cases j; repeat 

Proof state:
case right
⊢ (fun j => WalkingPair.recOn j right left) ((fun j => WalkingPair.recOn j right left) right) = right

Next tactic:
rfl
/-- The equivalence swapping left and right.
-/
def WalkingPair.swap : WalkingPair ≃ WalkingPair
    where
  toFun j := WalkingPair.recOn j right left
  invFun j := WalkingPair.recOn j right left
  left_inv j := by cases j; repeat 

Proof state:

Next tactic:
rfl
/-- The equivalence swapping left and right.
-/
def WalkingPair.swap : WalkingPair ≃ WalkingPair
    where
  toFun j := WalkingPair.recOn j right left
  invFun j := WalkingPair.recOn j right left
  left_inv j := by cases j; repeat rfl
  right_inv j := by 

Proof state:
j : WalkingPair
⊢ (fun j => WalkingPair.recOn j right left) ((fun j => WalkingPair.recOn j right left) j) = j

Next tactic:
cases j
/-- The equivalence swapping left and right.
-/
def WalkingPair.swap : WalkingPair ≃ WalkingPair
    where
  toFun j := WalkingPair.recOn j right left
  invFun j := WalkingPair.recOn j right left
  left_inv j := by cases j; repeat rfl
  right_inv j := by cases j; 

Proof state:
case left
⊢ (fun j => WalkingPair.recOn j right left) ((fun j => WalkingPair.recOn j right left) left) = left
case right ⊢ (fun j => WalkingPair.recOn j right left) ((fun j => WalkingPair.recOn j right left) right) = right

Next tactic:
repeat rfl
/-- The equivalence swapping left and right.
-/
def WalkingPair.swap : WalkingPair ≃ WalkingPair
    where
  toFun j := WalkingPair.recOn j right left
  invFun j := WalkingPair.recOn j right left
  left_inv j := by cases j; repeat rfl
  right_inv j := by cases j; repeat 

Proof state:
case left
⊢ (fun j => WalkingPair.recOn j right left) ((fun j => WalkingPair.recOn j right left) left) = left
case right ⊢ (fun j => WalkingPair.recOn j right left) ((fun j => WalkingPair.recOn j right left) right) = right

Next tactic:
rfl
/-- The equivalence swapping left and right.
-/
def WalkingPair.swap : WalkingPair ≃ WalkingPair
    where
  toFun j := WalkingPair.recOn j right left
  invFun j := WalkingPair.recOn j right left
  left_inv j := by cases j; repeat rfl
  right_inv j := by cases j; repeat 

Proof state:
case right
⊢ (fun j => WalkingPair.recOn j right left) ((fun j => WalkingPair.recOn j right left) right) = right

Next tactic:
rfl
/-- The equivalence swapping left and right.
-/
def WalkingPair.swap : WalkingPair ≃ WalkingPair
    where
  toFun j := WalkingPair.recOn j right left
  invFun j := WalkingPair.recOn j right left
  left_inv j := by cases j; repeat rfl
  right_inv j := by cases j; repeat 

Proof state:

Next tactic:
rfl
/-- An equivalence from `WalkingPair` to `Bool`, sometimes useful when reindexing limits.
-/
def WalkingPair.equivBool : WalkingPair ≃ Bool
    where
  toFun j := WalkingPair.recOn j true false
  -- to match equiv.sum_equiv_sigma_bool
  invFun b := Bool.recOn b right left
  left_inv j := by 

Proof state:
j : WalkingPair
⊢ (fun b => Bool.recOn b right left) ((fun j => WalkingPair.recOn j true false) j) = j

Next tactic:
cases j
/-- An equivalence from `WalkingPair` to `Bool`, sometimes useful when reindexing limits.
-/
def WalkingPair.equivBool : WalkingPair ≃ Bool
    where
  toFun j := WalkingPair.recOn j true false
  -- to match equiv.sum_equiv_sigma_bool
  invFun b := Bool.recOn b right left
  left_inv j := by cases j; 

Proof state:
case left
⊢ (fun b => Bool.recOn b right left) ((fun j => WalkingPair.recOn j true false) left) = left
case right ⊢ (fun b => Bool.recOn b right left) ((fun j => WalkingPair.recOn j true false) right) = right

Next tactic:
repeat rfl
/-- An equivalence from `WalkingPair` to `Bool`, sometimes useful when reindexing limits.
-/
def WalkingPair.equivBool : WalkingPair ≃ Bool
    where
  toFun j := WalkingPair.recOn j true false
  -- to match equiv.sum_equiv_sigma_bool
  invFun b := Bool.recOn b right left
  left_inv j := by cases j; repeat 

Proof state:
case left
⊢ (fun b => Bool.recOn b right left) ((fun j => WalkingPair.recOn j true false) left) = left
case right ⊢ (fun b => Bool.recOn b right left) ((fun j => WalkingPair.recOn j true false) right) = right

Next tactic:
rfl
/-- An equivalence from `WalkingPair` to `Bool`, sometimes useful when reindexing limits.
-/
def WalkingPair.equivBool : WalkingPair ≃ Bool
    where
  toFun j := WalkingPair.recOn j true false
  -- to match equiv.sum_equiv_sigma_bool
  invFun b := Bool.recOn b right left
  left_inv j := by cases j; repeat 

Proof state:
case right
⊢ (fun b => Bool.recOn b right left) ((fun j => WalkingPair.recOn j true false) right) = right

Next tactic:
rfl
/-- An equivalence from `WalkingPair` to `Bool`, sometimes useful when reindexing limits.
-/
def WalkingPair.equivBool : WalkingPair ≃ Bool
    where
  toFun j := WalkingPair.recOn j true false
  -- to match equiv.sum_equiv_sigma_bool
  invFun b := Bool.recOn b right left
  left_inv j := by cases j; repeat 

Proof state:

Next tactic:
rfl
/-- An equivalence from `WalkingPair` to `Bool`, sometimes useful when reindexing limits.
-/
def WalkingPair.equivBool : WalkingPair ≃ Bool
    where
  toFun j := WalkingPair.recOn j true false
  -- to match equiv.sum_equiv_sigma_bool
  invFun b := Bool.recOn b right left
  left_inv j := by cases j; repeat rfl
  right_inv b := by 

Proof state:
b : Bool
⊢ (fun j => WalkingPair.recOn j true false) ((fun b => Bool.recOn b right left) b) = b

Next tactic:
cases b
/-- An equivalence from `WalkingPair` to `Bool`, sometimes useful when reindexing limits.
-/
def WalkingPair.equivBool : WalkingPair ≃ Bool
    where
  toFun j := WalkingPair.recOn j true false
  -- to match equiv.sum_equiv_sigma_bool
  invFun b := Bool.recOn b right left
  left_inv j := by cases j; repeat rfl
  right_inv b := by cases b; 

Proof state:
case false
⊢ (fun j => WalkingPair.recOn j true false) ((fun b => Bool.recOn b right left) false) = false
case true ⊢ (fun j => WalkingPair.recOn j true false) ((fun b => Bool.recOn b right left) true) = true

Next tactic:
repeat rfl