l3lab/ntp-mathlib huggingface dataset:
/-- A multiplicative equivalence between `(M ∗ N) ∗ P` and `M ∗ (N ∗ P)`. -/
@[to_additive "An additive equivalence between `AddMonoid.Coprod (AddMonoid.Coprod M N) P` and
`AddMonoid.Coprod M (AddMonoid.Coprod N P)`."]
def coprodAssoc : (M ∗ N) ∗ P ≃* M ∗ (N ∗ P) :=
  MonoidHom.toMulEquiv
    (Coprod.lift (Coprod.map (.id M) inl) (inr.comp inr))
    (Coprod.lift (inl.comp inl) (Coprod.map inr (.id P)))
    (by ext <;> rfl) (by ext <;> 

Proof state:
case h₂.h₂.h
M : Type u_1
N : Type u_2
P : Type u_3
inst✝² : Monoid M
inst✝¹ : Monoid N
inst✝ : Monoid P
x✝ : P
⊢ (MonoidHom.comp
        (MonoidHom.comp
          (MonoidHom.comp (Coprod.lift (Coprod.map (MonoidHom.id M) inl) (MonoidHom.comp inr inr))
            (Coprod.lift (MonoidHom.comp inl inl) (Coprod.map inr (MonoidHom.id P))))
          inr)
        inr)
      x✝ =
    (MonoidHom.comp (MonoidHom.comp (MonoidHom.id (M ∗ (N ∗ P))) inr) inr) x✝

Next tactic:
rfl
@[simp]
theorem mem_sups : c ∈ s ⊻ t ↔ ∃ a ∈ s, ∃ b ∈ t, a ⊔ b = c := by 

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
inst✝⁴ : DecidableEq α
inst✝³ : DecidableEq β
inst✝² : SemilatticeSup α
inst✝¹ : SemilatticeSup β
inst✝ : SupHomClass F α β
s s₁ s₂ t t₁ t₂ u v : Finset α
a b c : α
⊢ c ∈ s ⊻ t ↔ ∃ a ∈ s, ∃ b ∈ t, a ⊔ b = c

Next tactic:
simp [(· ⊻ ·)]
lemma map_sups (f : F) (hf) (s t : Finset α) :
    map ⟨f, hf⟩ (s ⊻ t) = map ⟨f, hf⟩ s ⊻ map ⟨f, hf⟩ t := by
  

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
inst✝⁴ : DecidableEq α
inst✝³ : DecidableEq β
inst✝² : SemilatticeSup α
inst✝¹ : SemilatticeSup β
inst✝ : SupHomClass F α β
s✝ s₁ s₂ t✝ t₁ t₂ u v : Finset α
a b c : α
f : F
hf : Injective ⇑f
s t : Finset α
⊢ map { toFun := ⇑f, inj' := hf } (s ⊻ t) = map { toFun := ⇑f, inj' := hf } s ⊻ map { toFun := ⇑f, inj' := hf } t

Next tactic:
simpa [map_eq_image] using image_sups f s t
@[simp] lemma sups_eq_self : s ⊻ s = s ↔ SupClosed (s : Set α) := by 

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
inst✝⁴ : DecidableEq α
inst✝³ : DecidableEq β
inst✝² : SemilatticeSup α
inst✝¹ : SemilatticeSup β
inst✝ : SupHomClass F α β
s s₁ s₂ t t₁ t₂ u v : Finset α
a b c : α
⊢ s ⊻ s = s ↔ SupClosed ↑s

Next tactic:
simp [← coe_inj]
@[simp] lemma univ_sups_univ [Fintype α] : (univ : Finset α) ⊻ univ = univ := by 

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
inst✝⁵ : DecidableEq α
inst✝⁴ : DecidableEq β
inst✝³ : SemilatticeSup α
inst✝² : SemilatticeSup β
inst✝¹ : SupHomClass F α β
s s₁ s₂ t t₁ t₂ u v : Finset α
a b c : α
inst✝ : Fintype α
⊢ univ ⊻ univ = univ

Next tactic:
simp
lemma filter_sups_le [@DecidableRel α (· ≤ ·)] (s t : Finset α) (a : α) :
    (s ⊻ t).filter (· ≤ a) = s.filter (· ≤ a) ⊻ t.filter (· ≤ a) := by
  

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
inst✝⁵ : DecidableEq α
inst✝⁴ : DecidableEq β
inst✝³ : SemilatticeSup α
inst✝² : SemilatticeSup β
inst✝¹ : SupHomClass F α β
s✝ s₁ s₂ t✝ t₁ t₂ u v : Finset α
a✝ b c : α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
s t : Finset α
a : α
⊢ filter (fun x => x ≤ a) (s ⊻ t) = filter (fun x => x ≤ a) s ⊻ filter (fun x => x ≤ a) t

Next tactic:
simp only [← coe_inj, coe_filter, coe_sups, ← mem_coe, Set.sep_sups_le]
@[simp]
theorem mem_infs : c ∈ s ⊼ t ↔ ∃ a ∈ s, ∃ b ∈ t, a ⊓ b = c := by 

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
inst✝⁴ : DecidableEq α
inst✝³ : DecidableEq β
inst✝² : SemilatticeInf α
inst✝¹ : SemilatticeInf β
inst✝ : InfHomClass F α β
s s₁ s₂ t t₁ t₂ u v : Finset α
a b c : α
⊢ c ∈ s ⊼ t ↔ ∃ a ∈ s, ∃ b ∈ t, a ⊓ b = c

Next tactic:
simp [(· ⊼ ·)]
lemma map_infs (f : F) (hf) (s t : Finset α) :
    map ⟨f, hf⟩ (s ⊼ t) = map ⟨f, hf⟩ s ⊼ map ⟨f, hf⟩ t := by
  

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
inst✝⁴ : DecidableEq α
inst✝³ : DecidableEq β
inst✝² : SemilatticeInf α
inst✝¹ : SemilatticeInf β
inst✝ : InfHomClass F α β
s✝ s₁ s₂ t✝ t₁ t₂ u v : Finset α
a b c : α
f : F
hf : Injective ⇑f
s t : Finset α
⊢ map { toFun := ⇑f, inj' := hf } (s ⊼ t) = map { toFun := ⇑f, inj' := hf } s ⊼ map { toFun := ⇑f, inj' := hf } t

Next tactic:
simpa [map_eq_image] using image_infs f s t
@[simp] lemma infs_self : s ⊼ s = s ↔ InfClosed (s : Set α) := by 

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
inst✝⁴ : DecidableEq α
inst✝³ : DecidableEq β
inst✝² : SemilatticeInf α
inst✝¹ : SemilatticeInf β
inst✝ : InfHomClass F α β
s s₁ s₂ t t₁ t₂ u v : Finset α
a b c : α
⊢ s ⊼ s = s ↔ InfClosed ↑s

Next tactic:
simp [← coe_inj]
@[simp] lemma univ_infs_univ [Fintype α] : (univ : Finset α) ⊼ univ = univ := by 

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
inst✝⁵ : DecidableEq α
inst✝⁴ : DecidableEq β
inst✝³ : SemilatticeInf α
inst✝² : SemilatticeInf β
inst✝¹ : InfHomClass F α β
s s₁ s₂ t t₁ t₂ u v : Finset α
a b c : α
inst✝ : Fintype α
⊢ univ ⊼ univ = univ

Next tactic:
simp
lemma filter_infs_le [@DecidableRel α (· ≤ ·)] (s t : Finset α) (a : α) :
    (s ⊼ t).filter (a ≤ ·) = s.filter (a ≤ ·) ⊼ t.filter (a ≤ ·) := by
  

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
inst✝⁵ : DecidableEq α
inst✝⁴ : DecidableEq β
inst✝³ : SemilatticeInf α
inst✝² : SemilatticeInf β
inst✝¹ : InfHomClass F α β
s✝ s₁ s₂ t✝ t₁ t₂ u v : Finset α
a✝ b c : α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
s t : Finset α
a : α
⊢ filter (fun x => a ≤ x) (s ⊼ t) = filter (fun x => a ≤ x) s ⊼ filter (fun x => a ≤ x) t

Next tactic:
simp only [← coe_inj, coe_filter, coe_infs, ← mem_coe, Set.sep_infs_le]
@[simp] lemma powerset_union (s t : Finset α) : (s ∪ t).powerset = s.powerset ⊻ t.powerset := by
  

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
𝒜 ℬ : Finset (Finset α)
s✝ t✝ : Finset α
a : α
s t : Finset α
⊢ powerset (s ∪ t) = powerset s ⊻ powerset t

Next tactic:
ext u
@[simp] lemma powerset_union (s t : Finset α) : (s ∪ t).powerset = s.powerset ⊻ t.powerset := by
  ext u
  

Proof state:
case a
F : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
𝒜 ℬ : Finset (Finset α)
s✝ t✝ : Finset α
a : α
s t u : Finset α
⊢ u ∈ powerset (s ∪ t) ↔ u ∈ powerset s ⊻ powerset t

Next tactic:
simp only [mem_sups, mem_powerset, le_eq_subset, sup_eq_union]
@[simp] lemma powerset_union (s t : Finset α) : (s ∪ t).powerset = s.powerset ⊻ t.powerset := by
  ext u
  simp only [mem_sups, mem_powerset, le_eq_subset, sup_eq_union]
  

Proof state:
case a
F : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
𝒜 ℬ : Finset (Finset α)
s✝ t✝ : Finset α
a : α
s t u : Finset α
⊢ u ⊆ s ∪ t ↔ ∃ a ⊆ s, ∃ b ⊆ t, a ∪ b = u

Next tactic:
refine ⟨fun h ↦ ⟨_, inter_subset_left _ u, _, inter_subset_left _ u, ?_⟩, ?_⟩
@[simp] lemma powerset_union (s t : Finset α) : (s ∪ t).powerset = s.powerset ⊻ t.powerset := by
  ext u
  simp only [mem_sups, mem_powerset, le_eq_subset, sup_eq_union]
  refine ⟨fun h ↦ ⟨_, inter_subset_left _ u, _, inter_subset_left _ u, ?_⟩, ?_⟩
  · 

Proof state:
case a.refine_1
F : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
𝒜 ℬ : Finset (Finset α)
s✝ t✝ : Finset α
a : α
s t u : Finset α
h : u ⊆ s ∪ t
⊢ s ∩ u ∪ t ∩ u = u

Next tactic:
rwa [← inter_distrib_right, inter_eq_right]
@[simp] lemma powerset_union (s t : Finset α) : (s ∪ t).powerset = s.powerset ⊻ t.powerset := by
  ext u
  simp only [mem_sups, mem_powerset, le_eq_subset, sup_eq_union]
  refine ⟨fun h ↦ ⟨_, inter_subset_left _ u, _, inter_subset_left _ u, ?_⟩, ?_⟩
  · rwa [← inter_distrib_right, inter_eq_right]
  · 

Proof state:
case a.refine_2
F : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
𝒜 ℬ : Finset (Finset α)
s✝ t✝ : Finset α
a : α
s t u : Finset α
⊢ (∃ a ⊆ s, ∃ b ⊆ t, a ∪ b = u) → u ⊆ s ∪ t

Next tactic:
rintro ⟨v, hv, w, hw, rfl⟩
@[simp] lemma powerset_union (s t : Finset α) : (s ∪ t).powerset = s.powerset ⊻ t.powerset := by
  ext u
  simp only [mem_sups, mem_powerset, le_eq_subset, sup_eq_union]
  refine ⟨fun h ↦ ⟨_, inter_subset_left _ u, _, inter_subset_left _ u, ?_⟩, ?_⟩
  · rwa [← inter_distrib_right, inter_eq_right]
  · rintro ⟨v, hv, w, hw, rfl⟩
    

Proof state:
case a.refine_2.intro.intro.intro.intro
F : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
𝒜 ℬ : Finset (Finset α)
s✝ t✝ : Finset α
a : α
s t v : Finset α
hv : v ⊆ s
w : Finset α
hw : w ⊆ t
⊢ v ∪ w ⊆ s ∪ t

Next tactic:
exact union_subset_union hv hw
@[simp] lemma powerset_inter (s t : Finset α) : (s ∩ t).powerset = s.powerset ⊼ t.powerset := by
  

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
𝒜 ℬ : Finset (Finset α)
s✝ t✝ : Finset α
a : α
s t : Finset α
⊢ powerset (s ∩ t) = powerset s ⊼ powerset t

Next tactic:
ext u
@[simp] lemma powerset_inter (s t : Finset α) : (s ∩ t).powerset = s.powerset ⊼ t.powerset := by
  ext u
  

Proof state:
case a
F : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
𝒜 ℬ : Finset (Finset α)
s✝ t✝ : Finset α
a : α
s t u : Finset α
⊢ u ∈ powerset (s ∩ t) ↔ u ∈ powerset s ⊼ powerset t

Next tactic:
simp only [mem_infs, mem_powerset, le_eq_subset, inf_eq_inter]
@[simp] lemma powerset_inter (s t : Finset α) : (s ∩ t).powerset = s.powerset ⊼ t.powerset := by
  ext u
  simp only [mem_infs, mem_powerset, le_eq_subset, inf_eq_inter]
  

Proof state:
case a
F : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
𝒜 ℬ : Finset (Finset α)
s✝ t✝ : Finset α
a : α
s t u : Finset α
⊢ u ⊆ s ∩ t ↔ ∃ a ⊆ s, ∃ b ⊆ t, a ∩ b = u

Next tactic:
refine ⟨fun h ↦ ⟨_, inter_subset_left _ u, _, inter_subset_left _ u, ?_⟩, ?_⟩
@[simp] lemma powerset_inter (s t : Finset α) : (s ∩ t).powerset = s.powerset ⊼ t.powerset := by
  ext u
  simp only [mem_infs, mem_powerset, le_eq_subset, inf_eq_inter]
  refine ⟨fun h ↦ ⟨_, inter_subset_left _ u, _, inter_subset_left _ u, ?_⟩, ?_⟩
  · 

Proof state:
case a.refine_1
F : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
𝒜 ℬ : Finset (Finset α)
s✝ t✝ : Finset α
a : α
s t u : Finset α
h : u ⊆ s ∩ t
⊢ s ∩ u ∩ (t ∩ u) = u

Next tactic:
rwa [← inter_inter_distrib_right, inter_eq_right]
@[simp] lemma powerset_inter (s t : Finset α) : (s ∩ t).powerset = s.powerset ⊼ t.powerset := by
  ext u
  simp only [mem_infs, mem_powerset, le_eq_subset, inf_eq_inter]
  refine ⟨fun h ↦ ⟨_, inter_subset_left _ u, _, inter_subset_left _ u, ?_⟩, ?_⟩
  · rwa [← inter_inter_distrib_right, inter_eq_right]
  · 

Proof state:
case a.refine_2
F : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
𝒜 ℬ : Finset (Finset α)
s✝ t✝ : Finset α
a : α
s t u : Finset α
⊢ (∃ a ⊆ s, ∃ b ⊆ t, a ∩ b = u) → u ⊆ s ∩ t

Next tactic:
rintro ⟨v, hv, w, hw, rfl⟩
@[simp] lemma powerset_inter (s t : Finset α) : (s ∩ t).powerset = s.powerset ⊼ t.powerset := by
  ext u
  simp only [mem_infs, mem_powerset, le_eq_subset, inf_eq_inter]
  refine ⟨fun h ↦ ⟨_, inter_subset_left _ u, _, inter_subset_left _ u, ?_⟩, ?_⟩
  · rwa [← inter_inter_distrib_right, inter_eq_right]
  · rintro ⟨v, hv, w, hw, rfl⟩
    

Proof state:
case a.refine_2.intro.intro.intro.intro
F : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
𝒜 ℬ : Finset (Finset α)
s✝ t✝ : Finset α
a : α
s t v : Finset α
hv : v ⊆ s
w : Finset α
hw : w ⊆ t
⊢ v ∩ w ⊆ s ∩ t

Next tactic:
exact inter_subset_inter hv hw
@[simp] lemma powerset_sups_powerset_self (s : Finset α) :
    s.powerset ⊻ s.powerset = s.powerset := by 

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
𝒜 ℬ : Finset (Finset α)
s✝ t : Finset α
a : α
s : Finset α
⊢ powerset s ⊻ powerset s = powerset s

Next tactic:
simp [← powerset_union]
@[simp] lemma powerset_infs_powerset_self (s : Finset α) :
    s.powerset ⊼ s.powerset = s.powerset := by 

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
𝒜 ℬ : Finset (Finset α)
s✝ t : Finset α
a : α
s : Finset α
⊢ powerset s ⊼ powerset s = powerset s

Next tactic:
simp [← powerset_inter]
@[simp]
theorem mem_disjSups : c ∈ s ○ t ↔ ∃ a ∈ s, ∃ b ∈ t, Disjoint a b ∧ a ⊔ b = c := by
  

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
inst✝⁴ : DecidableEq α
inst✝³ : DecidableEq β
inst✝² : SemilatticeSup α
inst✝¹ : OrderBot α
inst✝ : DecidableRel Disjoint
s s₁ s₂ t t₁ t₂ u : Finset α
a b c : α
⊢ c ∈ s ○ t ↔ ∃ a ∈ s, ∃ b ∈ t, Disjoint a b ∧ a ⊔ b = c

Next tactic:
simp [disjSups, and_assoc]
theorem disjSups_subset_sups : s ○ t ⊆ s ⊻ t := by
  

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
inst✝⁴ : DecidableEq α
inst✝³ : DecidableEq β
inst✝² : SemilatticeSup α
inst✝¹ : OrderBot α
inst✝ : DecidableRel Disjoint
s s₁ s₂ t t₁ t₂ u : Finset α
a b c : α
⊢ s ○ t ⊆ s ⊻ t

Next tactic:
simp_rw [subset_iff, mem_sups, mem_disjSups]
theorem disjSups_subset_sups : s ○ t ⊆ s ⊻ t := by
  simp_rw [subset_iff, mem_sups, mem_disjSups]
  

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
inst✝⁴ : DecidableEq α
inst✝³ : DecidableEq β
inst✝² : SemilatticeSup α
inst✝¹ : OrderBot α
inst✝ : DecidableRel Disjoint
s s₁ s₂ t t₁ t₂ u : Finset α
a b c : α
⊢ ∀ ⦃x : α⦄, (∃ a ∈ s, ∃ b ∈ t, Disjoint a b ∧ a ⊔ b = x) → ∃ a ∈ s, ∃ b ∈ t, a ⊔ b = x

Next tactic:
exact fun c ⟨a, b, ha, hb, _, hc⟩ => ⟨a, b, ha, hb, hc⟩
theorem forall_disjSups_iff {p : α → Prop} :
    (∀ c ∈ s ○ t, p c) ↔ ∀ a ∈ s, ∀ b ∈ t, Disjoint a b → p (a ⊔ b) := by
  

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
inst✝⁴ : DecidableEq α
inst✝³ : DecidableEq β
inst✝² : SemilatticeSup α
inst✝¹ : OrderBot α
inst✝ : DecidableRel Disjoint
s s₁ s₂ t t₁ t₂ u : Finset α
a b c : α
p : α → Prop
⊢ (∀ c ∈ s ○ t, p c) ↔ ∀ a ∈ s, ∀ b ∈ t, Disjoint a b → p (a ⊔ b)

Next tactic:
simp_rw [mem_disjSups]
theorem forall_disjSups_iff {p : α → Prop} :
    (∀ c ∈ s ○ t, p c) ↔ ∀ a ∈ s, ∀ b ∈ t, Disjoint a b → p (a ⊔ b) := by
  simp_rw [mem_disjSups]
  

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
inst✝⁴ : DecidableEq α
inst✝³ : DecidableEq β
inst✝² : SemilatticeSup α
inst✝¹ : OrderBot α
inst✝ : DecidableRel Disjoint
s s₁ s₂ t t₁ t₂ u : Finset α
a b c : α
p : α → Prop
⊢ (∀ (c : α), (∃ a ∈ s, ∃ b ∈ t, Disjoint a b ∧ a ⊔ b = c) → p c) ↔ ∀ a ∈ s, ∀ b ∈ t, Disjoint a b → p (a ⊔ b)

Next tactic:
refine' ⟨fun h a ha b hb hab => h _ ⟨_, ha, _, hb, hab, rfl⟩, _⟩
theorem forall_disjSups_iff {p : α → Prop} :
    (∀ c ∈ s ○ t, p c) ↔ ∀ a ∈ s, ∀ b ∈ t, Disjoint a b → p (a ⊔ b) := by
  simp_rw [mem_disjSups]
  refine' ⟨fun h a ha b hb hab => h _ ⟨_, ha, _, hb, hab, rfl⟩, _⟩
  

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
inst✝⁴ : DecidableEq α
inst✝³ : DecidableEq β
inst✝² : SemilatticeSup α
inst✝¹ : OrderBot α
inst✝ : DecidableRel Disjoint
s s₁ s₂ t t₁ t₂ u : Finset α
a b c : α
p : α → Prop
⊢ (∀ a ∈ s, ∀ b ∈ t, Disjoint a b → p (a ⊔ b)) → ∀ (c : α), (∃ a ∈ s, ∃ b ∈ t, Disjoint a b ∧ a ⊔ b = c) → p c

Next tactic:
rintro h _ ⟨a, ha, b, hb, hab, rfl⟩
theorem forall_disjSups_iff {p : α → Prop} :
    (∀ c ∈ s ○ t, p c) ↔ ∀ a ∈ s, ∀ b ∈ t, Disjoint a b → p (a ⊔ b) := by
  simp_rw [mem_disjSups]
  refine' ⟨fun h a ha b hb hab => h _ ⟨_, ha, _, hb, hab, rfl⟩, _⟩
  rintro h _ ⟨a, ha, b, hb, hab, rfl⟩
  

Proof state:
case intro.intro.intro.intro.intro
F : Type u_1
α : Type u_2
β : Type u_3
inst✝⁴ : DecidableEq α
inst✝³ : DecidableEq β
inst✝² : SemilatticeSup α
inst✝¹ : OrderBot α
inst✝ : DecidableRel Disjoint
s s₁ s₂ t t₁ t₂ u : Finset α
a✝ b✝ c : α
p : α → Prop
h : ∀ a ∈ s, ∀ b ∈ t, Disjoint a b → p (a ⊔ b)
a : α
ha : a ∈ s
b : α
hb : b ∈ t
hab : Disjoint a b
⊢ p (a ⊔ b)

Next tactic:
exact h _ ha _ hb hab
theorem Nonempty.of_disjSups_left : (s ○ t).Nonempty → s.Nonempty := by
  

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
inst✝⁴ : DecidableEq α
inst✝³ : DecidableEq β
inst✝² : SemilatticeSup α
inst✝¹ : OrderBot α
inst✝ : DecidableRel Disjoint
s s₁ s₂ t t₁ t₂ u : Finset α
a b c : α
⊢ Finset.Nonempty (s ○ t) → Finset.Nonempty s

Next tactic:
simp_rw [Finset.Nonempty, mem_disjSups]
theorem Nonempty.of_disjSups_left : (s ○ t).Nonempty → s.Nonempty := by
  simp_rw [Finset.Nonempty, mem_disjSups]
  

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
inst✝⁴ : DecidableEq α
inst✝³ : DecidableEq β
inst✝² : SemilatticeSup α
inst✝¹ : OrderBot α
inst✝ : DecidableRel Disjoint
s s₁ s₂ t t₁ t₂ u : Finset α
a b c : α
⊢ (∃ x, ∃ a ∈ s, ∃ b ∈ t, Disjoint a b ∧ a ⊔ b = x) → ∃ x, x ∈ s

Next tactic:
exact fun ⟨_, a, ha, _⟩ => ⟨a, ha⟩
theorem Nonempty.of_disjSups_right : (s ○ t).Nonempty → t.Nonempty := by
  

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
inst✝⁴ : DecidableEq α
inst✝³ : DecidableEq β
inst✝² : SemilatticeSup α
inst✝¹ : OrderBot α
inst✝ : DecidableRel Disjoint
s s₁ s₂ t t₁ t₂ u : Finset α
a b c : α
⊢ Finset.Nonempty (s ○ t) → Finset.Nonempty t

Next tactic:
simp_rw [Finset.Nonempty, mem_disjSups]
theorem Nonempty.of_disjSups_right : (s ○ t).Nonempty → t.Nonempty := by
  simp_rw [Finset.Nonempty, mem_disjSups]
  

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
inst✝⁴ : DecidableEq α
inst✝³ : DecidableEq β
inst✝² : SemilatticeSup α
inst✝¹ : OrderBot α
inst✝ : DecidableRel Disjoint
s s₁ s₂ t t₁ t₂ u : Finset α
a b c : α
⊢ (∃ x, ∃ a ∈ s, ∃ b ∈ t, Disjoint a b ∧ a ⊔ b = x) → ∃ x, x ∈ t

Next tactic:
exact fun ⟨_, _, _, b, hb, _⟩ => ⟨b, hb⟩
@[simp]
theorem disjSups_empty_left : ∅ ○ t = ∅ := by 

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
inst✝⁴ : DecidableEq α
inst✝³ : DecidableEq β
inst✝² : SemilatticeSup α
inst✝¹ : OrderBot α
inst✝ : DecidableRel Disjoint
s s₁ s₂ t t₁ t₂ u : Finset α
a b c : α
⊢ ∅ ○ t = ∅

Next tactic:
simp [disjSups]
@[simp]
theorem disjSups_empty_right : s ○ ∅ = ∅ := by 

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
inst✝⁴ : DecidableEq α
inst✝³ : DecidableEq β
inst✝² : SemilatticeSup α
inst✝¹ : OrderBot α
inst✝ : DecidableRel Disjoint
s s₁ s₂ t t₁ t₂ u : Finset α
a b c : α
⊢ s ○ ∅ = ∅

Next tactic:
simp [disjSups]
theorem disjSups_singleton : ({a} ○ {b} : Finset α) = if Disjoint a b then {a ⊔ b} else ∅ := by
  

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
inst✝⁴ : DecidableEq α
inst✝³ : DecidableEq β
inst✝² : SemilatticeSup α
inst✝¹ : OrderBot α
inst✝ : DecidableRel Disjoint
s s₁ s₂ t t₁ t₂ u : Finset α
a b c : α
⊢ {a} ○ {b} = if Disjoint a b then {a ⊔ b} else ∅

Next tactic:
split_ifs with h
theorem disjSups_singleton : ({a} ○ {b} : Finset α) = if Disjoint a b then {a ⊔ b} else ∅ := by
  split_ifs with h <;> 

Proof state:
case pos
F : Type u_1
α : Type u_2
β : Type u_3
inst✝⁴ : DecidableEq α
inst✝³ : DecidableEq β
inst✝² : SemilatticeSup α
inst✝¹ : OrderBot α
inst✝ : DecidableRel Disjoint
s s₁ s₂ t t₁ t₂ u : Finset α
a b c : α
h : Disjoint a b
⊢ {a} ○ {b} = {a ⊔ b}

Next tactic:
simp [disjSups, filter_singleton, h]
theorem disjSups_singleton : ({a} ○ {b} : Finset α) = if Disjoint a b then {a ⊔ b} else ∅ := by
  split_ifs with h <;> 

Proof state:
case neg
F : Type u_1
α : Type u_2
β : Type u_3
inst✝⁴ : DecidableEq α
inst✝³ : DecidableEq β
inst✝² : SemilatticeSup α
inst✝¹ : OrderBot α
inst✝ : DecidableRel Disjoint
s s₁ s₂ t t₁ t₂ u : Finset α
a b c : α
h : ¬Disjoint a b
⊢ {a} ○ {b} = ∅

Next tactic:
simp [disjSups, filter_singleton, h]
theorem disjSups_union_left : (s₁ ∪ s₂) ○ t = s₁ ○ t ∪ s₂ ○ t := by
  

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
inst✝⁴ : DecidableEq α
inst✝³ : DecidableEq β
inst✝² : SemilatticeSup α
inst✝¹ : OrderBot α
inst✝ : DecidableRel Disjoint
s s₁ s₂ t t₁ t₂ u : Finset α
a b c : α
⊢ (s₁ ∪ s₂) ○ t = s₁ ○ t ∪ s₂ ○ t

Next tactic:
simp [disjSups, filter_union, image_union]
theorem disjSups_union_right : s ○ (t₁ ∪ t₂) = s ○ t₁ ∪ s ○ t₂ := by
  

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
inst✝⁴ : DecidableEq α
inst✝³ : DecidableEq β
inst✝² : SemilatticeSup α
inst✝¹ : OrderBot α
inst✝ : DecidableRel Disjoint
s s₁ s₂ t t₁ t₂ u : Finset α
a b c : α
⊢ s ○ (t₁ ∪ t₂) = s ○ t₁ ∪ s ○ t₂

Next tactic:
simp [disjSups, filter_union, image_union]
theorem disjSups_inter_subset_left : (s₁ ∩ s₂) ○ t ⊆ s₁ ○ t ∩ s₂ ○ t := by
  

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
inst✝⁴ : DecidableEq α
inst✝³ : DecidableEq β
inst✝² : SemilatticeSup α
inst✝¹ : OrderBot α
inst✝ : DecidableRel Disjoint
s s₁ s₂ t t₁ t₂ u : Finset α
a b c : α
⊢ (s₁ ∩ s₂) ○ t ⊆ s₁ ○ t ∩ s₂ ○ t

Next tactic:
simpa only [disjSups, inter_product, filter_inter_distrib] using image_inter_subset _ _ _
theorem disjSups_inter_subset_right : s ○ (t₁ ∩ t₂) ⊆ s ○ t₁ ∩ s ○ t₂ := by
  

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
inst✝⁴ : DecidableEq α
inst✝³ : DecidableEq β
inst✝² : SemilatticeSup α
inst✝¹ : OrderBot α
inst✝ : DecidableRel Disjoint
s s₁ s₂ t t₁ t₂ u : Finset α
a b c : α
⊢ s ○ (t₁ ∩ t₂) ⊆ s ○ t₁ ∩ s ○ t₂

Next tactic:
simpa only [disjSups, product_inter, filter_inter_distrib] using image_inter_subset _ _ _
theorem disjSups_comm : s ○ t = t ○ s := by
  

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
inst✝⁴ : DecidableEq α
inst✝³ : DecidableEq β
inst✝² : SemilatticeSup α
inst✝¹ : OrderBot α
inst✝ : DecidableRel Disjoint
s s₁ s₂ t t₁ t₂ u : Finset α
a b c : α
⊢ s ○ t = t ○ s

Next tactic:
ext
theorem disjSups_comm : s ○ t = t ○ s := by
  ext
  

Proof state:
case a
F : Type u_1
α : Type u_2
β : Type u_3
inst✝⁴ : DecidableEq α
inst✝³ : DecidableEq β
inst✝² : SemilatticeSup α
inst✝¹ : OrderBot α
inst✝ : DecidableRel Disjoint
s s₁ s₂ t t₁ t₂ u : Finset α
a b c a✝ : α
⊢ a✝ ∈ s ○ t ↔ a✝ ∈ t ○ s

Next tactic:
rw [mem_disjSups, mem_disjSups]
theorem disjSups_comm : s ○ t = t ○ s := by
  ext
  rw [mem_disjSups, mem_disjSups]
  -- Porting note: `exists₂_comm` no longer works with `∃ _ ∈ _, ∃ _ ∈ _, _`
  

Proof state:
case a
F : Type u_1
α : Type u_2
β : Type u_3
inst✝⁴ : DecidableEq α
inst✝³ : DecidableEq β
inst✝² : SemilatticeSup α
inst✝¹ : OrderBot α
inst✝ : DecidableRel Disjoint
s s₁ s₂ t t₁ t₂ u : Finset α
a b c a✝ : α
⊢ (∃ a ∈ s, ∃ b ∈ t, Disjoint a b ∧ a ⊔ b = a✝) ↔ ∃ a ∈ t, ∃ b ∈ s, Disjoint a b ∧ a ⊔ b = a✝

Next tactic:
constructor
theorem disjSups_comm : s ○ t = t ○ s := by
  ext
  rw [mem_disjSups, mem_disjSups]
  -- Porting note: `exists₂_comm` no longer works with `∃ _ ∈ _, ∃ _ ∈ _, _`
  constructor <;>
  · 

Proof state:
case a.mp
F : Type u_1
α : Type u_2
β : Type u_3
inst✝⁴ : DecidableEq α
inst✝³ : DecidableEq β
inst✝² : SemilatticeSup α
inst✝¹ : OrderBot α
inst✝ : DecidableRel Disjoint
s s₁ s₂ t t₁ t₂ u : Finset α
a b c a✝ : α
⊢ (∃ a ∈ s, ∃ b ∈ t, Disjoint a b ∧ a ⊔ b = a✝) → ∃ a ∈ t, ∃ b ∈ s, Disjoint a b ∧ a ⊔ b = a✝

Next tactic:
rintro ⟨a, ha, b, hb, hd, hs⟩
theorem disjSups_comm : s ○ t = t ○ s := by
  ext
  rw [mem_disjSups, mem_disjSups]
  -- Porting note: `exists₂_comm` no longer works with `∃ _ ∈ _, ∃ _ ∈ _, _`
  constructor <;>
  · rintro ⟨a, ha, b, hb, hd, hs⟩
    

Proof state:
case a.mp.intro.intro.intro.intro.intro
F : Type u_1
α : Type u_2
β : Type u_3
inst✝⁴ : DecidableEq α
inst✝³ : DecidableEq β
inst✝² : SemilatticeSup α
inst✝¹ : OrderBot α
inst✝ : DecidableRel Disjoint
s s₁ s₂ t t₁ t₂ u : Finset α
a✝¹ b✝ c a✝ a : α
ha : a ∈ s
b : α
hb : b ∈ t
hd : Disjoint a b
hs : a ⊔ b = a✝
⊢ ∃ a ∈ t, ∃ b ∈ s, Disjoint a b ∧ a ⊔ b = a✝

Next tactic:
rw [disjoint_comm] at hd
theorem disjSups_comm : s ○ t = t ○ s := by
  ext
  rw [mem_disjSups, mem_disjSups]
  -- Porting note: `exists₂_comm` no longer works with `∃ _ ∈ _, ∃ _ ∈ _, _`
  constructor <;>
  · rintro ⟨a, ha, b, hb, hd, hs⟩
    rw [disjoint_comm] at hd
    

Proof state:
case a.mp.intro.intro.intro.intro.intro
F : Type u_1
α : Type u_2
β : Type u_3
inst✝⁴ : DecidableEq α
inst✝³ : DecidableEq β
inst✝² : SemilatticeSup α
inst✝¹ : OrderBot α
inst✝ : DecidableRel Disjoint
s s₁ s₂ t t₁ t₂ u : Finset α
a✝¹ b✝ c a✝ a : α
ha : a ∈ s
b : α
hb : b ∈ t
hd : Disjoint b a
hs : a ⊔ b = a✝
⊢ ∃ a ∈ t, ∃ b ∈ s, Disjoint a b ∧ a ⊔ b = a✝

Next tactic:
rw [sup_comm] at hs
theorem disjSups_comm : s ○ t = t ○ s := by
  ext
  rw [mem_disjSups, mem_disjSups]
  -- Porting note: `exists₂_comm` no longer works with `∃ _ ∈ _, ∃ _ ∈ _, _`
  constructor <;>
  · rintro ⟨a, ha, b, hb, hd, hs⟩
    rw [disjoint_comm] at hd
    rw [sup_comm] at hs
    

Proof state:
case a.mp.intro.intro.intro.intro.intro
F : Type u_1
α : Type u_2
β : Type u_3
inst✝⁴ : DecidableEq α
inst✝³ : DecidableEq β
inst✝² : SemilatticeSup α
inst✝¹ : OrderBot α
inst✝ : DecidableRel Disjoint
s s₁ s₂ t t₁ t₂ u : Finset α
a✝¹ b✝ c a✝ a : α
ha : a ∈ s
b : α
hb : b ∈ t
hd : Disjoint b a
hs : b ⊔ a = a✝
⊢ ∃ a ∈ t, ∃ b ∈ s, Disjoint a b ∧ a ⊔ b = a✝

Next tactic:
exact ⟨b, hb, a, ha, hd, hs⟩