Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit fc8b08b

Browse files
kim-emmergify[bot]
authored andcommitted
feat(data/set/basic): prod_subset_iff (#980)
* feat(data/set/basic): prod_subset_iff * syntax
1 parent fbce6e4 commit fc8b08b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/data/set/basic.lean

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1254,6 +1254,11 @@ theorem mem_prod_eq {p : α × β} : p ∈ set.prod s t = (p.1 ∈ s ∧ p.2 ∈
12541254

12551255
lemma mk_mem_prod {a : α} {b : β} (a_in : a ∈ s) (b_in : b ∈ t) : (a, b) ∈ set.prod s t := ⟨a_in, b_in⟩
12561256

1257+
lemma prod_subset_iff {P : set (α × β)} :
1258+
(set.prod s t ⊆ P) ↔ ∀ (x ∈ s) (y ∈ t), (x, y) ∈ P :=
1259+
⟨λ h _ xin _ yin, h (mk_mem_prod xin yin),
1260+
λ h _ pin, by { cases mem_prod.1 pin with hs ht, simpa using h _ hs _ ht }⟩
1261+
12571262
@[simp] theorem prod_empty {s : set α} : set.prod s ∅ = (∅ : set (α × β)) :=
12581263
ext $ by simp [set.prod]
12591264

0 commit comments

Comments
 (0)