Theorem: Set.prod_subset_prod_iff
File: Mathlib/Data/Set/Prod.lean

tactic: cases' (s ×ˢ t).eq_empty_or_nonempty with h h
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.87049
δ : Type ?u.87052
s s₁ s₂ : Set α
t t₁ t₂ : Set β
a : α
b : β
⊢ s ×ˢ t ⊆ s₁ ×ˢ t₁ ↔ s ⊆ s₁ ∧ t ⊆ t₁ ∨ s = ∅ ∨ t = ∅

tactic: have st : s.Nonempty ∧ t.Nonempty := by rwa [prod_nonempty_iff] at h
state_before: case inr
α : Type u_1
β : Type u_2
γ : Type ?u.87049
δ : Type ?u.87052
s s₁ s₂ : Set α
t t₁ t₂ : Set β
a : α
b : β
h : Set.Nonempty (s ×ˢ t)
⊢ s ×ˢ t ⊆ s₁ ×ˢ t₁ ↔ s ⊆ s₁ ∧ t ⊆ t₁ ∨ s = ∅ ∨ t = ∅

tactic: refine' ⟨fun H => Or.inl ⟨_, _⟩, _⟩
state_before: case inr
α : Type u_1
β : Type u_2
γ : Type ?u.87049
δ : Type ?u.87052
s s₁ s₂ : Set α
t t₁ t₂ : Set β
a : α
b : β
h : Set.Nonempty (s ×ˢ t)
st : Set.Nonempty s ∧ Set.Nonempty t
⊢ s ×ˢ t ⊆ s₁ ×ˢ t₁ ↔ s ⊆ s₁ ∧ t ⊆ t₁ ∨ s = ∅ ∨ t = ∅

tactic: simp [h, prod_eq_empty_iff.1 h]
state_before: case inl
α : Type u_1
β : Type u_2
γ : Type ?u.87049
δ : Type ?u.87052
s s₁ s₂ : Set α
t t₁ t₂ : Set β
a : α
b : β
h : s ×ˢ t = ∅
⊢ s ×ˢ t ⊆ s₁ ×ˢ t₁ ↔ s ⊆ s₁ ∧ t ⊆ t₁ ∨ s = ∅ ∨ t = ∅

tactic: rwa [prod_nonempty_iff] at h
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.87049
δ : Type ?u.87052
s s₁ s₂ : Set α
t t₁ t₂ : Set β
a : α
b : β
h : Set.Nonempty (s ×ˢ t)
⊢ Set.Nonempty s ∧ Set.Nonempty t

tactic: have := image_subset (Prod.fst : α × β → α) H
state_before: case inr.refine'_1
α : Type u_1
β : Type u_2
γ : Type ?u.87049
δ : Type ?u.87052
s s₁ s₂ : Set α
t t₁ t₂ : Set β
a : α
b : β
h : Set.Nonempty (s ×ˢ t)
st : Set.Nonempty s ∧ Set.Nonempty t
H : s ×ˢ t ⊆ s₁ ×ˢ t₁
⊢ s ⊆ s₁

tactic: rwa [fst_image_prod _ st.2, fst_image_prod _ (h.mono H).snd] at this
state_before: case inr.refine'_1
α : Type u_1
β : Type u_2
γ : Type ?u.87049
δ : Type ?u.87052
s s₁ s₂ : Set α
t t₁ t₂ : Set β
a : α
b : β
h : Set.Nonempty (s ×ˢ t)
st : Set.Nonempty s ∧ Set.Nonempty t
H : s ×ˢ t ⊆ s₁ ×ˢ t₁
this : Prod.fst '' s ×ˢ t ⊆ Prod.fst '' s₁ ×ˢ t₁
⊢ s ⊆ s₁

tactic: have := image_subset (Prod.snd : α × β → β) H
state_before: case inr.refine'_2
α : Type u_1
β : Type u_2
γ : Type ?u.87049
δ : Type ?u.87052
s s₁ s₂ : Set α
t t₁ t₂ : Set β
a : α
b : β
h : Set.Nonempty (s ×ˢ t)
st : Set.Nonempty s ∧ Set.Nonempty t
H : s ×ˢ t ⊆ s₁ ×ˢ t₁
⊢ t ⊆ t₁

tactic: rwa [snd_image_prod st.1, snd_image_prod (h.mono H).fst] at this
state_before: case inr.refine'_2
α : Type u_1
β : Type u_2
γ : Type ?u.87049
δ : Type ?u.87052
s s₁ s₂ : Set α
t t₁ t₂ : Set β
a : α
b : β
h : Set.Nonempty (s ×ˢ t)
st : Set.Nonempty s ∧ Set.Nonempty t
H : s ×ˢ t ⊆ s₁ ×ˢ t₁
this : Prod.snd '' s ×ˢ t ⊆ Prod.snd '' s₁ ×ˢ t₁
⊢ t ⊆ t₁

tactic: intro H
state_before: case inr.refine'_3
α : Type u_1
β : Type u_2
γ : Type ?u.87049
δ : Type ?u.87052
s s₁ s₂ : Set α
t t₁ t₂ : Set β
a : α
b : β
h : Set.Nonempty (s ×ˢ t)
st : Set.Nonempty s ∧ Set.Nonempty t
⊢ s ⊆ s₁ ∧ t ⊆ t₁ ∨ s = ∅ ∨ t = ∅ → s ×ˢ t ⊆ s₁ ×ˢ t₁

tactic: simp only [st.1.ne_empty, st.2.ne_empty, or_false_iff] at H
state_before: case inr.refine'_3
α : Type u_1
β : Type u_2
γ : Type ?u.87049
δ : Type ?u.87052
s s₁ s₂ : Set α
t t₁ t₂ : Set β
a : α
b : β
h : Set.Nonempty (s ×ˢ t)
st : Set.Nonempty s ∧ Set.Nonempty t
H : s ⊆ s₁ ∧ t ⊆ t₁ ∨ s = ∅ ∨ t = ∅
⊢ s ×ˢ t ⊆ s₁ ×ˢ t₁

tactic: exact prod_mono H.1 H.2
state_before: case inr.refine'_3
α : Type u_1
β : Type u_2
γ : Type ?u.87049
δ : Type ?u.87052
s s₁ s₂ : Set α
t t₁ t₂ : Set β
a : α
b : β
h : Set.Nonempty (s ×ˢ t)
st : Set.Nonempty s ∧ Set.Nonempty t
H : s ⊆ s₁ ∧ t ⊆ t₁
⊢ s ×ˢ t ⊆ s₁ ×ˢ t₁