l3lab/ntp-mathlib huggingface dataset:
theorem supIndep_singleton (i : ι) (f : ι → α) : ({i} : Finset ι).SupIndep f :=
  fun s hs j hji hj => by
    

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝¹ : Lattice α
inst✝ : OrderBot α
s✝ t : Finset ι
f✝ : ι → α
i✝ i : ι
f : ι → α
s : Finset ι
hs : s ⊆ {i}
j : ι
hji : j ∈ {i}
hj : j ∉ s
⊢ Disjoint (f j) (sup s f)

Next tactic:
rw [eq_empty_of_ssubset_singleton ⟨hs, fun h => hj (h hji)⟩, sup_empty]
theorem supIndep_singleton (i : ι) (f : ι → α) : ({i} : Finset ι).SupIndep f :=
  fun s hs j hji hj => by
    rw [eq_empty_of_ssubset_singleton ⟨hs, fun h => hj (h hji)⟩, sup_empty]
    

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝¹ : Lattice α
inst✝ : OrderBot α
s✝ t : Finset ι
f✝ : ι → α
i✝ i : ι
f : ι → α
s : Finset ι
hs : s ⊆ {i}
j : ι
hji : j ∈ {i}
hj : j ∉ s
⊢ Disjoint (f j) ⊥

Next tactic:
exact disjoint_bot_right
theorem SupIndep.le_sup_iff (hs : s.SupIndep f) (hts : t ⊆ s) (hi : i ∈ s) (hf : ∀ i, f i ≠ ⊥) :
    f i ≤ t.sup f ↔ i ∈ t := by
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝¹ : Lattice α
inst✝ : OrderBot α
s t : Finset ι
f : ι → α
i : ι
hs : SupIndep s f
hts : t ⊆ s
hi : i ∈ s
hf : ∀ (i : ι), f i ≠ ⊥
⊢ f i ≤ sup t f ↔ i ∈ t

Next tactic:
refine' ⟨fun h => _, le_sup⟩
theorem SupIndep.le_sup_iff (hs : s.SupIndep f) (hts : t ⊆ s) (hi : i ∈ s) (hf : ∀ i, f i ≠ ⊥) :
    f i ≤ t.sup f ↔ i ∈ t := by
  refine' ⟨fun h => _, le_sup⟩
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝¹ : Lattice α
inst✝ : OrderBot α
s t : Finset ι
f : ι → α
i : ι
hs : SupIndep s f
hts : t ⊆ s
hi : i ∈ s
hf : ∀ (i : ι), f i ≠ ⊥
h : f i ≤ sup t f
⊢ i ∈ t

Next tactic:
by_contra hit
theorem SupIndep.le_sup_iff (hs : s.SupIndep f) (hts : t ⊆ s) (hi : i ∈ s) (hf : ∀ i, f i ≠ ⊥) :
    f i ≤ t.sup f ↔ i ∈ t := by
  refine' ⟨fun h => _, le_sup⟩
  by_contra hit
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝¹ : Lattice α
inst✝ : OrderBot α
s t : Finset ι
f : ι → α
i : ι
hs : SupIndep s f
hts : t ⊆ s
hi : i ∈ s
hf : ∀ (i : ι), f i ≠ ⊥
h : f i ≤ sup t f
hit : i ∉ t
⊢ False

Next tactic:
exact hf i (disjoint_self.1 <| (hs hts hi hit).mono_right h)
theorem SupIndep.image [DecidableEq ι] {s : Finset ι'} {g : ι' → ι} (hs : s.SupIndep (f ∘ g)) :
    (s.image g).SupIndep f := by
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝² : Lattice α
inst✝¹ : OrderBot α
s✝ t : Finset ι
f : ι → α
i : ι
inst✝ : DecidableEq ι
s : Finset ι'
g : ι' → ι
hs : SupIndep s (f ∘ g)
⊢ SupIndep (Finset.image g s) f

Next tactic:
intro t ht i hi hit
theorem SupIndep.image [DecidableEq ι] {s : Finset ι'} {g : ι' → ι} (hs : s.SupIndep (f ∘ g)) :
    (s.image g).SupIndep f := by
  intro t ht i hi hit
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝² : Lattice α
inst✝¹ : OrderBot α
s✝ t✝ : Finset ι
f : ι → α
i✝ : ι
inst✝ : DecidableEq ι
s : Finset ι'
g : ι' → ι
hs : SupIndep s (f ∘ g)
t : Finset ι
ht : t ⊆ Finset.image g s
i : ι
hi : i ∈ Finset.image g s
hit : i ∉ t
⊢ Disjoint (f i) (sup t f)

