l3lab/ntp-mathlib huggingface dataset:
theorem supIndep_univ_bool (f : Bool → α) :
    (Finset.univ : Finset Bool).SupIndep f ↔ Disjoint (f false) (f true) :=
  haveI : true ≠ false := by 

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝¹ : Lattice α
inst✝ : OrderBot α
s t : Finset ι
f✝ : ι → α
i : ι
f : Bool → α
⊢ true ≠ false

Next tactic:
simp only [Ne.def, not_false_iff]
@[simp]
theorem supIndep_univ_fin_two (f : Fin 2 → α) :
    (Finset.univ : Finset (Fin 2)).SupIndep f ↔ Disjoint (f 0) (f 1) :=
  haveI : (0 : Fin 2) ≠ 1 := by 

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝¹ : Lattice α
inst✝ : OrderBot α
s t : Finset ι
f✝ : ι → α
i : ι
f : Fin 2 → α
⊢ 0 ≠ 1

Next tactic:
simp
theorem SupIndep.attach (hs : s.SupIndep f) : s.attach.SupIndep fun a => f a := 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
⊢ SupIndep (Finset.attach s) fun a => f ↑a

Next tactic:
intro t _ i _ hi
theorem SupIndep.attach (hs : s.SupIndep f) : s.attach.SupIndep fun a => f a := by
  intro t _ i _ hi
  

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
t : Finset { x // x ∈ s }
a✝¹ : t ⊆ Finset.attach s
i : { x // x ∈ s }
a✝ : i ∈ Finset.attach s
hi : i ∉ t
⊢ Disjoint ((fun a => f ↑a) i) (sup t fun a => f ↑a)

Next tactic:
classical
    have : (fun (a : { x // x ∈ s }) => f ↑a) = f ∘ (fun a : { x // x ∈ s } => ↑a) := rfl
    rw [this, ← Finset.sup_image]
    refine' hs (image_subset_iff.2 fun (j : { x // x ∈ s }) _ => j.2) i.2 fun hi' => hi _
    rw [mem_image] at hi'
    obtain ⟨j, hj, hji⟩ := hi'
    rwa [Subtype.ext hji] at hj
theorem SupIndep.attach (hs : s.SupIndep f) : s.attach.SupIndep fun a => f a := by
  intro t _ i _ hi
  classical
    

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
t : Finset { x // x ∈ s }
a✝¹ : t ⊆ Finset.attach s
i : { x // x ∈ s }
a✝ : i ∈ Finset.attach s
hi : i ∉ t
⊢ Disjoint ((fun a => f ↑a) i) (sup t fun a => f ↑a)

Next tactic:
have : (fun (a : { x // x ∈ s }) => f ↑a) = f ∘ (fun a : { x // x ∈ s } => ↑a) := rfl
theorem SupIndep.attach (hs : s.SupIndep f) : s.attach.SupIndep fun a => f a := by
  intro t _ i _ hi
  classical
    have : (fun (a : { x // x ∈ s }) => f ↑a) = f ∘ (fun a : { x // x ∈ s } => ↑a) := rfl
    

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
t : Finset { x // x ∈ s }
a✝¹ : t ⊆ Finset.attach s
i : { x // x ∈ s }
a✝ : i ∈ Finset.attach s
hi : i ∉ t
this : (fun a => f ↑a) = f ∘ fun a => ↑a
⊢ Disjoint ((fun a => f ↑a) i) (sup t fun a => f ↑a)

Next tactic:
rw [this, ← Finset.sup_image]
theorem SupIndep.attach (hs : s.SupIndep f) : s.attach.SupIndep fun a => f a := by
  intro t _ i _ hi
  classical
    have : (fun (a : { x // x ∈ s }) => f ↑a) = f ∘ (fun a : { x // x ∈ s } => ↑a) := rfl
    rw [this, ← Finset.sup_image]
    

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
t : Finset { x // x ∈ s }
a✝¹ : t ⊆ Finset.attach s
i : { x // x ∈ s }
a✝ : i ∈ Finset.attach s
hi : i ∉ t
this : (fun a => f ↑a) = f ∘ fun a => ↑a
⊢ Disjoint ((f ∘ fun a => ↑a) i) (sup (Finset.image (fun a => ↑a) t) f)

Next tactic:
refine' hs (image_subset_iff.2 fun (j : { x // x ∈ s }) _ => j.2) i.2 fun hi' => hi _
theorem SupIndep.attach (hs : s.SupIndep f) : s.attach.SupIndep fun a => f a := by
  intro t _ i _ hi
  classical
    have : (fun (a : { x // x ∈ s }) => f ↑a) = f ∘ (fun a : { x // x ∈ s } => ↑a) := rfl
    rw [this, ← Finset.sup_image]
    refine' hs (image_subset_iff.2 fun (j : { x // x ∈ s }) _ => j.2) i.2 fun hi' => hi _
    

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
t : Finset { x // x ∈ s }
a✝¹ : t ⊆ Finset.attach s
i : { x // x ∈ s }
a✝ : i ∈ Finset.attach s
hi : i ∉ t
this : (fun a => f ↑a) = f ∘ fun a => ↑a
hi' : (fun a => ↑a) i ∈ Finset.image (fun j => ↑j) t
⊢ i ∈ t

Next tactic:
rw [mem_image] at hi'
theorem SupIndep.attach (hs : s.SupIndep f) : s.attach.SupIndep fun a => f a := by
  intro t _ i _ hi
  classical
    have : (fun (a : { x // x ∈ s }) => f ↑a) = f ∘ (fun a : { x // x ∈ s } => ↑a) := rfl
    rw [this, ← Finset.sup_image]
    refine' hs (image_subset_iff.2 fun (j : { x // x ∈ s }) _ => j.2) i.2 fun hi' => hi _
    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✝ : ι
hs : SupIndep s f
t : Finset { x // x ∈ s }
a✝¹ : t ⊆ Finset.attach s
i : { x // x ∈ s }
a✝ : i ∈ Finset.attach s
hi : i ∉ t
this : (fun a => f ↑a) = f ∘ fun a => ↑a
hi' : ∃ a ∈ t, ↑a = (fun a => ↑a) i
⊢ i ∈ t

Next tactic:
obtain ⟨j, hj, hji⟩ := hi'
theorem SupIndep.attach (hs : s.SupIndep f) : s.attach.SupIndep fun a => f a := by
  intro t _ i _ hi
  classical
    have : (fun (a : { x // x ∈ s }) => f ↑a) = f ∘ (fun a : { x // x ∈ s } => ↑a) := rfl
    rw [this, ← Finset.sup_image]
    refine' hs (image_subset_iff.2 fun (j : { x // x ∈ s }) _ => j.2) i.2 fun hi' => hi _
    rw [mem_image] at hi'
    obtain ⟨j, hj, hji⟩ := 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✝ : ι
hs : SupIndep s f
t : Finset { x // x ∈ s }
a✝¹ : t ⊆ Finset.attach s
i : { x // x ∈ s }
a✝ : i ∈ Finset.attach s
hi : i ∉ t
this : (fun a => f ↑a) = f ∘ fun a => ↑a
j : { x // x ∈ s }
hj : j ∈ t
hji : ↑j = (fun a => ↑a) i
⊢ i ∈ t

Next tactic:
rwa [Subtype.ext hji] at hj
@[simp, nolint simpNF]
theorem supIndep_attach : (s.attach.SupIndep fun a => f a) ↔ s.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 : ι
⊢ (SupIndep (attach s) fun a => f ↑a) ↔ SupIndep s f

Next tactic:
refine' ⟨fun h t ht i his hit => _, SupIndep.attach⟩
@[simp, nolint simpNF]
theorem supIndep_attach : (s.attach.SupIndep fun a => f a) ↔ s.SupIndep f := by
  refine' ⟨fun h t ht i his hit => _, SupIndep.attach⟩
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝¹ : Lattice α
inst✝ : OrderBot α
s t✝ : Finset ι
f : ι → α
i✝ : ι
h : SupIndep (attach s) fun a => f ↑a
t : Finset ι
ht : t ⊆ s
i : ι
his : i ∈ s
hit : i ∉ t
⊢ Disjoint (f i) (sup t f)

Next tactic:
classical
  convert h (filter_subset (fun (i : { x // x ∈ s }) => (i : ι) ∈ t) _) (mem_attach _ ⟨i, ‹_›⟩)
    fun hi => hit <| by simpa using hi using 1
  refine' eq_of_forall_ge_iff _
  simp only [Finset.sup_le_iff, mem_filter, mem_attach, true_and_iff, Function.comp_apply,
    Subtype.forall, Subtype.coe_mk]
  exact fun a => forall_congr' fun j => ⟨fun h _ => h, fun h hj => h (ht hj) hj⟩
@[simp, nolint simpNF]
theorem supIndep_attach : (s.attach.SupIndep fun a => f a) ↔ s.SupIndep f := by
  refine' ⟨fun h t ht i his hit => _, SupIndep.attach⟩
  classical
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝¹ : Lattice α
inst✝ : OrderBot α
s t✝ : Finset ι
f : ι → α
i✝ : ι
h : SupIndep (attach s) fun a => f ↑a
t : Finset ι
ht : t ⊆ s
i : ι
his : i ∈ s
hit : i ∉ t
⊢ Disjoint (f i) (sup t f)

Next tactic:
convert h (filter_subset (fun (i : { x // x ∈ s }) => (i : ι) ∈ t) _) (mem_attach _ ⟨i, ‹_›⟩)
    fun hi => hit <| by simpa using hi using 1
@[simp, nolint simpNF]
theorem supIndep_attach : (s.attach.SupIndep fun a => f a) ↔ s.SupIndep f := by
  refine' ⟨fun h t ht i his hit => _, SupIndep.attach⟩
  classical
  convert h (filter_subset (fun (i : { x // x ∈ s }) => (i : ι) ∈ t) _) (mem_attach _ ⟨i, ‹_›⟩)
    fun hi => hit <| by 

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝¹ : Lattice α
inst✝ : OrderBot α
s t✝ : Finset ι
f : ι → α
i✝ : ι
h : SupIndep (attach s) fun a => f ↑a
t : Finset ι
ht : t ⊆ s
i : ι
his : i ∈ s
hit : i ∉ t
hi : { val := i, property := his } ∈ filter (fun i => ↑i ∈ t) (attach s)
⊢ i ∈ t

Next tactic:
simpa using hi
@[simp, nolint simpNF]
theorem supIndep_attach : (s.attach.SupIndep fun a => f a) ↔ s.SupIndep f := by
  refine' ⟨fun h t ht i his hit => _, SupIndep.attach⟩
  classical
  convert h (filter_subset (fun (i : { x // x ∈ s }) => (i : ι) ∈ t) _) (mem_attach _ ⟨i, ‹_›⟩)
    fun hi => hit <| by simpa using hi 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✝ : ι
h : SupIndep (attach s) fun a => f ↑a
t : Finset ι
ht : t ⊆ s
i : ι
his : i ∈ s
hit : i ∉ t
⊢ sup t f = sup (filter (fun i => ↑i ∈ t) (attach s)) fun a => f ↑a

Next tactic:
refine' eq_of_forall_ge_iff _
@[simp, nolint simpNF]
theorem supIndep_attach : (s.attach.SupIndep fun a => f a) ↔ s.SupIndep f := by
  refine' ⟨fun h t ht i his hit => _, SupIndep.attach⟩
  classical
  convert h (filter_subset (fun (i : { x // x ∈ s }) => (i : ι) ∈ t) _) (mem_attach _ ⟨i, ‹_›⟩)
    fun hi => hit <| by simpa using hi using 1
  refine' eq_of_forall_ge_iff _
  

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✝ : ι
h : SupIndep (attach s) fun a => f ↑a
t : Finset ι
ht : t ⊆ s
i : ι
his : i ∈ s
hit : i ∉ t
⊢ ∀ (c : α), sup t f ≤ c ↔ (sup (filter (fun i => ↑i ∈ t) (attach s)) fun a => f ↑a) ≤ c

Next tactic:
simp only [Finset.sup_le_iff, mem_filter, mem_attach, true_and_iff, Function.comp_apply,
    Subtype.forall, Subtype.coe_mk]
@[simp, nolint simpNF]
theorem supIndep_attach : (s.attach.SupIndep fun a => f a) ↔ s.SupIndep f := by
  refine' ⟨fun h t ht i his hit => _, SupIndep.attach⟩
  classical
  convert h (filter_subset (fun (i : { x // x ∈ s }) => (i : ι) ∈ t) _) (mem_attach _ ⟨i, ‹_›⟩)
    fun hi => hit <| by simpa using hi using 1
  refine' eq_of_forall_ge_iff _
  simp only [Finset.sup_le_iff, mem_filter, mem_attach, true_and_iff, Function.comp_apply,
    Subtype.forall, Subtype.coe_mk]
  

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✝ : ι
h : SupIndep (attach s) fun a => f ↑a
t : Finset ι
ht : t ⊆ s
i : ι
his : i ∈ s
hit : i ∉ t
⊢ ∀ (c : α), (∀ b ∈ t, f b ≤ c) ↔ ∀ a ∈ s, a ∈ t → f a ≤ c

Next tactic:
exact fun a => forall_congr' fun j => ⟨fun h _ => h, fun h hj => h (ht hj) hj⟩
/-- Bind operation for `SupIndep`. -/
theorem SupIndep.sup [DecidableEq ι] {s : Finset ι'} {g : ι' → Finset ι} {f : ι → α}
    (hs : s.SupIndep fun i => (g i).sup f) (hg : ∀ i' ∈ s, (g i').SupIndep f) :
    (s.sup g).SupIndep f := by
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝² : DistribLattice α
inst✝¹ : OrderBot α
s✝ : Finset ι
f✝ : ι → α
inst✝ : DecidableEq ι
s : Finset ι'
g : ι' → Finset ι
f : ι → α
hs : SupIndep s fun i => Finset.sup (g i) f
hg : ∀ i' ∈ s, SupIndep (g i') f
⊢ SupIndep (Finset.sup s g) f

Next tactic:
simp_rw [supIndep_iff_pairwiseDisjoint] at hs hg ⊢
/-- Bind operation for `SupIndep`. -/
theorem SupIndep.sup [DecidableEq ι] {s : Finset ι'} {g : ι' → Finset ι} {f : ι → α}
    (hs : s.SupIndep fun i => (g i).sup f) (hg : ∀ i' ∈ s, (g i').SupIndep f) :
    (s.sup g).SupIndep f := by
  simp_rw [supIndep_iff_pairwiseDisjoint] at hs hg ⊢
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝² : DistribLattice α
inst✝¹ : OrderBot α
s✝ : Finset ι
f✝ : ι → α
inst✝ : DecidableEq ι
s : Finset ι'
g : ι' → Finset ι
f : ι → α
hs : Set.PairwiseDisjoint ↑s fun i => Finset.sup (g i) f
hg : ∀ i' ∈ s, Set.PairwiseDisjoint (↑(g i')) f
⊢ Set.PairwiseDisjoint (↑(Finset.sup s g)) f

Next tactic:
rw [sup_eq_biUnion, coe_biUnion]
/-- Bind operation for `SupIndep`. -/
theorem SupIndep.sup [DecidableEq ι] {s : Finset ι'} {g : ι' → Finset ι} {f : ι → α}
    (hs : s.SupIndep fun i => (g i).sup f) (hg : ∀ i' ∈ s, (g i').SupIndep f) :
    (s.sup g).SupIndep f := by
  simp_rw [supIndep_iff_pairwiseDisjoint] at hs hg ⊢
  rw [sup_eq_biUnion, coe_biUnion]
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝² : DistribLattice α
inst✝¹ : OrderBot α
s✝ : Finset ι
f✝ : ι → α
inst✝ : DecidableEq ι
s : Finset ι'
g : ι' → Finset ι
f : ι → α
hs : Set.PairwiseDisjoint ↑s fun i => Finset.sup (g i) f
hg : ∀ i' ∈ s, Set.PairwiseDisjoint (↑(g i')) f
⊢ Set.PairwiseDisjoint (⋃ x ∈ ↑s, ↑(g x)) f

Next tactic:
exact hs.biUnion_finset hg
/-- Bind operation for `SupIndep`. -/
theorem SupIndep.biUnion [DecidableEq ι] {s : Finset ι'} {g : ι' → Finset ι} {f : ι → α}
    (hs : s.SupIndep fun i => (g i).sup f) (hg : ∀ i' ∈ s, (g i').SupIndep f) :
    (s.biUnion g).SupIndep f := by
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝² : DistribLattice α
inst✝¹ : OrderBot α
s✝ : Finset ι
f✝ : ι → α
inst✝ : DecidableEq ι
s : Finset ι'
g : ι' → Finset ι
f : ι → α
hs : SupIndep s fun i => Finset.sup (g i) f
hg : ∀ i' ∈ s, SupIndep (g i') f
⊢ SupIndep (Finset.biUnion s g) f

Next tactic:
rw [← sup_eq_biUnion]
/-- Bind operation for `SupIndep`. -/
theorem SupIndep.biUnion [DecidableEq ι] {s : Finset ι'} {g : ι' → Finset ι} {f : ι → α}
    (hs : s.SupIndep fun i => (g i).sup f) (hg : ∀ i' ∈ s, (g i').SupIndep f) :
    (s.biUnion g).SupIndep f := by
  rw [← sup_eq_biUnion]
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝² : DistribLattice α
inst✝¹ : OrderBot α
s✝ : Finset ι
f✝ : ι → α
inst✝ : DecidableEq ι
s : Finset ι'
g : ι' → Finset ι
f : ι → α
hs : SupIndep s fun i => Finset.sup (g i) f
hg : ∀ i' ∈ s, SupIndep (g i') f
⊢ SupIndep (Finset.sup s g) f

Next tactic:
exact hs.sup hg
/-- Bind operation for `SupIndep`. -/
theorem SupIndep.sigma {β : ι → Type*} {s : Finset ι} {g : ∀ i, Finset (β i)} {f : Sigma β → α}
    (hs : s.SupIndep fun i => (g i).sup fun b => f ⟨i, b⟩)
    (hg : ∀ i ∈ s, (g i).SupIndep fun b => f ⟨i, b⟩) : (s.sigma g).SupIndep f := by
  

Proof state:
α : Type u_1
β✝ : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝¹ : DistribLattice α
inst✝ : OrderBot α
s✝ : Finset ι
f✝ : ι → α
β : ι → Type u_5
s : Finset ι
g : (i : ι) → Finset (β i)
f : Sigma β → α
hs : SupIndep s fun i => Finset.sup (g i) fun b => f { fst := i, snd := b }
hg : ∀ i ∈ s, SupIndep (g i) fun b => f { fst := i, snd := b }
⊢ SupIndep (Finset.sigma s g) f

Next tactic:
rintro t ht ⟨i, b⟩ hi hit
/-- Bind operation for `SupIndep`. -/
theorem SupIndep.sigma {β : ι → Type*} {s : Finset ι} {g : ∀ i, Finset (β i)} {f : Sigma β → α}
    (hs : s.SupIndep fun i => (g i).sup fun b => f ⟨i, b⟩)
    (hg : ∀ i ∈ s, (g i).SupIndep fun b => f ⟨i, b⟩) : (s.sigma g).SupIndep f := by
  rintro t ht ⟨i, b⟩ hi hit
  

Proof state:
case mk
α : Type u_1
β✝ : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝¹ : DistribLattice α
inst✝ : OrderBot α
s✝ : Finset ι
f✝ : ι → α
β : ι → Type u_5
s : Finset ι
g : (i : ι) → Finset (β i)
f : Sigma β → α
hs : SupIndep s fun i => Finset.sup (g i) fun b => f { fst := i, snd := b }
hg : ∀ i ∈ s, SupIndep (g i) fun b => f { fst := i, snd := b }
t : Finset ((i : ι) × β i)
ht : t ⊆ Finset.sigma s g
i : ι
b : β i
hi : { fst := i, snd := b } ∈ Finset.sigma s g
hit : { fst := i, snd := b } ∉ t
⊢ Disjoint (f { fst := i, snd := b }) (Finset.sup t f)

Next tactic:
rw [Finset.disjoint_sup_right]
/-- Bind operation for `SupIndep`. -/
theorem SupIndep.sigma {β : ι → Type*} {s : Finset ι} {g : ∀ i, Finset (β i)} {f : Sigma β → α}
    (hs : s.SupIndep fun i => (g i).sup fun b => f ⟨i, b⟩)
    (hg : ∀ i ∈ s, (g i).SupIndep fun b => f ⟨i, b⟩) : (s.sigma g).SupIndep f := by
  rintro t ht ⟨i, b⟩ hi hit
  rw [Finset.disjoint_sup_right]
  

Proof state:
case mk
α : Type u_1
β✝ : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝¹ : DistribLattice α
inst✝ : OrderBot α
s✝ : Finset ι
f✝ : ι → α
β : ι → Type u_5
s : Finset ι
g : (i : ι) → Finset (β i)
f : Sigma β → α
hs : SupIndep s fun i => Finset.sup (g i) fun b => f { fst := i, snd := b }
hg : ∀ i ∈ s, SupIndep (g i) fun b => f { fst := i, snd := b }
t : Finset ((i : ι) × β i)
ht : t ⊆ Finset.sigma s g
i : ι
b : β i
hi : { fst := i, snd := b } ∈ Finset.sigma s g
hit : { fst := i, snd := b } ∉ t
⊢ ∀ ⦃i_1 : (i : ι) × β i⦄, i_1 ∈ t → Disjoint (f { fst := i, snd := b }) (f i_1)

Next tactic:
rintro ⟨j, c⟩ hj
/-- Bind operation for `SupIndep`. -/
theorem SupIndep.sigma {β : ι → Type*} {s : Finset ι} {g : ∀ i, Finset (β i)} {f : Sigma β → α}
    (hs : s.SupIndep fun i => (g i).sup fun b => f ⟨i, b⟩)
    (hg : ∀ i ∈ s, (g i).SupIndep fun b => f ⟨i, b⟩) : (s.sigma g).SupIndep f := by
  rintro t ht ⟨i, b⟩ hi hit
  rw [Finset.disjoint_sup_right]
  rintro ⟨j, c⟩ hj
  

Proof state:
case mk.mk
α : Type u_1
β✝ : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝¹ : DistribLattice α
inst✝ : OrderBot α
s✝ : Finset ι
f✝ : ι → α
β : ι → Type u_5
s : Finset ι
g : (i : ι) → Finset (β i)
f : Sigma β → α
hs : SupIndep s fun i => Finset.sup (g i) fun b => f { fst := i, snd := b }
hg : ∀ i ∈ s, SupIndep (g i) fun b => f { fst := i, snd := b }
t : Finset ((i : ι) × β i)
ht : t ⊆ Finset.sigma s g
i : ι
b : β i
hi : { fst := i, snd := b } ∈ Finset.sigma s g
hit : { fst := i, snd := b } ∉ t
j : ι
c : β j
hj : { fst := j, snd := c } ∈ t
⊢ Disjoint (f { fst := i, snd := b }) (f { fst := j, snd := c })

Next tactic:
have hbc := (ne_of_mem_of_not_mem hj hit).symm
/-- Bind operation for `SupIndep`. -/
theorem SupIndep.sigma {β : ι → Type*} {s : Finset ι} {g : ∀ i, Finset (β i)} {f : Sigma β → α}
    (hs : s.SupIndep fun i => (g i).sup fun b => f ⟨i, b⟩)
    (hg : ∀ i ∈ s, (g i).SupIndep fun b => f ⟨i, b⟩) : (s.sigma g).SupIndep f := by
  rintro t ht ⟨i, b⟩ hi hit
  rw [Finset.disjoint_sup_right]
  rintro ⟨j, c⟩ hj
  have hbc := (ne_of_mem_of_not_mem hj hit).symm
  

Proof state:
case mk.mk
α : Type u_1
β✝ : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝¹ : DistribLattice α
inst✝ : OrderBot α
s✝ : Finset ι
f✝ : ι → α
β : ι → Type u_5
s : Finset ι
g : (i : ι) → Finset (β i)
f : Sigma β → α
hs : SupIndep s fun i => Finset.sup (g i) fun b => f { fst := i, snd := b }
hg : ∀ i ∈ s, SupIndep (g i) fun b => f { fst := i, snd := b }
t : Finset ((i : ι) × β i)
ht : t ⊆ Finset.sigma s g
i : ι
b : β i
hi : { fst := i, snd := b } ∈ Finset.sigma s g
hit : { fst := i, snd := b } ∉ t
j : ι
c : β j
hj : { fst := j, snd := c } ∈ t
hbc : { fst := i, snd := b } ≠ { fst := j, snd := c }
⊢ Disjoint (f { fst := i, snd := b }) (f { fst := j, snd := c })

Next tactic:
replace hj := ht hj
/-- Bind operation for `SupIndep`. -/
theorem SupIndep.sigma {β : ι → Type*} {s : Finset ι} {g : ∀ i, Finset (β i)} {f : Sigma β → α}
    (hs : s.SupIndep fun i => (g i).sup fun b => f ⟨i, b⟩)
    (hg : ∀ i ∈ s, (g i).SupIndep fun b => f ⟨i, b⟩) : (s.sigma g).SupIndep f := by
  rintro t ht ⟨i, b⟩ hi hit
  rw [Finset.disjoint_sup_right]
  rintro ⟨j, c⟩ hj
  have hbc := (ne_of_mem_of_not_mem hj hit).symm
  replace hj := ht hj
  

Proof state:
case mk.mk
α : Type u_1
β✝ : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝¹ : DistribLattice α
inst✝ : OrderBot α
s✝ : Finset ι
f✝ : ι → α
β : ι → Type u_5
s : Finset ι
g : (i : ι) → Finset (β i)
f : Sigma β → α
hs : SupIndep s fun i => Finset.sup (g i) fun b => f { fst := i, snd := b }
hg : ∀ i ∈ s, SupIndep (g i) fun b => f { fst := i, snd := b }
t : Finset ((i : ι) × β i)
ht : t ⊆ Finset.sigma s g
i : ι
b : β i
hi : { fst := i, snd := b } ∈ Finset.sigma s g
hit : { fst := i, snd := b } ∉ t
j : ι
c : β j
hbc : { fst := i, snd := b } ≠ { fst := j, snd := c }
hj : { fst := j, snd := c } ∈ Finset.sigma s g
⊢ Disjoint (f { fst := i, snd := b }) (f { fst := j, snd := c })

Next tactic:
rw [mem_sigma] at hi hj
/-- Bind operation for `SupIndep`. -/
theorem SupIndep.sigma {β : ι → Type*} {s : Finset ι} {g : ∀ i, Finset (β i)} {f : Sigma β → α}
    (hs : s.SupIndep fun i => (g i).sup fun b => f ⟨i, b⟩)
    (hg : ∀ i ∈ s, (g i).SupIndep fun b => f ⟨i, b⟩) : (s.sigma g).SupIndep f := by
  rintro t ht ⟨i, b⟩ hi hit
  rw [Finset.disjoint_sup_right]
  rintro ⟨j, c⟩ hj
  have hbc := (ne_of_mem_of_not_mem hj hit).symm
  replace hj := ht hj
  rw [mem_sigma] at hi hj
  

Proof state:
case mk.mk
α : Type u_1
β✝ : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝¹ : DistribLattice α
inst✝ : OrderBot α
s✝ : Finset ι
f✝ : ι → α
β : ι → Type u_5
s : Finset ι
g : (i : ι) → Finset (β i)
f : Sigma β → α
hs : SupIndep s fun i => Finset.sup (g i) fun b => f { fst := i, snd := b }
hg : ∀ i ∈ s, SupIndep (g i) fun b => f { fst := i, snd := b }
t : Finset ((i : ι) × β i)
ht : t ⊆ Finset.sigma s g
i : ι
b : β i
hi : { fst := i, snd := b }.fst ∈ s ∧ { fst := i, snd := b }.snd ∈ g { fst := i, snd := b }.fst
hit : { fst := i, snd := b } ∉ t
j : ι
c : β j
hbc : { fst := i, snd := b } ≠ { fst := j, snd := c }
hj : { fst := j, snd := c }.fst ∈ s ∧ { fst := j, snd := c }.snd ∈ g { fst := j, snd := c }.fst
⊢ Disjoint (f { fst := i, snd := b }) (f { fst := j, snd := c })

Next tactic:
obtain rfl | hij := eq_or_ne i j
/-- Bind operation for `SupIndep`. -/
theorem SupIndep.sigma {β : ι → Type*} {s : Finset ι} {g : ∀ i, Finset (β i)} {f : Sigma β → α}
    (hs : s.SupIndep fun i => (g i).sup fun b => f ⟨i, b⟩)
    (hg : ∀ i ∈ s, (g i).SupIndep fun b => f ⟨i, b⟩) : (s.sigma g).SupIndep f := by
  rintro t ht ⟨i, b⟩ hi hit
  rw [Finset.disjoint_sup_right]
  rintro ⟨j, c⟩ hj
  have hbc := (ne_of_mem_of_not_mem hj hit).symm
  replace hj := ht hj
  rw [mem_sigma] at hi hj
  obtain rfl | hij := eq_or_ne i j
  · 

Proof state:
case mk.mk.inl
α : Type u_1
β✝ : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝¹ : DistribLattice α
inst✝ : OrderBot α
s✝ : Finset ι
f✝ : ι → α
β : ι → Type u_5
s : Finset ι
g : (i : ι) → Finset (β i)
f : Sigma β → α
hs : SupIndep s fun i => Finset.sup (g i) fun b => f { fst := i, snd := b }
hg : ∀ i ∈ s, SupIndep (g i) fun b => f { fst := i, snd := b }
t : Finset ((i : ι) × β i)
ht : t ⊆ Finset.sigma s g
i : ι
b : β i
hi : { fst := i, snd := b }.fst ∈ s ∧ { fst := i, snd := b }.snd ∈ g { fst := i, snd := b }.fst
hit : { fst := i, snd := b } ∉ t
c : β i
hbc : { fst := i, snd := b } ≠ { fst := i, snd := c }
hj : { fst := i, snd := c }.fst ∈ s ∧ { fst := i, snd := c }.snd ∈ g { fst := i, snd := c }.fst
⊢ Disjoint (f { fst := i, snd := b }) (f { fst := i, snd := c })

Next tactic:
exact (hg _ hj.1).pairwiseDisjoint hi.2 hj.2 (sigma_mk_injective.ne_iff.1 hbc)
/-- Bind operation for `SupIndep`. -/
theorem SupIndep.sigma {β : ι → Type*} {s : Finset ι} {g : ∀ i, Finset (β i)} {f : Sigma β → α}
    (hs : s.SupIndep fun i => (g i).sup fun b => f ⟨i, b⟩)
    (hg : ∀ i ∈ s, (g i).SupIndep fun b => f ⟨i, b⟩) : (s.sigma g).SupIndep f := by
  rintro t ht ⟨i, b⟩ hi hit
  rw [Finset.disjoint_sup_right]
  rintro ⟨j, c⟩ hj
  have hbc := (ne_of_mem_of_not_mem hj hit).symm
  replace hj := ht hj
  rw [mem_sigma] at hi hj
  obtain rfl | hij := eq_or_ne i j
  · exact (hg _ hj.1).pairwiseDisjoint hi.2 hj.2 (sigma_mk_injective.ne_iff.1 hbc)
  · 

Proof state:
case mk.mk.inr
α : Type u_1
β✝ : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝¹ : DistribLattice α
inst✝ : OrderBot α
s✝ : Finset ι
f✝ : ι → α
β : ι → Type u_5
s : Finset ι
g : (i : ι) → Finset (β i)
f : Sigma β → α
hs : SupIndep s fun i => Finset.sup (g i) fun b => f { fst := i, snd := b }
hg : ∀ i ∈ s, SupIndep (g i) fun b => f { fst := i, snd := b }
t : Finset ((i : ι) × β i)
ht : t ⊆ Finset.sigma s g
i : ι
b : β i
hi : { fst := i, snd := b }.fst ∈ s ∧ { fst := i, snd := b }.snd ∈ g { fst := i, snd := b }.fst
hit : { fst := i, snd := b } ∉ t
j : ι
c : β j
hbc : { fst := i, snd := b } ≠ { fst := j, snd := c }
hj : { fst := j, snd := c }.fst ∈ s ∧ { fst := j, snd := c }.snd ∈ g { fst := j, snd := c }.fst
hij : i ≠ j
⊢ Disjoint (f { fst := i, snd := b }) (f { fst := j, snd := c })

Next tactic:
refine' (hs.pairwiseDisjoint hi.1 hj.1 hij).mono _ _