l3lab/ntp-mathlib huggingface dataset:
theorem supIndep_product_iff {s : Finset ι} {t : Finset ι'} {f : ι × ι' → α} :
    (s.product t).SupIndep f ↔ (s.SupIndep fun i => t.sup fun i' => f (i, i'))
      ∧ t.SupIndep fun i' => s.sup fun i => f (i, i') := by
  refine' ⟨_, fun h => h.1.product h.2⟩
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝¹ : DistribLattice α
inst✝ : OrderBot α
s✝ : Finset ι
f✝ : ι → α
s : Finset ι
t : Finset ι'
f : ι × ι' → α
⊢ SupIndep (Finset.product s t) f →
    (SupIndep s fun i => sup t fun i' => f (i, i')) ∧ SupIndep t fun i' => sup s fun i => f (i, i')

Next tactic:
simp_rw [supIndep_iff_pairwiseDisjoint]
theorem supIndep_product_iff {s : Finset ι} {t : Finset ι'} {f : ι × ι' → α} :
    (s.product t).SupIndep f ↔ (s.SupIndep fun i => t.sup fun i' => f (i, i'))
      ∧ t.SupIndep fun i' => s.sup fun i => f (i, i') := by
  refine' ⟨_, fun h => h.1.product h.2⟩
  simp_rw [supIndep_iff_pairwiseDisjoint]
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝¹ : DistribLattice α
inst✝ : OrderBot α
s✝ : Finset ι
f✝ : ι → α
s : Finset ι
t : Finset ι'
f : ι × ι' → α
⊢ Set.PairwiseDisjoint (↑(Finset.product s t)) f →
    (Set.PairwiseDisjoint ↑s fun i => sup t fun i' => f (i, i')) ∧
      Set.PairwiseDisjoint ↑t fun i' => sup s fun i => f (i, i')

Next tactic:
refine' fun h => ⟨fun i hi j hj hij => _, fun i hi j hj hij => _⟩
theorem supIndep_product_iff {s : Finset ι} {t : Finset ι'} {f : ι × ι' → α} :
    (s.product t).SupIndep f ↔ (s.SupIndep fun i => t.sup fun i' => f (i, i'))
      ∧ t.SupIndep fun i' => s.sup fun i => f (i, i') := by
  refine' ⟨_, fun h => h.1.product h.2⟩
  simp_rw [supIndep_iff_pairwiseDisjoint]
  refine' fun h => ⟨fun i hi j hj hij => _, fun i hi j hj hij => _⟩ <;>
      

Proof state:
case refine'_1
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝¹ : DistribLattice α
inst✝ : OrderBot α
s✝ : Finset ι
f✝ : ι → α
s : Finset ι
t : Finset ι'
f : ι × ι' → α
h : Set.PairwiseDisjoint (↑(Finset.product s t)) f
i : ι
hi : i ∈ ↑s
j : ι
hj : j ∈ ↑s
hij : i ≠ j
⊢ (Disjoint on fun i => sup t fun i' => f (i, i')) i j

Next tactic:
simp_rw [Function.onFun, Finset.disjoint_sup_left, Finset.disjoint_sup_right]
theorem supIndep_product_iff {s : Finset ι} {t : Finset ι'} {f : ι × ι' → α} :
    (s.product t).SupIndep f ↔ (s.SupIndep fun i => t.sup fun i' => f (i, i'))
      ∧ t.SupIndep fun i' => s.sup fun i => f (i, i') := by
  refine' ⟨_, fun h => h.1.product h.2⟩
  simp_rw [supIndep_iff_pairwiseDisjoint]
  refine' fun h => ⟨fun i hi j hj hij => _, fun i hi j hj hij => _⟩ <;>
      

Proof state:
case refine'_2
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝¹ : DistribLattice α
inst✝ : OrderBot α
s✝ : Finset ι
f✝ : ι → α
s : Finset ι
t : Finset ι'
f : ι × ι' → α
h : Set.PairwiseDisjoint (↑(Finset.product s t)) f
i : ι'
hi : i ∈ ↑t
j : ι'
hj : j ∈ ↑t
hij : i ≠ j
⊢ (Disjoint on fun i' => sup s fun i => f (i, i')) i j

