Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - feat(data/nat/pairing): add some nat.pair lemmas #8740

Closed
wants to merge 5 commits into from
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions src/data/nat/pairing.lean
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,35 @@ lemma Union_unpair_prod {α β} {s : ℕ → set α} {t : ℕ → set β} :
by { rw [← Union_prod], convert surjective_unpair.Union_comp _, refl }

end set

section complete_lattice

lemma supr_unpair_sup {α} [complete_lattice α] {s t : ℕ → α} :
(⨆ n : ℕ, s n.unpair.1 ⊔ t n.unpair.2) = (⨆ i : ℕ, s i) ⊔ ⨆ j, t j :=
begin
JasonKYi marked this conversation as resolved.
Show resolved Hide resolved
simp_rw [supr_sup, sup_supr, ← (supr_prod : (⨆ i : ℕ × ℕ, s i.1 ⊔ t i.2) = _),
← nat.surjective_unpair.supr_comp],
end

lemma supr_unpair_inf {α} [complete_distrib_lattice α] {s t : ℕ → α} :
(⨆ n : ℕ, s n.unpair.1 ⊓ t n.unpair.2) = (⨆ i : ℕ, s i) ⊓ ⨆ j, t j :=
begin
simp_rw [supr_inf_eq, inf_supr_eq, ← (supr_prod : (⨆ i : ℕ × ℕ, s i.1 ⊓ t i.2) = _),
← nat.surjective_unpair.supr_comp],
end

lemma infi_unpair_sup {α} [complete_distrib_lattice α] {s t : ℕ → α} :
(⨅ n : ℕ, s n.unpair.1 ⊔ t n.unpair.2) = (⨅ i : ℕ, s i) ⊔ ⨅ j, t j :=
begin
simp_rw [infi_sup_eq, sup_infi_eq, ← (infi_prod : (⨅ i : ℕ × ℕ, s i.1 ⊔ t i.2) = _),
← nat.surjective_unpair.infi_comp],
end

lemma infi_unpair_inf {α} [complete_lattice α] {s t : ℕ → α} :
(⨅ n : ℕ, s n.unpair.1 ⊓ t n.unpair.2) = (⨅ i : ℕ, s i) ⊓ ⨅ j, t j :=
begin
simp_rw [infi_inf, inf_infi, ← (infi_prod : (⨅ i : ℕ × ℕ, s i.1 ⊓ t i.2) = _),
← nat.surjective_unpair.infi_comp],
end

end complete_lattice