Next tactic:
rw [mem_image] at hi
theorem SupIndep.image [DecidableEq ι] {s : Finset ι'} {g : ι' → ι} (hs : s.SupIndep (f ∘ g)) :
    (s.image g).SupIndep f := by
  intro t ht i hi hit
  rw [mem_image] at hi
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝² : Lattice α
inst✝¹ : OrderBot α
s✝ t✝ : Finset ι
f : ι → α
i✝ : ι
inst✝ : DecidableEq ι
s : Finset ι'
g : ι' → ι
hs : SupIndep s (f ∘ g)
t : Finset ι
ht : t ⊆ Finset.image g s
i : ι
hi : ∃ a ∈ s, g a = i
hit : i ∉ t
⊢ Disjoint (f i) (sup t f)

Next tactic:
obtain ⟨i, hi, rfl⟩ := hi
theorem SupIndep.image [DecidableEq ι] {s : Finset ι'} {g : ι' → ι} (hs : s.SupIndep (f ∘ g)) :
    (s.image g).SupIndep f := by
  intro t ht i hi hit
  rw [mem_image] at hi
  obtain ⟨i, hi, rfl⟩ := hi
  

Proof state:
case intro.intro
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝² : Lattice α
inst✝¹ : OrderBot α
s✝ t✝ : Finset ι
f : ι → α
i✝ : ι
inst✝ : DecidableEq ι
s : Finset ι'
g : ι' → ι
hs : SupIndep s (f ∘ g)
t : Finset ι
ht : t ⊆ Finset.image g s
i : ι'
hi : i ∈ s
hit : g i ∉ t
⊢ Disjoint (f (g i)) (sup t f)

Next tactic:
haveI : DecidableEq ι' := Classical.decEq _
theorem SupIndep.image [DecidableEq ι] {s : Finset ι'} {g : ι' → ι} (hs : s.SupIndep (f ∘ g)) :
    (s.image g).SupIndep f := by
  intro t ht i hi hit
  rw [mem_image] at hi
  obtain ⟨i, hi, rfl⟩ := hi
  haveI : DecidableEq ι' := Classical.decEq _
  

Proof state:
case intro.intro
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝² : Lattice α
inst✝¹ : OrderBot α
s✝ t✝ : Finset ι
f : ι → α
i✝ : ι
inst✝ : DecidableEq ι
s : Finset ι'
g : ι' → ι
hs : SupIndep s (f ∘ g)
t : Finset ι
ht : t ⊆ Finset.image g s
i : ι'
hi : i ∈ s
hit : g i ∉ t
this : DecidableEq ι'
⊢ Disjoint (f (g i)) (sup t f)

Next tactic:
suffices hts : t ⊆ (s.erase i).image g by
    refine' (supIndep_iff_disjoint_erase.1 hs i hi).mono_right ((sup_mono hts).trans _)
    rw [sup_image]
theorem SupIndep.image [DecidableEq ι] {s : Finset ι'} {g : ι' → ι} (hs : s.SupIndep (f ∘ g)) :
    (s.image g).SupIndep f := by
  intro t ht i hi hit
  rw [mem_image] at hi
  obtain ⟨i, hi, rfl⟩ := hi
  haveI : DecidableEq ι' := Classical.decEq _
  suffices hts : t ⊆ (s.erase i).image g by
    

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝² : Lattice α
inst✝¹ : OrderBot α
s✝ t✝ : Finset ι
f : ι → α
i✝ : ι
inst✝ : DecidableEq ι
s : Finset ι'
g : ι' → ι
hs : SupIndep s (f ∘ g)
t : Finset ι
ht : t ⊆ Finset.image g s
i : ι'
hi : i ∈ s
hit : g i ∉ t
this : DecidableEq ι'
hts : t ⊆ Finset.image g (erase s i)
⊢ Disjoint (f (g i)) (sup t f)