Next tactic:
simp_rw [Function.onFun, Finset.disjoint_sup_left, Finset.disjoint_sup_right]
theorem supIndep_product_iff {s : Finset ι} {t : Finset ι'} {f : ι × ι' → α} :
    (s.product t).SupIndep f ↔ (s.SupIndep fun i => t.sup fun i' => f (i, i'))
      ∧ t.SupIndep fun i' => s.sup fun i => f (i, i') := by
  refine' ⟨_, fun h => h.1.product h.2⟩
  simp_rw [supIndep_iff_pairwiseDisjoint]
  refine' fun h => ⟨fun i hi j hj hij => _, fun i hi j hj hij => _⟩ <;>
      simp_rw [Function.onFun, Finset.disjoint_sup_left, Finset.disjoint_sup_right] <;>
    

Proof state:
case refine'_1
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝¹ : DistribLattice α
inst✝ : OrderBot α
s✝ : Finset ι
f✝ : ι → α
s : Finset ι
t : Finset ι'
f : ι × ι' → α
h : Set.PairwiseDisjoint (↑(Finset.product s t)) f
i : ι
hi : i ∈ ↑s
j : ι
hj : j ∈ ↑s
hij : i ≠ j
⊢ ∀ ⦃i_1 : ι'⦄, i_1 ∈ t → ∀ ⦃i_2 : ι'⦄, i_2 ∈ t → Disjoint (f (i, i_1)) (f (j, i_2))

Next tactic:
intro i' hi' j' hj'
theorem supIndep_product_iff {s : Finset ι} {t : Finset ι'} {f : ι × ι' → α} :
    (s.product t).SupIndep f ↔ (s.SupIndep fun i => t.sup fun i' => f (i, i'))
      ∧ t.SupIndep fun i' => s.sup fun i => f (i, i') := by
  refine' ⟨_, fun h => h.1.product h.2⟩
  simp_rw [supIndep_iff_pairwiseDisjoint]
  refine' fun h => ⟨fun i hi j hj hij => _, fun i hi j hj hij => _⟩ <;>
      simp_rw [Function.onFun, Finset.disjoint_sup_left, Finset.disjoint_sup_right] <;>
    

Proof state:
case refine'_2
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝¹ : DistribLattice α
inst✝ : OrderBot α
s✝ : Finset ι
f✝ : ι → α
s : Finset ι
t : Finset ι'
f : ι × ι' → α
h : Set.PairwiseDisjoint (↑(Finset.product s t)) f
i : ι'
hi : i ∈ ↑t
j : ι'
hj : j ∈ ↑t
hij : i ≠ j
⊢ ∀ ⦃i_1 : ι⦄, i_1 ∈ s → ∀ ⦃i_2 : ι⦄, i_2 ∈ s → Disjoint (f (i_1, i)) (f (i_2, j))

Next tactic:
intro i' hi' j' hj'
theorem supIndep_product_iff {s : Finset ι} {t : Finset ι'} {f : ι × ι' → α} :
    (s.product t).SupIndep f ↔ (s.SupIndep fun i => t.sup fun i' => f (i, i'))
      ∧ t.SupIndep fun i' => s.sup fun i => f (i, i') := by
  refine' ⟨_, fun h => h.1.product h.2⟩
  simp_rw [supIndep_iff_pairwiseDisjoint]
  refine' fun h => ⟨fun i hi j hj hij => _, fun i hi j hj hij => _⟩ <;>
      simp_rw [Function.onFun, Finset.disjoint_sup_left, Finset.disjoint_sup_right] <;>
    intro i' hi' j' hj'
  · 

