Skip to content

Commit

Permalink
feat(data/set/lattice): Product of sInter (#16692)
Browse files Browse the repository at this point in the history
Lemma to show that the product of two non-empty set intersections is equal to the intersection of the set of products.



Co-authored-by: Christopher Hoskin <christopher.hoskin@overleaf.com>
Co-authored-by: Christopher Hoskin <mans0954@users.noreply.github.com>
  • Loading branch information
3 people committed Oct 10, 2022
1 parent 9fc0f22 commit 91db833
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/data/set/lattice.lean
Expand Up @@ -1377,6 +1377,33 @@ begin
{ intros x hz x' hw, exact ⟨x ⊔ x', hs le_sup_left hz, ht le_sup_right hw⟩ }
end

lemma sInter_prod_sInter_subset (S : set (set α)) (T : set (set β)) :
⋂₀ S ×ˢ ⋂₀ T ⊆ ⋂ r ∈ S ×ˢ T, r.1 ×ˢ r.2 :=
subset_Inter₂ (λ x hx y hy, ⟨hy.1 x.1 hx.1, hy.2 x.2 hx.2⟩)

lemma sInter_prod_sInter {S : set (set α)} {T : set (set β)} (hS : S.nonempty) (hT : T.nonempty) :
⋂₀ S ×ˢ ⋂₀ T = ⋂ r ∈ S ×ˢ T, r.1 ×ˢ r.2 :=
begin
obtain ⟨s₁, h₁⟩ := hS,
obtain ⟨s₂, h₂⟩ := hT,
refine set.subset.antisymm (sInter_prod_sInter_subset S T) (λ x hx, _),
rw mem_Inter₂ at hx,
exact ⟨λ s₀ h₀, (hx (s₀, s₂) ⟨h₀, h₂⟩).1, λ s₀ h₀, (hx (s₁, s₀) ⟨h₁, h₀⟩).2⟩,
end

lemma sInter_prod {S : set (set α)} (hS : S.nonempty) (t : set β) :
⋂₀ S ×ˢ t = ⋂ s ∈ S, s ×ˢ t :=
begin
rw [←sInter_singleton t, sInter_prod_sInter hS (singleton_nonempty t), sInter_singleton],
simp_rw [prod_singleton, mem_image, Inter_exists, bInter_and', Inter_Inter_eq_right],
end

lemma prod_sInter {T : set (set β)} (hT : T.nonempty) (s : set α) :
s ×ˢ ⋂₀ T = ⋂ t ∈ T, s ×ˢ t :=
begin
rw [←sInter_singleton s, sInter_prod_sInter (singleton_nonempty s) hT, sInter_singleton],
simp_rw [singleton_prod, mem_image, Inter_exists, bInter_and', Inter_Inter_eq_right],
end
end prod

section image2
Expand Down

0 comments on commit 91db833

Please sign in to comment.