[GOAL]
M : Type ?u.870
inst✝ : Semigroup M
src✝ : Mul (Ultrafilter M) := mul
U V W : Ultrafilter M
p : M → Prop
⊢ (∀ᶠ (x : M) in ↑(U * V * W), p x) ↔ ∀ᶠ (x : M) in ↑(U * (V * W)), p x
[PROOFSTEP]
simp_rw [Ultrafilter.eventually_mul, mul_assoc]
[GOAL]
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
m : M
hm : m ∈ FP a
⊢ ∃ n, ∀ (m' : M), m' ∈ FP (Stream'.drop n a) → m * m' ∈ FP a
[PROOFSTEP]
induction' hm with a a m hm ih a m hm ih
[GOAL]
case head
M : Type u_1
inst✝ : Semigroup M
a✝ : Stream' M
m : M
a : Stream' M
⊢ ∃ n, ∀ (m' : M), m' ∈ FP (Stream'.drop n a) → Stream'.head a * m' ∈ FP a
[PROOFSTEP]
exact ⟨1, fun m hm => FP.cons a m hm⟩
[GOAL]
case tail
M : Type u_1
inst✝ : Semigroup M
a✝ : Stream' M
m✝ : M
a : Stream' M
m : M
hm : FP (Stream'.tail a) m
ih : ∃ n, ∀ (m' : M), m' ∈ FP (Stream'.drop n (Stream'.tail a)) → m * m' ∈ FP (Stream'.tail a)
⊢ ∃ n, ∀ (m' : M), m' ∈ FP (Stream'.drop n a) → m * m' ∈ FP a
[PROOFSTEP]
cases' ih with n hn
[GOAL]
case tail.intro
M : Type u_1
inst✝ : Semigroup M
a✝ : Stream' M
m✝ : M
a : Stream' M
m : M
hm : FP (Stream'.tail a) m
n : ℕ
hn : ∀ (m' : M), m' ∈ FP (Stream'.drop n (Stream'.tail a)) → m * m' ∈ FP (Stream'.tail a)
⊢ ∃ n, ∀ (m' : M), m' ∈ FP (Stream'.drop n a) → m * m' ∈ FP a
[PROOFSTEP]
use n + 1
[GOAL]
case h
M : Type u_1
inst✝ : Semigroup M
a✝ : Stream' M
m✝ : M
a : Stream' M
m : M
hm : FP (Stream'.tail a) m
n : ℕ
hn : ∀ (m' : M), m' ∈ FP (Stream'.drop n (Stream'.tail a)) → m * m' ∈ FP (Stream'.tail a)
⊢ ∀ (m' : M), m' ∈ FP (Stream'.drop (n + 1) a) → m * m' ∈ FP a
[PROOFSTEP]
intro m' hm'
[GOAL]
case h
M : Type u_1
inst✝ : Semigroup M
a✝ : Stream' M
m✝ : M
a : Stream' M
m : M
hm : FP (Stream'.tail a) m
n : ℕ
hn : ∀ (m' : M), m' ∈ FP (Stream'.drop n (Stream'.tail a)) → m * m' ∈ FP (Stream'.tail a)
m' : M
hm' : m' ∈ FP (Stream'.drop (n + 1) a)
⊢ m * m' ∈ FP a
[PROOFSTEP]
exact FP.tail _ _ (hn _ hm')
[GOAL]
case cons
M : Type u_1
inst✝ : Semigroup M
a✝ : Stream' M
m✝ : M
a : Stream' M
m : M
hm : FP (Stream'.tail a) m
ih : ∃ n, ∀ (m' : M), m' ∈ FP (Stream'.drop n (Stream'.tail a)) → m * m' ∈ FP (Stream'.tail a)
⊢ ∃ n, ∀ (m' : M), m' ∈ FP (Stream'.drop n a) → Stream'.head a * m * m' ∈ FP a
[PROOFSTEP]
cases' ih with n hn
[GOAL]
case cons.intro
M : Type u_1
inst✝ : Semigroup M
a✝ : Stream' M
m✝ : M
a : Stream' M
m : M
hm : FP (Stream'.tail a) m
n : ℕ
hn : ∀ (m' : M), m' ∈ FP (Stream'.drop n (Stream'.tail a)) → m * m' ∈ FP (Stream'.tail a)
⊢ ∃ n, ∀ (m' : M), m' ∈ FP (Stream'.drop n a) → Stream'.head a * m * m' ∈ FP a
[PROOFSTEP]
use n + 1
[GOAL]
case h
M : Type u_1
inst✝ : Semigroup M
a✝ : Stream' M
m✝ : M
a : Stream' M
m : M
hm : FP (Stream'.tail a) m
n : ℕ
hn : ∀ (m' : M), m' ∈ FP (Stream'.drop n (Stream'.tail a)) → m * m' ∈ FP (Stream'.tail a)
⊢ ∀ (m' : M), m' ∈ FP (Stream'.drop (n + 1) a) → Stream'.head a * m * m' ∈ FP a
[PROOFSTEP]
intro m' hm'
[GOAL]
case h
M : Type u_1
inst✝ : Semigroup M
a✝ : Stream' M
m✝ : M
a : Stream' M
m : M
hm : FP (Stream'.tail a) m
n : ℕ
hn : ∀ (m' : M), m' ∈ FP (Stream'.drop n (Stream'.tail a)) → m * m' ∈ FP (Stream'.tail a)
m' : M
hm' : m' ∈ FP (Stream'.drop (n + 1) a)
⊢ Stream'.head a * m * m' ∈ FP a
[PROOFSTEP]
rw [mul_assoc]
[GOAL]
case h
M : Type u_1
inst✝ : Semigroup M
a✝ : Stream' M
m✝ : M
a : Stream' M
m : M
hm : FP (Stream'.tail a) m
n : ℕ
hn : ∀ (m' : M), m' ∈ FP (Stream'.drop n (Stream'.tail a)) → m * m' ∈ FP (Stream'.tail a)
m' : M
hm' : m' ∈ FP (Stream'.drop (n + 1) a)
⊢ Stream'.head a * (m * m') ∈ FP a
[PROOFSTEP]
exact FP.cons _ _ (hn _ hm')
[GOAL]
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
⊢ ∃ U, U * U = U ∧ ∀ᶠ (m : M) in ↑U, m ∈ FP a
[PROOFSTEP]
let S : Set (Ultrafilter M) := ⋂ n, {U | ∀ᶠ m in U, m ∈ FP (a.drop n)}
[GOAL]
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
S : Set (Ultrafilter M) := ⋂ (n : ℕ), {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop n a)}
⊢ ∃ U, U * U = U ∧ ∀ᶠ (m : M) in ↑U, m ∈ FP a
[PROOFSTEP]
have h := exists_idempotent_in_compact_subsemigroup ?_ S ?_ ?_ ?_
[GOAL]
case refine_5
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
S : Set (Ultrafilter M) := ⋂ (n : ℕ), {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop n a)}
h : ∃ m, m ∈ S ∧ m * m = m
⊢ ∃ U, U * U = U ∧ ∀ᶠ (m : M) in ↑U, m ∈ FP a
[PROOFSTEP]
rcases h with ⟨U, hU, U_idem⟩
[GOAL]
case refine_5.intro.intro
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
S : Set (Ultrafilter M) := ⋂ (n : ℕ), {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop n a)}
U : Ultrafilter M
hU : U ∈ S
U_idem : U * U = U
⊢ ∃ U, U * U = U ∧ ∀ᶠ (m : M) in ↑U, m ∈ FP a
[PROOFSTEP]
refine' ⟨U, U_idem, _⟩
[GOAL]
case refine_5.intro.intro
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
S : Set (Ultrafilter M) := ⋂ (n : ℕ), {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop n a)}
U : Ultrafilter M
hU : U ∈ S
U_idem : U * U = U
⊢ ∀ᶠ (m : M) in ↑U, m ∈ FP a
[PROOFSTEP]
convert Set.mem_iInter.mp hU 0
[GOAL]
case refine_1
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
S : Set (Ultrafilter M) := ⋂ (n : ℕ), {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop n a)}
⊢ ∀ (r : Ultrafilter M), Continuous fun x => x * r
[PROOFSTEP]
exact Ultrafilter.continuous_mul_left
[GOAL]
case refine_2
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
S : Set (Ultrafilter M) := ⋂ (n : ℕ), {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop n a)}
⊢ Set.Nonempty S
[PROOFSTEP]
apply IsCompact.nonempty_iInter_of_sequence_nonempty_compact_closed
[GOAL]
case refine_2.hZd
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
S : Set (Ultrafilter M) := ⋂ (n : ℕ), {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop n a)}
⊢ ∀ (i : ℕ), {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop (i + 1) a)} ⊆ {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop i a)}
[PROOFSTEP]
intro n U hU
[GOAL]
case refine_2.hZd
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
S : Set (Ultrafilter M) := ⋂ (n : ℕ), {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop n a)}
n : ℕ
U : Ultrafilter M
hU : U ∈ {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop (n + 1) a)}
⊢ U ∈ {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop n a)}
[PROOFSTEP]
apply Eventually.mono hU
[GOAL]
case refine_2.hZd
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
S : Set (Ultrafilter M) := ⋂ (n : ℕ), {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop n a)}
n : ℕ
U : Ultrafilter M
hU : U ∈ {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop (n + 1) a)}
⊢ ∀ (x : M), x ∈ FP (Stream'.drop (n + 1) a) → x ∈ FP (Stream'.drop n a)
[PROOFSTEP]
rw [add_comm, ← Stream'.drop_drop, ← Stream'.tail_eq_drop]
[GOAL]
case refine_2.hZd
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
S : Set (Ultrafilter M) := ⋂ (n : ℕ), {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop n a)}
n : ℕ
U : Ultrafilter M
hU : U ∈ {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop (n + 1) a)}
⊢ ∀ (x : M), x ∈ FP (Stream'.tail (Stream'.drop n a)) → x ∈ FP (Stream'.drop n a)
[PROOFSTEP]
exact FP.tail _
[GOAL]
case refine_2.hZn
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
S : Set (Ultrafilter M) := ⋂ (n : ℕ), {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop n a)}
⊢ ∀ (i : ℕ), Set.Nonempty {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop i a)}
[PROOFSTEP]
intro n
[GOAL]
case refine_2.hZn
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
S : Set (Ultrafilter M) := ⋂ (n : ℕ), {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop n a)}
n : ℕ
⊢ Set.Nonempty {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop n a)}
[PROOFSTEP]
exact ⟨pure _, mem_pure.mpr <| FP.head _⟩
[GOAL]
case refine_2.hZ0
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
S : Set (Ultrafilter M) := ⋂ (n : ℕ), {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop n a)}
⊢ IsCompact {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop 0 a)}
[PROOFSTEP]
exact (ultrafilter_isClosed_basic _).isCompact
[GOAL]
case refine_2.hZcl
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
S : Set (Ultrafilter M) := ⋂ (n : ℕ), {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop n a)}
⊢ ∀ (i : ℕ), IsClosed {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop i a)}
[PROOFSTEP]
intro n
[GOAL]
case refine_2.hZcl
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
S : Set (Ultrafilter M) := ⋂ (n : ℕ), {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop n a)}
n : ℕ
⊢ IsClosed {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop n a)}
[PROOFSTEP]
apply ultrafilter_isClosed_basic
[GOAL]
case refine_3
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
S : Set (Ultrafilter M) := ⋂ (n : ℕ), {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop n a)}
⊢ IsCompact S
[PROOFSTEP]
exact IsClosed.isCompact (isClosed_iInter fun i => ultrafilter_isClosed_basic _)
[GOAL]
case refine_4
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
S : Set (Ultrafilter M) := ⋂ (n : ℕ), {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop n a)}
⊢ ∀ (x : Ultrafilter M), x ∈ S → ∀ (y : Ultrafilter M), y ∈ S → x * y ∈ S
[PROOFSTEP]
intro U hU V hV
[GOAL]
case refine_4
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
S : Set (Ultrafilter M) := ⋂ (n : ℕ), {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop n a)}
U : Ultrafilter M
hU : U ∈ S
V : Ultrafilter M
hV : V ∈ S
⊢ U * V ∈ S
[PROOFSTEP]
rw [Set.mem_iInter] at *
[GOAL]
case refine_4
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
S : Set (Ultrafilter M) := ⋂ (n : ℕ), {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop n a)}
U : Ultrafilter M
hU : ∀ (i : ℕ), U ∈ {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop i a)}
V : Ultrafilter M
hV : ∀ (i : ℕ), V ∈ {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop i a)}
⊢ ∀ (i : ℕ), U * V ∈ {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop i a)}
[PROOFSTEP]
intro n
[GOAL]
case refine_4
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
S : Set (Ultrafilter M) := ⋂ (n : ℕ), {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop n a)}
U : Ultrafilter M
hU : ∀ (i : ℕ), U ∈ {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop i a)}
V : Ultrafilter M
hV : ∀ (i : ℕ), V ∈ {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop i a)}
n : ℕ
⊢ U * V ∈ {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop n a)}
[PROOFSTEP]
rw [Set.mem_setOf_eq, Ultrafilter.eventually_mul]
[GOAL]
case refine_4
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
S : Set (Ultrafilter M) := ⋂ (n : ℕ), {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop n a)}
U : Ultrafilter M
hU : ∀ (i : ℕ), U ∈ {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop i a)}
V : Ultrafilter M
hV : ∀ (i : ℕ), V ∈ {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop i a)}
n : ℕ
⊢ ∀ᶠ (m : M) in ↑U, ∀ᶠ (m' : M) in ↑V, m * m' ∈ FP (Stream'.drop n a)
[PROOFSTEP]
apply Eventually.mono (hU n)
[GOAL]
case refine_4
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
S : Set (Ultrafilter M) := ⋂ (n : ℕ), {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop n a)}
U : Ultrafilter M
hU : ∀ (i : ℕ), U ∈ {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop i a)}
V : Ultrafilter M
hV : ∀ (i : ℕ), V ∈ {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop i a)}
n : ℕ
⊢ ∀ (x : M), x ∈ FP (Stream'.drop n a) → ∀ᶠ (m' : M) in ↑V, x * m' ∈ FP (Stream'.drop n a)
[PROOFSTEP]
intro m hm
[GOAL]
case refine_4
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
S : Set (Ultrafilter M) := ⋂ (n : ℕ), {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop n a)}
U : Ultrafilter M
hU : ∀ (i : ℕ), U ∈ {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop i a)}
V : Ultrafilter M
hV : ∀ (i : ℕ), V ∈ {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop i a)}
n : ℕ
m : M
hm : m ∈ FP (Stream'.drop n a)
⊢ ∀ᶠ (m' : M) in ↑V, m * m' ∈ FP (Stream'.drop n a)
[PROOFSTEP]
obtain ⟨n', hn⟩ := FP.mul hm
[GOAL]
case refine_4.intro
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
S : Set (Ultrafilter M) := ⋂ (n : ℕ), {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop n a)}
U : Ultrafilter M
hU : ∀ (i : ℕ), U ∈ {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop i a)}
V : Ultrafilter M
hV : ∀ (i : ℕ), V ∈ {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop i a)}
n : ℕ
m : M
hm : m ∈ FP (Stream'.drop n a)
n' : ℕ
hn : ∀ (m' : M), m' ∈ FP (Stream'.drop n' (Stream'.drop n a)) → m * m' ∈ FP (Stream'.drop n a)
⊢ ∀ᶠ (m' : M) in ↑V, m * m' ∈ FP (Stream'.drop n a)
[PROOFSTEP]
apply Eventually.mono (hV (n' + n))
[GOAL]
case refine_4.intro
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
S : Set (Ultrafilter M) := ⋂ (n : ℕ), {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop n a)}
U : Ultrafilter M
hU : ∀ (i : ℕ), U ∈ {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop i a)}
V : Ultrafilter M
hV : ∀ (i : ℕ), V ∈ {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop i a)}
n : ℕ
m : M
hm : m ∈ FP (Stream'.drop n a)
n' : ℕ
hn : ∀ (m' : M), m' ∈ FP (Stream'.drop n' (Stream'.drop n a)) → m * m' ∈ FP (Stream'.drop n a)
⊢ ∀ (x : M), x ∈ FP (Stream'.drop (n' + n) a) → m * x ∈ FP (Stream'.drop n a)
[PROOFSTEP]
intro m' hm'
[GOAL]
case refine_4.intro
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
S : Set (Ultrafilter M) := ⋂ (n : ℕ), {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop n a)}
U : Ultrafilter M
hU : ∀ (i : ℕ), U ∈ {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop i a)}
V : Ultrafilter M
hV : ∀ (i : ℕ), V ∈ {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop i a)}
n : ℕ
m : M
hm : m ∈ FP (Stream'.drop n a)
n' : ℕ
hn : ∀ (m' : M), m' ∈ FP (Stream'.drop n' (Stream'.drop n a)) → m * m' ∈ FP (Stream'.drop n a)
m' : M
hm' : m' ∈ FP (Stream'.drop (n' + n) a)
⊢ m * m' ∈ FP (Stream'.drop n a)
[PROOFSTEP]
apply hn
[GOAL]
case refine_4.intro.a
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
S : Set (Ultrafilter M) := ⋂ (n : ℕ), {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop n a)}
U : Ultrafilter M
hU : ∀ (i : ℕ), U ∈ {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop i a)}
V : Ultrafilter M
hV : ∀ (i : ℕ), V ∈ {U | ∀ᶠ (m : M) in ↑U, m ∈ FP (Stream'.drop i a)}
n : ℕ
m : M
hm : m ∈ FP (Stream'.drop n a)
n' : ℕ
hn : ∀ (m' : M), m' ∈ FP (Stream'.drop n' (Stream'.drop n a)) → m * m' ∈ FP (Stream'.drop n a)
m' : M
hm' : m' ∈ FP (Stream'.drop (n' + n) a)
⊢ m' ∈ FP (Stream'.drop n' (Stream'.drop n a))
[PROOFSTEP]
simpa only [Stream'.drop_drop] using hm'
[GOAL]
M : Type u_1
inst✝ : Semigroup M
U : Ultrafilter M
U_idem : U * U = U
s₀ : Set M
sU : s₀ ∈ U
⊢ ∃ a, FP a ⊆ s₀
[PROOFSTEP]
have exists_elem : ∀ {s : Set M} (_hs : s ∈ U), (s ∩ {m | ∀ᶠ m' in U, m * m' ∈ s}).Nonempty := fun {s} hs =>
  Ultrafilter.nonempty_of_mem (inter_mem hs <| by rwa [← U_idem] at hs )
[GOAL]
M : Type u_1
inst✝ : Semigroup M
U : Ultrafilter M
U_idem : U * U = U
s₀ : Set M
sU : s₀ ∈ U
s : Set M
hs : s ∈ U
⊢ {m | ∀ᶠ (m' : M) in ↑U, m * m' ∈ s} ∈ ↑U
[PROOFSTEP]
rwa [← U_idem] at hs
[GOAL]
M : Type u_1
inst✝ : Semigroup M
U : Ultrafilter M
U_idem : U * U = U
s₀ : Set M
sU : s₀ ∈ U
exists_elem : ∀ {s : Set M}, s ∈ U → Set.Nonempty (s ∩ {m | ∀ᶠ (m' : M) in ↑U, m * m' ∈ s})
⊢ ∃ a, FP a ⊆ s₀
[PROOFSTEP]
let elem : { s // s ∈ U } → M := fun p => (exists_elem p.property).some
[GOAL]
M : Type u_1
inst✝ : Semigroup M
U : Ultrafilter M
U_idem : U * U = U
s₀ : Set M
sU : s₀ ∈ U
exists_elem : ∀ {s : Set M}, s ∈ U → Set.Nonempty (s ∩ {m | ∀ᶠ (m' : M) in ↑U, m * m' ∈ s})
elem : { s // s ∈ U } → M := fun p => Set.Nonempty.some (_ : Set.Nonempty (↑p ∩ {m | ∀ᶠ (m' : M) in ↑U, m * m' ∈ ↑p}))
⊢ ∃ a, FP a ⊆ s₀
[PROOFSTEP]
let succ : { s // s ∈ U } → { s // s ∈ U } := fun (p : { s // s ∈ U }) =>
  ⟨p.val ∩ {m : M | elem p * m ∈ p.val},
    inter_mem p.property
      (show (exists_elem p.property).some ∈ {m : M | ∀ᶠ (m' : M) in ↑U, m * m' ∈ p.val} from
        p.val.inter_subset_right {m : M | ∀ᶠ (m' : M) in ↑U, m * m' ∈ p.val} (exists_elem p.property).some_mem)⟩
[GOAL]
M : Type u_1
inst✝ : Semigroup M
U : Ultrafilter M
U_idem : U * U = U
s₀ : Set M
sU : s₀ ∈ U
exists_elem : ∀ {s : Set M}, s ∈ U → Set.Nonempty (s ∩ {m | ∀ᶠ (m' : M) in ↑U, m * m' ∈ s})
elem : { s // s ∈ U } → M := fun p => Set.Nonempty.some (_ : Set.Nonempty (↑p ∩ {m | ∀ᶠ (m' : M) in ↑U, m * m' ∈ ↑p}))
succ : { s // s ∈ U } → { s // s ∈ U } :=
  fun p => { val := ↑p ∩ {m | elem p * m ∈ ↑p}, property := (_ : ↑p ∩ {m | elem p * m ∈ ↑p} ∈ ↑U) }
⊢ ∃ a, FP a ⊆ s₀
[PROOFSTEP]
use Stream'.corec elem succ (Subtype.mk s₀ sU)
[GOAL]
case h
M : Type u_1
inst✝ : Semigroup M
U : Ultrafilter M
U_idem : U * U = U
s₀ : Set M
sU : s₀ ∈ U
exists_elem : ∀ {s : Set M}, s ∈ U → Set.Nonempty (s ∩ {m | ∀ᶠ (m' : M) in ↑U, m * m' ∈ s})
elem : { s // s ∈ U } → M := fun p => Set.Nonempty.some (_ : Set.Nonempty (↑p ∩ {m | ∀ᶠ (m' : M) in ↑U, m * m' ∈ ↑p}))
succ : { s // s ∈ U } → { s // s ∈ U } :=
  fun p => { val := ↑p ∩ {m | elem p * m ∈ ↑p}, property := (_ : ↑p ∩ {m | elem p * m ∈ ↑p} ∈ ↑U) }
⊢ FP (Stream'.corec elem succ { val := s₀, property := sU }) ⊆ s₀
[PROOFSTEP]
suffices ∀ (a : Stream' M), ∀ m ∈ FP a, ∀ p, a = Stream'.corec elem succ p → m ∈ p.val
  by
  intro m hm
  exact this _ m hm ⟨s₀, sU⟩ rfl
[GOAL]
M : Type u_1
inst✝ : Semigroup M
U : Ultrafilter M
U_idem : U * U = U
s₀ : Set M
sU : s₀ ∈ U
exists_elem : ∀ {s : Set M}, s ∈ U → Set.Nonempty (s ∩ {m | ∀ᶠ (m' : M) in ↑U, m * m' ∈ s})
elem : { s // s ∈ U } → M := fun p => Set.Nonempty.some (_ : Set.Nonempty (↑p ∩ {m | ∀ᶠ (m' : M) in ↑U, m * m' ∈ ↑p}))
succ : { s // s ∈ U } → { s // s ∈ U } :=
  fun p => { val := ↑p ∩ {m | elem p * m ∈ ↑p}, property := (_ : ↑p ∩ {m | elem p * m ∈ ↑p} ∈ ↑U) }
this : ∀ (a : Stream' M) (m : M), m ∈ FP a → ∀ (p : { s // s ∈ U }), a = Stream'.corec elem succ p → m ∈ ↑p
⊢ FP (Stream'.corec elem succ { val := s₀, property := sU }) ⊆ s₀
[PROOFSTEP]
intro m hm
[GOAL]
M : Type u_1
inst✝ : Semigroup M
U : Ultrafilter M
U_idem : U * U = U
s₀ : Set M
sU : s₀ ∈ U
exists_elem : ∀ {s : Set M}, s ∈ U → Set.Nonempty (s ∩ {m | ∀ᶠ (m' : M) in ↑U, m * m' ∈ s})
elem : { s // s ∈ U } → M := fun p => Set.Nonempty.some (_ : Set.Nonempty (↑p ∩ {m | ∀ᶠ (m' : M) in ↑U, m * m' ∈ ↑p}))
succ : { s // s ∈ U } → { s // s ∈ U } :=
  fun p => { val := ↑p ∩ {m | elem p * m ∈ ↑p}, property := (_ : ↑p ∩ {m | elem p * m ∈ ↑p} ∈ ↑U) }
this : ∀ (a : Stream' M) (m : M), m ∈ FP a → ∀ (p : { s // s ∈ U }), a = Stream'.corec elem succ p → m ∈ ↑p
m : M
hm : m ∈ FP (Stream'.corec elem succ { val := s₀, property := sU })
⊢ m ∈ s₀
[PROOFSTEP]
exact this _ m hm ⟨s₀, sU⟩ rfl
[GOAL]
case h
M : Type u_1
inst✝ : Semigroup M
U : Ultrafilter M
U_idem : U * U = U
s₀ : Set M
sU : s₀ ∈ U
exists_elem : ∀ {s : Set M}, s ∈ U → Set.Nonempty (s ∩ {m | ∀ᶠ (m' : M) in ↑U, m * m' ∈ s})
elem : { s // s ∈ U } → M := fun p => Set.Nonempty.some (_ : Set.Nonempty (↑p ∩ {m | ∀ᶠ (m' : M) in ↑U, m * m' ∈ ↑p}))
succ : { s // s ∈ U } → { s // s ∈ U } :=
  fun p => { val := ↑p ∩ {m | elem p * m ∈ ↑p}, property := (_ : ↑p ∩ {m | elem p * m ∈ ↑p} ∈ ↑U) }
⊢ ∀ (a : Stream' M) (m : M), m ∈ FP a → ∀ (p : { s // s ∈ U }), a = Stream'.corec elem succ p → m ∈ ↑p
[PROOFSTEP]
clear sU s₀
[GOAL]
case h
M : Type u_1
inst✝ : Semigroup M
U : Ultrafilter M
U_idem : U * U = U
exists_elem : ∀ {s : Set M}, s ∈ U → Set.Nonempty (s ∩ {m | ∀ᶠ (m' : M) in ↑U, m * m' ∈ s})
elem : { s // s ∈ U } → M := fun p => Set.Nonempty.some (_ : Set.Nonempty (↑p ∩ {m | ∀ᶠ (m' : M) in ↑U, m * m' ∈ ↑p}))
succ : { s // s ∈ U } → { s // s ∈ U } :=
  fun p => { val := ↑p ∩ {m | elem p * m ∈ ↑p}, property := (_ : ↑p ∩ {m | elem p * m ∈ ↑p} ∈ ↑U) }
⊢ ∀ (a : Stream' M) (m : M), m ∈ FP a → ∀ (p : { s // s ∈ U }), a = Stream'.corec elem succ p → m ∈ ↑p
[PROOFSTEP]
intro a m h
[GOAL]
case h
M : Type u_1
inst✝ : Semigroup M
U : Ultrafilter M
U_idem : U * U = U
exists_elem : ∀ {s : Set M}, s ∈ U → Set.Nonempty (s ∩ {m | ∀ᶠ (m' : M) in ↑U, m * m' ∈ s})
elem : { s // s ∈ U } → M := fun p => Set.Nonempty.some (_ : Set.Nonempty (↑p ∩ {m | ∀ᶠ (m' : M) in ↑U, m * m' ∈ ↑p}))
succ : { s // s ∈ U } → { s // s ∈ U } :=
  fun p => { val := ↑p ∩ {m | elem p * m ∈ ↑p}, property := (_ : ↑p ∩ {m | elem p * m ∈ ↑p} ∈ ↑U) }
a : Stream' M
m : M
h : m ∈ FP a
⊢ ∀ (p : { s // s ∈ U }), a = Stream'.corec elem succ p → m ∈ ↑p
[PROOFSTEP]
induction' h with b b n h ih b n h ih
[GOAL]
case h.head
M : Type u_1
inst✝ : Semigroup M
U : Ultrafilter M
U_idem : U * U = U
exists_elem : ∀ {s : Set M}, s ∈ U → Set.Nonempty (s ∩ {m | ∀ᶠ (m' : M) in ↑U, m * m' ∈ s})
elem : { s // s ∈ U } → M := fun p => Set.Nonempty.some (_ : Set.Nonempty (↑p ∩ {m | ∀ᶠ (m' : M) in ↑U, m * m' ∈ ↑p}))
succ : { s // s ∈ U } → { s // s ∈ U } :=
  fun p => { val := ↑p ∩ {m | elem p * m ∈ ↑p}, property := (_ : ↑p ∩ {m | elem p * m ∈ ↑p} ∈ ↑U) }
a : Stream' M
m : M
b : Stream' M
⊢ ∀ (p : { s // s ∈ U }), b = Stream'.corec elem succ p → Stream'.head b ∈ ↑p
[PROOFSTEP]
rintro p rfl
[GOAL]
case h.head
M : Type u_1
inst✝ : Semigroup M
U : Ultrafilter M
U_idem : U * U = U
exists_elem : ∀ {s : Set M}, s ∈ U → Set.Nonempty (s ∩ {m | ∀ᶠ (m' : M) in ↑U, m * m' ∈ s})
elem : { s // s ∈ U } → M := fun p => Set.Nonempty.some (_ : Set.Nonempty (↑p ∩ {m | ∀ᶠ (m' : M) in ↑U, m * m' ∈ ↑p}))
succ : { s // s ∈ U } → { s // s ∈ U } :=
  fun p => { val := ↑p ∩ {m | elem p * m ∈ ↑p}, property := (_ : ↑p ∩ {m | elem p * m ∈ ↑p} ∈ ↑U) }
a : Stream' M
m : M
p : { s // s ∈ U }
⊢ Stream'.head (Stream'.corec elem succ p) ∈ ↑p
[PROOFSTEP]
rw [Stream'.corec_eq, Stream'.head_cons]
[GOAL]
case h.head
M : Type u_1
inst✝ : Semigroup M
U : Ultrafilter M
U_idem : U * U = U
exists_elem : ∀ {s : Set M}, s ∈ U → Set.Nonempty (s ∩ {m | ∀ᶠ (m' : M) in ↑U, m * m' ∈ s})
elem : { s // s ∈ U } → M := fun p => Set.Nonempty.some (_ : Set.Nonempty (↑p ∩ {m | ∀ᶠ (m' : M) in ↑U, m * m' ∈ ↑p}))
succ : { s // s ∈ U } → { s // s ∈ U } :=
  fun p => { val := ↑p ∩ {m | elem p * m ∈ ↑p}, property := (_ : ↑p ∩ {m | elem p * m ∈ ↑p} ∈ ↑U) }
a : Stream' M
m : M
p : { s // s ∈ U }
⊢ elem p ∈ ↑p
[PROOFSTEP]
exact Set.inter_subset_left _ _ (Set.Nonempty.some_mem _)
[GOAL]
case h.tail
M : Type u_1
inst✝ : Semigroup M
U : Ultrafilter M
U_idem : U * U = U
exists_elem : ∀ {s : Set M}, s ∈ U → Set.Nonempty (s ∩ {m | ∀ᶠ (m' : M) in ↑U, m * m' ∈ s})
elem : { s // s ∈ U } → M := fun p => Set.Nonempty.some (_ : Set.Nonempty (↑p ∩ {m | ∀ᶠ (m' : M) in ↑U, m * m' ∈ ↑p}))
succ : { s // s ∈ U } → { s // s ∈ U } :=
  fun p => { val := ↑p ∩ {m | elem p * m ∈ ↑p}, property := (_ : ↑p ∩ {m | elem p * m ∈ ↑p} ∈ ↑U) }
a : Stream' M
m : M
b : Stream' M
n : M
h : FP (Stream'.tail b) n
ih : ∀ (p : { s // s ∈ U }), Stream'.tail b = Stream'.corec elem succ p → n ∈ ↑p
⊢ ∀ (p : { s // s ∈ U }), b = Stream'.corec elem succ p → n ∈ ↑p
[PROOFSTEP]
rintro p rfl
[GOAL]
case h.tail
M : Type u_1
inst✝ : Semigroup M
U : Ultrafilter M
U_idem : U * U = U
exists_elem : ∀ {s : Set M}, s ∈ U → Set.Nonempty (s ∩ {m | ∀ᶠ (m' : M) in ↑U, m * m' ∈ s})
elem : { s // s ∈ U } → M := fun p => Set.Nonempty.some (_ : Set.Nonempty (↑p ∩ {m | ∀ᶠ (m' : M) in ↑U, m * m' ∈ ↑p}))
succ : { s // s ∈ U } → { s // s ∈ U } :=
  fun p => { val := ↑p ∩ {m | elem p * m ∈ ↑p}, property := (_ : ↑p ∩ {m | elem p * m ∈ ↑p} ∈ ↑U) }
a : Stream' M
m n : M
p : { s // s ∈ U }
h : FP (Stream'.tail (Stream'.corec elem succ p)) n
ih : ∀ (p_1 : { s // s ∈ U }), Stream'.tail (Stream'.corec elem succ p) = Stream'.corec elem succ p_1 → n ∈ ↑p_1
⊢ n ∈ ↑p
[PROOFSTEP]
refine' Set.inter_subset_left _ _ (ih (succ p) _)
[GOAL]
case h.tail
M : Type u_1
inst✝ : Semigroup M
U : Ultrafilter M
U_idem : U * U = U
exists_elem : ∀ {s : Set M}, s ∈ U → Set.Nonempty (s ∩ {m | ∀ᶠ (m' : M) in ↑U, m * m' ∈ s})
elem : { s // s ∈ U } → M := fun p => Set.Nonempty.some (_ : Set.Nonempty (↑p ∩ {m | ∀ᶠ (m' : M) in ↑U, m * m' ∈ ↑p}))
succ : { s // s ∈ U } → { s // s ∈ U } :=
  fun p => { val := ↑p ∩ {m | elem p * m ∈ ↑p}, property := (_ : ↑p ∩ {m | elem p * m ∈ ↑p} ∈ ↑U) }
a : Stream' M
m n : M
p : { s // s ∈ U }
h : FP (Stream'.tail (Stream'.corec elem succ p)) n
ih : ∀ (p_1 : { s // s ∈ U }), Stream'.tail (Stream'.corec elem succ p) = Stream'.corec elem succ p_1 → n ∈ ↑p_1
⊢ Stream'.tail (Stream'.corec elem succ p) = Stream'.corec elem succ (succ p)
[PROOFSTEP]
rw [Stream'.corec_eq, Stream'.tail_cons]
[GOAL]
case h.cons
M : Type u_1
inst✝ : Semigroup M
U : Ultrafilter M
U_idem : U * U = U
exists_elem : ∀ {s : Set M}, s ∈ U → Set.Nonempty (s ∩ {m | ∀ᶠ (m' : M) in ↑U, m * m' ∈ s})
elem : { s // s ∈ U } → M := fun p => Set.Nonempty.some (_ : Set.Nonempty (↑p ∩ {m | ∀ᶠ (m' : M) in ↑U, m * m' ∈ ↑p}))
succ : { s // s ∈ U } → { s // s ∈ U } :=
  fun p => { val := ↑p ∩ {m | elem p * m ∈ ↑p}, property := (_ : ↑p ∩ {m | elem p * m ∈ ↑p} ∈ ↑U) }
a : Stream' M
m : M
b : Stream' M
n : M
h : FP (Stream'.tail b) n
ih : ∀ (p : { s // s ∈ U }), Stream'.tail b = Stream'.corec elem succ p → n ∈ ↑p
⊢ ∀ (p : { s // s ∈ U }), b = Stream'.corec elem succ p → Stream'.head b * n ∈ ↑p
[PROOFSTEP]
rintro p rfl
[GOAL]
case h.cons
M : Type u_1
inst✝ : Semigroup M
U : Ultrafilter M
U_idem : U * U = U
exists_elem : ∀ {s : Set M}, s ∈ U → Set.Nonempty (s ∩ {m | ∀ᶠ (m' : M) in ↑U, m * m' ∈ s})
elem : { s // s ∈ U } → M := fun p => Set.Nonempty.some (_ : Set.Nonempty (↑p ∩ {m | ∀ᶠ (m' : M) in ↑U, m * m' ∈ ↑p}))
succ : { s // s ∈ U } → { s // s ∈ U } :=
  fun p => { val := ↑p ∩ {m | elem p * m ∈ ↑p}, property := (_ : ↑p ∩ {m | elem p * m ∈ ↑p} ∈ ↑U) }
a : Stream' M
m n : M
p : { s // s ∈ U }
h : FP (Stream'.tail (Stream'.corec elem succ p)) n
ih : ∀ (p_1 : { s // s ∈ U }), Stream'.tail (Stream'.corec elem succ p) = Stream'.corec elem succ p_1 → n ∈ ↑p_1
⊢ Stream'.head (Stream'.corec elem succ p) * n ∈ ↑p
[PROOFSTEP]
have := Set.inter_subset_right _ _ (ih (succ p) ?_)
[GOAL]
case h.cons.refine_2
M : Type u_1
inst✝ : Semigroup M
U : Ultrafilter M
U_idem : U * U = U
exists_elem : ∀ {s : Set M}, s ∈ U → Set.Nonempty (s ∩ {m | ∀ᶠ (m' : M) in ↑U, m * m' ∈ s})
elem : { s // s ∈ U } → M := fun p => Set.Nonempty.some (_ : Set.Nonempty (↑p ∩ {m | ∀ᶠ (m' : M) in ↑U, m * m' ∈ ↑p}))
succ : { s // s ∈ U } → { s // s ∈ U } :=
  fun p => { val := ↑p ∩ {m | elem p * m ∈ ↑p}, property := (_ : ↑p ∩ {m | elem p * m ∈ ↑p} ∈ ↑U) }
a : Stream' M
m n : M
p : { s // s ∈ U }
h : FP (Stream'.tail (Stream'.corec elem succ p)) n
ih : ∀ (p_1 : { s // s ∈ U }), Stream'.tail (Stream'.corec elem succ p) = Stream'.corec elem succ p_1 → n ∈ ↑p_1
this : n ∈ {m | elem p * m ∈ ↑p}
⊢ Stream'.head (Stream'.corec elem succ p) * n ∈ ↑p
[PROOFSTEP]
simpa only using this
[GOAL]
case h.cons.refine_1
M : Type u_1
inst✝ : Semigroup M
U : Ultrafilter M
U_idem : U * U = U
exists_elem : ∀ {s : Set M}, s ∈ U → Set.Nonempty (s ∩ {m | ∀ᶠ (m' : M) in ↑U, m * m' ∈ s})
elem : { s // s ∈ U } → M := fun p => Set.Nonempty.some (_ : Set.Nonempty (↑p ∩ {m | ∀ᶠ (m' : M) in ↑U, m * m' ∈ ↑p}))
succ : { s // s ∈ U } → { s // s ∈ U } :=
  fun p => { val := ↑p ∩ {m | elem p * m ∈ ↑p}, property := (_ : ↑p ∩ {m | elem p * m ∈ ↑p} ∈ ↑U) }
a : Stream' M
m n : M
p : { s // s ∈ U }
h : FP (Stream'.tail (Stream'.corec elem succ p)) n
ih : ∀ (p_1 : { s // s ∈ U }), Stream'.tail (Stream'.corec elem succ p) = Stream'.corec elem succ p_1 → n ∈ ↑p_1
⊢ Stream'.tail (Stream'.corec elem succ p) = Stream'.corec elem succ (succ p)
[PROOFSTEP]
rw [Stream'.corec_eq, Stream'.tail_cons]
[GOAL]
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
n : ℕ
⊢ FP (Stream'.drop n a) ⊆ FP a
[PROOFSTEP]
induction' n with n ih
[GOAL]
case zero
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
⊢ FP (Stream'.drop Nat.zero a) ⊆ FP a
[PROOFSTEP]
rfl
[GOAL]
case succ
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
n : ℕ
ih : FP (Stream'.drop n a) ⊆ FP a
⊢ FP (Stream'.drop (Nat.succ n) a) ⊆ FP a
[PROOFSTEP]
rw [Nat.succ_eq_one_add, ← Stream'.drop_drop]
[GOAL]
case succ
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
n : ℕ
ih : FP (Stream'.drop n a) ⊆ FP a
⊢ FP (Stream'.drop 1 (Stream'.drop n a)) ⊆ FP a
[PROOFSTEP]
exact _root_.trans (FP.tail _) ih
[GOAL]
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
i : ℕ
⊢ Stream'.nth a i ∈ FP a
[PROOFSTEP]
induction' i with i ih generalizing a
[GOAL]
case zero
M : Type u_1
inst✝ : Semigroup M
a✝ a : Stream' M
⊢ Stream'.nth a Nat.zero ∈ FP a
[PROOFSTEP]
apply FP.head
[GOAL]
case succ
M : Type u_1
inst✝ : Semigroup M
a✝ : Stream' M
i : ℕ
ih : ∀ (a : Stream' M), Stream'.nth a i ∈ FP a
a : Stream' M
⊢ Stream'.nth a (Nat.succ i) ∈ FP a
[PROOFSTEP]
apply FP.tail
[GOAL]
case succ.h
M : Type u_1
inst✝ : Semigroup M
a✝ : Stream' M
i : ℕ
ih : ∀ (a : Stream' M), Stream'.nth a i ∈ FP a
a : Stream' M
⊢ FP (Stream'.tail a) (Stream'.nth a (Nat.succ i))
[PROOFSTEP]
apply ih
[GOAL]
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
i j : ℕ
ij : i < j
⊢ Stream'.nth a i * Stream'.nth a j ∈ FP a
[PROOFSTEP]
refine' FP_drop_subset_FP _ i _
[GOAL]
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
i j : ℕ
ij : i < j
⊢ Stream'.nth a i * Stream'.nth a j ∈ FP (Stream'.drop i a)
[PROOFSTEP]
rw [← Stream'.head_drop]
[GOAL]
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
i j : ℕ
ij : i < j
⊢ Stream'.head (Stream'.drop i a) * Stream'.nth a j ∈ FP (Stream'.drop i a)
[PROOFSTEP]
apply FP.cons
[GOAL]
case h
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
i j : ℕ
ij : i < j
⊢ FP (Stream'.tail (Stream'.drop i a)) (Stream'.nth a j)
[PROOFSTEP]
rcases le_iff_exists_add.mp (Nat.succ_le_of_lt ij) with
  ⟨d, hd⟩
    -- Porting note: need to fix breakage of Set notation
[GOAL]
case h.intro
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
i j : ℕ
ij : i < j
d : ℕ
hd : j = Nat.succ i + d
⊢ FP (Stream'.tail (Stream'.drop i a)) (Stream'.nth a j)
[PROOFSTEP]
change _ ∈ FP _
[GOAL]
case h.intro
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
i j : ℕ
ij : i < j
d : ℕ
hd : j = Nat.succ i + d
⊢ Stream'.nth a j ∈ FP (Stream'.tail (Stream'.drop i a))
[PROOFSTEP]
have := FP.singleton (a.drop i).tail d
[GOAL]
case h.intro
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
i j : ℕ
ij : i < j
d : ℕ
hd : j = Nat.succ i + d
this : Stream'.nth (Stream'.tail (Stream'.drop i a)) d ∈ FP (Stream'.tail (Stream'.drop i a))
⊢ Stream'.nth a j ∈ FP (Stream'.tail (Stream'.drop i a))
[PROOFSTEP]
rw [Stream'.tail_eq_drop, Stream'.nth_drop, Stream'.nth_drop] at this
[GOAL]
case h.intro
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
i j : ℕ
ij : i < j
d : ℕ
hd : j = Nat.succ i + d
this : Stream'.nth a (d + 1 + i) ∈ FP (Stream'.drop 1 (Stream'.drop i a))
⊢ Stream'.nth a j ∈ FP (Stream'.tail (Stream'.drop i a))
[PROOFSTEP]
convert this
[GOAL]
case h.e'_4.h.e'_3
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
i j : ℕ
ij : i < j
d : ℕ
hd : j = Nat.succ i + d
this : Stream'.nth a (d + 1 + i) ∈ FP (Stream'.drop 1 (Stream'.drop i a))
⊢ j = d + 1 + i
[PROOFSTEP]
rw [hd, add_comm, Nat.succ_add, Nat.add_succ]
[GOAL]
M : Type u_1
inst✝ : CommMonoid M
a : Stream' M
s : Finset ℕ
hs : Finset.Nonempty s
⊢ (Finset.prod s fun i => Stream'.nth a i) ∈ FP a
[PROOFSTEP]
refine' FP_drop_subset_FP _ (s.min' hs) _
[GOAL]
M : Type u_1
inst✝ : CommMonoid M
a : Stream' M
s : Finset ℕ
hs : Finset.Nonempty s
⊢ (Finset.prod s fun i => Stream'.nth a i) ∈ FP (Stream'.drop (Finset.min' s hs) a)
[PROOFSTEP]
induction' s using Finset.strongInduction with s ih
[GOAL]
case H
M : Type u_1
inst✝ : CommMonoid M
a : Stream' M
s✝ : Finset ℕ
hs✝ : Finset.Nonempty s✝
s : Finset ℕ
ih :
  ∀ (t : Finset ℕ),
    t ⊂ s →
      ∀ (hs : Finset.Nonempty t), (Finset.prod t fun i => Stream'.nth a i) ∈ FP (Stream'.drop (Finset.min' t hs) a)
hs : Finset.Nonempty s
⊢ (Finset.prod s fun i => Stream'.nth a i) ∈ FP (Stream'.drop (Finset.min' s hs) a)
[PROOFSTEP]
rw [← Finset.mul_prod_erase _ _ (s.min'_mem hs), ← Stream'.head_drop]
[GOAL]
case H
M : Type u_1
inst✝ : CommMonoid M
a : Stream' M
s✝ : Finset ℕ
hs✝ : Finset.Nonempty s✝
s : Finset ℕ
ih :
  ∀ (t : Finset ℕ),
    t ⊂ s →
      ∀ (hs : Finset.Nonempty t), (Finset.prod t fun i => Stream'.nth a i) ∈ FP (Stream'.drop (Finset.min' t hs) a)
hs : Finset.Nonempty s
⊢ (Stream'.head (Stream'.drop (Finset.min' s hs) a) *
      Finset.prod (Finset.erase s (Finset.min' s hs)) fun x => Stream'.nth a x) ∈
    FP (Stream'.drop (Finset.min' s hs) a)
[PROOFSTEP]
cases' (s.erase (s.min' hs)).eq_empty_or_nonempty with h h
[GOAL]
case H.inl
M : Type u_1
inst✝ : CommMonoid M
a : Stream' M
s✝ : Finset ℕ
hs✝ : Finset.Nonempty s✝
s : Finset ℕ
ih :
  ∀ (t : Finset ℕ),
    t ⊂ s →
      ∀ (hs : Finset.Nonempty t), (Finset.prod t fun i => Stream'.nth a i) ∈ FP (Stream'.drop (Finset.min' t hs) a)
hs : Finset.Nonempty s
h : Finset.erase s (Finset.min' s hs) = ∅
⊢ (Stream'.head (Stream'.drop (Finset.min' s hs) a) *
      Finset.prod (Finset.erase s (Finset.min' s hs)) fun x => Stream'.nth a x) ∈
    FP (Stream'.drop (Finset.min' s hs) a)
[PROOFSTEP]
rw [h, Finset.prod_empty, mul_one]
[GOAL]
case H.inl
M : Type u_1
inst✝ : CommMonoid M
a : Stream' M
s✝ : Finset ℕ
hs✝ : Finset.Nonempty s✝
s : Finset ℕ
ih :
  ∀ (t : Finset ℕ),
    t ⊂ s →
      ∀ (hs : Finset.Nonempty t), (Finset.prod t fun i => Stream'.nth a i) ∈ FP (Stream'.drop (Finset.min' t hs) a)
hs : Finset.Nonempty s
h : Finset.erase s (Finset.min' s hs) = ∅
⊢ Stream'.head (Stream'.drop (Finset.min' s hs) a) ∈ FP (Stream'.drop (Finset.min' s hs) a)
[PROOFSTEP]
exact FP.head _
[GOAL]
case H.inr
M : Type u_1
inst✝ : CommMonoid M
a : Stream' M
s✝ : Finset ℕ
hs✝ : Finset.Nonempty s✝
s : Finset ℕ
ih :
  ∀ (t : Finset ℕ),
    t ⊂ s →
      ∀ (hs : Finset.Nonempty t), (Finset.prod t fun i => Stream'.nth a i) ∈ FP (Stream'.drop (Finset.min' t hs) a)
hs : Finset.Nonempty s
h : Finset.Nonempty (Finset.erase s (Finset.min' s hs))
⊢ (Stream'.head (Stream'.drop (Finset.min' s hs) a) *
      Finset.prod (Finset.erase s (Finset.min' s hs)) fun x => Stream'.nth a x) ∈
    FP (Stream'.drop (Finset.min' s hs) a)
[PROOFSTEP]
apply FP.cons
[GOAL]
case H.inr.h
M : Type u_1
inst✝ : CommMonoid M
a : Stream' M
s✝ : Finset ℕ
hs✝ : Finset.Nonempty s✝
s : Finset ℕ
ih :
  ∀ (t : Finset ℕ),
    t ⊂ s →
      ∀ (hs : Finset.Nonempty t), (Finset.prod t fun i => Stream'.nth a i) ∈ FP (Stream'.drop (Finset.min' t hs) a)
hs : Finset.Nonempty s
h : Finset.Nonempty (Finset.erase s (Finset.min' s hs))
⊢ FP (Stream'.tail (Stream'.drop (Finset.min' s hs) a))
    (Finset.prod (Finset.erase s (Finset.min' s hs)) fun x => Stream'.nth a x)
[PROOFSTEP]
rw [Stream'.tail_eq_drop, Stream'.drop_drop, add_comm]
[GOAL]
case H.inr.h
M : Type u_1
inst✝ : CommMonoid M
a : Stream' M
s✝ : Finset ℕ
hs✝ : Finset.Nonempty s✝
s : Finset ℕ
ih :
  ∀ (t : Finset ℕ),
    t ⊂ s →
      ∀ (hs : Finset.Nonempty t), (Finset.prod t fun i => Stream'.nth a i) ∈ FP (Stream'.drop (Finset.min' t hs) a)
hs : Finset.Nonempty s
h : Finset.Nonempty (Finset.erase s (Finset.min' s hs))
⊢ FP (Stream'.drop (Finset.min' s hs + 1) a) (Finset.prod (Finset.erase s (Finset.min' s hs)) fun x => Stream'.nth a x)
[PROOFSTEP]
refine' Set.mem_of_subset_of_mem _ (ih _ (Finset.erase_ssubset <| s.min'_mem hs) h)
[GOAL]
case H.inr.h
M : Type u_1
inst✝ : CommMonoid M
a : Stream' M
s✝ : Finset ℕ
hs✝ : Finset.Nonempty s✝
s : Finset ℕ
ih :
  ∀ (t : Finset ℕ),
    t ⊂ s →
      ∀ (hs : Finset.Nonempty t), (Finset.prod t fun i => Stream'.nth a i) ∈ FP (Stream'.drop (Finset.min' t hs) a)
hs : Finset.Nonempty s
h : Finset.Nonempty (Finset.erase s (Finset.min' s hs))
⊢ FP (Stream'.drop (Finset.min' (Finset.erase s (Finset.min' s hs)) h) a) ⊆ FP (Stream'.drop (Finset.min' s hs + 1) a)
[PROOFSTEP]
have : s.min' hs + 1 ≤ (s.erase (s.min' hs)).min' h :=
  Nat.succ_le_of_lt (Finset.min'_lt_of_mem_erase_min' _ _ <| Finset.min'_mem _ _)
[GOAL]
case H.inr.h
M : Type u_1
inst✝ : CommMonoid M
a : Stream' M
s✝ : Finset ℕ
hs✝ : Finset.Nonempty s✝
s : Finset ℕ
ih :
  ∀ (t : Finset ℕ),
    t ⊂ s →
      ∀ (hs : Finset.Nonempty t), (Finset.prod t fun i => Stream'.nth a i) ∈ FP (Stream'.drop (Finset.min' t hs) a)
hs : Finset.Nonempty s
h : Finset.Nonempty (Finset.erase s (Finset.min' s hs))
this : Finset.min' s hs + 1 ≤ Finset.min' (Finset.erase s (Finset.min' s hs)) h
⊢ FP (Stream'.drop (Finset.min' (Finset.erase s (Finset.min' s hs)) h) a) ⊆ FP (Stream'.drop (Finset.min' s hs + 1) a)
[PROOFSTEP]
cases' le_iff_exists_add.mp this with d hd
[GOAL]
case H.inr.h.intro
M : Type u_1
inst✝ : CommMonoid M
a : Stream' M
s✝ : Finset ℕ
hs✝ : Finset.Nonempty s✝
s : Finset ℕ
ih :
  ∀ (t : Finset ℕ),
    t ⊂ s →
      ∀ (hs : Finset.Nonempty t), (Finset.prod t fun i => Stream'.nth a i) ∈ FP (Stream'.drop (Finset.min' t hs) a)
hs : Finset.Nonempty s
h : Finset.Nonempty (Finset.erase s (Finset.min' s hs))
this : Finset.min' s hs + 1 ≤ Finset.min' (Finset.erase s (Finset.min' s hs)) h
d : ℕ
hd : Finset.min' (Finset.erase s (Finset.min' s hs)) h = Finset.min' s hs + 1 + d
⊢ FP (Stream'.drop (Finset.min' (Finset.erase s (Finset.min' s hs)) h) a) ⊆ FP (Stream'.drop (Finset.min' s hs + 1) a)
[PROOFSTEP]
rw [hd, add_comm, ← Stream'.drop_drop]
[GOAL]
case H.inr.h.intro
M : Type u_1
inst✝ : CommMonoid M
a : Stream' M
s✝ : Finset ℕ
hs✝ : Finset.Nonempty s✝
s : Finset ℕ
ih :
  ∀ (t : Finset ℕ),
    t ⊂ s →
      ∀ (hs : Finset.Nonempty t), (Finset.prod t fun i => Stream'.nth a i) ∈ FP (Stream'.drop (Finset.min' t hs) a)
hs : Finset.Nonempty s
h : Finset.Nonempty (Finset.erase s (Finset.min' s hs))
this : Finset.min' s hs + 1 ≤ Finset.min' (Finset.erase s (Finset.min' s hs)) h
d : ℕ
hd : Finset.min' (Finset.erase s (Finset.min' s hs)) h = Finset.min' s hs + 1 + d
⊢ FP (Stream'.drop d (Stream'.drop (Finset.min' s hs + 1) a)) ⊆ FP (Stream'.drop (Finset.min' s hs + 1) a)
[PROOFSTEP]
apply FP_drop_subset_FP


[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
f g : ι → α
s t u : Set α
a✝ b✝ : α
hr : Symmetric r
a b : α
⊢ Pairwise (r on fun c => bif c then a else b) ↔ r a b
[PROOFSTEP]
simpa [Pairwise, Function.onFun] using @hr a b
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
f g : ι → α
s✝ t u : Set α
a b : α
inst✝ : IsEquiv α r
s : Set ι
hs : Set.Nonempty s
⊢ Set.Pairwise s (r on f) ↔ ∃ z, ∀ (x : ι), x ∈ s → r (f x) z
[PROOFSTEP]
constructor
[GOAL]
case mp
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
f g : ι → α
s✝ t u : Set α
a b : α
inst✝ : IsEquiv α r
s : Set ι
hs : Set.Nonempty s
⊢ Set.Pairwise s (r on f) → ∃ z, ∀ (x : ι), x ∈ s → r (f x) z
[PROOFSTEP]
rcases hs with ⟨y, hy⟩
[GOAL]
case mp.intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
f g : ι → α
s✝ t u : Set α
a b : α
inst✝ : IsEquiv α r
s : Set ι
y : ι
hy : y ∈ s
⊢ Set.Pairwise s (r on f) → ∃ z, ∀ (x : ι), x ∈ s → r (f x) z
[PROOFSTEP]
refine' fun H => ⟨f y, fun x hx => _⟩
[GOAL]
case mp.intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
f g : ι → α
s✝ t u : Set α
a b : α
inst✝ : IsEquiv α r
s : Set ι
y : ι
hy : y ∈ s
H : Set.Pairwise s (r on f)
x : ι
hx : x ∈ s
⊢ r (f x) (f y)
[PROOFSTEP]
rcases eq_or_ne x y with (rfl | hne)
[GOAL]
case mp.intro.inl
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
f g : ι → α
s✝ t u : Set α
a b : α
inst✝ : IsEquiv α r
s : Set ι
H : Set.Pairwise s (r on f)
x : ι
hx hy : x ∈ s
⊢ r (f x) (f x)
[PROOFSTEP]
apply IsRefl.refl
[GOAL]
case mp.intro.inr
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
f g : ι → α
s✝ t u : Set α
a b : α
inst✝ : IsEquiv α r
s : Set ι
y : ι
hy : y ∈ s
H : Set.Pairwise s (r on f)
x : ι
hx : x ∈ s
hne : x ≠ y
⊢ r (f x) (f y)
[PROOFSTEP]
exact H hx hy hne
[GOAL]
case mpr
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
f g : ι → α
s✝ t u : Set α
a b : α
inst✝ : IsEquiv α r
s : Set ι
hs : Set.Nonempty s
⊢ (∃ z, ∀ (x : ι), x ∈ s → r (f x) z) → Set.Pairwise s (r on f)
[PROOFSTEP]
rintro ⟨z, hz⟩ x hx y hy _
[GOAL]
case mpr.intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
f g : ι → α
s✝ t u : Set α
a b : α
inst✝ : IsEquiv α r
s : Set ι
hs : Set.Nonempty s
z : α
hz : ∀ (x : ι), x ∈ s → r (f x) z
x : ι
hx : x ∈ s
y : ι
hy : y ∈ s
a✝ : x ≠ y
⊢ (r on f) x y
[PROOFSTEP]
exact @IsTrans.trans α r _ (f x) z (f y) (hz _ hx) (IsSymm.symm _ _ <| hz _ hy)
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r✝ p q : α → α → Prop
f✝ g : ι → α
s✝ t u : Set α
a b : α
inst✝¹ : Nonempty ι
s : Set α
f : α → ι
r : ι → ι → Prop
inst✝ : IsEquiv ι r
⊢ Set.Pairwise s (r on f) ↔ ∃ z, ∀ (x : α), x ∈ s → r (f x) z
[PROOFSTEP]
rcases s.eq_empty_or_nonempty with (rfl | hne)
[GOAL]
case inl
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r✝ p q : α → α → Prop
f✝ g : ι → α
s t u : Set α
a b : α
inst✝¹ : Nonempty ι
f : α → ι
r : ι → ι → Prop
inst✝ : IsEquiv ι r
⊢ Set.Pairwise ∅ (r on f) ↔ ∃ z, ∀ (x : α), x ∈ ∅ → r (f x) z
[PROOFSTEP]
simp
[GOAL]
case inr
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r✝ p q : α → α → Prop
f✝ g : ι → α
s✝ t u : Set α
a b : α
inst✝¹ : Nonempty ι
s : Set α
f : α → ι
r : ι → ι → Prop
inst✝ : IsEquiv ι r
hne : Set.Nonempty s
⊢ Set.Pairwise s (r on f) ↔ ∃ z, ∀ (x : α), x ∈ s → r (f x) z
[PROOFSTEP]
exact hne.pairwise_iff_exists_forall
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
f g : ι → α
s t u : Set α
a b : α
⊢ Set.Pairwise (s ∪ t) r ↔
    Set.Pairwise s r ∧ Set.Pairwise t r ∧ ∀ (a : α), a ∈ s → ∀ (b : α), b ∈ t → a ≠ b → r a b ∧ r b a
[PROOFSTEP]
simp only [Set.Pairwise, mem_union, or_imp, forall_and]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
f g : ι → α
s t u : Set α
a b : α
⊢ (((∀ (x : α), x ∈ s → ∀ (x_1 : α), x_1 ∈ s → x ≠ x_1 → r x x_1) ∧
        ∀ (x : α), x ∈ t → ∀ (x_1 : α), x_1 ∈ s → x ≠ x_1 → r x x_1) ∧
      (∀ (x : α), x ∈ s → ∀ (x_1 : α), x_1 ∈ t → x ≠ x_1 → r x x_1) ∧
        ∀ (x : α), x ∈ t → ∀ (x_1 : α), x_1 ∈ t → x ≠ x_1 → r x x_1) ↔
    (∀ (x : α), x ∈ s → ∀ (x_1 : α), x_1 ∈ s → x ≠ x_1 → r x x_1) ∧
      (∀ (x : α), x ∈ t → ∀ (x_1 : α), x_1 ∈ t → x ≠ x_1 → r x x_1) ∧
        (∀ (x : α), x ∈ s → ∀ (x_1 : α), x_1 ∈ t → x ≠ x_1 → r x x_1) ∧
          ∀ (x : α), x ∈ s → ∀ (x_2 : α), x_2 ∈ t → x ≠ x_2 → r x_2 x
[PROOFSTEP]
exact
  ⟨fun H => ⟨H.1.1, H.2.2, H.2.1, fun x hx y hy hne => H.1.2 y hy x hx hne.symm⟩, fun H =>
    ⟨⟨H.1, fun x hx y hy hne => H.2.2.2 y hy x hx hne.symm⟩, H.2.2.1, H.2.1⟩⟩
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
f g : ι → α
s t u : Set α
a b : α
hr : Symmetric r
⊢ (Set.Pairwise s r ∧ Set.Pairwise t r ∧ ∀ (a : α), a ∈ s → ∀ (b : α), b ∈ t → a ≠ b → r a b ∧ r b a) ↔
    Set.Pairwise s r ∧ Set.Pairwise t r ∧ ∀ (a : α), a ∈ s → ∀ (b : α), b ∈ t → a ≠ b → r a b
[PROOFSTEP]
simp only [hr.iff, and_self_iff]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
f g : ι → α
s t u : Set α
a b : α
⊢ Set.Pairwise (insert a s) r ↔ Set.Pairwise s r ∧ ∀ (b : α), b ∈ s → a ≠ b → r a b ∧ r b a
[PROOFSTEP]
simp only [insert_eq, pairwise_union, pairwise_singleton, true_and_iff, mem_singleton_iff, forall_eq]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
f g : ι → α
s t u : Set α
a b✝ : α
ha : ¬a ∈ s
b : α
hb : b ∈ s
⊢ a ≠ b → r a b ∧ r b a ↔ r a b ∧ r b a
[PROOFSTEP]
simp [(ne_of_mem_of_not_mem hb ha).symm]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
f g : ι → α
s t u : Set α
a b : α
hr : Symmetric r
⊢ Set.Pairwise (insert a s) r ↔ Set.Pairwise s r ∧ ∀ (b : α), b ∈ s → a ≠ b → r a b
[PROOFSTEP]
simp only [pairwise_insert, hr.iff a, and_self_iff]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
f g : ι → α
s t u : Set α
a b : α
hr : Symmetric r
ha : ¬a ∈ s
⊢ Set.Pairwise (insert a s) r ↔ Set.Pairwise s r ∧ ∀ (b : α), b ∈ s → r a b
[PROOFSTEP]
simp only [pairwise_insert_of_not_mem ha, hr.iff a, and_self_iff]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
f g : ι → α
s t u : Set α
a b : α
⊢ Set.Pairwise {a, b} r ↔ a ≠ b → r a b ∧ r b a
[PROOFSTEP]
simp [pairwise_insert]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
f g : ι → α
s t u : Set α
a b : α
hr : Symmetric r
⊢ Set.Pairwise {a, b} r ↔ a ≠ b → r a b
[PROOFSTEP]
simp [pairwise_insert_of_symmetric hr]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
f g : ι → α
s t u : Set α
a b : α
⊢ Set.Pairwise univ r ↔ Pairwise r
[PROOFSTEP]
simp only [Set.Pairwise, Pairwise, mem_univ, forall_const]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
f g : ι → α
s✝ t u : Set α
a b : α
s : Set ι
h : InjOn f s
⊢ Set.Pairwise (f '' s) r ↔ Set.Pairwise s (r on f)
[PROOFSTEP]
simp (config := { contextual := true }) [h.eq_iff, Set.Pairwise]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r✝ p q : α → α → Prop
s : Set α
r : α → α → Prop
⊢ (Pairwise fun x y => r ↑x ↑y) ↔ Set.Pairwise s r
[PROOFSTEP]
simp only [Pairwise, Set.Pairwise, SetCoe.forall, Ne.def, Subtype.ext_iff, Subtype.coe_mk]
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
inst✝¹ : PartialOrder α
inst✝ : OrderBot α
s t : Set ι
f g✝ : ι → α
hs : PairwiseDisjoint s f
g : ι → ι
hg : f ∘ g ≤ f
⊢ PairwiseDisjoint (g '' s) f
[PROOFSTEP]
rintro _ ⟨a, ha, rfl⟩ _ ⟨b, hb, rfl⟩ h
[GOAL]
case intro.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
inst✝¹ : PartialOrder α
inst✝ : OrderBot α
s t : Set ι
f g✝ : ι → α
hs : PairwiseDisjoint s f
g : ι → ι
hg : f ∘ g ≤ f
a : ι
ha : a ∈ s
b : ι
hb : b ∈ s
h : g a ≠ g b
⊢ (Disjoint on f) (g a) (g b)
[PROOFSTEP]
exact (hs ha hb <| ne_of_apply_ne _ h).mono (hg a) (hg b)
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
inst✝¹ : PartialOrder α
inst✝ : OrderBot α
s t : Set ι
f g✝ : ι → α
g : ↑s → ι
hg : ∀ (i : ↑s), f (g i) ≤ f ↑i
ht : PairwiseDisjoint s f
⊢ PairwiseDisjoint (Set.range g) f
[PROOFSTEP]
rintro _ ⟨x, rfl⟩ _ ⟨y, rfl⟩ hxy
[GOAL]
case intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
inst✝¹ : PartialOrder α
inst✝ : OrderBot α
s t : Set ι
f g✝ : ι → α
g : ↑s → ι
hg : ∀ (i : ↑s), f (g i) ≤ f ↑i
ht : PairwiseDisjoint s f
x y : ↑s
hxy : g x ≠ g y
⊢ (Disjoint on f) (g x) (g y)
[PROOFSTEP]
exact ((ht x.2 y.2) fun h => hxy <| congr_arg g <| Subtype.ext h).mono (hg x) (hg y)
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
s : Set ι
t : Set ι'
⊢ PairwiseDisjoint (range singleton) id
[PROOFSTEP]
rintro _ ⟨a, rfl⟩ _ ⟨b, rfl⟩ h
[GOAL]
case intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
s : Set ι
t : Set ι'
a b : ι
h : {a} ≠ {b}
⊢ (Disjoint on id) {a} {b}
[PROOFSTEP]
exact disjoint_singleton.2 (ne_of_apply_ne _ h)
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
s✝ : Set ι
t✝ : Set ι'
f : α → β → γ
s : Set α
t : Set β
hf : ∀ (a : α), a ∈ s → Injective (f a)
⊢ (PairwiseDisjoint s fun a => f a '' t) ↔ InjOn (fun p => f p.fst p.snd) (s ×ˢ t)
[PROOFSTEP]
refine' ⟨fun hs x hx y hy (h : f _ _ = _) => _, fun hs x hx y hy h => _⟩
[GOAL]
case refine'_1
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
s✝ : Set ι
t✝ : Set ι'
f : α → β → γ
s : Set α
t : Set β
hf : ∀ (a : α), a ∈ s → Injective (f a)
hs : PairwiseDisjoint s fun a => f a '' t
x : α × β
hx : x ∈ s ×ˢ t
y : α × β
hy : y ∈ s ×ˢ t
h : f x.fst x.snd = (fun p => f p.fst p.snd) y
⊢ x = y
[PROOFSTEP]
suffices x.1 = y.1 by exact Prod.ext this (hf _ hx.1 <| h.trans <| by rw [this])
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
s✝ : Set ι
t✝ : Set ι'
f : α → β → γ
s : Set α
t : Set β
hf : ∀ (a : α), a ∈ s → Injective (f a)
hs : PairwiseDisjoint s fun a => f a '' t
x : α × β
hx : x ∈ s ×ˢ t
y : α × β
hy : y ∈ s ×ˢ t
h : f x.fst x.snd = (fun p => f p.fst p.snd) y
this : x.fst = y.fst
⊢ x = y
[PROOFSTEP]
exact Prod.ext this (hf _ hx.1 <| h.trans <| by rw [this])
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
s✝ : Set ι
t✝ : Set ι'
f : α → β → γ
s : Set α
t : Set β
hf : ∀ (a : α), a ∈ s → Injective (f a)
hs : PairwiseDisjoint s fun a => f a '' t
x : α × β
hx : x ∈ s ×ˢ t
y : α × β
hy : y ∈ s ×ˢ t
h : f x.fst x.snd = (fun p => f p.fst p.snd) y
this : x.fst = y.fst
⊢ (fun p => f p.fst p.snd) y = f x.fst y.snd
[PROOFSTEP]
rw [this]
[GOAL]
case refine'_1
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
s✝ : Set ι
t✝ : Set ι'
f : α → β → γ
s : Set α
t : Set β
hf : ∀ (a : α), a ∈ s → Injective (f a)
hs : PairwiseDisjoint s fun a => f a '' t
x : α × β
hx : x ∈ s ×ˢ t
y : α × β
hy : y ∈ s ×ˢ t
h : f x.fst x.snd = (fun p => f p.fst p.snd) y
⊢ x.fst = y.fst
[PROOFSTEP]
refine' hs.elim hx.1 hy.1 (not_disjoint_iff.2 ⟨_, mem_image_of_mem _ hx.2, _⟩)
[GOAL]
case refine'_1
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
s✝ : Set ι
t✝ : Set ι'
f : α → β → γ
s : Set α
t : Set β
hf : ∀ (a : α), a ∈ s → Injective (f a)
hs : PairwiseDisjoint s fun a => f a '' t
x : α × β
hx : x ∈ s ×ˢ t
y : α × β
hy : y ∈ s ×ˢ t
h : f x.fst x.snd = (fun p => f p.fst p.snd) y
⊢ f x.fst x.snd ∈ f y.fst '' t
[PROOFSTEP]
rw [h]
[GOAL]
case refine'_1
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
s✝ : Set ι
t✝ : Set ι'
f : α → β → γ
s : Set α
t : Set β
hf : ∀ (a : α), a ∈ s → Injective (f a)
hs : PairwiseDisjoint s fun a => f a '' t
x : α × β
hx : x ∈ s ×ˢ t
y : α × β
hy : y ∈ s ×ˢ t
h : f x.fst x.snd = (fun p => f p.fst p.snd) y
⊢ (fun p => f p.fst p.snd) y ∈ f y.fst '' t
[PROOFSTEP]
exact mem_image_of_mem _ hy.2
[GOAL]
case refine'_2
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
s✝ : Set ι
t✝ : Set ι'
f : α → β → γ
s : Set α
t : Set β
hf : ∀ (a : α), a ∈ s → Injective (f a)
hs : InjOn (fun p => f p.fst p.snd) (s ×ˢ t)
x : α
hx : x ∈ s
y : α
hy : y ∈ s
h : x ≠ y
⊢ (Disjoint on fun a => f a '' t) x y
[PROOFSTEP]
refine' disjoint_iff_inf_le.mpr _
[GOAL]
case refine'_2
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
s✝ : Set ι
t✝ : Set ι'
f : α → β → γ
s : Set α
t : Set β
hf : ∀ (a : α), a ∈ s → Injective (f a)
hs : InjOn (fun p => f p.fst p.snd) (s ×ˢ t)
x : α
hx : x ∈ s
y : α
hy : y ∈ s
h : x ≠ y
⊢ (fun a => f a '' t) x ⊓ (fun a => f a '' t) y ≤ ⊥
[PROOFSTEP]
rintro _ ⟨⟨a, ha, hab⟩, b, hb, rfl⟩
[GOAL]
case refine'_2.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
s✝ : Set ι
t✝ : Set ι'
f : α → β → γ
s : Set α
t : Set β
hf : ∀ (a : α), a ∈ s → Injective (f a)
hs : InjOn (fun p => f p.fst p.snd) (s ×ˢ t)
x : α
hx : x ∈ s
y : α
hy : y ∈ s
h : x ≠ y
a : β
ha : a ∈ t
b : β
hb : b ∈ t
hab : f x a = f y b
⊢ f y b ∈ ⊥
[PROOFSTEP]
exact h (congr_arg Prod.fst <| hs (mk_mem_prod hx ha) (mk_mem_prod hy hb) hab)
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
s✝ : Set ι
t✝ : Set ι'
f : α → β → γ
s : Set α
t : Set β
hf : ∀ (b : β), b ∈ t → Injective fun a => f a b
⊢ (PairwiseDisjoint t fun b => (fun a => f a b) '' s) ↔ InjOn (fun p => f p.fst p.snd) (s ×ˢ t)
[PROOFSTEP]
refine' ⟨fun ht x hx y hy (h : f _ _ = _) => _, fun ht x hx y hy h => _⟩
[GOAL]
case refine'_1
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
s✝ : Set ι
t✝ : Set ι'
f : α → β → γ
s : Set α
t : Set β
hf : ∀ (b : β), b ∈ t → Injective fun a => f a b
ht : PairwiseDisjoint t fun b => (fun a => f a b) '' s
x : α × β
hx : x ∈ s ×ˢ t
y : α × β
hy : y ∈ s ×ˢ t
h : f x.fst x.snd = (fun p => f p.fst p.snd) y
⊢ x = y
[PROOFSTEP]
suffices x.2 = y.2 by exact Prod.ext (hf _ hx.2 <| h.trans <| by rw [this]) this
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
s✝ : Set ι
t✝ : Set ι'
f : α → β → γ
s : Set α
t : Set β
hf : ∀ (b : β), b ∈ t → Injective fun a => f a b
ht : PairwiseDisjoint t fun b => (fun a => f a b) '' s
x : α × β
hx : x ∈ s ×ˢ t
y : α × β
hy : y ∈ s ×ˢ t
h : f x.fst x.snd = (fun p => f p.fst p.snd) y
this : x.snd = y.snd
⊢ x = y
[PROOFSTEP]
exact Prod.ext (hf _ hx.2 <| h.trans <| by rw [this]) this
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
s✝ : Set ι
t✝ : Set ι'
f : α → β → γ
s : Set α
t : Set β
hf : ∀ (b : β), b ∈ t → Injective fun a => f a b
ht : PairwiseDisjoint t fun b => (fun a => f a b) '' s
x : α × β
hx : x ∈ s ×ˢ t
y : α × β
hy : y ∈ s ×ˢ t
h : f x.fst x.snd = (fun p => f p.fst p.snd) y
this : x.snd = y.snd
⊢ (fun p => f p.fst p.snd) y = (fun a => f a x.snd) y.fst
[PROOFSTEP]
rw [this]
[GOAL]
case refine'_1
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
s✝ : Set ι
t✝ : Set ι'
f : α → β → γ
s : Set α
t : Set β
hf : ∀ (b : β), b ∈ t → Injective fun a => f a b
ht : PairwiseDisjoint t fun b => (fun a => f a b) '' s
x : α × β
hx : x ∈ s ×ˢ t
y : α × β
hy : y ∈ s ×ˢ t
h : f x.fst x.snd = (fun p => f p.fst p.snd) y
⊢ x.snd = y.snd
[PROOFSTEP]
refine' ht.elim hx.2 hy.2 (not_disjoint_iff.2 ⟨_, mem_image_of_mem _ hx.1, _⟩)
[GOAL]
case refine'_1
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
s✝ : Set ι
t✝ : Set ι'
f : α → β → γ
s : Set α
t : Set β
hf : ∀ (b : β), b ∈ t → Injective fun a => f a b
ht : PairwiseDisjoint t fun b => (fun a => f a b) '' s
x : α × β
hx : x ∈ s ×ˢ t
y : α × β
hy : y ∈ s ×ˢ t
h : f x.fst x.snd = (fun p => f p.fst p.snd) y
⊢ f x.fst x.snd ∈ (fun a => f a y.snd) '' s
[PROOFSTEP]
rw [h]
[GOAL]
case refine'_1
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
s✝ : Set ι
t✝ : Set ι'
f : α → β → γ
s : Set α
t : Set β
hf : ∀ (b : β), b ∈ t → Injective fun a => f a b
ht : PairwiseDisjoint t fun b => (fun a => f a b) '' s
x : α × β
hx : x ∈ s ×ˢ t
y : α × β
hy : y ∈ s ×ˢ t
h : f x.fst x.snd = (fun p => f p.fst p.snd) y
⊢ (fun p => f p.fst p.snd) y ∈ (fun a => f a y.snd) '' s
[PROOFSTEP]
exact mem_image_of_mem _ hy.1
[GOAL]
case refine'_2
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
s✝ : Set ι
t✝ : Set ι'
f : α → β → γ
s : Set α
t : Set β
hf : ∀ (b : β), b ∈ t → Injective fun a => f a b
ht : InjOn (fun p => f p.fst p.snd) (s ×ˢ t)
x : β
hx : x ∈ t
y : β
hy : y ∈ t
h : x ≠ y
⊢ (Disjoint on fun b => (fun a => f a b) '' s) x y
[PROOFSTEP]
refine' disjoint_iff_inf_le.mpr _
[GOAL]
case refine'_2
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
s✝ : Set ι
t✝ : Set ι'
f : α → β → γ
s : Set α
t : Set β
hf : ∀ (b : β), b ∈ t → Injective fun a => f a b
ht : InjOn (fun p => f p.fst p.snd) (s ×ˢ t)
x : β
hx : x ∈ t
y : β
hy : y ∈ t
h : x ≠ y
⊢ (fun b => (fun a => f a b) '' s) x ⊓ (fun b => (fun a => f a b) '' s) y ≤ ⊥
[PROOFSTEP]
rintro _ ⟨⟨a, ha, hab⟩, b, hb, rfl⟩
[GOAL]
case refine'_2.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
s✝ : Set ι
t✝ : Set ι'
f : α → β → γ
s : Set α
t : Set β
hf : ∀ (b : β), b ∈ t → Injective fun a => f a b
ht : InjOn (fun p => f p.fst p.snd) (s ×ˢ t)
x : β
hx : x ∈ t
y : β
hy : y ∈ t
h : x ≠ y
a : α
ha : a ∈ s
b : α
hb : b ∈ s
hab : (fun a => f a x) a = (fun a => f a y) b
⊢ (fun a => f a y) b ∈ ⊥
[PROOFSTEP]
exact h (congr_arg Prod.snd <| ht (mk_mem_prod ha hx) (mk_mem_prod hb hy) hab)
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
s : Set ι
t : Set ι'
f : ι → Set α
h : ¬PairwiseDisjoint s f
⊢ ∃ i, i ∈ s ∧ ∃ j, j ∈ s ∧ ∃ _hij x, x ∈ f i ∩ f j
[PROOFSTEP]
change ¬∀ i, i ∈ s → ∀ j, j ∈ s → i ≠ j → ∀ t, t ≤ f i → t ≤ f j → t ≤ ⊥ at h
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
s : Set ι
t : Set ι'
f : ι → Set α
h : ¬∀ (i : ι), i ∈ s → ∀ (j : ι), j ∈ s → i ≠ j → ∀ (t : Set α), t ≤ f i → t ≤ f j → t ≤ ⊥
⊢ ∃ i, i ∈ s ∧ ∃ j, j ∈ s ∧ ∃ _hij x, x ∈ f i ∩ f j
[PROOFSTEP]
simp only [not_forall] at h
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
s : Set ι
t : Set ι'
f : ι → Set α
h : ∃ x h x_1 h h x_2 h x, ¬x_2 ≤ ⊥
⊢ ∃ i, i ∈ s ∧ ∃ j, j ∈ s ∧ ∃ _hij x, x ∈ f i ∩ f j
[PROOFSTEP]
obtain ⟨i, hi, j, hj, h_ne, t, hfi, hfj, ht⟩ := h
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
s : Set ι
t✝ : Set ι'
f : ι → Set α
i : ι
hi : i ∈ s
j : ι
hj : j ∈ s
h_ne : i ≠ j
t : Set α
hfi : t ≤ f i
hfj : t ≤ f j
ht : ¬t ≤ ⊥
⊢ ∃ i, i ∈ s ∧ ∃ j, j ∈ s ∧ ∃ _hij x, x ∈ f i ∩ f j
[PROOFSTEP]
replace ht : t.Nonempty := by rwa [le_bot_iff, bot_eq_empty, ← Ne.def, ← nonempty_iff_ne_empty] at ht
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
s : Set ι
t✝ : Set ι'
f : ι → Set α
i : ι
hi : i ∈ s
j : ι
hj : j ∈ s
h_ne : i ≠ j
t : Set α
hfi : t ≤ f i
hfj : t ≤ f j
ht : ¬t ≤ ⊥
⊢ Set.Nonempty t
[PROOFSTEP]
rwa [le_bot_iff, bot_eq_empty, ← Ne.def, ← nonempty_iff_ne_empty] at ht
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
s : Set ι
t✝ : Set ι'
f : ι → Set α
i : ι
hi : i ∈ s
j : ι
hj : j ∈ s
h_ne : i ≠ j
t : Set α
hfi : t ≤ f i
hfj : t ≤ f j
ht : Set.Nonempty t
⊢ ∃ i, i ∈ s ∧ ∃ j, j ∈ s ∧ ∃ _hij x, x ∈ f i ∩ f j
[PROOFSTEP]
obtain ⟨x, hx⟩ := ht
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
s : Set ι
t✝ : Set ι'
f : ι → Set α
i : ι
hi : i ∈ s
j : ι
hj : j ∈ s
h_ne : i ≠ j
t : Set α
hfi : t ≤ f i
hfj : t ≤ f j
x : α
hx : x ∈ t
⊢ ∃ i, i ∈ s ∧ ∃ j, j ∈ s ∧ ∃ _hij x, x ∈ f i ∩ f j
[PROOFSTEP]
exact ⟨i, hi, j, hj, h_ne, x, hfi hx, hfj hx⟩
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
s : Set ι
t : Set ι'
inst✝ : LinearOrder ι
f : ι → Set α
h : ¬PairwiseDisjoint s f
⊢ ∃ i, i ∈ s ∧ ∃ j, j ∈ s ∧ ∃ _hij x, x ∈ f i ∩ f j
[PROOFSTEP]
obtain ⟨i, hi, j, hj, hne, x, hx₁, hx₂⟩ := exists_ne_mem_inter_of_not_pairwiseDisjoint h
[GOAL]
case intro.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
s : Set ι
t : Set ι'
inst✝ : LinearOrder ι
f : ι → Set α
h : ¬PairwiseDisjoint s f
i : ι
hi : i ∈ s
j : ι
hj : j ∈ s
hne : i ≠ j
x : α
hx₁ : x ∈ f i
hx₂ : x ∈ f j
⊢ ∃ i, i ∈ s ∧ ∃ j, j ∈ s ∧ ∃ _hij x, x ∈ f i ∩ f j
[PROOFSTEP]
cases' lt_or_lt_iff_ne.mpr hne with h_lt h_lt
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.inl
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
s : Set ι
t : Set ι'
inst✝ : LinearOrder ι
f : ι → Set α
h : ¬PairwiseDisjoint s f
i : ι
hi : i ∈ s
j : ι
hj : j ∈ s
hne : i ≠ j
x : α
hx₁ : x ∈ f i
hx₂ : x ∈ f j
h_lt : i < j
⊢ ∃ i, i ∈ s ∧ ∃ j, j ∈ s ∧ ∃ _hij x, x ∈ f i ∩ f j
[PROOFSTEP]
exact ⟨i, hi, j, hj, h_lt, x, hx₁, hx₂⟩
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.inr
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
s : Set ι
t : Set ι'
inst✝ : LinearOrder ι
f : ι → Set α
h : ¬PairwiseDisjoint s f
i : ι
hi : i ∈ s
j : ι
hj : j ∈ s
hne : i ≠ j
x : α
hx₁ : x ∈ f i
hx₂ : x ∈ f j
h_lt : j < i
⊢ ∃ i, i ∈ s ∧ ∃ j, j ∈ s ∧ ∃ _hij x, x ∈ f i ∩ f j
[PROOFSTEP]
exact ⟨j, hj, i, hi, h_lt, x, hx₂, hx₁⟩
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
f : ι → Set α
h : ¬Pairwise (Disjoint on f)
⊢ ∃ i j _hij x, x ∈ f i ∩ f j
[PROOFSTEP]
rw [← pairwise_univ] at h
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
f : ι → Set α
h : ¬Set.Pairwise univ (Disjoint on f)
⊢ ∃ i j _hij x, x ∈ f i ∩ f j
[PROOFSTEP]
obtain ⟨i, _hi, j, _hj, h⟩ := exists_ne_mem_inter_of_not_pairwiseDisjoint h
[GOAL]
case intro.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
f : ι → Set α
h✝ : ¬Set.Pairwise univ (Disjoint on f)
i : ι
_hi : i ∈ univ
j : ι
_hj : j ∈ univ
h : ∃ _hij x, x ∈ f i ∩ f j
⊢ ∃ i j _hij x, x ∈ f i ∩ f j
[PROOFSTEP]
exact ⟨i, j, h⟩
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
inst✝ : LinearOrder ι
f : ι → Set α
h : ¬Pairwise (Disjoint on f)
⊢ ∃ i j x x, x ∈ f i ∩ f j
[PROOFSTEP]
rw [← pairwise_univ] at h
[GOAL]
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
inst✝ : LinearOrder ι
f : ι → Set α
h : ¬Set.Pairwise univ (Disjoint on f)
⊢ ∃ i j x x, x ∈ f i ∩ f j
[PROOFSTEP]
obtain ⟨i, _hi, j, _hj, h⟩ := exists_lt_mem_inter_of_not_pairwiseDisjoint h
[GOAL]
case intro.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r p q : α → α → Prop
inst✝ : LinearOrder ι
f : ι → Set α
h✝ : ¬Set.Pairwise univ (Disjoint on f)
i : ι
_hi : i ∈ univ
j : ι
_hj : j ∈ univ
h : ∃ _hij x, x ∈ f i ∩ f j
⊢ ∃ i j x x, x ∈ f i ∩ f j
[PROOFSTEP]
exact ⟨i, j, h⟩