Next tactic:
refine' (supIndep_iff_disjoint_erase.1 hs i hi).mono_right ((sup_mono hts).trans _)
theorem SupIndep.image [DecidableEq ι] {s : Finset ι'} {g : ι' → ι} (hs : s.SupIndep (f ∘ g)) :
    (s.image g).SupIndep f := by
  intro t ht i hi hit
  rw [mem_image] at hi
  obtain ⟨i, hi, rfl⟩ := hi
  haveI : DecidableEq ι' := Classical.decEq _
  suffices hts : t ⊆ (s.erase i).image g by
    refine' (supIndep_iff_disjoint_erase.1 hs i hi).mono_right ((sup_mono hts).trans _)
    

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝² : Lattice α
inst✝¹ : OrderBot α
s✝ t✝ : Finset ι
f : ι → α
i✝ : ι
inst✝ : DecidableEq ι
s : Finset ι'
g : ι' → ι
hs : SupIndep s (f ∘ g)
t : Finset ι
ht : t ⊆ Finset.image g s
i : ι'
hi : i ∈ s
hit : g i ∉ t
this : DecidableEq ι'
hts : t ⊆ Finset.image g (erase s i)
⊢ sup (Finset.image g (erase s i)) f ≤ sup (erase s i) (f ∘ g)

Next tactic:
rw [sup_image]
theorem SupIndep.image [DecidableEq ι] {s : Finset ι'} {g : ι' → ι} (hs : s.SupIndep (f ∘ g)) :
    (s.image g).SupIndep f := by
  intro t ht i hi hit
  rw [mem_image] at hi
  obtain ⟨i, hi, rfl⟩ := hi
  haveI : DecidableEq ι' := Classical.decEq _
  suffices hts : t ⊆ (s.erase i).image g by
    refine' (supIndep_iff_disjoint_erase.1 hs i hi).mono_right ((sup_mono hts).trans _)
    rw [sup_image]
  

Proof state:
case intro.intro
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝² : Lattice α
inst✝¹ : OrderBot α
s✝ t✝ : Finset ι
f : ι → α
i✝ : ι
inst✝ : DecidableEq ι
s : Finset ι'
g : ι' → ι
hs : SupIndep s (f ∘ g)
t : Finset ι
ht : t ⊆ Finset.image g s
i : ι'
hi : i ∈ s
hit : g i ∉ t
this : DecidableEq ι'
⊢ t ⊆ Finset.image g (erase s i)

Next tactic:
rintro j hjt
theorem SupIndep.image [DecidableEq ι] {s : Finset ι'} {g : ι' → ι} (hs : s.SupIndep (f ∘ g)) :
    (s.image g).SupIndep f := by
  intro t ht i hi hit
  rw [mem_image] at hi
  obtain ⟨i, hi, rfl⟩ := hi
  haveI : DecidableEq ι' := Classical.decEq _
  suffices hts : t ⊆ (s.erase i).image g by
    refine' (supIndep_iff_disjoint_erase.1 hs i hi).mono_right ((sup_mono hts).trans _)
    rw [sup_image]
  rintro j hjt
  

Proof state:
case intro.intro
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝² : Lattice α
inst✝¹ : OrderBot α
s✝ t✝ : Finset ι
f : ι → α
i✝ : ι
inst✝ : DecidableEq ι
s : Finset ι'
g : ι' → ι
hs : SupIndep s (f ∘ g)
t : Finset ι
ht : t ⊆ Finset.image g s
i : ι'
hi : i ∈ s
hit : g i ∉ t
this : DecidableEq ι'
j : ι
hjt : j ∈ t
⊢ j ∈ Finset.image g (erase s i)

Next tactic:
obtain ⟨j, hj, rfl⟩ := mem_image.1 (ht hjt)
theorem SupIndep.image [DecidableEq ι] {s : Finset ι'} {g : ι' → ι} (hs : s.SupIndep (f ∘ g)) :
    (s.image g).SupIndep f := by
  intro t ht i hi hit
  rw [mem_image] at hi
  obtain ⟨i, hi, rfl⟩ := hi
  haveI : DecidableEq ι' := Classical.decEq _
  suffices hts : t ⊆ (s.erase i).image g by
    refine' (supIndep_iff_disjoint_erase.1 hs i hi).mono_right ((sup_mono hts).trans _)
    rw [sup_image]
  rintro j hjt
  obtain ⟨j, hj, rfl⟩ := mem_image.1 (ht hjt)
  