Proof state:
case refine'_1
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝¹ : DistribLattice α
inst✝ : OrderBot α
s✝ : Finset ι
f✝ : ι → α
s : Finset ι
t : Finset ι'
f : ι × ι' → α
h : Set.PairwiseDisjoint (↑(Finset.product 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_product hi hi') (mk_mem_product hj hj') (ne_of_apply_ne Prod.fst hij)
theorem supIndep_product_iff {s : Finset ι} {t : Finset ι'} {f : ι × ι' → α} :
    (s.product t).SupIndep f ↔ (s.SupIndep fun i => t.sup fun i' => f (i, i'))
      ∧ t.SupIndep fun i' => s.sup fun i => f (i, i') := by
  refine' ⟨_, fun h => h.1.product h.2⟩
  simp_rw [supIndep_iff_pairwiseDisjoint]
  refine' fun h => ⟨fun i hi j hj hij => _, fun i hi j hj hij => _⟩ <;>
      simp_rw [Function.onFun, Finset.disjoint_sup_left, Finset.disjoint_sup_right] <;>
    intro i' hi' j' hj'
  · exact h (mk_mem_product hi hi') (mk_mem_product 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
inst✝¹ : DistribLattice α
inst✝ : OrderBot α
s✝ : Finset ι
f✝ : ι → α
s : Finset ι
t : Finset ι'
f : ι × ι' → α
h : Set.PairwiseDisjoint (↑(Finset.product 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_product hi' hi) (mk_mem_product hj' hj) (ne_of_apply_ne Prod.snd hij)
theorem setIndependent_pair {a b : α} (hab : a ≠ b) :
    SetIndependent ({a, b} : Set α) ↔ Disjoint a b := by
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝ : CompleteLattice α
s : Set α
hs : SetIndependent s
a b : α
hab : a ≠ b
⊢ SetIndependent {a, b} ↔ Disjoint a b

Next tactic:
constructor
theorem setIndependent_pair {a b : α} (hab : a ≠ b) :
    SetIndependent ({a, b} : Set α) ↔ Disjoint a b := by
  constructor
  · 

Proof state:
case mp
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝ : CompleteLattice α
s : Set α
hs : SetIndependent s
a b : α
hab : a ≠ b
⊢ SetIndependent {a, b} → Disjoint a b

Next tactic:
intro h
theorem setIndependent_pair {a b : α} (hab : a ≠ b) :
    SetIndependent ({a, b} : Set α) ↔ Disjoint a b := by
  constructor
  · intro h
    

Proof state:
case mp
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝ : CompleteLattice α
s : Set α
hs : SetIndependent s
a b : α
hab : a ≠ b
h : SetIndependent {a, b}
⊢ Disjoint a b

Next tactic:
exact h.pairwiseDisjoint (mem_insert _ _) (mem_insert_of_mem _ (mem_singleton _)) hab
theorem setIndependent_pair {a b : α} (hab : a ≠ b) :
    SetIndependent ({a, b} : Set α) ↔ Disjoint a b := by
  constructor
  · intro h
    exact h.pairwiseDisjoint (mem_insert _ _) (mem_insert_of_mem _ (mem_singleton _)) hab
  · 

Proof state:
case mpr
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝ : CompleteLattice α
s : Set α
hs : SetIndependent s
a b : α
hab : a ≠ b
⊢ Disjoint a b → SetIndependent {a, b}

Next tactic:
rintro h c ((rfl : c = a) | (rfl : c = b))
theorem setIndependent_pair {a b : α} (hab : a ≠ b) :
    SetIndependent ({a, b} : Set α) ↔ Disjoint a b := by
  constructor
  · intro h
    exact h.pairwiseDisjoint (mem_insert _ _) (mem_insert_of_mem _ (mem_singleton _)) hab
  · rintro h c ((rfl : c = a) | (rfl : c = b))
    · 

Proof state:
case mpr.inl
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝ : CompleteLattice α
s : Set α
hs : SetIndependent s
b c : α
hab : c ≠ b
h : Disjoint c b
⊢ Disjoint c (sSup ({c, b} \ {c}))

Next tactic:
convert h using 1
theorem setIndependent_pair {a b : α} (hab : a ≠ b) :
    SetIndependent ({a, b} : Set α) ↔ Disjoint a b := by
  constructor
  · intro h
    exact h.pairwiseDisjoint (mem_insert _ _) (mem_insert_of_mem _ (mem_singleton _)) hab
  · rintro h c ((rfl : c = a) | (rfl : c = b))
    · convert h using 1
      

Proof state:
case h.e'_5
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝ : CompleteLattice α
s : Set α
hs : SetIndependent s
b c : α
hab : c ≠ b
h : Disjoint c b
⊢ sSup ({c, b} \ {c}) = b

Next tactic:
simp [hab, sSup_singleton]
theorem setIndependent_pair {a b : α} (hab : a ≠ b) :
    SetIndependent ({a, b} : Set α) ↔ Disjoint a b := by
  constructor
  · intro h
    exact h.pairwiseDisjoint (mem_insert _ _) (mem_insert_of_mem _ (mem_singleton _)) hab
  · rintro h c ((rfl : c = a) | (rfl : c = b))
    · convert h using 1
      simp [hab, sSup_singleton]
    · 

Proof state:
case mpr.inr
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝ : CompleteLattice α
s : Set α
hs : SetIndependent s
a c : α
hab : a ≠ c
h : Disjoint a c
⊢ Disjoint c (sSup ({a, c} \ {c}))

Next tactic:
convert h.symm using 1
theorem setIndependent_pair {a b : α} (hab : a ≠ b) :
    SetIndependent ({a, b} : Set α) ↔ Disjoint a b := by
  constructor
  · intro h
    exact h.pairwiseDisjoint (mem_insert _ _) (mem_insert_of_mem _ (mem_singleton _)) hab
  · rintro h c ((rfl : c = a) | (rfl : c = b))
    · convert h using 1
      simp [hab, sSup_singleton]
    · convert h.symm using 1
      

Proof state:
case h.e'_5
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝ : CompleteLattice α
s : Set α
hs : SetIndependent s
a c : α
hab : a ≠ c
h : Disjoint a c
⊢ sSup ({a, c} \ {c}) = a

Next tactic:
simp [hab, sSup_singleton]
/-- If the elements of a set are independent, then any element is disjoint from the `sSup` of some
subset of the rest. -/
theorem SetIndependent.disjoint_sSup {x : α} {y : Set α} (hx : x ∈ s) (hy : y ⊆ s) (hxy : x ∉ y) :
    Disjoint x (sSup y) := by
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝ : CompleteLattice α
s : Set α
hs : SetIndependent s
x : α
y : Set α
hx : x ∈ s
hy : y ⊆ s
hxy : x ∉ y
⊢ Disjoint x (sSup y)

Next tactic:
have := (hs.mono <| insert_subset_iff.mpr ⟨hx, hy⟩) (mem_insert x _)
/-- If the elements of a set are independent, then any element is disjoint from the `sSup` of some
subset of the rest. -/
theorem SetIndependent.disjoint_sSup {x : α} {y : Set α} (hx : x ∈ s) (hy : y ⊆ s) (hxy : x ∉ y) :
    Disjoint x (sSup y) := by
  have := (hs.mono <| insert_subset_iff.mpr ⟨hx, hy⟩) (mem_insert x _)
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝ : CompleteLattice α
s : Set α
hs : SetIndependent s
x : α
y : Set α
hx : x ∈ s
hy : y ⊆ s
hxy : x ∉ y
this : Disjoint x (sSup (insert x y \ {x}))
⊢ Disjoint x (sSup y)

Next tactic:
rw [insert_diff_of_mem _ (mem_singleton _), diff_singleton_eq_self hxy] at this
/-- If the elements of a set are independent, then any element is disjoint from the `sSup` of some
subset of the rest. -/
theorem SetIndependent.disjoint_sSup {x : α} {y : Set α} (hx : x ∈ s) (hy : y ⊆ s) (hxy : x ∉ y) :
    Disjoint x (sSup y) := by
  have := (hs.mono <| insert_subset_iff.mpr ⟨hx, hy⟩) (mem_insert x _)
  rw [insert_diff_of_mem _ (mem_singleton _), diff_singleton_eq_self hxy] at this
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝ : CompleteLattice α
s : Set α
hs : SetIndependent s
x : α
y : Set α
hx : x ∈ s
hy : y ⊆ s
hxy : x ∉ y
this : Disjoint x (sSup y)
⊢ Disjoint x (sSup y)

Next tactic:
exact this
theorem setIndependent_iff {α : Type*} [CompleteLattice α] (s : Set α) :
    SetIndependent s ↔ Independent ((↑) : s → α) := by
  

Proof state:
α✝ : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝¹ : CompleteLattice α✝
s✝ : Set α✝
hs : SetIndependent s✝
α : Type u_5
inst✝ : CompleteLattice α
s : Set α
⊢ SetIndependent s ↔ Independent Subtype.val

Next tactic:
simp_rw [Independent, SetIndependent, SetCoe.forall, sSup_eq_iSup]
theorem setIndependent_iff {α : Type*} [CompleteLattice α] (s : Set α) :
    SetIndependent s ↔ Independent ((↑) : s → α) := by
  simp_rw [Independent, SetIndependent, SetCoe.forall, sSup_eq_iSup]
  

Proof state:
α✝ : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝¹ : CompleteLattice α✝
s✝ : Set α✝
hs : SetIndependent s✝
α : Type u_5
inst✝ : CompleteLattice α
s : Set α
⊢ (∀ ⦃a : α⦄, a ∈ s → Disjoint a (⨆ a_2 ∈ s \ {a}, a_2)) ↔
    ∀ (x : α) (h : x ∈ s), Disjoint x (⨆ j, ⨆ (_ : j ≠ { val := x, property := h }), ↑j)

Next tactic:
refine' forall₂_congr fun a ha => _
theorem setIndependent_iff {α : Type*} [CompleteLattice α] (s : Set α) :
    SetIndependent s ↔ Independent ((↑) : s → α) := by
  simp_rw [Independent, SetIndependent, SetCoe.forall, sSup_eq_iSup]
  refine' forall₂_congr fun a ha => _
  

Proof state:
α✝ : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝¹ : CompleteLattice α✝
s✝ : Set α✝
hs : SetIndependent s✝
α : Type u_5
inst✝ : CompleteLattice α
s : Set α
a : α
ha : a ∈ s
⊢ Disjoint a (⨆ a_1 ∈ s \ {a}, a_1) ↔ Disjoint a (⨆ j, ⨆ (_ : j ≠ { val := a, property := ha }), ↑j)

Next tactic:
simp [iSup_subtype, iSup_and]
theorem independent_def' : Independent t ↔ ∀ i, Disjoint (t i) (sSup (t '' { j | j ≠ i })) := by
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝ : CompleteLattice α
s : Set α
hs : SetIndependent s
t : ι → α
ht : Independent t
⊢ Independent t ↔ ∀ (i : ι), Disjoint (t i) (sSup (t '' {j | j ≠ i}))

Next tactic:
simp_rw [sSup_image]
theorem independent_def' : Independent t ↔ ∀ i, Disjoint (t i) (sSup (t '' { j | j ≠ i })) := by
  simp_rw [sSup_image]
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝ : CompleteLattice α
s : Set α
hs : SetIndependent s
t : ι → α
ht : Independent t
⊢ Independent t ↔ ∀ (i : ι), Disjoint (t i) (⨆ a ∈ {j | j ≠ i}, t a)

Next tactic:
rfl
theorem independent_def'' :
    Independent t ↔ ∀ i, Disjoint (t i) (sSup { a | ∃ (j : _) (_ : j ≠ i), t j = a }) := by
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝ : CompleteLattice α
s : Set α
hs : SetIndependent s
t : ι → α
ht : Independent t
⊢ Independent t ↔ ∀ (i : ι), Disjoint (t i) (sSup {a | ∃ j, ∃ (_ : j ≠ i), t j = a})

Next tactic:
rw [independent_def']
theorem independent_def'' :
    Independent t ↔ ∀ i, Disjoint (t i) (sSup { a | ∃ (j : _) (_ : j ≠ i), t j = a }) := by
  rw [independent_def']
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝ : CompleteLattice α
s : Set α
hs : SetIndependent s
t : ι → α
ht : Independent t
⊢ (∀ (i : ι), Disjoint (t i) (sSup (t '' {j | j ≠ i}))) ↔
    ∀ (i : ι), Disjoint (t i) (sSup {a | ∃ j, ∃ (_ : j ≠ i), t j = a})

Next tactic:
aesop
/-- Composing an independent indexed family with an injective function on the index results in
another indepedendent indexed family. -/
theorem Independent.comp {ι ι' : Sort*} {t : ι → α} {f : ι' → ι} (ht : Independent t)
    (hf : Injective f) : Independent (t ∘ f) := fun i =>
  (ht (f i)).mono_right <| by
    

Proof state:
α : Type u_1
β : Type u_2
ι✝ : Type u_3
ι'✝ : Type u_4
inst✝ : CompleteLattice α
s : Set α
hs : SetIndependent s
t✝ : ι✝ → α
ht✝ : Independent t✝
ι : Sort u_5
ι' : Sort u_6
t : ι → α
f : ι' → ι
ht : Independent t
hf : Injective f
i : ι'
⊢ ⨆ j, ⨆ (_ : j ≠ i), (t ∘ f) j ≤ ⨆ j, ⨆ (_ : j ≠ f i), t j

Next tactic:
refine' (iSup_mono fun i => _).trans (iSup_comp_le _ f)
/-- Composing an independent indexed family with an injective function on the index results in
another indepedendent indexed family. -/
theorem Independent.comp {ι ι' : Sort*} {t : ι → α} {f : ι' → ι} (ht : Independent t)
    (hf : Injective f) : Independent (t ∘ f) := fun i =>
  (ht (f i)).mono_right <| by
    refine' (iSup_mono fun i => _).trans (iSup_comp_le _ f)
    

Proof state:
α : Type u_1
β : Type u_2
ι✝ : Type u_3
ι'✝ : Type u_4
inst✝ : CompleteLattice α
s : Set α
hs : SetIndependent s
t✝ : ι✝ → α
ht✝ : Independent t✝
ι : Sort u_5
ι' : Sort u_6
t : ι → α
f : ι' → ι
ht : Independent t
hf : Injective f
i✝ i : ι'
⊢ ⨆ (_ : i ≠ i✝), (t ∘ f) i ≤ ⨆ (_ : f i ≠ f i✝), t (f i)

Next tactic:
exact iSup_const_mono hf.ne
theorem Independent.comp' {ι ι' : Sort*} {t : ι → α} {f : ι' → ι} (ht : Independent <| t ∘ f)
    (hf : Surjective f) : Independent t := by
  

Proof state:
α : Type u_1
β : Type u_2
ι✝ : Type u_3
ι'✝ : Type u_4
inst✝ : CompleteLattice α
s : Set α
hs : SetIndependent s
t✝ : ι✝ → α
ht✝ : Independent t✝
ι : Sort u_5
ι' : Sort u_6
t : ι → α
f : ι' → ι
ht : Independent (t ∘ f)
hf : Surjective f
⊢ Independent t

Next tactic:
intro i
theorem Independent.comp' {ι ι' : Sort*} {t : ι → α} {f : ι' → ι} (ht : Independent <| t ∘ f)
    (hf : Surjective f) : Independent t := by
  intro i
  

Proof state:
α : Type u_1
β : Type u_2
ι✝ : Type u_3
ι'✝ : Type u_4
inst✝ : CompleteLattice α
s : Set α
hs : SetIndependent s
t✝ : ι✝ → α
ht✝ : Independent t✝
ι : Sort u_5
ι' : Sort u_6
t : ι → α
f : ι' → ι
ht : Independent (t ∘ f)
hf : Surjective f
i : ι
⊢ Disjoint (t i) (⨆ j, ⨆ (_ : j ≠ i), t j)

Next tactic:
obtain ⟨i', rfl⟩ := hf i
theorem Independent.comp' {ι ι' : Sort*} {t : ι → α} {f : ι' → ι} (ht : Independent <| t ∘ f)
    (hf : Surjective f) : Independent t := by
  intro i
  obtain ⟨i', rfl⟩ := hf i
  

Proof state:
case intro
α : Type u_1
β : Type u_2
ι✝ : Type u_3
ι'✝ : Type u_4
inst✝ : CompleteLattice α
s : Set α
hs : SetIndependent s
t✝ : ι✝ → α
ht✝ : Independent t✝
ι : Sort u_5
ι' : Sort u_6
t : ι → α
f : ι' → ι
ht : Independent (t ∘ f)
hf : Surjective f
i' : ι'
⊢ Disjoint (t (f i')) (⨆ j, ⨆ (_ : j ≠ f i'), t j)

Next tactic:
rw [← hf.iSup_comp]
theorem Independent.comp' {ι ι' : Sort*} {t : ι → α} {f : ι' → ι} (ht : Independent <| t ∘ f)
    (hf : Surjective f) : Independent t := by
  intro i
  obtain ⟨i', rfl⟩ := hf i
  rw [← hf.iSup_comp]
  

Proof state:
case intro
α : Type u_1
β : Type u_2
ι✝ : Type u_3
ι'✝ : Type u_4
inst✝ : CompleteLattice α
s : Set α
hs : SetIndependent s
t✝ : ι✝ → α
ht✝ : Independent t✝
ι : Sort u_5
ι' : Sort u_6
t : ι → α
f : ι' → ι
ht : Independent (t ∘ f)
hf : Surjective f
i' : ι'
⊢ Disjoint (t (f i')) (⨆ x, ⨆ (_ : f x ≠ f i'), t (f x))

Next tactic:
exact (ht i').mono_right (biSup_mono fun j' hij => mt (congr_arg f) hij)
theorem Independent.setIndependent_range (ht : Independent t) : SetIndependent <| range t := by
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝ : CompleteLattice α
s : Set α
hs : SetIndependent s
t : ι → α
ht✝ ht : Independent t
⊢ SetIndependent (range t)

Next tactic:
rw [setIndependent_iff]
theorem Independent.setIndependent_range (ht : Independent t) : SetIndependent <| range t := by
  rw [setIndependent_iff]
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝ : CompleteLattice α
s : Set α
hs : SetIndependent s
t : ι → α
ht✝ ht : Independent t
⊢ Independent Subtype.val

Next tactic:
rw [← coe_comp_rangeFactorization t] at ht
theorem Independent.setIndependent_range (ht : Independent t) : SetIndependent <| range t := by
  rw [setIndependent_iff]
  rw [← coe_comp_rangeFactorization t] at ht
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝ : CompleteLattice α
s : Set α
hs : SetIndependent s
t : ι → α
ht✝ : Independent t
ht : Independent (Subtype.val ∘ rangeFactorization t)
⊢ Independent Subtype.val

Next tactic:
exact ht.comp' surjective_onto_range
@[simp]
theorem independent_ne_bot_iff_independent :
    Independent (fun i : {i // t i ≠ ⊥} ↦ t i) ↔ Independent t := by
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝ : CompleteLattice α
s : Set α
hs : SetIndependent s
t : ι → α
ht : Independent t
⊢ (Independent fun i => t ↑i) ↔ Independent t

Next tactic:
refine ⟨fun h ↦ ?_, fun h ↦ h.comp Subtype.val_injective⟩
@[simp]
theorem independent_ne_bot_iff_independent :
    Independent (fun i : {i // t i ≠ ⊥} ↦ t i) ↔ Independent t := by
  refine ⟨fun h ↦ ?_, fun h ↦ h.comp Subtype.val_injective⟩
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝ : CompleteLattice α
s : Set α
hs : SetIndependent s
t : ι → α
ht : Independent t
h : Independent fun i => t ↑i
⊢ Independent t

Next tactic:
simp only [independent_def] at h ⊢
@[simp]
theorem independent_ne_bot_iff_independent :
    Independent (fun i : {i // t i ≠ ⊥} ↦ t i) ↔ Independent t := by
  refine ⟨fun h ↦ ?_, fun h ↦ h.comp Subtype.val_injective⟩
  simp only [independent_def] at h ⊢
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝ : CompleteLattice α
s : Set α
hs : SetIndependent s
t : ι → α
ht : Independent t
h : ∀ (i : { i // t i ≠ ⊥ }), Disjoint (t ↑i) (⨆ j, ⨆ (_ : j ≠ i), t ↑j)
⊢ ∀ (i : ι), Disjoint (t i) (⨆ j, ⨆ (_ : j ≠ i), t j)

Next tactic:
intro i
@[simp]
theorem independent_ne_bot_iff_independent :
    Independent (fun i : {i // t i ≠ ⊥} ↦ t i) ↔ Independent t := by
  refine ⟨fun h ↦ ?_, fun h ↦ h.comp Subtype.val_injective⟩
  simp only [independent_def] at h ⊢
  intro i
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝ : CompleteLattice α
s : Set α
hs : SetIndependent s
t : ι → α
ht : Independent t
h : ∀ (i : { i // t i ≠ ⊥ }), Disjoint (t ↑i) (⨆ j, ⨆ (_ : j ≠ i), t ↑j)
i : ι
⊢ Disjoint (t i) (⨆ j, ⨆ (_ : j ≠ i), t j)

Next tactic:
cases eq_or_ne (t i) ⊥ with
  | inl hi => simp [hi]
  | inr hi => ?_
@[simp]
theorem independent_ne_bot_iff_independent :
    Independent (fun i : {i // t i ≠ ⊥} ↦ t i) ↔ Independent t := by
  refine ⟨fun h ↦ ?_, fun h ↦ h.comp Subtype.val_injective⟩
  simp only [independent_def] at h ⊢
  intro i
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝ : CompleteLattice α
s : Set α
hs : SetIndependent s
t : ι → α
ht : Independent t
h : ∀ (i : { i // t i ≠ ⊥ }), Disjoint (t ↑i) (⨆ j, ⨆ (_ : j ≠ i), t ↑j)
i : ι
x✝ : t i = ⊥ ∨ t i ≠ ⊥
⊢ Disjoint (t i) (⨆ j, ⨆ (_ : j ≠ i), t j)

Next tactic:
cases eq_or_ne (t i) ⊥ with
  | inl hi => simp [hi]
  | inr hi => ?_
@[simp]
theorem independent_ne_bot_iff_independent :
    Independent (fun i : {i // t i ≠ ⊥} ↦ t i) ↔ Independent t := by
  refine ⟨fun h ↦ ?_, fun h ↦ h.comp Subtype.val_injective⟩
  simp only [independent_def] at h ⊢
  intro i
  cases eq_or_ne (t i) ⊥ with
  

Proof state:
case inl
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝ : CompleteLattice α
s : Set α
hs : SetIndependent s
t : ι → α
ht : Independent t
h : ∀ (i : { i // t i ≠ ⊥ }), Disjoint (t ↑i) (⨆ j, ⨆ (_ : j ≠ i), t ↑j)
i : ι
hi : t i = ⊥
⊢ Disjoint (t i) (⨆ j, ⨆ (_ : j ≠ i), t j)

Next tactic:
| inl hi => simp [hi]
@[simp]
theorem independent_ne_bot_iff_independent :
    Independent (fun i : {i // t i ≠ ⊥} ↦ t i) ↔ Independent t := by
  refine ⟨fun h ↦ ?_, fun h ↦ h.comp Subtype.val_injective⟩
  simp only [independent_def] at h ⊢
  intro i
  cases eq_or_ne (t i) ⊥ with
  | inl hi => 

Proof state:
case inl
α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝ : CompleteLattice α
s : Set α
hs : SetIndependent s
t : ι → α
ht : Independent t
h : ∀ (i : { i // t i ≠ ⊥ }), Disjoint (t ↑i) (⨆ j, ⨆ (_ : j ≠ i), t ↑j)
i : ι
hi : t i = ⊥
⊢ Disjoint (t i) (⨆ j, ⨆ (_ : j ≠ i), t j)

Next tactic:
simp [hi]