Proof state:
case intro.intro.intro.intro
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝² : Lattice α
inst✝¹ : OrderBot α
s✝ t✝ : Finset ι
f : ι → α
i✝ : ι
inst✝ : DecidableEq ι
s : Finset ι'
g : ι' → ι
hs : SupIndep s (f ∘ g)
t : Finset ι
ht : t ⊆ Finset.image g s
i : ι'
hi : i ∈ s
hit : g i ∉ t
this : DecidableEq ι'
j : ι'
hj : j ∈ s
hjt : g j ∈ t
⊢ g j ∈ Finset.image g (erase s i)

Next tactic:
exact mem_image_of_mem _ (mem_erase.2 ⟨ne_of_apply_ne g (ne_of_mem_of_not_mem hjt hit), hj⟩)
theorem supIndep_map {s : Finset ι'} {g : ι' ↪ ι} : (s.map g).SupIndep f ↔ s.SupIndep (f ∘ g) := by
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝¹ : Lattice α
inst✝ : OrderBot α
s✝ t : Finset ι
f : ι → α
i : ι
s : Finset ι'
g : ι' ↪ ι
⊢ SupIndep (map g s) f ↔ SupIndep s (f ∘ ⇑g)

Next tactic:
refine' ⟨fun hs t ht i hi hit => _, fun hs => _⟩
theorem supIndep_map {s : Finset ι'} {g : ι' ↪ ι} : (s.map g).SupIndep f ↔ s.SupIndep (f ∘ g) := by
  refine' ⟨fun hs t ht i hi hit => _, fun hs => _⟩
  · 

Proof state:
case refine'_1
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝¹ : Lattice α
inst✝ : OrderBot α
s✝ t✝ : Finset ι
f : ι → α
i✝ : ι
s : Finset ι'
g : ι' ↪ ι
hs : SupIndep (map g s) f
t : Finset ι'
ht : t ⊆ s
i : ι'
hi : i ∈ s
hit : i ∉ t
⊢ Disjoint ((f ∘ ⇑g) i) (sup t (f ∘ ⇑g))

Next tactic:
rw [← sup_map]
theorem supIndep_map {s : Finset ι'} {g : ι' ↪ ι} : (s.map g).SupIndep f ↔ s.SupIndep (f ∘ g) := by
  refine' ⟨fun hs t ht i hi hit => _, fun hs => _⟩
  · rw [← sup_map]
    

Proof state:
case refine'_1
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝¹ : Lattice α
inst✝ : OrderBot α
s✝ t✝ : Finset ι
f : ι → α
i✝ : ι
s : Finset ι'
g : ι' ↪ ι
hs : SupIndep (map g s) f
t : Finset ι'
ht : t ⊆ s
i : ι'
hi : i ∈ s
hit : i ∉ t
⊢ Disjoint ((f ∘ ⇑g) i) (sup (map g t) f)

Next tactic:
exact hs (map_subset_map.2 ht) ((mem_map' _).2 hi) (by rwa [mem_map'])
theorem supIndep_map {s : Finset ι'} {g : ι' ↪ ι} : (s.map g).SupIndep f ↔ s.SupIndep (f ∘ g) := by
  refine' ⟨fun hs t ht i hi hit => _, fun hs => _⟩
  · rw [← sup_map]
    exact hs (map_subset_map.2 ht) ((mem_map' _).2 hi) (by 

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝¹ : Lattice α
inst✝ : OrderBot α
s✝ t✝ : Finset ι
f : ι → α
i✝ : ι
s : Finset ι'
g : ι' ↪ ι
hs : SupIndep (map g s) f
t : Finset ι'
ht : t ⊆ s
i : ι'
hi : i ∈ s
hit : i ∉ t
⊢ g i ∉ map g t

Next tactic:
rwa [mem_map']
theorem supIndep_map {s : Finset ι'} {g : ι' ↪ ι} : (s.map g).SupIndep f ↔ s.SupIndep (f ∘ g) := by
  refine' ⟨fun hs t ht i hi hit => _, fun hs => _⟩
  · rw [← sup_map]
    exact hs (map_subset_map.2 ht) ((mem_map' _).2 hi) (by rwa [mem_map'])
  · 

Proof state:
case refine'_2
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝¹ : Lattice α
inst✝ : OrderBot α
s✝ t : Finset ι
f : ι → α
i : ι
s : Finset ι'
g : ι' ↪ ι
hs : SupIndep s (f ∘ ⇑g)
⊢ SupIndep (map g s) f

Next tactic:
classical
    rw [map_eq_image]
    exact hs.image
theorem supIndep_map {s : Finset ι'} {g : ι' ↪ ι} : (s.map g).SupIndep f ↔ s.SupIndep (f ∘ g) := by
  refine' ⟨fun hs t ht i hi hit => _, fun hs => _⟩
  · rw [← sup_map]
    exact hs (map_subset_map.2 ht) ((mem_map' _).2 hi) (by rwa [mem_map'])
  · classical
    

Proof state:
case refine'_2
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝¹ : Lattice α
inst✝ : OrderBot α
s✝ t : Finset ι
f : ι → α
i : ι
s : Finset ι'
g : ι' ↪ ι
hs : SupIndep s (f ∘ ⇑g)
⊢ SupIndep (map g s) f

Next tactic:
rw [map_eq_image]
theorem supIndep_map {s : Finset ι'} {g : ι' ↪ ι} : (s.map g).SupIndep f ↔ s.SupIndep (f ∘ g) := by
  refine' ⟨fun hs t ht i hi hit => _, fun hs => _⟩
  · rw [← sup_map]
    exact hs (map_subset_map.2 ht) ((mem_map' _).2 hi) (by rwa [mem_map'])
  · classical
    rw [map_eq_image]
    

Proof state:
case refine'_2
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝¹ : Lattice α
inst✝ : OrderBot α
s✝ t : Finset ι
f : ι → α
i : ι
s : Finset ι'
g : ι' ↪ ι
hs : SupIndep s (f ∘ ⇑g)
⊢ SupIndep (image (⇑g) s) f

Next tactic:
exact hs.image
@[simp]
theorem supIndep_pair [DecidableEq ι] {i j : ι} (hij : i ≠ j) :
    ({i, j} : Finset ι).SupIndep f ↔ Disjoint (f i) (f j) :=
  ⟨fun h => h.pairwiseDisjoint (by 

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝² : Lattice α
inst✝¹ : OrderBot α
s t : Finset ι
f : ι → α
i✝ : ι
inst✝ : DecidableEq ι
i j : ι
hij : i ≠ j
h : SupIndep {i, j} f
⊢ i ∈ ↑{i, j}

Next tactic:
simp
@[simp]
theorem supIndep_pair [DecidableEq ι] {i j : ι} (hij : i ≠ j) :
    ({i, j} : Finset ι).SupIndep f ↔ Disjoint (f i) (f j) :=
  ⟨fun h => h.pairwiseDisjoint (by simp) (by 

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝² : Lattice α
inst✝¹ : OrderBot α
s t : Finset ι
f : ι → α
i✝ : ι
inst✝ : DecidableEq ι
i j : ι
hij : i ≠ j
h : SupIndep {i, j} f
⊢ j ∈ ↑{i, j}

Next tactic:
simp
@[simp]
theorem supIndep_pair [DecidableEq ι] {i j : ι} (hij : i ≠ j) :
    ({i, j} : Finset ι).SupIndep f ↔ Disjoint (f i) (f j) :=
  ⟨fun h => h.pairwiseDisjoint (by simp) (by simp) hij,
   fun h => by
    

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝² : Lattice α
inst✝¹ : OrderBot α
s t : Finset ι
f : ι → α
i✝ : ι
inst✝ : DecidableEq ι
i j : ι
hij : i ≠ j
h : Disjoint (f i) (f j)
⊢ SupIndep {i, j} f

Next tactic:
rw [supIndep_iff_disjoint_erase]
@[simp]
theorem supIndep_pair [DecidableEq ι] {i j : ι} (hij : i ≠ j) :
    ({i, j} : Finset ι).SupIndep f ↔ Disjoint (f i) (f j) :=
  ⟨fun h => h.pairwiseDisjoint (by simp) (by simp) hij,
   fun h => by
    rw [supIndep_iff_disjoint_erase]
    

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝² : Lattice α
inst✝¹ : OrderBot α
s t : Finset ι
f : ι → α
i✝ : ι
inst✝ : DecidableEq ι
i j : ι
hij : i ≠ j
h : Disjoint (f i) (f j)
⊢ ∀ i_1 ∈ {i, j}, Disjoint (f i_1) (sup (erase {i, j} i_1) f)

Next tactic:
intro k hk
@[simp]
theorem supIndep_pair [DecidableEq ι] {i j : ι} (hij : i ≠ j) :
    ({i, j} : Finset ι).SupIndep f ↔ Disjoint (f i) (f j) :=
  ⟨fun h => h.pairwiseDisjoint (by simp) (by simp) hij,
   fun h => by
    rw [supIndep_iff_disjoint_erase]
    intro k hk
    

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝² : Lattice α
inst✝¹ : OrderBot α
s t : Finset ι
f : ι → α
i✝ : ι
inst✝ : DecidableEq ι
i j : ι
hij : i ≠ j
h : Disjoint (f i) (f j)
k : ι
hk : k ∈ {i, j}
⊢ Disjoint (f k) (sup (erase {i, j} k) f)

Next tactic:
rw [Finset.mem_insert, Finset.mem_singleton] at hk
@[simp]
theorem supIndep_pair [DecidableEq ι] {i j : ι} (hij : i ≠ j) :
    ({i, j} : Finset ι).SupIndep f ↔ Disjoint (f i) (f j) :=
  ⟨fun h => h.pairwiseDisjoint (by simp) (by simp) hij,
   fun h => by
    rw [supIndep_iff_disjoint_erase]
    intro k hk
    rw [Finset.mem_insert, Finset.mem_singleton] at hk
    

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝² : Lattice α
inst✝¹ : OrderBot α
s t : Finset ι
f : ι → α
i✝ : ι
inst✝ : DecidableEq ι
i j : ι
hij : i ≠ j
h : Disjoint (f i) (f j)
k : ι
hk : k = i ∨ k = j
⊢ Disjoint (f k) (sup (erase {i, j} k) f)

Next tactic:
obtain rfl | rfl := hk
@[simp]
theorem supIndep_pair [DecidableEq ι] {i j : ι} (hij : i ≠ j) :
    ({i, j} : Finset ι).SupIndep f ↔ Disjoint (f i) (f j) :=
  ⟨fun h => h.pairwiseDisjoint (by simp) (by simp) hij,
   fun h => by
    rw [supIndep_iff_disjoint_erase]
    intro k hk
    rw [Finset.mem_insert, Finset.mem_singleton] at hk
    obtain rfl | rfl := hk
    · 

Proof state:
case inl
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝² : Lattice α
inst✝¹ : OrderBot α
s t : Finset ι
f : ι → α
i : ι
inst✝ : DecidableEq ι
j k : ι
hij : k ≠ j
h : Disjoint (f k) (f j)
⊢ Disjoint (f k) (sup (erase {k, j} k) f)

Next tactic:
convert h using 1
@[simp]
theorem supIndep_pair [DecidableEq ι] {i j : ι} (hij : i ≠ j) :
    ({i, j} : Finset ι).SupIndep f ↔ Disjoint (f i) (f j) :=
  ⟨fun h => h.pairwiseDisjoint (by simp) (by simp) hij,
   fun h => by
    rw [supIndep_iff_disjoint_erase]
    intro k hk
    rw [Finset.mem_insert, Finset.mem_singleton] at hk
    obtain rfl | rfl := hk
    · convert h using 1
      

Proof state:
case h.e'_5
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝² : Lattice α
inst✝¹ : OrderBot α
s t : Finset ι
f : ι → α
i : ι
inst✝ : DecidableEq ι
j k : ι
hij : k ≠ j
h : Disjoint (f k) (f j)
⊢ sup (erase {k, j} k) f = f j

Next tactic:
rw [Finset.erase_insert, Finset.sup_singleton]
@[simp]
theorem supIndep_pair [DecidableEq ι] {i j : ι} (hij : i ≠ j) :
    ({i, j} : Finset ι).SupIndep f ↔ Disjoint (f i) (f j) :=
  ⟨fun h => h.pairwiseDisjoint (by simp) (by simp) hij,
   fun h => by
    rw [supIndep_iff_disjoint_erase]
    intro k hk
    rw [Finset.mem_insert, Finset.mem_singleton] at hk
    obtain rfl | rfl := hk
    · convert h using 1
      rw [Finset.erase_insert, Finset.sup_singleton]
      

Proof state:
case h.e'_5
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝² : Lattice α
inst✝¹ : OrderBot α
s t : Finset ι
f : ι → α
i : ι
inst✝ : DecidableEq ι
j k : ι
hij : k ≠ j
h : Disjoint (f k) (f j)
⊢ k ∉ {j}

Next tactic:
simpa using hij
@[simp]
theorem supIndep_pair [DecidableEq ι] {i j : ι} (hij : i ≠ j) :
    ({i, j} : Finset ι).SupIndep f ↔ Disjoint (f i) (f j) :=
  ⟨fun h => h.pairwiseDisjoint (by simp) (by simp) hij,
   fun h => by
    rw [supIndep_iff_disjoint_erase]
    intro k hk
    rw [Finset.mem_insert, Finset.mem_singleton] at hk
    obtain rfl | rfl := hk
    · convert h using 1
      rw [Finset.erase_insert, Finset.sup_singleton]
      simpa using hij
    · 

Proof state:
case inr
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝² : Lattice α
inst✝¹ : OrderBot α
s t : Finset ι
f : ι → α
i✝ : ι
inst✝ : DecidableEq ι
i k : ι
hij : i ≠ k
h : Disjoint (f i) (f k)
⊢ Disjoint (f k) (sup (erase {i, k} k) f)

Next tactic:
convert h.symm using 1
@[simp]
theorem supIndep_pair [DecidableEq ι] {i j : ι} (hij : i ≠ j) :
    ({i, j} : Finset ι).SupIndep f ↔ Disjoint (f i) (f j) :=
  ⟨fun h => h.pairwiseDisjoint (by simp) (by simp) hij,
   fun h => by
    rw [supIndep_iff_disjoint_erase]
    intro k hk
    rw [Finset.mem_insert, Finset.mem_singleton] at hk
    obtain rfl | rfl := hk
    · convert h using 1
      rw [Finset.erase_insert, Finset.sup_singleton]
      simpa using hij
    · convert h.symm using 1
      

Proof state:
case h.e'_5
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝² : Lattice α
inst✝¹ : OrderBot α
s t : Finset ι
f : ι → α
i✝ : ι
inst✝ : DecidableEq ι
i k : ι
hij : i ≠ k
h : Disjoint (f i) (f k)
⊢ sup (erase {i, k} k) f = f i

Next tactic:
have : ({i, k} : Finset ι).erase k = {i} := by
        ext
        rw [mem_erase, mem_insert, mem_singleton, mem_singleton, and_or_left, Ne.def,
          not_and_self_iff, or_false_iff, and_iff_right_of_imp]
        rintro rfl
        exact hij
@[simp]
theorem supIndep_pair [DecidableEq ι] {i j : ι} (hij : i ≠ j) :
    ({i, j} : Finset ι).SupIndep f ↔ Disjoint (f i) (f j) :=
  ⟨fun h => h.pairwiseDisjoint (by simp) (by simp) hij,
   fun h => by
    rw [supIndep_iff_disjoint_erase]
    intro k hk
    rw [Finset.mem_insert, Finset.mem_singleton] at hk
    obtain rfl | rfl := hk
    · convert h using 1
      rw [Finset.erase_insert, Finset.sup_singleton]
      simpa using hij
    · convert h.symm using 1
      have : ({i, k} : Finset ι).erase k = {i} := by
        

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝² : Lattice α
inst✝¹ : OrderBot α
s t : Finset ι
f : ι → α
i✝ : ι
inst✝ : DecidableEq ι
i k : ι
hij : i ≠ k
h : Disjoint (f i) (f k)
⊢ erase {i, k} k = {i}

Next tactic:
ext
@[simp]
theorem supIndep_pair [DecidableEq ι] {i j : ι} (hij : i ≠ j) :
    ({i, j} : Finset ι).SupIndep f ↔ Disjoint (f i) (f j) :=
  ⟨fun h => h.pairwiseDisjoint (by simp) (by simp) hij,
   fun h => by
    rw [supIndep_iff_disjoint_erase]
    intro k hk
    rw [Finset.mem_insert, Finset.mem_singleton] at hk
    obtain rfl | rfl := hk
    · convert h using 1
      rw [Finset.erase_insert, Finset.sup_singleton]
      simpa using hij
    · convert h.symm using 1
      have : ({i, k} : Finset ι).erase k = {i} := by
        ext
        

Proof state:
case a
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝² : Lattice α
inst✝¹ : OrderBot α
s t : Finset ι
f : ι → α
i✝ : ι
inst✝ : DecidableEq ι
i k : ι
hij : i ≠ k
h : Disjoint (f i) (f k)
a✝ : ι
⊢ a✝ ∈ erase {i, k} k ↔ a✝ ∈ {i}

Next tactic:
rw [mem_erase, mem_insert, mem_singleton, mem_singleton, and_or_left, Ne.def,
          not_and_self_iff, or_false_iff, and_iff_right_of_imp]
@[simp]
theorem supIndep_pair [DecidableEq ι] {i j : ι} (hij : i ≠ j) :
    ({i, j} : Finset ι).SupIndep f ↔ Disjoint (f i) (f j) :=
  ⟨fun h => h.pairwiseDisjoint (by simp) (by simp) hij,
   fun h => by
    rw [supIndep_iff_disjoint_erase]
    intro k hk
    rw [Finset.mem_insert, Finset.mem_singleton] at hk
    obtain rfl | rfl := hk
    · convert h using 1
      rw [Finset.erase_insert, Finset.sup_singleton]
      simpa using hij
    · convert h.symm using 1
      have : ({i, k} : Finset ι).erase k = {i} := by
        ext
        rw [mem_erase, mem_insert, mem_singleton, mem_singleton, and_or_left, Ne.def,
          not_and_self_iff, or_false_iff, and_iff_right_of_imp]
        

Proof state:
case a
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝² : Lattice α
inst✝¹ : OrderBot α
s t : Finset ι
f : ι → α
i✝ : ι
inst✝ : DecidableEq ι
i k : ι
hij : i ≠ k
h : Disjoint (f i) (f k)
a✝ : ι
⊢ a✝ = i → ¬a✝ = k

Next tactic:
rintro rfl
@[simp]
theorem supIndep_pair [DecidableEq ι] {i j : ι} (hij : i ≠ j) :
    ({i, j} : Finset ι).SupIndep f ↔ Disjoint (f i) (f j) :=
  ⟨fun h => h.pairwiseDisjoint (by simp) (by simp) hij,
   fun h => by
    rw [supIndep_iff_disjoint_erase]
    intro k hk
    rw [Finset.mem_insert, Finset.mem_singleton] at hk
    obtain rfl | rfl := hk
    · convert h using 1
      rw [Finset.erase_insert, Finset.sup_singleton]
      simpa using hij
    · convert h.symm using 1
      have : ({i, k} : Finset ι).erase k = {i} := by
        ext
        rw [mem_erase, mem_insert, mem_singleton, mem_singleton, and_or_left, Ne.def,
          not_and_self_iff, or_false_iff, and_iff_right_of_imp]
        rintro rfl
        

Proof state:
case a
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝² : Lattice α
inst✝¹ : OrderBot α
s t : Finset ι
f : ι → α
i : ι
inst✝ : DecidableEq ι
k a✝ : ι
hij : a✝ ≠ k
h : Disjoint (f a✝) (f k)
⊢ ¬a✝ = k

Next tactic:
exact hij
@[simp]
theorem supIndep_pair [DecidableEq ι] {i j : ι} (hij : i ≠ j) :
    ({i, j} : Finset ι).SupIndep f ↔ Disjoint (f i) (f j) :=
  ⟨fun h => h.pairwiseDisjoint (by simp) (by simp) hij,
   fun h => by
    rw [supIndep_iff_disjoint_erase]
    intro k hk
    rw [Finset.mem_insert, Finset.mem_singleton] at hk
    obtain rfl | rfl := hk
    · convert h using 1
      rw [Finset.erase_insert, Finset.sup_singleton]
      simpa using hij
    · convert h.symm using 1
      have : ({i, k} : Finset ι).erase k = {i} := by
        ext
        rw [mem_erase, mem_insert, mem_singleton, mem_singleton, and_or_left, Ne.def,
          not_and_self_iff, or_false_iff, and_iff_right_of_imp]
        rintro rfl
        exact hij
      

Proof state:
case h.e'_5
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝² : Lattice α
inst✝¹ : OrderBot α
s t : Finset ι
f : ι → α
i✝ : ι
inst✝ : DecidableEq ι
i k : ι
hij : i ≠ k
h : Disjoint (f i) (f k)
this : erase {i, k} k = {i}
⊢ sup (erase {i, k} k) f = f i

Next tactic:
rw [this, Finset.sup_singleton]