[GOAL]
α : Type u_1
ι : Sort u_3
β : Sort u_2
S : ι → Set α
f : (i : ι) → ↑(S i) → β
hf :
  ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j),
    f i { val := x, property := hxi } = f j { val := x, property := hxj }
T : Set α
hT : T ⊆ iUnion S
hT' : T = iUnion S
x : ↑T
i : ι
hx : ↑x ∈ S i
⊢ iUnionLift S f hf T hT x = f i { val := ↑x, property := hx }
[PROOFSTEP]
cases' x with x hx
[GOAL]
case mk
α : Type u_1
ι : Sort u_3
β : Sort u_2
S : ι → Set α
f : (i : ι) → ↑(S i) → β
hf :
  ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j),
    f i { val := x, property := hxi } = f j { val := x, property := hxj }
T : Set α
hT : T ⊆ iUnion S
hT' : T = iUnion S
i : ι
x : α
hx✝ : x ∈ T
hx : ↑{ val := x, property := hx✝ } ∈ S i
⊢ iUnionLift S f hf T hT { val := x, property := hx✝ } = f i { val := ↑{ val := x, property := hx✝ }, property := hx }
[PROOFSTEP]
exact hf _ _ _ _ _
[GOAL]
α : Type u_1
ι : Sort u_3
β : Type u_2
S : ι → Set α
f : (i : ι) → ↑(S i) → β
hf :
  ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j),
    f i { val := x, property := hxi } = f j { val := x, property := hxj }
T : Set α
hT : T ⊆ iUnion S
hT' : T = iUnion S
t : Set β
⊢ iUnionLift S f hf T hT ⁻¹' t = inclusion hT ⁻¹' ⋃ (i : ι), inclusion (_ : S i ⊆ ⋃ (i : ι), S i) '' (f i ⁻¹' t)
[PROOFSTEP]
ext x
[GOAL]
case h
α : Type u_1
ι : Sort u_3
β : Type u_2
S : ι → Set α
f : (i : ι) → ↑(S i) → β
hf :
  ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j),
    f i { val := x, property := hxi } = f j { val := x, property := hxj }
T : Set α
hT : T ⊆ iUnion S
hT' : T = iUnion S
t : Set β
x : ↑T
⊢ x ∈ iUnionLift S f hf T hT ⁻¹' t ↔ x ∈ inclusion hT ⁻¹' ⋃ (i : ι), inclusion (_ : S i ⊆ ⋃ (i : ι), S i) '' (f i ⁻¹' t)
[PROOFSTEP]
simp only [mem_preimage, mem_iUnion, mem_image]
[GOAL]
case h
α : Type u_1
ι : Sort u_3
β : Type u_2
S : ι → Set α
f : (i : ι) → ↑(S i) → β
hf :
  ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j),
    f i { val := x, property := hxi } = f j { val := x, property := hxj }
T : Set α
hT : T ⊆ iUnion S
hT' : T = iUnion S
t : Set β
x : ↑T
⊢ iUnionLift S f hf T hT x ∈ t ↔ ∃ i x_1, f i x_1 ∈ t ∧ inclusion (_ : S i ⊆ ⋃ (i : ι), S i) x_1 = inclusion hT x
[PROOFSTEP]
constructor
[GOAL]
case h.mp
α : Type u_1
ι : Sort u_3
β : Type u_2
S : ι → Set α
f : (i : ι) → ↑(S i) → β
hf :
  ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j),
    f i { val := x, property := hxi } = f j { val := x, property := hxj }
T : Set α
hT : T ⊆ iUnion S
hT' : T = iUnion S
t : Set β
x : ↑T
⊢ iUnionLift S f hf T hT x ∈ t → ∃ i x_1, f i x_1 ∈ t ∧ inclusion (_ : S i ⊆ ⋃ (i : ι), S i) x_1 = inclusion hT x
[PROOFSTEP]
rcases mem_iUnion.1 (hT x.prop) with ⟨i, hi⟩
[GOAL]
case h.mp.intro
α : Type u_1
ι : Sort u_3
β : Type u_2
S : ι → Set α
f : (i : ι) → ↑(S i) → β
hf :
  ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j),
    f i { val := x, property := hxi } = f j { val := x, property := hxj }
T : Set α
hT : T ⊆ iUnion S
hT' : T = iUnion S
t : Set β
x : ↑T
i : ι
hi : ↑x ∈ S i
⊢ iUnionLift S f hf T hT x ∈ t → ∃ i x_1, f i x_1 ∈ t ∧ inclusion (_ : S i ⊆ ⋃ (i : ι), S i) x_1 = inclusion hT x
[PROOFSTEP]
refine fun h => ⟨i, ⟨x, hi⟩, ?_, rfl⟩
[GOAL]
case h.mp.intro
α : Type u_1
ι : Sort u_3
β : Type u_2
S : ι → Set α
f : (i : ι) → ↑(S i) → β
hf :
  ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j),
    f i { val := x, property := hxi } = f j { val := x, property := hxj }
T : Set α
hT : T ⊆ iUnion S
hT' : T = iUnion S
t : Set β
x : ↑T
i : ι
hi : ↑x ∈ S i
h : iUnionLift S f hf T hT x ∈ t
⊢ f i { val := ↑x, property := hi } ∈ t
[PROOFSTEP]
rwa [iUnionLift_of_mem x hi] at h
[GOAL]
case h.mpr
α : Type u_1
ι : Sort u_3
β : Type u_2
S : ι → Set α
f : (i : ι) → ↑(S i) → β
hf :
  ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j),
    f i { val := x, property := hxi } = f j { val := x, property := hxj }
T : Set α
hT : T ⊆ iUnion S
hT' : T = iUnion S
t : Set β
x : ↑T
⊢ (∃ i x_1, f i x_1 ∈ t ∧ inclusion (_ : S i ⊆ ⋃ (i : ι), S i) x_1 = inclusion hT x) → iUnionLift S f hf T hT x ∈ t
[PROOFSTEP]
rintro ⟨i, ⟨y, hi⟩, h, hxy⟩
[GOAL]
case h.mpr.intro.intro.mk.intro
α : Type u_1
ι : Sort u_3
β : Type u_2
S : ι → Set α
f : (i : ι) → ↑(S i) → β
hf :
  ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j),
    f i { val := x, property := hxi } = f j { val := x, property := hxj }
T : Set α
hT : T ⊆ iUnion S
hT' : T = iUnion S
t : Set β
x : ↑T
i : ι
y : α
hi : y ∈ S i
h : f i { val := y, property := hi } ∈ t
hxy : inclusion (_ : S i ⊆ ⋃ (i : ι), S i) { val := y, property := hi } = inclusion hT x
⊢ iUnionLift S f hf T hT x ∈ t
[PROOFSTEP]
obtain rfl : y = x := congr_arg Subtype.val hxy
[GOAL]
case h.mpr.intro.intro.mk.intro
α : Type u_1
ι : Sort u_3
β : Type u_2
S : ι → Set α
f : (i : ι) → ↑(S i) → β
hf :
  ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j),
    f i { val := x, property := hxi } = f j { val := x, property := hxj }
T : Set α
hT : T ⊆ iUnion S
hT' : T = iUnion S
t : Set β
x : ↑T
i : ι
hi : ↑x ∈ S i
h : f i { val := ↑x, property := hi } ∈ t
hxy : inclusion (_ : S i ⊆ ⋃ (i : ι), S i) { val := ↑x, property := hi } = inclusion hT x
⊢ iUnionLift S f hf T hT x ∈ t
[PROOFSTEP]
rwa [iUnionLift_of_mem x hi]
[GOAL]
α : Type u_1
ι : Sort u_3
β : Sort u_2
S : ι → Set α
f : (i : ι) → ↑(S i) → β
hf :
  ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j),
    f i { val := x, property := hxi } = f j { val := x, property := hxj }
T : Set α
hT : T ⊆ iUnion S
hT' : T = iUnion S
c : ↑T
ci : (i : ι) → ↑(S i)
hci : ∀ (i : ι), ↑(ci i) = ↑c
cβ : β
h : ∀ (i : ι), f i (ci i) = cβ
⊢ iUnionLift S f hf T hT c = cβ
[PROOFSTEP]
let ⟨i, hi⟩ := Set.mem_iUnion.1 (hT c.prop)
[GOAL]
α : Type u_1
ι : Sort u_3
β : Sort u_2
S : ι → Set α
f : (i : ι) → ↑(S i) → β
hf :
  ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j),
    f i { val := x, property := hxi } = f j { val := x, property := hxj }
T : Set α
hT : T ⊆ iUnion S
hT' : T = iUnion S
c : ↑T
ci : (i : ι) → ↑(S i)
hci : ∀ (i : ι), ↑(ci i) = ↑c
cβ : β
h : ∀ (i : ι), f i (ci i) = cβ
i : ι
hi : ↑c ∈ S i
⊢ iUnionLift S f hf T hT c = cβ
[PROOFSTEP]
have : ci i = ⟨c, hi⟩ := Subtype.ext (hci i)
[GOAL]
α : Type u_1
ι : Sort u_3
β : Sort u_2
S : ι → Set α
f : (i : ι) → ↑(S i) → β
hf :
  ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j),
    f i { val := x, property := hxi } = f j { val := x, property := hxj }
T : Set α
hT : T ⊆ iUnion S
hT' : T = iUnion S
c : ↑T
ci : (i : ι) → ↑(S i)
hci : ∀ (i : ι), ↑(ci i) = ↑c
cβ : β
h : ∀ (i : ι), f i (ci i) = cβ
i : ι
hi : ↑c ∈ S i
this : ci i = { val := ↑c, property := hi }
⊢ iUnionLift S f hf T hT c = cβ
[PROOFSTEP]
rw [iUnionLift_of_mem _ hi, ← this, h]
[GOAL]
α : Type u_1
ι : Sort u_2
β : Sort u_3
S : ι → Set α
f : (i : ι) → ↑(S i) → β
hf :
  ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j),
    f i { val := x, property := hxi } = f j { val := x, property := hxj }
T : Set α
hT : T ⊆ iUnion S
hT' : T = iUnion S
u : ↑T → ↑T
ui : (i : ι) → ↑(S i) → ↑(S i)
hui : ∀ (i : ι) (x : ↑(S i)), u (inclusion (_ : S i ⊆ T) x) = inclusion (_ : S i ⊆ T) (ui i x)
uβ : β → β
h : ∀ (i : ι) (x : ↑(S i)), f i (ui i x) = uβ (f i x)
x : ↑T
⊢ iUnionLift S f hf T (_ : T ≤ iUnion S) (u x) = uβ (iUnionLift S f hf T (_ : T ≤ iUnion S) x)
[PROOFSTEP]
subst hT'
[GOAL]
α : Type u_1
ι : Sort u_2
β : Sort u_3
S : ι → Set α
f : (i : ι) → ↑(S i) → β
hf :
  ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j),
    f i { val := x, property := hxi } = f j { val := x, property := hxj }
ui : (i : ι) → ↑(S i) → ↑(S i)
uβ : β → β
h : ∀ (i : ι) (x : ↑(S i)), f i (ui i x) = uβ (f i x)
hT : iUnion S ⊆ iUnion S
u : ↑(iUnion S) → ↑(iUnion S)
hui : ∀ (i : ι) (x : ↑(S i)), u (inclusion (_ : S i ⊆ iUnion S) x) = inclusion (_ : S i ⊆ iUnion S) (ui i x)
x : ↑(iUnion S)
⊢ iUnionLift S f hf (iUnion S) (_ : iUnion S ≤ iUnion S) (u x) =
    uβ (iUnionLift S f hf (iUnion S) (_ : iUnion S ≤ iUnion S) x)
[PROOFSTEP]
cases' Set.mem_iUnion.1 x.prop with i hi
[GOAL]
case intro
α : Type u_1
ι : Sort u_2
β : Sort u_3
S : ι → Set α
f : (i : ι) → ↑(S i) → β
hf :
  ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j),
    f i { val := x, property := hxi } = f j { val := x, property := hxj }
ui : (i : ι) → ↑(S i) → ↑(S i)
uβ : β → β
h : ∀ (i : ι) (x : ↑(S i)), f i (ui i x) = uβ (f i x)
hT : iUnion S ⊆ iUnion S
u : ↑(iUnion S) → ↑(iUnion S)
hui : ∀ (i : ι) (x : ↑(S i)), u (inclusion (_ : S i ⊆ iUnion S) x) = inclusion (_ : S i ⊆ iUnion S) (ui i x)
x : ↑(iUnion S)
i : ι
hi : ↑x ∈ S i
⊢ iUnionLift S f hf (iUnion S) (_ : iUnion S ≤ iUnion S) (u x) =
    uβ (iUnionLift S f hf (iUnion S) (_ : iUnion S ≤ iUnion S) x)
[PROOFSTEP]
rw [iUnionLift_of_mem x hi, ← h i]
[GOAL]
case intro
α : Type u_1
ι : Sort u_2
β : Sort u_3
S : ι → Set α
f : (i : ι) → ↑(S i) → β
hf :
  ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j),
    f i { val := x, property := hxi } = f j { val := x, property := hxj }
ui : (i : ι) → ↑(S i) → ↑(S i)
uβ : β → β
h : ∀ (i : ι) (x : ↑(S i)), f i (ui i x) = uβ (f i x)
hT : iUnion S ⊆ iUnion S
u : ↑(iUnion S) → ↑(iUnion S)
hui : ∀ (i : ι) (x : ↑(S i)), u (inclusion (_ : S i ⊆ iUnion S) x) = inclusion (_ : S i ⊆ iUnion S) (ui i x)
x : ↑(iUnion S)
i : ι
hi : ↑x ∈ S i
⊢ iUnionLift S f hf (iUnion S) (_ : iUnion S ≤ iUnion S) (u x) = f i (ui i { val := ↑x, property := hi })
[PROOFSTEP]
have : x = Set.inclusion (Set.subset_iUnion S i) ⟨x, hi⟩ :=
  by
  cases x
  rfl
[GOAL]
α : Type u_1
ι : Sort u_2
β : Sort u_3
S : ι → Set α
f : (i : ι) → ↑(S i) → β
hf :
  ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j),
    f i { val := x, property := hxi } = f j { val := x, property := hxj }
ui : (i : ι) → ↑(S i) → ↑(S i)
uβ : β → β
h : ∀ (i : ι) (x : ↑(S i)), f i (ui i x) = uβ (f i x)
hT : iUnion S ⊆ iUnion S
u : ↑(iUnion S) → ↑(iUnion S)
hui : ∀ (i : ι) (x : ↑(S i)), u (inclusion (_ : S i ⊆ iUnion S) x) = inclusion (_ : S i ⊆ iUnion S) (ui i x)
x : ↑(iUnion S)
i : ι
hi : ↑x ∈ S i
⊢ x = inclusion (_ : S i ⊆ ⋃ (i : ι), S i) { val := ↑x, property := hi }
[PROOFSTEP]
cases x
[GOAL]
case mk
α : Type u_1
ι : Sort u_2
β : Sort u_3
S : ι → Set α
f : (i : ι) → ↑(S i) → β
hf :
  ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j),
    f i { val := x, property := hxi } = f j { val := x, property := hxj }
ui : (i : ι) → ↑(S i) → ↑(S i)
uβ : β → β
h : ∀ (i : ι) (x : ↑(S i)), f i (ui i x) = uβ (f i x)
hT : iUnion S ⊆ iUnion S
u : ↑(iUnion S) → ↑(iUnion S)
hui : ∀ (i : ι) (x : ↑(S i)), u (inclusion (_ : S i ⊆ iUnion S) x) = inclusion (_ : S i ⊆ iUnion S) (ui i x)
i : ι
val✝ : α
property✝ : val✝ ∈ iUnion S
hi : ↑{ val := val✝, property := property✝ } ∈ S i
⊢ { val := val✝, property := property✝ } =
    inclusion (_ : S i ⊆ ⋃ (i : ι), S i) { val := ↑{ val := val✝, property := property✝ }, property := hi }
[PROOFSTEP]
rfl
[GOAL]
case intro
α : Type u_1
ι : Sort u_2
β : Sort u_3
S : ι → Set α
f : (i : ι) → ↑(S i) → β
hf :
  ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j),
    f i { val := x, property := hxi } = f j { val := x, property := hxj }
ui : (i : ι) → ↑(S i) → ↑(S i)
uβ : β → β
h : ∀ (i : ι) (x : ↑(S i)), f i (ui i x) = uβ (f i x)
hT : iUnion S ⊆ iUnion S
u : ↑(iUnion S) → ↑(iUnion S)
hui : ∀ (i : ι) (x : ↑(S i)), u (inclusion (_ : S i ⊆ iUnion S) x) = inclusion (_ : S i ⊆ iUnion S) (ui i x)
x : ↑(iUnion S)
i : ι
hi : ↑x ∈ S i
this : x = inclusion (_ : S i ⊆ ⋃ (i : ι), S i) { val := ↑x, property := hi }
⊢ iUnionLift S f hf (iUnion S) (_ : iUnion S ≤ iUnion S) (u x) = f i (ui i { val := ↑x, property := hi })
[PROOFSTEP]
conv_lhs => rw [this, hui, iUnionLift_inclusion]
[GOAL]
α : Type u_1
ι : Sort u_2
β : Sort u_3
S : ι → Set α
f : (i : ι) → ↑(S i) → β
hf :
  ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j),
    f i { val := x, property := hxi } = f j { val := x, property := hxj }
ui : (i : ι) → ↑(S i) → ↑(S i)
uβ : β → β
h : ∀ (i : ι) (x : ↑(S i)), f i (ui i x) = uβ (f i x)
hT : iUnion S ⊆ iUnion S
u : ↑(iUnion S) → ↑(iUnion S)
hui : ∀ (i : ι) (x : ↑(S i)), u (inclusion (_ : S i ⊆ iUnion S) x) = inclusion (_ : S i ⊆ iUnion S) (ui i x)
x : ↑(iUnion S)
i : ι
hi : ↑x ∈ S i
this : x = inclusion (_ : S i ⊆ ⋃ (i : ι), S i) { val := ↑x, property := hi }
| iUnionLift S f hf (iUnion S) (_ : iUnion S ≤ iUnion S) (u x)
[PROOFSTEP]
rw [this, hui, iUnionLift_inclusion]
[GOAL]
α : Type u_1
ι : Sort u_2
β : Sort u_3
S : ι → Set α
f : (i : ι) → ↑(S i) → β
hf :
  ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j),
    f i { val := x, property := hxi } = f j { val := x, property := hxj }
ui : (i : ι) → ↑(S i) → ↑(S i)
uβ : β → β
h : ∀ (i : ι) (x : ↑(S i)), f i (ui i x) = uβ (f i x)
hT : iUnion S ⊆ iUnion S
u : ↑(iUnion S) → ↑(iUnion S)
hui : ∀ (i : ι) (x : ↑(S i)), u (inclusion (_ : S i ⊆ iUnion S) x) = inclusion (_ : S i ⊆ iUnion S) (ui i x)
x : ↑(iUnion S)
i : ι
hi : ↑x ∈ S i
this : x = inclusion (_ : S i ⊆ ⋃ (i : ι), S i) { val := ↑x, property := hi }
| iUnionLift S f hf (iUnion S) (_ : iUnion S ≤ iUnion S) (u x)
[PROOFSTEP]
rw [this, hui, iUnionLift_inclusion]
[GOAL]
α : Type u_1
ι : Sort u_2
β : Sort u_3
S : ι → Set α
f : (i : ι) → ↑(S i) → β
hf :
  ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j),
    f i { val := x, property := hxi } = f j { val := x, property := hxj }
ui : (i : ι) → ↑(S i) → ↑(S i)
uβ : β → β
h : ∀ (i : ι) (x : ↑(S i)), f i (ui i x) = uβ (f i x)
hT : iUnion S ⊆ iUnion S
u : ↑(iUnion S) → ↑(iUnion S)
hui : ∀ (i : ι) (x : ↑(S i)), u (inclusion (_ : S i ⊆ iUnion S) x) = inclusion (_ : S i ⊆ iUnion S) (ui i x)
x : ↑(iUnion S)
i : ι
hi : ↑x ∈ S i
this : x = inclusion (_ : S i ⊆ ⋃ (i : ι), S i) { val := ↑x, property := hi }
| iUnionLift S f hf (iUnion S) (_ : iUnion S ≤ iUnion S) (u x)
[PROOFSTEP]
rw [this, hui, iUnionLift_inclusion]
[GOAL]
α : Type u_1
ι : Sort u_2
β : Sort u_3
S : ι → Set α
f : (i : ι) → ↑(S i) → β
hf :
  ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j),
    f i { val := x, property := hxi } = f j { val := x, property := hxj }
T : Set α
hT : T ⊆ iUnion S
hT' : T = iUnion S
dir : Directed (fun x x_1 => x ≤ x_1) S
op : ↑T → ↑T → ↑T
opi : (i : ι) → ↑(S i) → ↑(S i) → ↑(S i)
hopi :
  ∀ (i : ι) (x y : ↑(S i)),
    inclusion (_ : S i ⊆ T) (opi i x y) = op (inclusion (_ : S i ⊆ T) x) (inclusion (_ : S i ⊆ T) y)
opβ : β → β → β
h : ∀ (i : ι) (x y : ↑(S i)), f i (opi i x y) = opβ (f i x) (f i y)
x y : ↑T
⊢ iUnionLift S f hf T (_ : T ≤ iUnion S) (op x y) =
    opβ (iUnionLift S f hf T (_ : T ≤ iUnion S) x) (iUnionLift S f hf T (_ : T ≤ iUnion S) y)
[PROOFSTEP]
subst hT'
[GOAL]
α : Type u_1
ι : Sort u_2
β : Sort u_3
S : ι → Set α
f : (i : ι) → ↑(S i) → β
hf :
  ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j),
    f i { val := x, property := hxi } = f j { val := x, property := hxj }
dir : Directed (fun x x_1 => x ≤ x_1) S
opi : (i : ι) → ↑(S i) → ↑(S i) → ↑(S i)
opβ : β → β → β
h : ∀ (i : ι) (x y : ↑(S i)), f i (opi i x y) = opβ (f i x) (f i y)
hT : iUnion S ⊆ iUnion S
op : ↑(iUnion S) → ↑(iUnion S) → ↑(iUnion S)
hopi :
  ∀ (i : ι) (x y : ↑(S i)),
    inclusion (_ : S i ⊆ iUnion S) (opi i x y) =
      op (inclusion (_ : S i ⊆ iUnion S) x) (inclusion (_ : S i ⊆ iUnion S) y)
x y : ↑(iUnion S)
⊢ iUnionLift S f hf (iUnion S) (_ : iUnion S ≤ iUnion S) (op x y) =
    opβ (iUnionLift S f hf (iUnion S) (_ : iUnion S ≤ iUnion S) x)
      (iUnionLift S f hf (iUnion S) (_ : iUnion S ≤ iUnion S) y)
[PROOFSTEP]
cases' Set.mem_iUnion.1 x.prop with i hi
[GOAL]
case intro
α : Type u_1
ι : Sort u_2
β : Sort u_3
S : ι → Set α
f : (i : ι) → ↑(S i) → β
hf :
  ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j),
    f i { val := x, property := hxi } = f j { val := x, property := hxj }
dir : Directed (fun x x_1 => x ≤ x_1) S
opi : (i : ι) → ↑(S i) → ↑(S i) → ↑(S i)
opβ : β → β → β
h : ∀ (i : ι) (x y : ↑(S i)), f i (opi i x y) = opβ (f i x) (f i y)
hT : iUnion S ⊆ iUnion S
op : ↑(iUnion S) → ↑(iUnion S) → ↑(iUnion S)
hopi :
  ∀ (i : ι) (x y : ↑(S i)),
    inclusion (_ : S i ⊆ iUnion S) (opi i x y) =
      op (inclusion (_ : S i ⊆ iUnion S) x) (inclusion (_ : S i ⊆ iUnion S) y)
x y : ↑(iUnion S)
i : ι
hi : ↑x ∈ S i
⊢ iUnionLift S f hf (iUnion S) (_ : iUnion S ≤ iUnion S) (op x y) =
    opβ (iUnionLift S f hf (iUnion S) (_ : iUnion S ≤ iUnion S) x)
      (iUnionLift S f hf (iUnion S) (_ : iUnion S ≤ iUnion S) y)
[PROOFSTEP]
cases' Set.mem_iUnion.1 y.prop with j hj
[GOAL]
case intro.intro
α : Type u_1
ι : Sort u_2
β : Sort u_3
S : ι → Set α
f : (i : ι) → ↑(S i) → β
hf :
  ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j),
    f i { val := x, property := hxi } = f j { val := x, property := hxj }
dir : Directed (fun x x_1 => x ≤ x_1) S
opi : (i : ι) → ↑(S i) → ↑(S i) → ↑(S i)
opβ : β → β → β
h : ∀ (i : ι) (x y : ↑(S i)), f i (opi i x y) = opβ (f i x) (f i y)
hT : iUnion S ⊆ iUnion S
op : ↑(iUnion S) → ↑(iUnion S) → ↑(iUnion S)
hopi :
  ∀ (i : ι) (x y : ↑(S i)),
    inclusion (_ : S i ⊆ iUnion S) (opi i x y) =
      op (inclusion (_ : S i ⊆ iUnion S) x) (inclusion (_ : S i ⊆ iUnion S) y)
x y : ↑(iUnion S)
i : ι
hi : ↑x ∈ S i
j : ι
hj : ↑y ∈ S j
⊢ iUnionLift S f hf (iUnion S) (_ : iUnion S ≤ iUnion S) (op x y) =
    opβ (iUnionLift S f hf (iUnion S) (_ : iUnion S ≤ iUnion S) x)
      (iUnionLift S f hf (iUnion S) (_ : iUnion S ≤ iUnion S) y)
[PROOFSTEP]
rcases dir i j with ⟨k, hik, hjk⟩
[GOAL]
case intro.intro.intro.intro
α : Type u_1
ι : Sort u_2
β : Sort u_3
S : ι → Set α
f : (i : ι) → ↑(S i) → β
hf :
  ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j),
    f i { val := x, property := hxi } = f j { val := x, property := hxj }
dir : Directed (fun x x_1 => x ≤ x_1) S
opi : (i : ι) → ↑(S i) → ↑(S i) → ↑(S i)
opβ : β → β → β
h : ∀ (i : ι) (x y : ↑(S i)), f i (opi i x y) = opβ (f i x) (f i y)
hT : iUnion S ⊆ iUnion S
op : ↑(iUnion S) → ↑(iUnion S) → ↑(iUnion S)
hopi :
  ∀ (i : ι) (x y : ↑(S i)),
    inclusion (_ : S i ⊆ iUnion S) (opi i x y) =
      op (inclusion (_ : S i ⊆ iUnion S) x) (inclusion (_ : S i ⊆ iUnion S) y)
x y : ↑(iUnion S)
i : ι
hi : ↑x ∈ S i
j : ι
hj : ↑y ∈ S j
k : ι
hik : S i ≤ S k
hjk : S j ≤ S k
⊢ iUnionLift S f hf (iUnion S) (_ : iUnion S ≤ iUnion S) (op x y) =
    opβ (iUnionLift S f hf (iUnion S) (_ : iUnion S ≤ iUnion S) x)
      (iUnionLift S f hf (iUnion S) (_ : iUnion S ≤ iUnion S) y)
[PROOFSTEP]
rw [iUnionLift_of_mem x (hik hi), iUnionLift_of_mem y (hjk hj), ← h k]
[GOAL]
case intro.intro.intro.intro
α : Type u_1
ι : Sort u_2
β : Sort u_3
S : ι → Set α
f : (i : ι) → ↑(S i) → β
hf :
  ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j),
    f i { val := x, property := hxi } = f j { val := x, property := hxj }
dir : Directed (fun x x_1 => x ≤ x_1) S
opi : (i : ι) → ↑(S i) → ↑(S i) → ↑(S i)
opβ : β → β → β
h : ∀ (i : ι) (x y : ↑(S i)), f i (opi i x y) = opβ (f i x) (f i y)
hT : iUnion S ⊆ iUnion S
op : ↑(iUnion S) → ↑(iUnion S) → ↑(iUnion S)
hopi :
  ∀ (i : ι) (x y : ↑(S i)),
    inclusion (_ : S i ⊆ iUnion S) (opi i x y) =
      op (inclusion (_ : S i ⊆ iUnion S) x) (inclusion (_ : S i ⊆ iUnion S) y)
x y : ↑(iUnion S)
i : ι
hi : ↑x ∈ S i
j : ι
hj : ↑y ∈ S j
k : ι
hik : S i ≤ S k
hjk : S j ≤ S k
⊢ iUnionLift S f hf (iUnion S) (_ : iUnion S ≤ iUnion S) (op x y) =
    f k (opi k { val := ↑x, property := (_ : ↑x ∈ S k) } { val := ↑y, property := (_ : ↑y ∈ S k) })
[PROOFSTEP]
have hx : x = Set.inclusion (Set.subset_iUnion S k) ⟨x, hik hi⟩ :=
  by
  cases x
  rfl
[GOAL]
α : Type u_1
ι : Sort u_2
β : Sort u_3
S : ι → Set α
f : (i : ι) → ↑(S i) → β
hf :
  ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j),
    f i { val := x, property := hxi } = f j { val := x, property := hxj }
dir : Directed (fun x x_1 => x ≤ x_1) S
opi : (i : ι) → ↑(S i) → ↑(S i) → ↑(S i)
opβ : β → β → β
h : ∀ (i : ι) (x y : ↑(S i)), f i (opi i x y) = opβ (f i x) (f i y)
hT : iUnion S ⊆ iUnion S
op : ↑(iUnion S) → ↑(iUnion S) → ↑(iUnion S)
hopi :
  ∀ (i : ι) (x y : ↑(S i)),
    inclusion (_ : S i ⊆ iUnion S) (opi i x y) =
      op (inclusion (_ : S i ⊆ iUnion S) x) (inclusion (_ : S i ⊆ iUnion S) y)
x y : ↑(iUnion S)
i : ι
hi : ↑x ∈ S i
j : ι
hj : ↑y ∈ S j
k : ι
hik : S i ≤ S k
hjk : S j ≤ S k
⊢ x = inclusion (_ : S k ⊆ ⋃ (i : ι), S i) { val := ↑x, property := (_ : ↑x ∈ S k) }
[PROOFSTEP]
cases x
[GOAL]
case mk
α : Type u_1
ι : Sort u_2
β : Sort u_3
S : ι → Set α
f : (i : ι) → ↑(S i) → β
hf :
  ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j),
    f i { val := x, property := hxi } = f j { val := x, property := hxj }
dir : Directed (fun x x_1 => x ≤ x_1) S
opi : (i : ι) → ↑(S i) → ↑(S i) → ↑(S i)
opβ : β → β → β
h : ∀ (i : ι) (x y : ↑(S i)), f i (opi i x y) = opβ (f i x) (f i y)
hT : iUnion S ⊆ iUnion S
op : ↑(iUnion S) → ↑(iUnion S) → ↑(iUnion S)
hopi :
  ∀ (i : ι) (x y : ↑(S i)),
    inclusion (_ : S i ⊆ iUnion S) (opi i x y) =
      op (inclusion (_ : S i ⊆ iUnion S) x) (inclusion (_ : S i ⊆ iUnion S) y)
y : ↑(iUnion S)
i j : ι
hj : ↑y ∈ S j
k : ι
hik : S i ≤ S k
hjk : S j ≤ S k
val✝ : α
property✝ : val✝ ∈ iUnion S
hi : ↑{ val := val✝, property := property✝ } ∈ S i
⊢ { val := val✝, property := property✝ } =
    inclusion (_ : S k ⊆ ⋃ (i : ι), S i)
      { val := ↑{ val := val✝, property := property✝ },
        property := (_ : ↑{ val := val✝, property := property✝ } ∈ S k) }
[PROOFSTEP]
rfl
[GOAL]
case intro.intro.intro.intro
α : Type u_1
ι : Sort u_2
β : Sort u_3
S : ι → Set α
f : (i : ι) → ↑(S i) → β
hf :
  ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j),
    f i { val := x, property := hxi } = f j { val := x, property := hxj }
dir : Directed (fun x x_1 => x ≤ x_1) S
opi : (i : ι) → ↑(S i) → ↑(S i) → ↑(S i)
opβ : β → β → β
h : ∀ (i : ι) (x y : ↑(S i)), f i (opi i x y) = opβ (f i x) (f i y)
hT : iUnion S ⊆ iUnion S
op : ↑(iUnion S) → ↑(iUnion S) → ↑(iUnion S)
hopi :
  ∀ (i : ι) (x y : ↑(S i)),
    inclusion (_ : S i ⊆ iUnion S) (opi i x y) =
      op (inclusion (_ : S i ⊆ iUnion S) x) (inclusion (_ : S i ⊆ iUnion S) y)
x y : ↑(iUnion S)
i : ι
hi : ↑x ∈ S i
j : ι
hj : ↑y ∈ S j
k : ι
hik : S i ≤ S k
hjk : S j ≤ S k
hx : x = inclusion (_ : S k ⊆ ⋃ (i : ι), S i) { val := ↑x, property := (_ : ↑x ∈ S k) }
⊢ iUnionLift S f hf (iUnion S) (_ : iUnion S ≤ iUnion S) (op x y) =
    f k (opi k { val := ↑x, property := (_ : ↑x ∈ S k) } { val := ↑y, property := (_ : ↑y ∈ S k) })
[PROOFSTEP]
have hy : y = Set.inclusion (Set.subset_iUnion S k) ⟨y, hjk hj⟩ :=
  by
  cases y
  rfl
[GOAL]
α : Type u_1
ι : Sort u_2
β : Sort u_3
S : ι → Set α
f : (i : ι) → ↑(S i) → β
hf :
  ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j),
    f i { val := x, property := hxi } = f j { val := x, property := hxj }
dir : Directed (fun x x_1 => x ≤ x_1) S
opi : (i : ι) → ↑(S i) → ↑(S i) → ↑(S i)
opβ : β → β → β
h : ∀ (i : ι) (x y : ↑(S i)), f i (opi i x y) = opβ (f i x) (f i y)
hT : iUnion S ⊆ iUnion S
op : ↑(iUnion S) → ↑(iUnion S) → ↑(iUnion S)
hopi :
  ∀ (i : ι) (x y : ↑(S i)),
    inclusion (_ : S i ⊆ iUnion S) (opi i x y) =
      op (inclusion (_ : S i ⊆ iUnion S) x) (inclusion (_ : S i ⊆ iUnion S) y)
x y : ↑(iUnion S)
i : ι
hi : ↑x ∈ S i
j : ι
hj : ↑y ∈ S j
k : ι
hik : S i ≤ S k
hjk : S j ≤ S k
hx : x = inclusion (_ : S k ⊆ ⋃ (i : ι), S i) { val := ↑x, property := (_ : ↑x ∈ S k) }
⊢ y = inclusion (_ : S k ⊆ ⋃ (i : ι), S i) { val := ↑y, property := (_ : ↑y ∈ S k) }
[PROOFSTEP]
cases y
[GOAL]
case mk
α : Type u_1
ι : Sort u_2
β : Sort u_3
S : ι → Set α
f : (i : ι) → ↑(S i) → β
hf :
  ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j),
    f i { val := x, property := hxi } = f j { val := x, property := hxj }
dir : Directed (fun x x_1 => x ≤ x_1) S
opi : (i : ι) → ↑(S i) → ↑(S i) → ↑(S i)
opβ : β → β → β
h : ∀ (i : ι) (x y : ↑(S i)), f i (opi i x y) = opβ (f i x) (f i y)
hT : iUnion S ⊆ iUnion S
op : ↑(iUnion S) → ↑(iUnion S) → ↑(iUnion S)
hopi :
  ∀ (i : ι) (x y : ↑(S i)),
    inclusion (_ : S i ⊆ iUnion S) (opi i x y) =
      op (inclusion (_ : S i ⊆ iUnion S) x) (inclusion (_ : S i ⊆ iUnion S) y)
x : ↑(iUnion S)
i : ι
hi : ↑x ∈ S i
j k : ι
hik : S i ≤ S k
hjk : S j ≤ S k
hx : x = inclusion (_ : S k ⊆ ⋃ (i : ι), S i) { val := ↑x, property := (_ : ↑x ∈ S k) }
val✝ : α
property✝ : val✝ ∈ iUnion S
hj : ↑{ val := val✝, property := property✝ } ∈ S j
⊢ { val := val✝, property := property✝ } =
    inclusion (_ : S k ⊆ ⋃ (i : ι), S i)
      { val := ↑{ val := val✝, property := property✝ },
        property := (_ : ↑{ val := val✝, property := property✝ } ∈ S k) }
[PROOFSTEP]
rfl
[GOAL]
case intro.intro.intro.intro
α : Type u_1
ι : Sort u_2
β : Sort u_3
S : ι → Set α
f : (i : ι) → ↑(S i) → β
hf :
  ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j),
    f i { val := x, property := hxi } = f j { val := x, property := hxj }
dir : Directed (fun x x_1 => x ≤ x_1) S
opi : (i : ι) → ↑(S i) → ↑(S i) → ↑(S i)
opβ : β → β → β
h : ∀ (i : ι) (x y : ↑(S i)), f i (opi i x y) = opβ (f i x) (f i y)
hT : iUnion S ⊆ iUnion S
op : ↑(iUnion S) → ↑(iUnion S) → ↑(iUnion S)
hopi :
  ∀ (i : ι) (x y : ↑(S i)),
    inclusion (_ : S i ⊆ iUnion S) (opi i x y) =
      op (inclusion (_ : S i ⊆ iUnion S) x) (inclusion (_ : S i ⊆ iUnion S) y)
x y : ↑(iUnion S)
i : ι
hi : ↑x ∈ S i
j : ι
hj : ↑y ∈ S j
k : ι
hik : S i ≤ S k
hjk : S j ≤ S k
hx : x = inclusion (_ : S k ⊆ ⋃ (i : ι), S i) { val := ↑x, property := (_ : ↑x ∈ S k) }
hy : y = inclusion (_ : S k ⊆ ⋃ (i : ι), S i) { val := ↑y, property := (_ : ↑y ∈ S k) }
⊢ iUnionLift S f hf (iUnion S) (_ : iUnion S ≤ iUnion S) (op x y) =
    f k (opi k { val := ↑x, property := (_ : ↑x ∈ S k) } { val := ↑y, property := (_ : ↑y ∈ S k) })
[PROOFSTEP]
have hxy : (Set.inclusion (Set.subset_iUnion S k) (opi k ⟨x, hik hi⟩ ⟨y, hjk hj⟩) : α) ∈ S k :=
  (opi k ⟨x, hik hi⟩ ⟨y, hjk hj⟩).prop
[GOAL]
case intro.intro.intro.intro
α : Type u_1
ι : Sort u_2
β : Sort u_3
S : ι → Set α
f : (i : ι) → ↑(S i) → β
hf :
  ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j),
    f i { val := x, property := hxi } = f j { val := x, property := hxj }
dir : Directed (fun x x_1 => x ≤ x_1) S
opi : (i : ι) → ↑(S i) → ↑(S i) → ↑(S i)
opβ : β → β → β
h : ∀ (i : ι) (x y : ↑(S i)), f i (opi i x y) = opβ (f i x) (f i y)
hT : iUnion S ⊆ iUnion S
op : ↑(iUnion S) → ↑(iUnion S) → ↑(iUnion S)
hopi :
  ∀ (i : ι) (x y : ↑(S i)),
    inclusion (_ : S i ⊆ iUnion S) (opi i x y) =
      op (inclusion (_ : S i ⊆ iUnion S) x) (inclusion (_ : S i ⊆ iUnion S) y)
x y : ↑(iUnion S)
i : ι
hi : ↑x ∈ S i
j : ι
hj : ↑y ∈ S j
k : ι
hik : S i ≤ S k
hjk : S j ≤ S k
hx : x = inclusion (_ : S k ⊆ ⋃ (i : ι), S i) { val := ↑x, property := (_ : ↑x ∈ S k) }
hy : y = inclusion (_ : S k ⊆ ⋃ (i : ι), S i) { val := ↑y, property := (_ : ↑y ∈ S k) }
hxy :
  ↑(inclusion (_ : S k ⊆ ⋃ (i : ι), S i)
        (opi k { val := ↑x, property := (_ : ↑x ∈ S k) } { val := ↑y, property := (_ : ↑y ∈ S k) })) ∈
    S k
⊢ iUnionLift S f hf (iUnion S) (_ : iUnion S ≤ iUnion S) (op x y) =
    f k (opi k { val := ↑x, property := (_ : ↑x ∈ S k) } { val := ↑y, property := (_ : ↑y ∈ S k) })
[PROOFSTEP]
conv_lhs => rw [hx, hy, ← hopi, iUnionLift_of_mem _ hxy]
[GOAL]
α : Type u_1
ι : Sort u_2
β : Sort u_3
S : ι → Set α
f : (i : ι) → ↑(S i) → β
hf :
  ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j),
    f i { val := x, property := hxi } = f j { val := x, property := hxj }
dir : Directed (fun x x_1 => x ≤ x_1) S
opi : (i : ι) → ↑(S i) → ↑(S i) → ↑(S i)
opβ : β → β → β
h : ∀ (i : ι) (x y : ↑(S i)), f i (opi i x y) = opβ (f i x) (f i y)
hT : iUnion S ⊆ iUnion S
op : ↑(iUnion S) → ↑(iUnion S) → ↑(iUnion S)
hopi :
  ∀ (i : ι) (x y : ↑(S i)),
    inclusion (_ : S i ⊆ iUnion S) (opi i x y) =
      op (inclusion (_ : S i ⊆ iUnion S) x) (inclusion (_ : S i ⊆ iUnion S) y)
x y : ↑(iUnion S)
i : ι
hi : ↑x ∈ S i
j : ι
hj : ↑y ∈ S j
k : ι
hik : S i ≤ S k
hjk : S j ≤ S k
hx : x = inclusion (_ : S k ⊆ ⋃ (i : ι), S i) { val := ↑x, property := (_ : ↑x ∈ S k) }
hy : y = inclusion (_ : S k ⊆ ⋃ (i : ι), S i) { val := ↑y, property := (_ : ↑y ∈ S k) }
hxy :
  ↑(inclusion (_ : S k ⊆ ⋃ (i : ι), S i)
        (opi k { val := ↑x, property := (_ : ↑x ∈ S k) } { val := ↑y, property := (_ : ↑y ∈ S k) })) ∈
    S k
| iUnionLift S f hf (iUnion S) (_ : iUnion S ≤ iUnion S) (op x y)
[PROOFSTEP]
rw [hx, hy, ← hopi, iUnionLift_of_mem _ hxy]
[GOAL]
α : Type u_1
ι : Sort u_2
β : Sort u_3
S : ι → Set α
f : (i : ι) → ↑(S i) → β
hf :
  ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j),
    f i { val := x, property := hxi } = f j { val := x, property := hxj }
dir : Directed (fun x x_1 => x ≤ x_1) S
opi : (i : ι) → ↑(S i) → ↑(S i) → ↑(S i)
opβ : β → β → β
h : ∀ (i : ι) (x y : ↑(S i)), f i (opi i x y) = opβ (f i x) (f i y)
hT : iUnion S ⊆ iUnion S
op : ↑(iUnion S) → ↑(iUnion S) → ↑(iUnion S)
hopi :
  ∀ (i : ι) (x y : ↑(S i)),
    inclusion (_ : S i ⊆ iUnion S) (opi i x y) =
      op (inclusion (_ : S i ⊆ iUnion S) x) (inclusion (_ : S i ⊆ iUnion S) y)
x y : ↑(iUnion S)
i : ι
hi : ↑x ∈ S i
j : ι
hj : ↑y ∈ S j
k : ι
hik : S i ≤ S k
hjk : S j ≤ S k
hx : x = inclusion (_ : S k ⊆ ⋃ (i : ι), S i) { val := ↑x, property := (_ : ↑x ∈ S k) }
hy : y = inclusion (_ : S k ⊆ ⋃ (i : ι), S i) { val := ↑y, property := (_ : ↑y ∈ S k) }
hxy :
  ↑(inclusion (_ : S k ⊆ ⋃ (i : ι), S i)
        (opi k { val := ↑x, property := (_ : ↑x ∈ S k) } { val := ↑y, property := (_ : ↑y ∈ S k) })) ∈
    S k
| iUnionLift S f hf (iUnion S) (_ : iUnion S ≤ iUnion S) (op x y)
[PROOFSTEP]
rw [hx, hy, ← hopi, iUnionLift_of_mem _ hxy]
[GOAL]
α : Type u_1
ι : Sort u_2
β : Sort u_3
S : ι → Set α
f : (i : ι) → ↑(S i) → β
hf :
  ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j),
    f i { val := x, property := hxi } = f j { val := x, property := hxj }
dir : Directed (fun x x_1 => x ≤ x_1) S
opi : (i : ι) → ↑(S i) → ↑(S i) → ↑(S i)
opβ : β → β → β
h : ∀ (i : ι) (x y : ↑(S i)), f i (opi i x y) = opβ (f i x) (f i y)
hT : iUnion S ⊆ iUnion S
op : ↑(iUnion S) → ↑(iUnion S) → ↑(iUnion S)
hopi :
  ∀ (i : ι) (x y : ↑(S i)),
    inclusion (_ : S i ⊆ iUnion S) (opi i x y) =
      op (inclusion (_ : S i ⊆ iUnion S) x) (inclusion (_ : S i ⊆ iUnion S) y)
x y : ↑(iUnion S)
i : ι
hi : ↑x ∈ S i
j : ι
hj : ↑y ∈ S j
k : ι
hik : S i ≤ S k
hjk : S j ≤ S k
hx : x = inclusion (_ : S k ⊆ ⋃ (i : ι), S i) { val := ↑x, property := (_ : ↑x ∈ S k) }
hy : y = inclusion (_ : S k ⊆ ⋃ (i : ι), S i) { val := ↑y, property := (_ : ↑y ∈ S k) }
hxy :
  ↑(inclusion (_ : S k ⊆ ⋃ (i : ι), S i)
        (opi k { val := ↑x, property := (_ : ↑x ∈ S k) } { val := ↑y, property := (_ : ↑y ∈ S k) })) ∈
    S k
| iUnionLift S f hf (iUnion S) (_ : iUnion S ≤ iUnion S) (op x y)
[PROOFSTEP]
rw [hx, hy, ← hopi, iUnionLift_of_mem _ hxy]
[GOAL]
α : Type u_1
ι : Sort u_3
β : Type u_2
S : ι → Set α
f : (i : ι) → ↑(S i) → β
hf :
  ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j),
    f i { val := x, property := hxi } = f j { val := x, property := hxj }
hS : iUnion S = univ
t : Set β
⊢ liftCover S f hf hS ⁻¹' t = ⋃ (i : ι), Subtype.val '' (f i ⁻¹' t)
[PROOFSTEP]
change (iUnionLift S f hf univ hS.symm.subset ∘ fun a => ⟨a, mem_univ a⟩) ⁻¹' t = _
[GOAL]
α : Type u_1
ι : Sort u_3
β : Type u_2
S : ι → Set α
f : (i : ι) → ↑(S i) → β
hf :
  ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j),
    f i { val := x, property := hxi } = f j { val := x, property := hxj }
hS : iUnion S = univ
t : Set β
⊢ (iUnionLift S f hf univ (_ : univ ⊆ iUnion S) ∘ fun a => { val := a, property := (_ : a ∈ univ) }) ⁻¹' t =
    ⋃ (i : ι), Subtype.val '' (f i ⁻¹' t)
[PROOFSTEP]
rw [preimage_comp, preimage_iUnionLift]
[GOAL]
α : Type u_1
ι : Sort u_3
β : Type u_2
S : ι → Set α
f : (i : ι) → ↑(S i) → β
hf :
  ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j),
    f i { val := x, property := hxi } = f j { val := x, property := hxj }
hS : iUnion S = univ
t : Set β
⊢ (fun a => { val := a, property := (_ : a ∈ univ) }) ⁻¹'
      (inclusion (_ : univ ⊆ iUnion S) ⁻¹' ⋃ (i : ι), inclusion (_ : S i ⊆ ⋃ (i : ι), S i) '' (f i ⁻¹' t)) =
    ⋃ (i : ι), Subtype.val '' (f i ⁻¹' t)
[PROOFSTEP]
ext
[GOAL]
case h
α : Type u_1
ι : Sort u_3
β : Type u_2
S : ι → Set α
f : (i : ι) → ↑(S i) → β
hf :
  ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j),
    f i { val := x, property := hxi } = f j { val := x, property := hxj }
hS : iUnion S = univ
t : Set β
x✝ : α
⊢ x✝ ∈
      (fun a => { val := a, property := (_ : a ∈ univ) }) ⁻¹'
        (inclusion (_ : univ ⊆ iUnion S) ⁻¹' ⋃ (i : ι), inclusion (_ : S i ⊆ ⋃ (i : ι), S i) '' (f i ⁻¹' t)) ↔
    x✝ ∈ ⋃ (i : ι), Subtype.val '' (f i ⁻¹' t)
[PROOFSTEP]
simp


[GOAL]
α : Type u
β : Type v
γ : Type w
l : List α
⊢ (List.bind l fun x => [x]) = l
[PROOFSTEP]
induction l
[GOAL]
case nil
α : Type u
β : Type v
γ : Type w
⊢ (List.bind [] fun x => [x]) = []
[PROOFSTEP]
simp [*]
[GOAL]
case cons
α : Type u
β : Type v
γ : Type w
head✝ : α
tail✝ : List α
tail_ih✝ : (List.bind tail✝ fun x => [x]) = tail✝
⊢ (List.bind (head✝ :: tail✝) fun x => [x]) = head✝ :: tail✝
[PROOFSTEP]
simp [*]
[GOAL]
α✝ : Type u
β✝ : Type v
γ : Type w
α : Type u_1
β : Type u_2
f : α → β
l : List α
⊢ map f l = List.bind l fun x => [f x]
[PROOFSTEP]
simp only [← map_singleton]
[GOAL]
α✝ : Type u
β✝ : Type v
γ : Type w
α : Type u_1
β : Type u_2
f : α → β
l : List α
⊢ map f l = List.bind l fun x => map f [x]
[PROOFSTEP]
rw [← bind_singleton' l, bind_map, bind_singleton']
[GOAL]
α✝ : Type u
β✝ : Type v
γ : Type w
α : Type u_1
β : Type u_2
l : List α
f : α → List β
g : β → List γ
⊢ List.bind (List.bind l f) g = List.bind l fun x => List.bind (f x) g
[PROOFSTEP]
induction l
[GOAL]
case nil
α✝ : Type u
β✝ : Type v
γ : Type w
α : Type u_1
β : Type u_2
f : α → List β
g : β → List γ
⊢ List.bind (List.bind [] f) g = List.bind [] fun x => List.bind (f x) g
[PROOFSTEP]
simp [*]
[GOAL]
case cons
α✝ : Type u
β✝ : Type v
γ : Type w
α : Type u_1
β : Type u_2
f : α → List β
g : β → List γ
head✝ : α
tail✝ : List α
tail_ih✝ : List.bind (List.bind tail✝ f) g = List.bind tail✝ fun x => List.bind (f x) g
⊢ List.bind (List.bind (head✝ :: tail✝) f) g = List.bind (head✝ :: tail✝) fun x => List.bind (f x) g
[PROOFSTEP]
simp [*]
[GOAL]
α✝ : Type u
β : Type v
γ : Type w
α : Type u
p : α → Prop
inst✝ : DecidablePred p
⊢ ¬∃ x, x ∈ [] ∧ p x
[PROOFSTEP]
simp
[GOAL]
α✝ : Type u
β : Type v
γ : Type w
α : Type u
p : α → Prop
inst✝ : DecidablePred p
x : α
xs : List α
h₁ : ¬p x
h₂ : ∃ x, x ∈ xs ∧ p x
⊢ ∃ x_1, x_1 ∈ x :: xs ∧ p x_1
[PROOFSTEP]
cases' h₂ with y h
[GOAL]
case intro
α✝ : Type u
β : Type v
γ : Type w
α : Type u
p : α → Prop
inst✝ : DecidablePred p
x : α
xs : List α
h₁ : ¬p x
y : α
h : y ∈ xs ∧ p y
⊢ ∃ x_1, x_1 ∈ x :: xs ∧ p x_1
[PROOFSTEP]
cases' h with hm hp
[GOAL]
case intro.intro
α✝ : Type u
β : Type v
γ : Type w
α : Type u
p : α → Prop
inst✝ : DecidablePred p
x : α
xs : List α
h₁ : ¬p x
y : α
hm : y ∈ xs
hp : p y
⊢ ∃ x_1, x_1 ∈ x :: xs ∧ p x_1
[PROOFSTEP]
exact ⟨y, mem_cons_of_mem _ hm, hp⟩
[GOAL]
α✝ : Type u
β : Type v
γ : Type w
α : Type u
p : α → Prop
inst✝ : DecidablePred p
x : α
xs : List α
h₁ : ¬p x
h₂ : ¬∃ x, x ∈ xs ∧ p x
⊢ ¬∃ x_1, x_1 ∈ x :: xs ∧ p x_1
[PROOFSTEP]
intro h
[GOAL]
α✝ : Type u
β : Type v
γ : Type w
α : Type u
p : α → Prop
inst✝ : DecidablePred p
x : α
xs : List α
h₁ : ¬p x
h₂ : ¬∃ x, x ∈ xs ∧ p x
h : ∃ x_1, x_1 ∈ x :: xs ∧ p x_1
⊢ False
[PROOFSTEP]
cases' h with y h
[GOAL]
case intro
α✝ : Type u
β : Type v
γ : Type w
α : Type u
p : α → Prop
inst✝ : DecidablePred p
x : α
xs : List α
h₁ : ¬p x
h₂ : ¬∃ x, x ∈ xs ∧ p x
y : α
h : y ∈ x :: xs ∧ p y
⊢ False
[PROOFSTEP]
cases' h with hm hp
[GOAL]
case intro.intro
α✝ : Type u
β : Type v
γ : Type w
α : Type u
p : α → Prop
inst✝ : DecidablePred p
x : α
xs : List α
h₁ : ¬p x
h₂ : ¬∃ x, x ∈ xs ∧ p x
y : α
hm : y ∈ x :: xs
hp : p y
⊢ False
[PROOFSTEP]
cases' mem_cons.1 hm with h h
[GOAL]
case intro.intro.inl
α✝ : Type u
β : Type v
γ : Type w
α : Type u
p : α → Prop
inst✝ : DecidablePred p
x : α
xs : List α
h₁ : ¬p x
h₂ : ¬∃ x, x ∈ xs ∧ p x
y : α
hm : y ∈ x :: xs
hp : p y
h : y = x
⊢ False
[PROOFSTEP]
rw [h] at hp
[GOAL]
case intro.intro.inl
α✝ : Type u
β : Type v
γ : Type w
α : Type u
p : α → Prop
inst✝ : DecidablePred p
x : α
xs : List α
h₁ : ¬p x
h₂ : ¬∃ x, x ∈ xs ∧ p x
y : α
hm : y ∈ x :: xs
hp : p x
h : y = x
⊢ False
[PROOFSTEP]
contradiction
[GOAL]
case intro.intro.inr
α✝ : Type u
β : Type v
γ : Type w
α : Type u
p : α → Prop
inst✝ : DecidablePred p
x : α
xs : List α
h₁ : ¬p x
h₂ : ¬∃ x, x ∈ xs ∧ p x
y : α
hm : y ∈ x :: xs
hp : p y
h : y ∈ xs
⊢ False
[PROOFSTEP]
exact absurd ⟨y, h, hp⟩ h₂


[GOAL]
R : Type u_1
inst✝ : Ring R
p q : R[X]
comm : leadingCoeff p * leadingCoeff q = leadingCoeff q * leadingCoeff p
h : natDegree p ≤ natDegree q
hq : 0 < natDegree q
⊢ natDegree (cancelLeads p q) < natDegree q
[PROOFSTEP]
by_cases hp : p = 0
[GOAL]
case pos
R : Type u_1
inst✝ : Ring R
p q : R[X]
comm : leadingCoeff p * leadingCoeff q = leadingCoeff q * leadingCoeff p
h : natDegree p ≤ natDegree q
hq : 0 < natDegree q
hp : p = 0
⊢ natDegree (cancelLeads p q) < natDegree q
[PROOFSTEP]
convert hq
[GOAL]
case h.e'_3
R : Type u_1
inst✝ : Ring R
p q : R[X]
comm : leadingCoeff p * leadingCoeff q = leadingCoeff q * leadingCoeff p
h : natDegree p ≤ natDegree q
hq : 0 < natDegree q
hp : p = 0
⊢ natDegree (cancelLeads p q) = 0
[PROOFSTEP]
simp [hp, cancelLeads]
[GOAL]
case neg
R : Type u_1
inst✝ : Ring R
p q : R[X]
comm : leadingCoeff p * leadingCoeff q = leadingCoeff q * leadingCoeff p
h : natDegree p ≤ natDegree q
hq : 0 < natDegree q
hp : ¬p = 0
⊢ natDegree (cancelLeads p q) < natDegree q
[PROOFSTEP]
rw [cancelLeads, sub_eq_add_neg, tsub_eq_zero_iff_le.mpr h, pow_zero, mul_one]
[GOAL]
case neg
R : Type u_1
inst✝ : Ring R
p q : R[X]
comm : leadingCoeff p * leadingCoeff q = leadingCoeff q * leadingCoeff p
h : natDegree p ≤ natDegree q
hq : 0 < natDegree q
hp : ¬p = 0
⊢ natDegree (↑C (leadingCoeff p) * q + -(↑C (leadingCoeff q) * X ^ (natDegree q - natDegree p) * p)) < natDegree q
[PROOFSTEP]
by_cases h0 : C p.leadingCoeff * q + -(C q.leadingCoeff * X ^ (q.natDegree - p.natDegree) * p) = 0
[GOAL]
case pos
R : Type u_1
inst✝ : Ring R
p q : R[X]
comm : leadingCoeff p * leadingCoeff q = leadingCoeff q * leadingCoeff p
h : natDegree p ≤ natDegree q
hq : 0 < natDegree q
hp : ¬p = 0
h0 : ↑C (leadingCoeff p) * q + -(↑C (leadingCoeff q) * X ^ (natDegree q - natDegree p) * p) = 0
⊢ natDegree (↑C (leadingCoeff p) * q + -(↑C (leadingCoeff q) * X ^ (natDegree q - natDegree p) * p)) < natDegree q
[PROOFSTEP]
exact (le_of_eq (by simp only [h0, natDegree_zero])).trans_lt hq
[GOAL]
R : Type u_1
inst✝ : Ring R
p q : R[X]
comm : leadingCoeff p * leadingCoeff q = leadingCoeff q * leadingCoeff p
h : natDegree p ≤ natDegree q
hq : 0 < natDegree q
hp : ¬p = 0
h0 : ↑C (leadingCoeff p) * q + -(↑C (leadingCoeff q) * X ^ (natDegree q - natDegree p) * p) = 0
⊢ natDegree (↑C (leadingCoeff p) * q + -(↑C (leadingCoeff q) * X ^ (natDegree q - natDegree p) * p)) = 0
[PROOFSTEP]
simp only [h0, natDegree_zero]
[GOAL]
case neg
R : Type u_1
inst✝ : Ring R
p q : R[X]
comm : leadingCoeff p * leadingCoeff q = leadingCoeff q * leadingCoeff p
h : natDegree p ≤ natDegree q
hq : 0 < natDegree q
hp : ¬p = 0
h0 : ¬↑C (leadingCoeff p) * q + -(↑C (leadingCoeff q) * X ^ (natDegree q - natDegree p) * p) = 0
⊢ natDegree (↑C (leadingCoeff p) * q + -(↑C (leadingCoeff q) * X ^ (natDegree q - natDegree p) * p)) < natDegree q
[PROOFSTEP]
apply lt_of_le_of_ne
[GOAL]
case neg.a
R : Type u_1
inst✝ : Ring R
p q : R[X]
comm : leadingCoeff p * leadingCoeff q = leadingCoeff q * leadingCoeff p
h : natDegree p ≤ natDegree q
hq : 0 < natDegree q
hp : ¬p = 0
h0 : ¬↑C (leadingCoeff p) * q + -(↑C (leadingCoeff q) * X ^ (natDegree q - natDegree p) * p) = 0
⊢ natDegree (↑C (leadingCoeff p) * q + -(↑C (leadingCoeff q) * X ^ (natDegree q - natDegree p) * p)) ≤ natDegree q
[PROOFSTEP]
rw [natDegree_add_le_iff_left]
[GOAL]
case neg.a
R : Type u_1
inst✝ : Ring R
p q : R[X]
comm : leadingCoeff p * leadingCoeff q = leadingCoeff q * leadingCoeff p
h : natDegree p ≤ natDegree q
hq : 0 < natDegree q
hp : ¬p = 0
h0 : ¬↑C (leadingCoeff p) * q + -(↑C (leadingCoeff q) * X ^ (natDegree q - natDegree p) * p) = 0
⊢ natDegree (↑C (leadingCoeff p) * q) ≤ natDegree q
[PROOFSTEP]
apply natDegree_C_mul_le
[GOAL]
case neg.a.qn
R : Type u_1
inst✝ : Ring R
p q : R[X]
comm : leadingCoeff p * leadingCoeff q = leadingCoeff q * leadingCoeff p
h : natDegree p ≤ natDegree q
hq : 0 < natDegree q
hp : ¬p = 0
h0 : ¬↑C (leadingCoeff p) * q + -(↑C (leadingCoeff q) * X ^ (natDegree q - natDegree p) * p) = 0
⊢ natDegree (-(↑C (leadingCoeff q) * X ^ (natDegree q - natDegree p) * p)) ≤ natDegree q
[PROOFSTEP]
refine (natDegree_neg (C q.leadingCoeff * X ^ (q.natDegree - p.natDegree) * p)).le.trans ?_
[GOAL]
case neg.a.qn
R : Type u_1
inst✝ : Ring R
p q : R[X]
comm : leadingCoeff p * leadingCoeff q = leadingCoeff q * leadingCoeff p
h : natDegree p ≤ natDegree q
hq : 0 < natDegree q
hp : ¬p = 0
h0 : ¬↑C (leadingCoeff p) * q + -(↑C (leadingCoeff q) * X ^ (natDegree q - natDegree p) * p) = 0
⊢ natDegree (↑C (leadingCoeff q) * X ^ (natDegree q - natDegree p) * p) ≤ natDegree q
[PROOFSTEP]
exact natDegree_mul_le.trans <| Nat.add_le_of_le_sub h <| natDegree_C_mul_X_pow_le _ _
[GOAL]
case neg.a
R : Type u_1
inst✝ : Ring R
p q : R[X]
comm : leadingCoeff p * leadingCoeff q = leadingCoeff q * leadingCoeff p
h : natDegree p ≤ natDegree q
hq : 0 < natDegree q
hp : ¬p = 0
h0 : ¬↑C (leadingCoeff p) * q + -(↑C (leadingCoeff q) * X ^ (natDegree q - natDegree p) * p) = 0
⊢ natDegree (↑C (leadingCoeff p) * q + -(↑C (leadingCoeff q) * X ^ (natDegree q - natDegree p) * p)) ≠ natDegree q
[PROOFSTEP]
contrapose! h0
[GOAL]
case neg.a
R : Type u_1
inst✝ : Ring R
p q : R[X]
comm : leadingCoeff p * leadingCoeff q = leadingCoeff q * leadingCoeff p
h : natDegree p ≤ natDegree q
hq : 0 < natDegree q
hp : ¬p = 0
h0 : natDegree (↑C (leadingCoeff p) * q + -(↑C (leadingCoeff q) * X ^ (natDegree q - natDegree p) * p)) = natDegree q
⊢ ↑C (leadingCoeff p) * q + -(↑C (leadingCoeff q) * X ^ (natDegree q - natDegree p) * p) = 0
[PROOFSTEP]
rw [← leadingCoeff_eq_zero, leadingCoeff, h0, mul_assoc, X_pow_mul, ← tsub_add_cancel_of_le h, add_comm _ p.natDegree]
[GOAL]
case neg.a
R : Type u_1
inst✝ : Ring R
p q : R[X]
comm : leadingCoeff p * leadingCoeff q = leadingCoeff q * leadingCoeff p
h : natDegree p ≤ natDegree q
hq : 0 < natDegree q
hp : ¬p = 0
h0 : natDegree (↑C (leadingCoeff p) * q + -(↑C (leadingCoeff q) * X ^ (natDegree q - natDegree p) * p)) = natDegree q
⊢ coeff
      (↑C (leadingCoeff p) * q +
        -(↑C (leadingCoeff q) * (p * X ^ (natDegree p + (natDegree q - natDegree p) - natDegree p))))
      (natDegree p + (natDegree q - natDegree p)) =
    0
[PROOFSTEP]
simp only [coeff_mul_X_pow, coeff_neg, coeff_C_mul, add_tsub_cancel_left, coeff_add]
[GOAL]
case neg.a
R : Type u_1
inst✝ : Ring R
p q : R[X]
comm : leadingCoeff p * leadingCoeff q = leadingCoeff q * leadingCoeff p
h : natDegree p ≤ natDegree q
hq : 0 < natDegree q
hp : ¬p = 0
h0 : natDegree (↑C (leadingCoeff p) * q + -(↑C (leadingCoeff q) * X ^ (natDegree q - natDegree p) * p)) = natDegree q
⊢ leadingCoeff p * coeff q (natDegree p + (natDegree q - natDegree p)) + -(leadingCoeff q * coeff p (natDegree p)) = 0
[PROOFSTEP]
rw [add_comm p.natDegree, tsub_add_cancel_of_le h, ← leadingCoeff, ← leadingCoeff, comm, add_right_neg]


[GOAL]
α : Type u_1
β : Type u_2
inst✝⁶ : MeasurableSpace α
inst✝⁵ : TopologicalSpace β
inst✝⁴ : PseudoMetrizableSpace β
inst✝³ : MeasurableSpace β
inst✝² : BorelSpace β
ι : Type u_3
f : ι → α → ℝ≥0∞
g : α → ℝ≥0∞
u : Filter ι
inst✝¹ : NeBot u
inst✝ : IsCountablyGenerated u
hf : ∀ (i : ι), Measurable (f i)
lim : Tendsto f u (𝓝 g)
⊢ Measurable g
[PROOFSTEP]
rcases u.exists_seq_tendsto with ⟨x, hx⟩
[GOAL]
case intro
α : Type u_1
β : Type u_2
inst✝⁶ : MeasurableSpace α
inst✝⁵ : TopologicalSpace β
inst✝⁴ : PseudoMetrizableSpace β
inst✝³ : MeasurableSpace β
inst✝² : BorelSpace β
ι : Type u_3
f : ι → α → ℝ≥0∞
g : α → ℝ≥0∞
u : Filter ι
inst✝¹ : NeBot u
inst✝ : IsCountablyGenerated u
hf : ∀ (i : ι), Measurable (f i)
lim : Tendsto f u (𝓝 g)
x : ℕ → ι
hx : Tendsto x atTop u
⊢ Measurable g
[PROOFSTEP]
rw [tendsto_pi_nhds] at lim
[GOAL]
case intro
α : Type u_1
β : Type u_2
inst✝⁶ : MeasurableSpace α
inst✝⁵ : TopologicalSpace β
inst✝⁴ : PseudoMetrizableSpace β
inst✝³ : MeasurableSpace β
inst✝² : BorelSpace β
ι : Type u_3
f : ι → α → ℝ≥0∞
g : α → ℝ≥0∞
u : Filter ι
inst✝¹ : NeBot u
inst✝ : IsCountablyGenerated u
hf : ∀ (i : ι), Measurable (f i)
lim : ∀ (x : α), Tendsto (fun i => f i x) u (𝓝 (g x))
x : ℕ → ι
hx : Tendsto x atTop u
⊢ Measurable g
[PROOFSTEP]
have : (fun y => liminf (fun n => (f (x n) y : ℝ≥0∞)) atTop) = g :=
  by
  ext1 y
  exact ((lim y).comp hx).liminf_eq
[GOAL]
α : Type u_1
β : Type u_2
inst✝⁶ : MeasurableSpace α
inst✝⁵ : TopologicalSpace β
inst✝⁴ : PseudoMetrizableSpace β
inst✝³ : MeasurableSpace β
inst✝² : BorelSpace β
ι : Type u_3
f : ι → α → ℝ≥0∞
g : α → ℝ≥0∞
u : Filter ι
inst✝¹ : NeBot u
inst✝ : IsCountablyGenerated u
hf : ∀ (i : ι), Measurable (f i)
lim : ∀ (x : α), Tendsto (fun i => f i x) u (𝓝 (g x))
x : ℕ → ι
hx : Tendsto x atTop u
⊢ (fun y => liminf (fun n => f (x n) y) atTop) = g
[PROOFSTEP]
ext1 y
[GOAL]
case h
α : Type u_1
β : Type u_2
inst✝⁶ : MeasurableSpace α
inst✝⁵ : TopologicalSpace β
inst✝⁴ : PseudoMetrizableSpace β
inst✝³ : MeasurableSpace β
inst✝² : BorelSpace β
ι : Type u_3
f : ι → α → ℝ≥0∞
g : α → ℝ≥0∞
u : Filter ι
inst✝¹ : NeBot u
inst✝ : IsCountablyGenerated u
hf : ∀ (i : ι), Measurable (f i)
lim : ∀ (x : α), Tendsto (fun i => f i x) u (𝓝 (g x))
x : ℕ → ι
hx : Tendsto x atTop u
y : α
⊢ liminf (fun n => f (x n) y) atTop = g y
[PROOFSTEP]
exact ((lim y).comp hx).liminf_eq
[GOAL]
case intro
α : Type u_1
β : Type u_2
inst✝⁶ : MeasurableSpace α
inst✝⁵ : TopologicalSpace β
inst✝⁴ : PseudoMetrizableSpace β
inst✝³ : MeasurableSpace β
inst✝² : BorelSpace β
ι : Type u_3
f : ι → α → ℝ≥0∞
g : α → ℝ≥0∞
u : Filter ι
inst✝¹ : NeBot u
inst✝ : IsCountablyGenerated u
hf : ∀ (i : ι), Measurable (f i)
lim : ∀ (x : α), Tendsto (fun i => f i x) u (𝓝 (g x))
x : ℕ → ι
hx : Tendsto x atTop u
this : (fun y => liminf (fun n => f (x n) y) atTop) = g
⊢ Measurable g
[PROOFSTEP]
rw [← this]
[GOAL]
case intro
α : Type u_1
β : Type u_2
inst✝⁶ : MeasurableSpace α
inst✝⁵ : TopologicalSpace β
inst✝⁴ : PseudoMetrizableSpace β
inst✝³ : MeasurableSpace β
inst✝² : BorelSpace β
ι : Type u_3
f : ι → α → ℝ≥0∞
g : α → ℝ≥0∞
u : Filter ι
inst✝¹ : NeBot u
inst✝ : IsCountablyGenerated u
hf : ∀ (i : ι), Measurable (f i)
lim : ∀ (x : α), Tendsto (fun i => f i x) u (𝓝 (g x))
x : ℕ → ι
hx : Tendsto x atTop u
this : (fun y => liminf (fun n => f (x n) y) atTop) = g
⊢ Measurable fun y => liminf (fun n => f (x n) y) atTop
[PROOFSTEP]
show Measurable fun y => liminf (fun n => (f (x n) y : ℝ≥0∞)) atTop
[GOAL]
case intro
α : Type u_1
β : Type u_2
inst✝⁶ : MeasurableSpace α
inst✝⁵ : TopologicalSpace β
inst✝⁴ : PseudoMetrizableSpace β
inst✝³ : MeasurableSpace β
inst✝² : BorelSpace β
ι : Type u_3
f : ι → α → ℝ≥0∞
g : α → ℝ≥0∞
u : Filter ι
inst✝¹ : NeBot u
inst✝ : IsCountablyGenerated u
hf : ∀ (i : ι), Measurable (f i)
lim : ∀ (x : α), Tendsto (fun i => f i x) u (𝓝 (g x))
x : ℕ → ι
hx : Tendsto x atTop u
this : (fun y => liminf (fun n => f (x n) y) atTop) = g
⊢ Measurable fun y => liminf (fun n => f (x n) y) atTop
[PROOFSTEP]
exact measurable_liminf fun n => hf (x n)
[GOAL]
α : Type u_1
β : Type u_2
inst✝⁶ : MeasurableSpace α
inst✝⁵ : TopologicalSpace β
inst✝⁴ : PseudoMetrizableSpace β
inst✝³ : MeasurableSpace β
inst✝² : BorelSpace β
ι : Type u_3
f : ι → α → ℝ≥0
g : α → ℝ≥0
u : Filter ι
inst✝¹ : NeBot u
inst✝ : IsCountablyGenerated u
hf : ∀ (i : ι), Measurable (f i)
lim : Tendsto f u (𝓝 g)
⊢ Measurable g
[PROOFSTEP]
simp_rw [← measurable_coe_nnreal_ennreal_iff] at hf ⊢
[GOAL]
α : Type u_1
β : Type u_2
inst✝⁶ : MeasurableSpace α
inst✝⁵ : TopologicalSpace β
inst✝⁴ : PseudoMetrizableSpace β
inst✝³ : MeasurableSpace β
inst✝² : BorelSpace β
ι : Type u_3
f : ι → α → ℝ≥0
g : α → ℝ≥0
u : Filter ι
inst✝¹ : NeBot u
inst✝ : IsCountablyGenerated u
lim : Tendsto f u (𝓝 g)
hf : ∀ (i : ι), Measurable fun x => ↑(f i x)
⊢ Measurable fun x => ↑(g x)
[PROOFSTEP]
refine' measurable_of_tendsto_ennreal' u hf _
[GOAL]
α : Type u_1
β : Type u_2
inst✝⁶ : MeasurableSpace α
inst✝⁵ : TopologicalSpace β
inst✝⁴ : PseudoMetrizableSpace β
inst✝³ : MeasurableSpace β
inst✝² : BorelSpace β
ι : Type u_3
f : ι → α → ℝ≥0
g : α → ℝ≥0
u : Filter ι
inst✝¹ : NeBot u
inst✝ : IsCountablyGenerated u
lim : Tendsto f u (𝓝 g)
hf : ∀ (i : ι), Measurable fun x => ↑(f i x)
⊢ Tendsto (fun i x => ↑(f i x)) u (𝓝 fun x => ↑(g x))
[PROOFSTEP]
rw [tendsto_pi_nhds] at lim ⊢
[GOAL]
α : Type u_1
β : Type u_2
inst✝⁶ : MeasurableSpace α
inst✝⁵ : TopologicalSpace β
inst✝⁴ : PseudoMetrizableSpace β
inst✝³ : MeasurableSpace β
inst✝² : BorelSpace β
ι : Type u_3
f : ι → α → ℝ≥0
g : α → ℝ≥0
u : Filter ι
inst✝¹ : NeBot u
inst✝ : IsCountablyGenerated u
lim : ∀ (x : α), Tendsto (fun i => f i x) u (𝓝 (g x))
hf : ∀ (i : ι), Measurable fun x => ↑(f i x)
⊢ ∀ (x : α), Tendsto (fun i => ↑(f i x)) u (𝓝 ↑(g x))
[PROOFSTEP]
exact fun x => (ENNReal.continuous_coe.tendsto (g x)).comp (lim x)
[GOAL]
α : Type u_1
β : Type u_2
inst✝⁶ : MeasurableSpace α
inst✝⁵ : TopologicalSpace β
inst✝⁴ : PseudoMetrizableSpace β
inst✝³ : MeasurableSpace β
inst✝² : BorelSpace β
ι : Type u_3
f : ι → α → β
g : α → β
u : Filter ι
inst✝¹ : NeBot u
inst✝ : IsCountablyGenerated u
hf : ∀ (i : ι), Measurable (f i)
lim : Tendsto f u (𝓝 g)
⊢ Measurable g
[PROOFSTEP]
letI : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β
[GOAL]
α : Type u_1
β : Type u_2
inst✝⁶ : MeasurableSpace α
inst✝⁵ : TopologicalSpace β
inst✝⁴ : PseudoMetrizableSpace β
inst✝³ : MeasurableSpace β
inst✝² : BorelSpace β
ι : Type u_3
f : ι → α → β
g : α → β
u : Filter ι
inst✝¹ : NeBot u
inst✝ : IsCountablyGenerated u
hf : ∀ (i : ι), Measurable (f i)
lim : Tendsto f u (𝓝 g)
this : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β
⊢ Measurable g
[PROOFSTEP]
apply measurable_of_is_closed'
[GOAL]
case hf
α : Type u_1
β : Type u_2
inst✝⁶ : MeasurableSpace α
inst✝⁵ : TopologicalSpace β
inst✝⁴ : PseudoMetrizableSpace β
inst✝³ : MeasurableSpace β
inst✝² : BorelSpace β
ι : Type u_3
f : ι → α → β
g : α → β
u : Filter ι
inst✝¹ : NeBot u
inst✝ : IsCountablyGenerated u
hf : ∀ (i : ι), Measurable (f i)
lim : Tendsto f u (𝓝 g)
this : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β
⊢ ∀ (s : Set β), IsClosed s → Set.Nonempty s → s ≠ Set.univ → MeasurableSet (g ⁻¹' s)
[PROOFSTEP]
intro s h1s h2s h3s
[GOAL]
case hf
α : Type u_1
β : Type u_2
inst✝⁶ : MeasurableSpace α
inst✝⁵ : TopologicalSpace β
inst✝⁴ : PseudoMetrizableSpace β
inst✝³ : MeasurableSpace β
inst✝² : BorelSpace β
ι : Type u_3
f : ι → α → β
g : α → β
u : Filter ι
inst✝¹ : NeBot u
inst✝ : IsCountablyGenerated u
hf : ∀ (i : ι), Measurable (f i)
lim : Tendsto f u (𝓝 g)
this : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β
s : Set β
h1s : IsClosed s
h2s : Set.Nonempty s
h3s : s ≠ Set.univ
⊢ MeasurableSet (g ⁻¹' s)
[PROOFSTEP]
have : Measurable fun x => infNndist (g x) s :=
  by
  suffices : Tendsto (fun i x => infNndist (f i x) s) u (𝓝 fun x => infNndist (g x) s)
  exact measurable_of_tendsto_nnreal' u (fun i => (hf i).infNndist) this
  rw [tendsto_pi_nhds] at lim ⊢
  intro x
  exact ((continuous_infNndist_pt s).tendsto (g x)).comp (lim x)
[GOAL]
α : Type u_1
β : Type u_2
inst✝⁶ : MeasurableSpace α
inst✝⁵ : TopologicalSpace β
inst✝⁴ : PseudoMetrizableSpace β
inst✝³ : MeasurableSpace β
inst✝² : BorelSpace β
ι : Type u_3
f : ι → α → β
g : α → β
u : Filter ι
inst✝¹ : NeBot u
inst✝ : IsCountablyGenerated u
hf : ∀ (i : ι), Measurable (f i)
lim : Tendsto f u (𝓝 g)
this : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β
s : Set β
h1s : IsClosed s
h2s : Set.Nonempty s
h3s : s ≠ Set.univ
⊢ Measurable fun x => infNndist (g x) s
[PROOFSTEP]
suffices : Tendsto (fun i x => infNndist (f i x) s) u (𝓝 fun x => infNndist (g x) s)
[GOAL]
α : Type u_1
β : Type u_2
inst✝⁶ : MeasurableSpace α
inst✝⁵ : TopologicalSpace β
inst✝⁴ : PseudoMetrizableSpace β
inst✝³ : MeasurableSpace β
inst✝² : BorelSpace β
ι : Type u_3
f : ι → α → β
g : α → β
u : Filter ι
inst✝¹ : NeBot u
inst✝ : IsCountablyGenerated u
hf : ∀ (i : ι), Measurable (f i)
lim : Tendsto f u (𝓝 g)
this✝ : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β
s : Set β
h1s : IsClosed s
h2s : Set.Nonempty s
h3s : s ≠ Set.univ
this : Tendsto (fun i x => infNndist (f i x) s) u (𝓝 fun x => infNndist (g x) s)
⊢ Measurable fun x => infNndist (g x) s
case this
α : Type u_1
β : Type u_2
inst✝⁶ : MeasurableSpace α
inst✝⁵ : TopologicalSpace β
inst✝⁴ : PseudoMetrizableSpace β
inst✝³ : MeasurableSpace β
inst✝² : BorelSpace β
ι : Type u_3
f : ι → α → β
g : α → β
u : Filter ι
inst✝¹ : NeBot u
inst✝ : IsCountablyGenerated u
hf : ∀ (i : ι), Measurable (f i)
lim : Tendsto f u (𝓝 g)
this : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β
s : Set β
h1s : IsClosed s
h2s : Set.Nonempty s
h3s : s ≠ Set.univ
⊢ Tendsto (fun i x => infNndist (f i x) s) u (𝓝 fun x => infNndist (g x) s)
[PROOFSTEP]
exact measurable_of_tendsto_nnreal' u (fun i => (hf i).infNndist) this
[GOAL]
case this
α : Type u_1
β : Type u_2
inst✝⁶ : MeasurableSpace α
inst✝⁵ : TopologicalSpace β
inst✝⁴ : PseudoMetrizableSpace β
inst✝³ : MeasurableSpace β
inst✝² : BorelSpace β
ι : Type u_3
f : ι → α → β
g : α → β
u : Filter ι
inst✝¹ : NeBot u
inst✝ : IsCountablyGenerated u
hf : ∀ (i : ι), Measurable (f i)
lim : Tendsto f u (𝓝 g)
this : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β
s : Set β
h1s : IsClosed s
h2s : Set.Nonempty s
h3s : s ≠ Set.univ
⊢ Tendsto (fun i x => infNndist (f i x) s) u (𝓝 fun x => infNndist (g x) s)
[PROOFSTEP]
rw [tendsto_pi_nhds] at lim ⊢
[GOAL]
case this
α : Type u_1
β : Type u_2
inst✝⁶ : MeasurableSpace α
inst✝⁵ : TopologicalSpace β
inst✝⁴ : PseudoMetrizableSpace β
inst✝³ : MeasurableSpace β
inst✝² : BorelSpace β
ι : Type u_3
f : ι → α → β
g : α → β
u : Filter ι
inst✝¹ : NeBot u
inst✝ : IsCountablyGenerated u
hf : ∀ (i : ι), Measurable (f i)
lim : ∀ (x : α), Tendsto (fun i => f i x) u (𝓝 (g x))
this : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β
s : Set β
h1s : IsClosed s
h2s : Set.Nonempty s
h3s : s ≠ Set.univ
⊢ ∀ (x : α), Tendsto (fun i => infNndist (f i x) s) u (𝓝 (infNndist (g x) s))
[PROOFSTEP]
intro x
[GOAL]
case this
α : Type u_1
β : Type u_2
inst✝⁶ : MeasurableSpace α
inst✝⁵ : TopologicalSpace β
inst✝⁴ : PseudoMetrizableSpace β
inst✝³ : MeasurableSpace β
inst✝² : BorelSpace β
ι : Type u_3
f : ι → α → β
g : α → β
u : Filter ι
inst✝¹ : NeBot u
inst✝ : IsCountablyGenerated u
hf : ∀ (i : ι), Measurable (f i)
lim : ∀ (x : α), Tendsto (fun i => f i x) u (𝓝 (g x))
this : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β
s : Set β
h1s : IsClosed s
h2s : Set.Nonempty s
h3s : s ≠ Set.univ
x : α
⊢ Tendsto (fun i => infNndist (f i x) s) u (𝓝 (infNndist (g x) s))
[PROOFSTEP]
exact ((continuous_infNndist_pt s).tendsto (g x)).comp (lim x)
[GOAL]
case hf
α : Type u_1
β : Type u_2
inst✝⁶ : MeasurableSpace α
inst✝⁵ : TopologicalSpace β
inst✝⁴ : PseudoMetrizableSpace β
inst✝³ : MeasurableSpace β
inst✝² : BorelSpace β
ι : Type u_3
f : ι → α → β
g : α → β
u : Filter ι
inst✝¹ : NeBot u
inst✝ : IsCountablyGenerated u
hf : ∀ (i : ι), Measurable (f i)
lim : Tendsto f u (𝓝 g)
this✝ : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β
s : Set β
h1s : IsClosed s
h2s : Set.Nonempty s
h3s : s ≠ Set.univ
this : Measurable fun x => infNndist (g x) s
⊢ MeasurableSet (g ⁻¹' s)
[PROOFSTEP]
have h4s : g ⁻¹' s = (fun x => infNndist (g x) s) ⁻¹' {0} :=
  by
  ext x
  simp [h1s, ← h1s.mem_iff_infDist_zero h2s, ← NNReal.coe_eq_zero]
[GOAL]
α : Type u_1
β : Type u_2
inst✝⁶ : MeasurableSpace α
inst✝⁵ : TopologicalSpace β
inst✝⁴ : PseudoMetrizableSpace β
inst✝³ : MeasurableSpace β
inst✝² : BorelSpace β
ι : Type u_3
f : ι → α → β
g : α → β
u : Filter ι
inst✝¹ : NeBot u
inst✝ : IsCountablyGenerated u
hf : ∀ (i : ι), Measurable (f i)
lim : Tendsto f u (𝓝 g)
this✝ : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β
s : Set β
h1s : IsClosed s
h2s : Set.Nonempty s
h3s : s ≠ Set.univ
this : Measurable fun x => infNndist (g x) s
⊢ g ⁻¹' s = (fun x => infNndist (g x) s) ⁻¹' {0}
[PROOFSTEP]
ext x
[GOAL]
case h
α : Type u_1
β : Type u_2
inst✝⁶ : MeasurableSpace α
inst✝⁵ : TopologicalSpace β
inst✝⁴ : PseudoMetrizableSpace β
inst✝³ : MeasurableSpace β
inst✝² : BorelSpace β
ι : Type u_3
f : ι → α → β
g : α → β
u : Filter ι
inst✝¹ : NeBot u
inst✝ : IsCountablyGenerated u
hf : ∀ (i : ι), Measurable (f i)
lim : Tendsto f u (𝓝 g)
this✝ : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β
s : Set β
h1s : IsClosed s
h2s : Set.Nonempty s
h3s : s ≠ Set.univ
this : Measurable fun x => infNndist (g x) s
x : α
⊢ x ∈ g ⁻¹' s ↔ x ∈ (fun x => infNndist (g x) s) ⁻¹' {0}
[PROOFSTEP]
simp [h1s, ← h1s.mem_iff_infDist_zero h2s, ← NNReal.coe_eq_zero]
[GOAL]
case hf
α : Type u_1
β : Type u_2
inst✝⁶ : MeasurableSpace α
inst✝⁵ : TopologicalSpace β
inst✝⁴ : PseudoMetrizableSpace β
inst✝³ : MeasurableSpace β
inst✝² : BorelSpace β
ι : Type u_3
f : ι → α → β
g : α → β
u : Filter ι
inst✝¹ : NeBot u
inst✝ : IsCountablyGenerated u
hf : ∀ (i : ι), Measurable (f i)
lim : Tendsto f u (𝓝 g)
this✝ : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β
s : Set β
h1s : IsClosed s
h2s : Set.Nonempty s
h3s : s ≠ Set.univ
this : Measurable fun x => infNndist (g x) s
h4s : g ⁻¹' s = (fun x => infNndist (g x) s) ⁻¹' {0}
⊢ MeasurableSet (g ⁻¹' s)
[PROOFSTEP]
rw [h4s]
[GOAL]
case hf
α : Type u_1
β : Type u_2
inst✝⁶ : MeasurableSpace α
inst✝⁵ : TopologicalSpace β
inst✝⁴ : PseudoMetrizableSpace β
inst✝³ : MeasurableSpace β
inst✝² : BorelSpace β
ι : Type u_3
f : ι → α → β
g : α → β
u : Filter ι
inst✝¹ : NeBot u
inst✝ : IsCountablyGenerated u
hf : ∀ (i : ι), Measurable (f i)
lim : Tendsto f u (𝓝 g)
this✝ : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β
s : Set β
h1s : IsClosed s
h2s : Set.Nonempty s
h3s : s ≠ Set.univ
this : Measurable fun x => infNndist (g x) s
h4s : g ⁻¹' s = (fun x => infNndist (g x) s) ⁻¹' {0}
⊢ MeasurableSet ((fun x => infNndist (g x) s) ⁻¹' {0})
[PROOFSTEP]
exact this (measurableSet_singleton 0)
[GOAL]
α : Type u_1
β : Type u_2
inst✝⁵ : MeasurableSpace α
inst✝⁴ : TopologicalSpace β
inst✝³ : PseudoMetrizableSpace β
inst✝² : MeasurableSpace β
inst✝¹ : BorelSpace β
ι : Type u_3
μ : Measure α
f : ι → α → β
g : α → β
u : Filter ι
hu : NeBot u
inst✝ : IsCountablyGenerated u
hf : ∀ (n : ι), AEMeasurable (f n)
h_tendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) u (𝓝 (g x))
⊢ AEMeasurable g
[PROOFSTEP]
rcases u.exists_seq_tendsto with ⟨v, hv⟩
[GOAL]
case intro
α : Type u_1
β : Type u_2
inst✝⁵ : MeasurableSpace α
inst✝⁴ : TopologicalSpace β
inst✝³ : PseudoMetrizableSpace β
inst✝² : MeasurableSpace β
inst✝¹ : BorelSpace β
ι : Type u_3
μ : Measure α
f : ι → α → β
g : α → β
u : Filter ι
hu : NeBot u
inst✝ : IsCountablyGenerated u
hf : ∀ (n : ι), AEMeasurable (f n)
h_tendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) u (𝓝 (g x))
v : ℕ → ι
hv : Tendsto v atTop u
⊢ AEMeasurable g
[PROOFSTEP]
have h'f : ∀ n, AEMeasurable (f (v n)) μ := fun n => hf (v n)
[GOAL]
case intro
α : Type u_1
β : Type u_2
inst✝⁵ : MeasurableSpace α
inst✝⁴ : TopologicalSpace β
inst✝³ : PseudoMetrizableSpace β
inst✝² : MeasurableSpace β
inst✝¹ : BorelSpace β
ι : Type u_3
μ : Measure α
f : ι → α → β
g : α → β
u : Filter ι
hu : NeBot u
inst✝ : IsCountablyGenerated u
hf : ∀ (n : ι), AEMeasurable (f n)
h_tendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) u (𝓝 (g x))
v : ℕ → ι
hv : Tendsto v atTop u
h'f : ∀ (n : ℕ), AEMeasurable (f (v n))
⊢ AEMeasurable g
[PROOFSTEP]
set p : α → (ℕ → β) → Prop := fun x f' => Tendsto (fun n => f' n) atTop (𝓝 (g x))
[GOAL]
case intro
α : Type u_1
β : Type u_2
inst✝⁵ : MeasurableSpace α
inst✝⁴ : TopologicalSpace β
inst✝³ : PseudoMetrizableSpace β
inst✝² : MeasurableSpace β
inst✝¹ : BorelSpace β
ι : Type u_3
μ : Measure α
f : ι → α → β
g : α → β
u : Filter ι
hu : NeBot u
inst✝ : IsCountablyGenerated u
hf : ∀ (n : ι), AEMeasurable (f n)
h_tendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) u (𝓝 (g x))
v : ℕ → ι
hv : Tendsto v atTop u
h'f : ∀ (n : ℕ), AEMeasurable (f (v n))
p : α → (ℕ → β) → Prop := fun x f' => Tendsto (fun n => f' n) atTop (𝓝 (g x))
⊢ AEMeasurable g
[PROOFSTEP]
have hp : ∀ᵐ x ∂μ, p x fun n => f (v n) x := by filter_upwards [h_tendsto] with x hx using hx.comp hv
[GOAL]
α : Type u_1
β : Type u_2
inst✝⁵ : MeasurableSpace α
inst✝⁴ : TopologicalSpace β
inst✝³ : PseudoMetrizableSpace β
inst✝² : MeasurableSpace β
inst✝¹ : BorelSpace β
ι : Type u_3
μ : Measure α
f : ι → α → β
g : α → β
u : Filter ι
hu : NeBot u
inst✝ : IsCountablyGenerated u
hf : ∀ (n : ι), AEMeasurable (f n)
h_tendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) u (𝓝 (g x))
v : ℕ → ι
hv : Tendsto v atTop u
h'f : ∀ (n : ℕ), AEMeasurable (f (v n))
p : α → (ℕ → β) → Prop := fun x f' => Tendsto (fun n => f' n) atTop (𝓝 (g x))
⊢ ∀ᵐ (x : α) ∂μ, p x fun n => f (v n) x
[PROOFSTEP]
filter_upwards [h_tendsto] with x hx using hx.comp hv
[GOAL]
case intro
α : Type u_1
β : Type u_2
inst✝⁵ : MeasurableSpace α
inst✝⁴ : TopologicalSpace β
inst✝³ : PseudoMetrizableSpace β
inst✝² : MeasurableSpace β
inst✝¹ : BorelSpace β
ι : Type u_3
μ : Measure α
f : ι → α → β
g : α → β
u : Filter ι
hu : NeBot u
inst✝ : IsCountablyGenerated u
hf : ∀ (n : ι), AEMeasurable (f n)
h_tendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) u (𝓝 (g x))
v : ℕ → ι
hv : Tendsto v atTop u
h'f : ∀ (n : ℕ), AEMeasurable (f (v n))
p : α → (ℕ → β) → Prop := fun x f' => Tendsto (fun n => f' n) atTop (𝓝 (g x))
hp : ∀ᵐ (x : α) ∂μ, p x fun n => f (v n) x
⊢ AEMeasurable g
[PROOFSTEP]
set aeSeqLim := fun x => ite (x ∈ aeSeqSet h'f p) (g x) (⟨f (v 0) x⟩ : Nonempty β).some
[GOAL]
case intro
α : Type u_1
β : Type u_2
inst✝⁵ : MeasurableSpace α
inst✝⁴ : TopologicalSpace β
inst✝³ : PseudoMetrizableSpace β
inst✝² : MeasurableSpace β
inst✝¹ : BorelSpace β
ι : Type u_3
μ : Measure α
f : ι → α → β
g : α → β
u : Filter ι
hu : NeBot u
inst✝ : IsCountablyGenerated u
hf : ∀ (n : ι), AEMeasurable (f n)
h_tendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) u (𝓝 (g x))
v : ℕ → ι
hv : Tendsto v atTop u
h'f : ∀ (n : ℕ), AEMeasurable (f (v n))
p : α → (ℕ → β) → Prop := fun x f' => Tendsto (fun n => f' n) atTop (𝓝 (g x))
hp : ∀ᵐ (x : α) ∂μ, p x fun n => f (v n) x
aeSeqLim : α → β := fun x => if x ∈ aeSeqSet h'f p then g x else Nonempty.some (_ : Nonempty β)
⊢ AEMeasurable g
[PROOFSTEP]
refine' ⟨aeSeqLim, measurable_of_tendsto_metrizable' atTop (aeSeq.measurable h'f p) (tendsto_pi_nhds.mpr fun x => _), _⟩
[GOAL]
case intro.refine'_1
α : Type u_1
β : Type u_2
inst✝⁵ : MeasurableSpace α
inst✝⁴ : TopologicalSpace β
inst✝³ : PseudoMetrizableSpace β
inst✝² : MeasurableSpace β
inst✝¹ : BorelSpace β
ι : Type u_3
μ : Measure α
f : ι → α → β
g : α → β
u : Filter ι
hu : NeBot u
inst✝ : IsCountablyGenerated u
hf : ∀ (n : ι), AEMeasurable (f n)
h_tendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) u (𝓝 (g x))
v : ℕ → ι
hv : Tendsto v atTop u
h'f : ∀ (n : ℕ), AEMeasurable (f (v n))
p : α → (ℕ → β) → Prop := fun x f' => Tendsto (fun n => f' n) atTop (𝓝 (g x))
hp : ∀ᵐ (x : α) ∂μ, p x fun n => f (v n) x
aeSeqLim : α → β := fun x => if x ∈ aeSeqSet h'f p then g x else Nonempty.some (_ : Nonempty β)
x : α
⊢ Tendsto (fun i => aeSeq h'f p i x) atTop (𝓝 (aeSeqLim x))
[PROOFSTEP]
simp_rw [aeSeq]
[GOAL]
case intro.refine'_1
α : Type u_1
β : Type u_2
inst✝⁵ : MeasurableSpace α
inst✝⁴ : TopologicalSpace β
inst✝³ : PseudoMetrizableSpace β
inst✝² : MeasurableSpace β
inst✝¹ : BorelSpace β
ι : Type u_3
μ : Measure α
f : ι → α → β
g : α → β
u : Filter ι
hu : NeBot u
inst✝ : IsCountablyGenerated u
hf : ∀ (n : ι), AEMeasurable (f n)
h_tendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) u (𝓝 (g x))
v : ℕ → ι
hv : Tendsto v atTop u
h'f : ∀ (n : ℕ), AEMeasurable (f (v n))
p : α → (ℕ → β) → Prop := fun x f' => Tendsto (fun n => f' n) atTop (𝓝 (g x))
hp : ∀ᵐ (x : α) ∂μ, p x fun n => f (v n) x
aeSeqLim : α → β := fun x => if x ∈ aeSeqSet h'f p then g x else Nonempty.some (_ : Nonempty β)
x : α
⊢ Tendsto
    (fun i =>
      if x ∈ aeSeqSet h'f fun x f' => Tendsto (fun n => f' n) atTop (𝓝 (g x)) then
        AEMeasurable.mk (f (v i)) (_ : AEMeasurable (f (v i))) x
      else Nonempty.some (_ : Nonempty β))
    atTop
    (𝓝
      (if x ∈ aeSeqSet h'f fun x f' => Tendsto (fun n => f' n) atTop (𝓝 (g x)) then g x
      else Nonempty.some (_ : Nonempty β)))
[PROOFSTEP]
split_ifs with hx
[GOAL]
case pos
α : Type u_1
β : Type u_2
inst✝⁵ : MeasurableSpace α
inst✝⁴ : TopologicalSpace β
inst✝³ : PseudoMetrizableSpace β
inst✝² : MeasurableSpace β
inst✝¹ : BorelSpace β
ι : Type u_3
μ : Measure α
f : ι → α → β
g : α → β
u : Filter ι
hu : NeBot u
inst✝ : IsCountablyGenerated u
hf : ∀ (n : ι), AEMeasurable (f n)
h_tendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) u (𝓝 (g x))
v : ℕ → ι
hv : Tendsto v atTop u
h'f : ∀ (n : ℕ), AEMeasurable (f (v n))
p : α → (ℕ → β) → Prop := fun x f' => Tendsto (fun n => f' n) atTop (𝓝 (g x))
hp : ∀ᵐ (x : α) ∂μ, p x fun n => f (v n) x
aeSeqLim : α → β := fun x => if x ∈ aeSeqSet h'f p then g x else Nonempty.some (_ : Nonempty β)
x : α
hx : x ∈ aeSeqSet h'f fun x f' => Tendsto (fun n => f' n) atTop (𝓝 (g x))
⊢ Tendsto (fun i => AEMeasurable.mk (f (v i)) (_ : AEMeasurable (f (v i))) x) atTop (𝓝 (g x))
[PROOFSTEP]
simp_rw [aeSeq.mk_eq_fun_of_mem_aeSeqSet h'f hx]
[GOAL]
case pos
α : Type u_1
β : Type u_2
inst✝⁵ : MeasurableSpace α
inst✝⁴ : TopologicalSpace β
inst✝³ : PseudoMetrizableSpace β
inst✝² : MeasurableSpace β
inst✝¹ : BorelSpace β
ι : Type u_3
μ : Measure α
f : ι → α → β
g : α → β
u : Filter ι
hu : NeBot u
inst✝ : IsCountablyGenerated u
hf : ∀ (n : ι), AEMeasurable (f n)
h_tendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) u (𝓝 (g x))
v : ℕ → ι
hv : Tendsto v atTop u
h'f : ∀ (n : ℕ), AEMeasurable (f (v n))
p : α → (ℕ → β) → Prop := fun x f' => Tendsto (fun n => f' n) atTop (𝓝 (g x))
hp : ∀ᵐ (x : α) ∂μ, p x fun n => f (v n) x
aeSeqLim : α → β := fun x => if x ∈ aeSeqSet h'f p then g x else Nonempty.some (_ : Nonempty β)
x : α
hx : x ∈ aeSeqSet h'f fun x f' => Tendsto (fun n => f' n) atTop (𝓝 (g x))
⊢ Tendsto (fun i => f (v i) x) atTop (𝓝 (g x))
[PROOFSTEP]
exact @aeSeq.fun_prop_of_mem_aeSeqSet _ α β _ _ _ _ _ h'f x hx
[GOAL]
case neg
α : Type u_1
β : Type u_2
inst✝⁵ : MeasurableSpace α
inst✝⁴ : TopologicalSpace β
inst✝³ : PseudoMetrizableSpace β
inst✝² : MeasurableSpace β
inst✝¹ : BorelSpace β
ι : Type u_3
μ : Measure α
f : ι → α → β
g : α → β
u : Filter ι
hu : NeBot u
inst✝ : IsCountablyGenerated u
hf : ∀ (n : ι), AEMeasurable (f n)
h_tendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) u (𝓝 (g x))
v : ℕ → ι
hv : Tendsto v atTop u
h'f : ∀ (n : ℕ), AEMeasurable (f (v n))
p : α → (ℕ → β) → Prop := fun x f' => Tendsto (fun n => f' n) atTop (𝓝 (g x))
hp : ∀ᵐ (x : α) ∂μ, p x fun n => f (v n) x
aeSeqLim : α → β := fun x => if x ∈ aeSeqSet h'f p then g x else Nonempty.some (_ : Nonempty β)
x : α
hx : ¬x ∈ aeSeqSet h'f fun x f' => Tendsto (fun n => f' n) atTop (𝓝 (g x))
⊢ Tendsto (fun i => Nonempty.some (_ : Nonempty β)) atTop (𝓝 (Nonempty.some (_ : Nonempty β)))
[PROOFSTEP]
exact tendsto_const_nhds
[GOAL]
case intro.refine'_2
α : Type u_1
β : Type u_2
inst✝⁵ : MeasurableSpace α
inst✝⁴ : TopologicalSpace β
inst✝³ : PseudoMetrizableSpace β
inst✝² : MeasurableSpace β
inst✝¹ : BorelSpace β
ι : Type u_3
μ : Measure α
f : ι → α → β
g : α → β
u : Filter ι
hu : NeBot u
inst✝ : IsCountablyGenerated u
hf : ∀ (n : ι), AEMeasurable (f n)
h_tendsto : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) u (𝓝 (g x))
v : ℕ → ι
hv : Tendsto v atTop u
h'f : ∀ (n : ℕ), AEMeasurable (f (v n))
p : α → (ℕ → β) → Prop := fun x f' => Tendsto (fun n => f' n) atTop (𝓝 (g x))
hp : ∀ᵐ (x : α) ∂μ, p x fun n => f (v n) x
aeSeqLim : α → β := fun x => if x ∈ aeSeqSet h'f p then g x else Nonempty.some (_ : Nonempty β)
⊢ g =ᵐ[μ] aeSeqLim
[PROOFSTEP]
exact
  (ite_ae_eq_of_measure_compl_zero g (fun x => (⟨f (v 0) x⟩ : Nonempty β).some) (aeSeqSet h'f p)
      (aeSeq.measure_compl_aeSeqSet_eq_zero h'f hp)).symm
[GOAL]
α : Type u_1
β✝ : Type u_2
inst✝⁷ : MeasurableSpace α
inst✝⁶ : TopologicalSpace β✝
inst✝⁵ : PseudoMetrizableSpace β✝
inst✝⁴ : MeasurableSpace β✝
inst✝³ : BorelSpace β✝
β : Type u_3
inst✝² : MeasurableSpace β
inst✝¹ : PseudoMetricSpace β
inst✝ : BorelSpace β
μ : Measure α
g : α → β
hf : ∀ (ε : ℝ), ε > 0 → ∃ f, AEMeasurable f ∧ ∀ᵐ (x : α) ∂μ, dist (f x) (g x) ≤ ε
⊢ AEMeasurable g
[PROOFSTEP]
obtain ⟨u, -, u_pos, u_lim⟩ : ∃ u : ℕ → ℝ, StrictAnti u ∧ (∀ n : ℕ, 0 < u n) ∧ Tendsto u atTop (𝓝 0) :=
  exists_seq_strictAnti_tendsto (0 : ℝ)
[GOAL]
case intro.intro.intro
α : Type u_1
β✝ : Type u_2
inst✝⁷ : MeasurableSpace α
inst✝⁶ : TopologicalSpace β✝
inst✝⁵ : PseudoMetrizableSpace β✝
inst✝⁴ : MeasurableSpace β✝
inst✝³ : BorelSpace β✝
β : Type u_3
inst✝² : MeasurableSpace β
inst✝¹ : PseudoMetricSpace β
inst✝ : BorelSpace β
μ : Measure α
g : α → β
hf : ∀ (ε : ℝ), ε > 0 → ∃ f, AEMeasurable f ∧ ∀ᵐ (x : α) ∂μ, dist (f x) (g x) ≤ ε
u : ℕ → ℝ
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
⊢ AEMeasurable g
[PROOFSTEP]
choose f Hf using fun n : ℕ => hf (u n) (u_pos n)
[GOAL]
case intro.intro.intro
α : Type u_1
β✝ : Type u_2
inst✝⁷ : MeasurableSpace α
inst✝⁶ : TopologicalSpace β✝
inst✝⁵ : PseudoMetrizableSpace β✝
inst✝⁴ : MeasurableSpace β✝
inst✝³ : BorelSpace β✝
β : Type u_3
inst✝² : MeasurableSpace β
inst✝¹ : PseudoMetricSpace β
inst✝ : BorelSpace β
μ : Measure α
g : α → β
hf : ∀ (ε : ℝ), ε > 0 → ∃ f, AEMeasurable f ∧ ∀ᵐ (x : α) ∂μ, dist (f x) (g x) ≤ ε
u : ℕ → ℝ
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
f : ℕ → α → β
Hf : ∀ (n : ℕ), AEMeasurable (f n) ∧ ∀ᵐ (x : α) ∂μ, dist (f n x) (g x) ≤ u n
⊢ AEMeasurable g
[PROOFSTEP]
have : ∀ᵐ x ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x)) :=
  by
  have : ∀ᵐ x ∂μ, ∀ n, dist (f n x) (g x) ≤ u n := ae_all_iff.2 fun n => (Hf n).2
  filter_upwards [this]
  intro x hx
  rw [tendsto_iff_dist_tendsto_zero]
  exact squeeze_zero (fun n => dist_nonneg) hx u_lim
[GOAL]
α : Type u_1
β✝ : Type u_2
inst✝⁷ : MeasurableSpace α
inst✝⁶ : TopologicalSpace β✝
inst✝⁵ : PseudoMetrizableSpace β✝
inst✝⁴ : MeasurableSpace β✝
inst✝³ : BorelSpace β✝
β : Type u_3
inst✝² : MeasurableSpace β
inst✝¹ : PseudoMetricSpace β
inst✝ : BorelSpace β
μ : Measure α
g : α → β
hf : ∀ (ε : ℝ), ε > 0 → ∃ f, AEMeasurable f ∧ ∀ᵐ (x : α) ∂μ, dist (f x) (g x) ≤ ε
u : ℕ → ℝ
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
f : ℕ → α → β
Hf : ∀ (n : ℕ), AEMeasurable (f n) ∧ ∀ᵐ (x : α) ∂μ, dist (f n x) (g x) ≤ u n
⊢ ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))
[PROOFSTEP]
have : ∀ᵐ x ∂μ, ∀ n, dist (f n x) (g x) ≤ u n := ae_all_iff.2 fun n => (Hf n).2
[GOAL]
α : Type u_1
β✝ : Type u_2
inst✝⁷ : MeasurableSpace α
inst✝⁶ : TopologicalSpace β✝
inst✝⁵ : PseudoMetrizableSpace β✝
inst✝⁴ : MeasurableSpace β✝
inst✝³ : BorelSpace β✝
β : Type u_3
inst✝² : MeasurableSpace β
inst✝¹ : PseudoMetricSpace β
inst✝ : BorelSpace β
μ : Measure α
g : α → β
hf : ∀ (ε : ℝ), ε > 0 → ∃ f, AEMeasurable f ∧ ∀ᵐ (x : α) ∂μ, dist (f x) (g x) ≤ ε
u : ℕ → ℝ
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
f : ℕ → α → β
Hf : ∀ (n : ℕ), AEMeasurable (f n) ∧ ∀ᵐ (x : α) ∂μ, dist (f n x) (g x) ≤ u n
this : ∀ᵐ (x : α) ∂μ, ∀ (n : ℕ), dist (f n x) (g x) ≤ u n
⊢ ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))
[PROOFSTEP]
filter_upwards [this]
[GOAL]
case h
α : Type u_1
β✝ : Type u_2
inst✝⁷ : MeasurableSpace α
inst✝⁶ : TopologicalSpace β✝
inst✝⁵ : PseudoMetrizableSpace β✝
inst✝⁴ : MeasurableSpace β✝
inst✝³ : BorelSpace β✝
β : Type u_3
inst✝² : MeasurableSpace β
inst✝¹ : PseudoMetricSpace β
inst✝ : BorelSpace β
μ : Measure α
g : α → β
hf : ∀ (ε : ℝ), ε > 0 → ∃ f, AEMeasurable f ∧ ∀ᵐ (x : α) ∂μ, dist (f x) (g x) ≤ ε
u : ℕ → ℝ
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
f : ℕ → α → β
Hf : ∀ (n : ℕ), AEMeasurable (f n) ∧ ∀ᵐ (x : α) ∂μ, dist (f n x) (g x) ≤ u n
this : ∀ᵐ (x : α) ∂μ, ∀ (n : ℕ), dist (f n x) (g x) ≤ u n
⊢ ∀ (a : α), (∀ (n : ℕ), dist (f n a) (g a) ≤ u n) → Tendsto (fun n => f n a) atTop (𝓝 (g a))
[PROOFSTEP]
intro x hx
[GOAL]
case h
α : Type u_1
β✝ : Type u_2
inst✝⁷ : MeasurableSpace α
inst✝⁶ : TopologicalSpace β✝
inst✝⁵ : PseudoMetrizableSpace β✝
inst✝⁴ : MeasurableSpace β✝
inst✝³ : BorelSpace β✝
β : Type u_3
inst✝² : MeasurableSpace β
inst✝¹ : PseudoMetricSpace β
inst✝ : BorelSpace β
μ : Measure α
g : α → β
hf : ∀ (ε : ℝ), ε > 0 → ∃ f, AEMeasurable f ∧ ∀ᵐ (x : α) ∂μ, dist (f x) (g x) ≤ ε
u : ℕ → ℝ
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
f : ℕ → α → β
Hf : ∀ (n : ℕ), AEMeasurable (f n) ∧ ∀ᵐ (x : α) ∂μ, dist (f n x) (g x) ≤ u n
this : ∀ᵐ (x : α) ∂μ, ∀ (n : ℕ), dist (f n x) (g x) ≤ u n
x : α
hx : ∀ (n : ℕ), dist (f n x) (g x) ≤ u n
⊢ Tendsto (fun n => f n x) atTop (𝓝 (g x))
[PROOFSTEP]
rw [tendsto_iff_dist_tendsto_zero]
[GOAL]
case h
α : Type u_1
β✝ : Type u_2
inst✝⁷ : MeasurableSpace α
inst✝⁶ : TopologicalSpace β✝
inst✝⁵ : PseudoMetrizableSpace β✝
inst✝⁴ : MeasurableSpace β✝
inst✝³ : BorelSpace β✝
β : Type u_3
inst✝² : MeasurableSpace β
inst✝¹ : PseudoMetricSpace β
inst✝ : BorelSpace β
μ : Measure α
g : α → β
hf : ∀ (ε : ℝ), ε > 0 → ∃ f, AEMeasurable f ∧ ∀ᵐ (x : α) ∂μ, dist (f x) (g x) ≤ ε
u : ℕ → ℝ
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
f : ℕ → α → β
Hf : ∀ (n : ℕ), AEMeasurable (f n) ∧ ∀ᵐ (x : α) ∂μ, dist (f n x) (g x) ≤ u n
this : ∀ᵐ (x : α) ∂μ, ∀ (n : ℕ), dist (f n x) (g x) ≤ u n
x : α
hx : ∀ (n : ℕ), dist (f n x) (g x) ≤ u n
⊢ Tendsto (fun b => dist (f b x) (g x)) atTop (𝓝 0)
[PROOFSTEP]
exact squeeze_zero (fun n => dist_nonneg) hx u_lim
[GOAL]
case intro.intro.intro
α : Type u_1
β✝ : Type u_2
inst✝⁷ : MeasurableSpace α
inst✝⁶ : TopologicalSpace β✝
inst✝⁵ : PseudoMetrizableSpace β✝
inst✝⁴ : MeasurableSpace β✝
inst✝³ : BorelSpace β✝
β : Type u_3
inst✝² : MeasurableSpace β
inst✝¹ : PseudoMetricSpace β
inst✝ : BorelSpace β
μ : Measure α
g : α → β
hf : ∀ (ε : ℝ), ε > 0 → ∃ f, AEMeasurable f ∧ ∀ᵐ (x : α) ∂μ, dist (f x) (g x) ≤ ε
u : ℕ → ℝ
u_pos : ∀ (n : ℕ), 0 < u n
u_lim : Tendsto u atTop (𝓝 0)
f : ℕ → α → β
Hf : ∀ (n : ℕ), AEMeasurable (f n) ∧ ∀ᵐ (x : α) ∂μ, dist (f n x) (g x) ≤ u n
this : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))
⊢ AEMeasurable g
[PROOFSTEP]
exact aemeasurable_of_tendsto_metrizable_ae' (fun n => (Hf n).1) this
[GOAL]
α : Type u_1
β : Type u_2
inst✝⁷ : MeasurableSpace α
inst✝⁶ : TopologicalSpace β
inst✝⁵ : PseudoMetrizableSpace β
inst✝⁴ : MeasurableSpace β
inst✝³ : BorelSpace β
ι : Type u_3
inst✝² : Countable ι
inst✝¹ : Nonempty ι
μ : Measure α
f : ι → α → β
L : Filter ι
inst✝ : IsCountablyGenerated L
hf : ∀ (n : ι), AEMeasurable (f n)
h_ae_tendsto : ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => f n x) L (𝓝 l)
⊢ ∃ f_lim hf_lim_meas, ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) L (𝓝 (f_lim x))
[PROOFSTEP]
inhabit ι
[GOAL]
α : Type u_1
β : Type u_2
inst✝⁷ : MeasurableSpace α
inst✝⁶ : TopologicalSpace β
inst✝⁵ : PseudoMetrizableSpace β
inst✝⁴ : MeasurableSpace β
inst✝³ : BorelSpace β
ι : Type u_3
inst✝² : Countable ι
inst✝¹ : Nonempty ι
μ : Measure α
f : ι → α → β
L : Filter ι
inst✝ : IsCountablyGenerated L
hf : ∀ (n : ι), AEMeasurable (f n)
h_ae_tendsto : ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => f n x) L (𝓝 l)
inhabited_h : Inhabited ι
⊢ ∃ f_lim hf_lim_meas, ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) L (𝓝 (f_lim x))
[PROOFSTEP]
rcases eq_or_neBot L with (rfl | hL)
[GOAL]
case inl
α : Type u_1
β : Type u_2
inst✝⁷ : MeasurableSpace α
inst✝⁶ : TopologicalSpace β
inst✝⁵ : PseudoMetrizableSpace β
inst✝⁴ : MeasurableSpace β
inst✝³ : BorelSpace β
ι : Type u_3
inst✝² : Countable ι
inst✝¹ : Nonempty ι
μ : Measure α
f : ι → α → β
hf : ∀ (n : ι), AEMeasurable (f n)
inhabited_h : Inhabited ι
inst✝ : IsCountablyGenerated ⊥
h_ae_tendsto : ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => f n x) ⊥ (𝓝 l)
⊢ ∃ f_lim hf_lim_meas, ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) ⊥ (𝓝 (f_lim x))
[PROOFSTEP]
exact ⟨(hf default).mk _, (hf default).measurable_mk, eventually_of_forall fun x => tendsto_bot⟩
[GOAL]
case inr
α : Type u_1
β : Type u_2
inst✝⁷ : MeasurableSpace α
inst✝⁶ : TopologicalSpace β
inst✝⁵ : PseudoMetrizableSpace β
inst✝⁴ : MeasurableSpace β
inst✝³ : BorelSpace β
ι : Type u_3
inst✝² : Countable ι
inst✝¹ : Nonempty ι
μ : Measure α
f : ι → α → β
L : Filter ι
inst✝ : IsCountablyGenerated L
hf : ∀ (n : ι), AEMeasurable (f n)
h_ae_tendsto : ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => f n x) L (𝓝 l)
inhabited_h : Inhabited ι
hL : NeBot L
⊢ ∃ f_lim hf_lim_meas, ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) L (𝓝 (f_lim x))
[PROOFSTEP]
let p : α → (ι → β) → Prop := fun x f' => ∃ l : β, Tendsto (fun n => f' n) L (𝓝 l)
[GOAL]
case inr
α : Type u_1
β : Type u_2
inst✝⁷ : MeasurableSpace α
inst✝⁶ : TopologicalSpace β
inst✝⁵ : PseudoMetrizableSpace β
inst✝⁴ : MeasurableSpace β
inst✝³ : BorelSpace β
ι : Type u_3
inst✝² : Countable ι
inst✝¹ : Nonempty ι
μ : Measure α
f : ι → α → β
L : Filter ι
inst✝ : IsCountablyGenerated L
hf : ∀ (n : ι), AEMeasurable (f n)
h_ae_tendsto : ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => f n x) L (𝓝 l)
inhabited_h : Inhabited ι
hL : NeBot L
p : α → (ι → β) → Prop := fun x f' => ∃ l, Tendsto (fun n => f' n) L (𝓝 l)
⊢ ∃ f_lim hf_lim_meas, ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) L (𝓝 (f_lim x))
[PROOFSTEP]
have hp_mem : ∀ x ∈ aeSeqSet hf p, p x fun n => f n x := fun x hx => aeSeq.fun_prop_of_mem_aeSeqSet hf hx
[GOAL]
case inr
α : Type u_1
β : Type u_2
inst✝⁷ : MeasurableSpace α
inst✝⁶ : TopologicalSpace β
inst✝⁵ : PseudoMetrizableSpace β
inst✝⁴ : MeasurableSpace β
inst✝³ : BorelSpace β
ι : Type u_3
inst✝² : Countable ι
inst✝¹ : Nonempty ι
μ : Measure α
f : ι → α → β
L : Filter ι
inst✝ : IsCountablyGenerated L
hf : ∀ (n : ι), AEMeasurable (f n)
h_ae_tendsto : ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => f n x) L (𝓝 l)
inhabited_h : Inhabited ι
hL : NeBot L
p : α → (ι → β) → Prop := fun x f' => ∃ l, Tendsto (fun n => f' n) L (𝓝 l)
hp_mem : ∀ (x : α), x ∈ aeSeqSet hf p → p x fun n => f n x
⊢ ∃ f_lim hf_lim_meas, ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) L (𝓝 (f_lim x))
[PROOFSTEP]
have h_ae_eq : ∀ᵐ x ∂μ, ∀ n, aeSeq hf p n x = f n x := aeSeq.aeSeq_eq_fun_ae hf h_ae_tendsto
[GOAL]
case inr
α : Type u_1
β : Type u_2
inst✝⁷ : MeasurableSpace α
inst✝⁶ : TopologicalSpace β
inst✝⁵ : PseudoMetrizableSpace β
inst✝⁴ : MeasurableSpace β
inst✝³ : BorelSpace β
ι : Type u_3
inst✝² : Countable ι
inst✝¹ : Nonempty ι
μ : Measure α
f : ι → α → β
L : Filter ι
inst✝ : IsCountablyGenerated L
hf : ∀ (n : ι), AEMeasurable (f n)
h_ae_tendsto : ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => f n x) L (𝓝 l)
inhabited_h : Inhabited ι
hL : NeBot L
p : α → (ι → β) → Prop := fun x f' => ∃ l, Tendsto (fun n => f' n) L (𝓝 l)
hp_mem : ∀ (x : α), x ∈ aeSeqSet hf p → p x fun n => f n x
h_ae_eq : ∀ᵐ (x : α) ∂μ, ∀ (n : ι), aeSeq hf p n x = f n x
⊢ ∃ f_lim hf_lim_meas, ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) L (𝓝 (f_lim x))
[PROOFSTEP]
set f_lim : α → β := fun x =>
  dite (x ∈ aeSeqSet hf p) (fun h => (hp_mem x h).choose) fun _ => (⟨f default x⟩ : Nonempty β).some
[GOAL]
case inr
α : Type u_1
β : Type u_2
inst✝⁷ : MeasurableSpace α
inst✝⁶ : TopologicalSpace β
inst✝⁵ : PseudoMetrizableSpace β
inst✝⁴ : MeasurableSpace β
inst✝³ : BorelSpace β
ι : Type u_3
inst✝² : Countable ι
inst✝¹ : Nonempty ι
μ : Measure α
f : ι → α → β
L : Filter ι
inst✝ : IsCountablyGenerated L
hf : ∀ (n : ι), AEMeasurable (f n)
h_ae_tendsto : ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => f n x) L (𝓝 l)
inhabited_h : Inhabited ι
hL : NeBot L
p : α → (ι → β) → Prop := fun x f' => ∃ l, Tendsto (fun n => f' n) L (𝓝 l)
hp_mem : ∀ (x : α), x ∈ aeSeqSet hf p → p x fun n => f n x
h_ae_eq : ∀ᵐ (x : α) ∂μ, ∀ (n : ι), aeSeq hf p n x = f n x
f_lim : α → β :=
  fun x => if h : x ∈ aeSeqSet hf p then Exists.choose (_ : p x fun n => f n x) else Nonempty.some (_ : Nonempty β)
⊢ ∃ f_lim hf_lim_meas, ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) L (𝓝 (f_lim x))
[PROOFSTEP]
have hf_lim : ∀ x, Tendsto (fun n => aeSeq hf p n x) L (𝓝 (f_lim x)) :=
  by
  intro x
  simp only [aeSeq]
  split_ifs with h
  · refine' (hp_mem x h).choose_spec.congr fun n => _
    exact (aeSeq.mk_eq_fun_of_mem_aeSeqSet hf h n).symm
  · exact tendsto_const_nhds
[GOAL]
α : Type u_1
β : Type u_2
inst✝⁷ : MeasurableSpace α
inst✝⁶ : TopologicalSpace β
inst✝⁵ : PseudoMetrizableSpace β
inst✝⁴ : MeasurableSpace β
inst✝³ : BorelSpace β
ι : Type u_3
inst✝² : Countable ι
inst✝¹ : Nonempty ι
μ : Measure α
f : ι → α → β
L : Filter ι
inst✝ : IsCountablyGenerated L
hf : ∀ (n : ι), AEMeasurable (f n)
h_ae_tendsto : ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => f n x) L (𝓝 l)
inhabited_h : Inhabited ι
hL : NeBot L
p : α → (ι → β) → Prop := fun x f' => ∃ l, Tendsto (fun n => f' n) L (𝓝 l)
hp_mem : ∀ (x : α), x ∈ aeSeqSet hf p → p x fun n => f n x
h_ae_eq : ∀ᵐ (x : α) ∂μ, ∀ (n : ι), aeSeq hf p n x = f n x
f_lim : α → β :=
  fun x => if h : x ∈ aeSeqSet hf p then Exists.choose (_ : p x fun n => f n x) else Nonempty.some (_ : Nonempty β)
⊢ ∀ (x : α), Tendsto (fun n => aeSeq hf p n x) L (𝓝 (f_lim x))
[PROOFSTEP]
intro x
[GOAL]
α : Type u_1
β : Type u_2
inst✝⁷ : MeasurableSpace α
inst✝⁶ : TopologicalSpace β
inst✝⁵ : PseudoMetrizableSpace β
inst✝⁴ : MeasurableSpace β
inst✝³ : BorelSpace β
ι : Type u_3
inst✝² : Countable ι
inst✝¹ : Nonempty ι
μ : Measure α
f : ι → α → β
L : Filter ι
inst✝ : IsCountablyGenerated L
hf : ∀ (n : ι), AEMeasurable (f n)
h_ae_tendsto : ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => f n x) L (𝓝 l)
inhabited_h : Inhabited ι
hL : NeBot L
p : α → (ι → β) → Prop := fun x f' => ∃ l, Tendsto (fun n => f' n) L (𝓝 l)
hp_mem : ∀ (x : α), x ∈ aeSeqSet hf p → p x fun n => f n x
h_ae_eq : ∀ᵐ (x : α) ∂μ, ∀ (n : ι), aeSeq hf p n x = f n x
f_lim : α → β :=
  fun x => if h : x ∈ aeSeqSet hf p then Exists.choose (_ : p x fun n => f n x) else Nonempty.some (_ : Nonempty β)
x : α
⊢ Tendsto (fun n => aeSeq hf p n x) L (𝓝 (f_lim x))
[PROOFSTEP]
simp only [aeSeq]
[GOAL]
α : Type u_1
β : Type u_2
inst✝⁷ : MeasurableSpace α
inst✝⁶ : TopologicalSpace β
inst✝⁵ : PseudoMetrizableSpace β
inst✝⁴ : MeasurableSpace β
inst✝³ : BorelSpace β
ι : Type u_3
inst✝² : Countable ι
inst✝¹ : Nonempty ι
μ : Measure α
f : ι → α → β
L : Filter ι
inst✝ : IsCountablyGenerated L
hf : ∀ (n : ι), AEMeasurable (f n)
h_ae_tendsto : ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => f n x) L (𝓝 l)
inhabited_h : Inhabited ι
hL : NeBot L
p : α → (ι → β) → Prop := fun x f' => ∃ l, Tendsto (fun n => f' n) L (𝓝 l)
hp_mem : ∀ (x : α), x ∈ aeSeqSet hf p → p x fun n => f n x
h_ae_eq : ∀ᵐ (x : α) ∂μ, ∀ (n : ι), aeSeq hf p n x = f n x
f_lim : α → β :=
  fun x => if h : x ∈ aeSeqSet hf p then Exists.choose (_ : p x fun n => f n x) else Nonempty.some (_ : Nonempty β)
x : α
⊢ Tendsto
    (fun n =>
      if x ∈ aeSeqSet hf fun x f' => ∃ l, Tendsto (fun n => f' n) L (𝓝 l) then
        AEMeasurable.mk (f n) (_ : AEMeasurable (f n)) x
      else Nonempty.some (_ : Nonempty β))
    L
    (𝓝
      (if h : x ∈ aeSeqSet hf fun x f' => ∃ l, Tendsto (fun n => f' n) L (𝓝 l) then
        Exists.choose (_ : p x fun n => f n x)
      else Nonempty.some (_ : Nonempty β)))
[PROOFSTEP]
split_ifs with h
[GOAL]
case pos
α : Type u_1
β : Type u_2
inst✝⁷ : MeasurableSpace α
inst✝⁶ : TopologicalSpace β
inst✝⁵ : PseudoMetrizableSpace β
inst✝⁴ : MeasurableSpace β
inst✝³ : BorelSpace β
ι : Type u_3
inst✝² : Countable ι
inst✝¹ : Nonempty ι
μ : Measure α
f : ι → α → β
L : Filter ι
inst✝ : IsCountablyGenerated L
hf : ∀ (n : ι), AEMeasurable (f n)
h_ae_tendsto : ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => f n x) L (𝓝 l)
inhabited_h : Inhabited ι
hL : NeBot L
p : α → (ι → β) → Prop := fun x f' => ∃ l, Tendsto (fun n => f' n) L (𝓝 l)
hp_mem : ∀ (x : α), x ∈ aeSeqSet hf p → p x fun n => f n x
h_ae_eq : ∀ᵐ (x : α) ∂μ, ∀ (n : ι), aeSeq hf p n x = f n x
f_lim : α → β :=
  fun x => if h : x ∈ aeSeqSet hf p then Exists.choose (_ : p x fun n => f n x) else Nonempty.some (_ : Nonempty β)
x : α
h : x ∈ aeSeqSet hf fun x f' => ∃ l, Tendsto (fun n => f' n) L (𝓝 l)
⊢ Tendsto (fun n => AEMeasurable.mk (f n) (_ : AEMeasurable (f n)) x) L (𝓝 (Exists.choose (_ : p x fun n => f n x)))
[PROOFSTEP]
refine' (hp_mem x h).choose_spec.congr fun n => _
[GOAL]
case pos
α : Type u_1
β : Type u_2
inst✝⁷ : MeasurableSpace α
inst✝⁶ : TopologicalSpace β
inst✝⁵ : PseudoMetrizableSpace β
inst✝⁴ : MeasurableSpace β
inst✝³ : BorelSpace β
ι : Type u_3
inst✝² : Countable ι
inst✝¹ : Nonempty ι
μ : Measure α
f : ι → α → β
L : Filter ι
inst✝ : IsCountablyGenerated L
hf : ∀ (n : ι), AEMeasurable (f n)
h_ae_tendsto : ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => f n x) L (𝓝 l)
inhabited_h : Inhabited ι
hL : NeBot L
p : α → (ι → β) → Prop := fun x f' => ∃ l, Tendsto (fun n => f' n) L (𝓝 l)
hp_mem : ∀ (x : α), x ∈ aeSeqSet hf p → p x fun n => f n x
h_ae_eq : ∀ᵐ (x : α) ∂μ, ∀ (n : ι), aeSeq hf p n x = f n x
f_lim : α → β :=
  fun x => if h : x ∈ aeSeqSet hf p then Exists.choose (_ : p x fun n => f n x) else Nonempty.some (_ : Nonempty β)
x : α
h : x ∈ aeSeqSet hf fun x f' => ∃ l, Tendsto (fun n => f' n) L (𝓝 l)
n : ι
⊢ (fun n => f n x) n = AEMeasurable.mk (f n) (_ : AEMeasurable (f n)) x
[PROOFSTEP]
exact (aeSeq.mk_eq_fun_of_mem_aeSeqSet hf h n).symm
[GOAL]
case neg
α : Type u_1
β : Type u_2
inst✝⁷ : MeasurableSpace α
inst✝⁶ : TopologicalSpace β
inst✝⁵ : PseudoMetrizableSpace β
inst✝⁴ : MeasurableSpace β
inst✝³ : BorelSpace β
ι : Type u_3
inst✝² : Countable ι
inst✝¹ : Nonempty ι
μ : Measure α
f : ι → α → β
L : Filter ι
inst✝ : IsCountablyGenerated L
hf : ∀ (n : ι), AEMeasurable (f n)
h_ae_tendsto : ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => f n x) L (𝓝 l)
inhabited_h : Inhabited ι
hL : NeBot L
p : α → (ι → β) → Prop := fun x f' => ∃ l, Tendsto (fun n => f' n) L (𝓝 l)
hp_mem : ∀ (x : α), x ∈ aeSeqSet hf p → p x fun n => f n x
h_ae_eq : ∀ᵐ (x : α) ∂μ, ∀ (n : ι), aeSeq hf p n x = f n x
f_lim : α → β :=
  fun x => if h : x ∈ aeSeqSet hf p then Exists.choose (_ : p x fun n => f n x) else Nonempty.some (_ : Nonempty β)
x : α
h : ¬x ∈ aeSeqSet hf fun x f' => ∃ l, Tendsto (fun n => f' n) L (𝓝 l)
⊢ Tendsto (fun n => Nonempty.some (_ : Nonempty β)) L (𝓝 (Nonempty.some (_ : Nonempty β)))
[PROOFSTEP]
exact tendsto_const_nhds
[GOAL]
case inr
α : Type u_1
β : Type u_2
inst✝⁷ : MeasurableSpace α
inst✝⁶ : TopologicalSpace β
inst✝⁵ : PseudoMetrizableSpace β
inst✝⁴ : MeasurableSpace β
inst✝³ : BorelSpace β
ι : Type u_3
inst✝² : Countable ι
inst✝¹ : Nonempty ι
μ : Measure α
f : ι → α → β
L : Filter ι
inst✝ : IsCountablyGenerated L
hf : ∀ (n : ι), AEMeasurable (f n)
h_ae_tendsto : ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => f n x) L (𝓝 l)
inhabited_h : Inhabited ι
hL : NeBot L
p : α → (ι → β) → Prop := fun x f' => ∃ l, Tendsto (fun n => f' n) L (𝓝 l)
hp_mem : ∀ (x : α), x ∈ aeSeqSet hf p → p x fun n => f n x
h_ae_eq : ∀ᵐ (x : α) ∂μ, ∀ (n : ι), aeSeq hf p n x = f n x
f_lim : α → β :=
  fun x => if h : x ∈ aeSeqSet hf p then Exists.choose (_ : p x fun n => f n x) else Nonempty.some (_ : Nonempty β)
hf_lim : ∀ (x : α), Tendsto (fun n => aeSeq hf p n x) L (𝓝 (f_lim x))
⊢ ∃ f_lim hf_lim_meas, ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) L (𝓝 (f_lim x))
[PROOFSTEP]
have h_ae_tendsto_f_lim : ∀ᵐ x ∂μ, Tendsto (fun n => f n x) L (𝓝 (f_lim x)) :=
  h_ae_eq.mono fun x hx => (hf_lim x).congr hx
[GOAL]
case inr
α : Type u_1
β : Type u_2
inst✝⁷ : MeasurableSpace α
inst✝⁶ : TopologicalSpace β
inst✝⁵ : PseudoMetrizableSpace β
inst✝⁴ : MeasurableSpace β
inst✝³ : BorelSpace β
ι : Type u_3
inst✝² : Countable ι
inst✝¹ : Nonempty ι
μ : Measure α
f : ι → α → β
L : Filter ι
inst✝ : IsCountablyGenerated L
hf : ∀ (n : ι), AEMeasurable (f n)
h_ae_tendsto : ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => f n x) L (𝓝 l)
inhabited_h : Inhabited ι
hL : NeBot L
p : α → (ι → β) → Prop := fun x f' => ∃ l, Tendsto (fun n => f' n) L (𝓝 l)
hp_mem : ∀ (x : α), x ∈ aeSeqSet hf p → p x fun n => f n x
h_ae_eq : ∀ᵐ (x : α) ∂μ, ∀ (n : ι), aeSeq hf p n x = f n x
f_lim : α → β :=
  fun x => if h : x ∈ aeSeqSet hf p then Exists.choose (_ : p x fun n => f n x) else Nonempty.some (_ : Nonempty β)
hf_lim : ∀ (x : α), Tendsto (fun n => aeSeq hf p n x) L (𝓝 (f_lim x))
h_ae_tendsto_f_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) L (𝓝 (f_lim x))
⊢ ∃ f_lim hf_lim_meas, ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) L (𝓝 (f_lim x))
[PROOFSTEP]
have h_f_lim_meas : Measurable f_lim :=
  measurable_of_tendsto_metrizable' L (aeSeq.measurable hf p) (tendsto_pi_nhds.mpr fun x => hf_lim x)
[GOAL]
case inr
α : Type u_1
β : Type u_2
inst✝⁷ : MeasurableSpace α
inst✝⁶ : TopologicalSpace β
inst✝⁵ : PseudoMetrizableSpace β
inst✝⁴ : MeasurableSpace β
inst✝³ : BorelSpace β
ι : Type u_3
inst✝² : Countable ι
inst✝¹ : Nonempty ι
μ : Measure α
f : ι → α → β
L : Filter ι
inst✝ : IsCountablyGenerated L
hf : ∀ (n : ι), AEMeasurable (f n)
h_ae_tendsto : ∀ᵐ (x : α) ∂μ, ∃ l, Tendsto (fun n => f n x) L (𝓝 l)
inhabited_h : Inhabited ι
hL : NeBot L
p : α → (ι → β) → Prop := fun x f' => ∃ l, Tendsto (fun n => f' n) L (𝓝 l)
hp_mem : ∀ (x : α), x ∈ aeSeqSet hf p → p x fun n => f n x
h_ae_eq : ∀ᵐ (x : α) ∂μ, ∀ (n : ι), aeSeq hf p n x = f n x
f_lim : α → β :=
  fun x => if h : x ∈ aeSeqSet hf p then Exists.choose (_ : p x fun n => f n x) else Nonempty.some (_ : Nonempty β)
hf_lim : ∀ (x : α), Tendsto (fun n => aeSeq hf p n x) L (𝓝 (f_lim x))
h_ae_tendsto_f_lim : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) L (𝓝 (f_lim x))
h_f_lim_meas : Measurable f_lim
⊢ ∃ f_lim hf_lim_meas, ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) L (𝓝 (f_lim x))
[PROOFSTEP]
exact ⟨f_lim, h_f_lim_meas, h_ae_tendsto_f_lim⟩


[GOAL]
R : Type u
S : Type v
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝ : CommRing R
p✝ q p : MvPolynomial σ R
⊢ degrees (-p) = degrees p
[PROOFSTEP]
rw [degrees, support_neg]
[GOAL]
R : Type u
S : Type v
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝ : CommRing R
p✝ q p : MvPolynomial σ R
⊢ (Finset.sup (support p) fun s => ↑toMultiset s) = degrees p
[PROOFSTEP]
rfl
[GOAL]
R : Type u
S : Type v
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝¹ : CommRing R
p✝ q✝ : MvPolynomial σ R
inst✝ : DecidableEq σ
p q : MvPolynomial σ R
⊢ degrees (p - q) ≤ degrees p ⊔ degrees q
[PROOFSTEP]
simpa only [sub_eq_add_neg] using le_trans (degrees_add p (-q)) (by rw [degrees_neg])
[GOAL]
R : Type u
S : Type v
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝¹ : CommRing R
p✝ q✝ : MvPolynomial σ R
inst✝ : DecidableEq σ
p q : MvPolynomial σ R
⊢ degrees p ⊔ degrees (-q) ≤ degrees p ⊔ degrees q
[PROOFSTEP]
rw [degrees_neg]
[GOAL]
R : Type u
S : Type v
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝ : CommRing R
p q : MvPolynomial σ R
⊢ vars (-p) = vars p
[PROOFSTEP]
simp [vars, degrees_neg]
[GOAL]
R : Type u
S : Type v
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝¹ : CommRing R
p q : MvPolynomial σ R
inst✝ : DecidableEq σ
⊢ vars (p - q) ⊆ vars p ∪ vars q
[PROOFSTEP]
convert vars_add_subset p (-q) using 2
[GOAL]
case h.e'_3.h.e'_4
R : Type u
S : Type v
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝¹ : CommRing R
p q : MvPolynomial σ R
inst✝ : DecidableEq σ
⊢ p - q = p + -q
[PROOFSTEP]
simp [sub_eq_add_neg]
[GOAL]
case h.e'_4.h.e'_4
R : Type u
S : Type v
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝¹ : CommRing R
p q : MvPolynomial σ R
inst✝ : DecidableEq σ
⊢ vars q = vars (-q)
[PROOFSTEP]
simp [sub_eq_add_neg]
[GOAL]
R : Type u
S : Type v
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝¹ : CommRing R
p q : MvPolynomial σ R
inst✝ : DecidableEq σ
hpq : Disjoint (vars p) (vars q)
⊢ vars (p - q) = vars p ∪ vars q
[PROOFSTEP]
rw [← vars_neg q] at hpq
[GOAL]
R : Type u
S : Type v
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝¹ : CommRing R
p q : MvPolynomial σ R
inst✝ : DecidableEq σ
hpq : Disjoint (vars p) (vars (-q))
⊢ vars (p - q) = vars p ∪ vars q
[PROOFSTEP]
convert vars_add_of_disjoint hpq using 2
[GOAL]
case h.e'_2.h.e'_4
R : Type u
S : Type v
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝¹ : CommRing R
p q : MvPolynomial σ R
inst✝ : DecidableEq σ
hpq : Disjoint (vars p) (vars (-q))
⊢ p - q = p + -q
[PROOFSTEP]
simp [sub_eq_add_neg]
[GOAL]
case h.e'_3.h.e'_4
R : Type u
S : Type v
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝¹ : CommRing R
p q : MvPolynomial σ R
inst✝ : DecidableEq σ
hpq : Disjoint (vars p) (vars (-q))
⊢ vars q = vars (-q)
[PROOFSTEP]
simp [sub_eq_add_neg]
[GOAL]
R✝ : Type u
S : Type v
σ : Type u_1
a a' a₁ a₂ : R✝
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝¹ : CommRing R✝
p q : MvPolynomial σ R✝
inst✝ : CommRing S
f✝ : R✝ →+* S
g : σ → S
R : Type u
c : ℤ →+* S
f : MvPolynomial R ℤ →+* S
x : MvPolynomial R ℤ
⊢ eval₂ c (↑f ∘ X) x = ↑f x
[PROOFSTEP]
apply
  MvPolynomial.induction_on x
    (fun n => by
      rw [hom_C f, eval₂_C]
      exact eq_intCast c n)
    (fun p q hp hq => by
      rw [eval₂_add, hp, hq]
      exact (f.map_add _ _).symm)
    (fun p n hp => by
      rw [eval₂_mul, eval₂_X, hp]
      exact (f.map_mul _ _).symm)
[GOAL]
R✝ : Type u
S : Type v
σ : Type u_1
a a' a₁ a₂ : R✝
e : ℕ
n✝ m : σ
s : σ →₀ ℕ
inst✝¹ : CommRing R✝
p q : MvPolynomial σ R✝
inst✝ : CommRing S
f✝ : R✝ →+* S
g : σ → S
R : Type u
c : ℤ →+* S
f : MvPolynomial R ℤ →+* S
x : MvPolynomial R ℤ
n : ℤ
⊢ eval₂ c (↑f ∘ X) (↑C n) = ↑f (↑C n)
[PROOFSTEP]
rw [hom_C f, eval₂_C]
[GOAL]
R✝ : Type u
S : Type v
σ : Type u_1
a a' a₁ a₂ : R✝
e : ℕ
n✝ m : σ
s : σ →₀ ℕ
inst✝¹ : CommRing R✝
p q : MvPolynomial σ R✝
inst✝ : CommRing S
f✝ : R✝ →+* S
g : σ → S
R : Type u
c : ℤ →+* S
f : MvPolynomial R ℤ →+* S
x : MvPolynomial R ℤ
n : ℤ
⊢ ↑c n = ↑n
[PROOFSTEP]
exact eq_intCast c n
[GOAL]
R✝ : Type u
S : Type v
σ : Type u_1
a a' a₁ a₂ : R✝
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝¹ : CommRing R✝
p✝ q✝ : MvPolynomial σ R✝
inst✝ : CommRing S
f✝ : R✝ →+* S
g : σ → S
R : Type u
c : ℤ →+* S
f : MvPolynomial R ℤ →+* S
x p q : MvPolynomial R ℤ
hp : eval₂ c (↑f ∘ X) p = ↑f p
hq : eval₂ c (↑f ∘ X) q = ↑f q
⊢ eval₂ c (↑f ∘ X) (p + q) = ↑f (p + q)
[PROOFSTEP]
rw [eval₂_add, hp, hq]
[GOAL]
R✝ : Type u
S : Type v
σ : Type u_1
a a' a₁ a₂ : R✝
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝¹ : CommRing R✝
p✝ q✝ : MvPolynomial σ R✝
inst✝ : CommRing S
f✝ : R✝ →+* S
g : σ → S
R : Type u
c : ℤ →+* S
f : MvPolynomial R ℤ →+* S
x p q : MvPolynomial R ℤ
hp : eval₂ c (↑f ∘ X) p = ↑f p
hq : eval₂ c (↑f ∘ X) q = ↑f q
⊢ ↑f p + ↑f q = ↑f (p + q)
[PROOFSTEP]
exact (f.map_add _ _).symm
[GOAL]
R✝ : Type u
S : Type v
σ : Type u_1
a a' a₁ a₂ : R✝
e : ℕ
n✝ m : σ
s : σ →₀ ℕ
inst✝¹ : CommRing R✝
p✝ q : MvPolynomial σ R✝
inst✝ : CommRing S
f✝ : R✝ →+* S
g : σ → S
R : Type u
c : ℤ →+* S
f : MvPolynomial R ℤ →+* S
x p : MvPolynomial R ℤ
n : R
hp : eval₂ c (↑f ∘ X) p = ↑f p
⊢ eval₂ c (↑f ∘ X) (p * X n) = ↑f (p * X n)
[PROOFSTEP]
rw [eval₂_mul, eval₂_X, hp]
[GOAL]
R✝ : Type u
S : Type v
σ : Type u_1
a a' a₁ a₂ : R✝
e : ℕ
n✝ m : σ
s : σ →₀ ℕ
inst✝¹ : CommRing R✝
p✝ q : MvPolynomial σ R✝
inst✝ : CommRing S
f✝ : R✝ →+* S
g : σ → S
R : Type u
c : ℤ →+* S
f : MvPolynomial R ℤ →+* S
x p : MvPolynomial R ℤ
n : R
hp : eval₂ c (↑f ∘ X) p = ↑f p
⊢ ↑f p * (↑f ∘ X) n = ↑f (p * X n)
[PROOFSTEP]
exact (f.map_mul _ _).symm
[GOAL]
R : Type u
S : Type v
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝¹ : CommRing R
p q : MvPolynomial σ R
inst✝ : CommRing S
f✝ : R →+* S
g f : σ → S
x : σ
⊢ (fun f => ↑f ∘ X) ((fun f => eval₂Hom (Int.castRingHom S) f) f) x = f x
[PROOFSTEP]
simp only [coe_eval₂Hom, Function.comp_apply, eval₂_X]
[GOAL]
R : Type u
S : Type v
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝ : CommRing R
p q : MvPolynomial σ R
x : σ
f g : MvPolynomial σ R
k : ℕ
h : 0 < k
hf : ∀ (m : σ →₀ ℕ), m ∈ support f → k ≤ ↑m x → coeff m f = coeff m g
hg : ∀ (m : σ →₀ ℕ), m ∈ support g → k ≤ ↑m x → coeff m f = coeff m g
⊢ degreeOf x (f - g) < k
[PROOFSTEP]
classical
rw [degreeOf_lt_iff h]
intro m hm
by_contra' hc
have h := support_sub σ f g hm
simp only [mem_support_iff, Ne.def, coeff_sub, sub_eq_zero] at hm
cases' Finset.mem_union.1 h with cf cg
· exact hm (hf m cf hc)
· exact hm (hg m cg hc)
[GOAL]
R : Type u
S : Type v
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝ : CommRing R
p q : MvPolynomial σ R
x : σ
f g : MvPolynomial σ R
k : ℕ
h : 0 < k
hf : ∀ (m : σ →₀ ℕ), m ∈ support f → k ≤ ↑m x → coeff m f = coeff m g
hg : ∀ (m : σ →₀ ℕ), m ∈ support g → k ≤ ↑m x → coeff m f = coeff m g
⊢ degreeOf x (f - g) < k
[PROOFSTEP]
rw [degreeOf_lt_iff h]
[GOAL]
R : Type u
S : Type v
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝ : CommRing R
p q : MvPolynomial σ R
x : σ
f g : MvPolynomial σ R
k : ℕ
h : 0 < k
hf : ∀ (m : σ →₀ ℕ), m ∈ support f → k ≤ ↑m x → coeff m f = coeff m g
hg : ∀ (m : σ →₀ ℕ), m ∈ support g → k ≤ ↑m x → coeff m f = coeff m g
⊢ ∀ (m : σ →₀ ℕ), m ∈ support (f - g) → ↑m x < k
[PROOFSTEP]
intro m hm
[GOAL]
R : Type u
S : Type v
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m✝ : σ
s : σ →₀ ℕ
inst✝ : CommRing R
p q : MvPolynomial σ R
x : σ
f g : MvPolynomial σ R
k : ℕ
h : 0 < k
hf : ∀ (m : σ →₀ ℕ), m ∈ support f → k ≤ ↑m x → coeff m f = coeff m g
hg : ∀ (m : σ →₀ ℕ), m ∈ support g → k ≤ ↑m x → coeff m f = coeff m g
m : σ →₀ ℕ
hm : m ∈ support (f - g)
⊢ ↑m x < k
[PROOFSTEP]
by_contra' hc
[GOAL]
R : Type u
S : Type v
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m✝ : σ
s : σ →₀ ℕ
inst✝ : CommRing R
p q : MvPolynomial σ R
x : σ
f g : MvPolynomial σ R
k : ℕ
h : 0 < k
hf : ∀ (m : σ →₀ ℕ), m ∈ support f → k ≤ ↑m x → coeff m f = coeff m g
hg : ∀ (m : σ →₀ ℕ), m ∈ support g → k ≤ ↑m x → coeff m f = coeff m g
m : σ →₀ ℕ
hm : m ∈ support (f - g)
hc : k ≤ ↑m x
⊢ False
[PROOFSTEP]
have h := support_sub σ f g hm
[GOAL]
R : Type u
S : Type v
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m✝ : σ
s : σ →₀ ℕ
inst✝ : CommRing R
p q : MvPolynomial σ R
x : σ
f g : MvPolynomial σ R
k : ℕ
h✝ : 0 < k
hf : ∀ (m : σ →₀ ℕ), m ∈ support f → k ≤ ↑m x → coeff m f = coeff m g
hg : ∀ (m : σ →₀ ℕ), m ∈ support g → k ≤ ↑m x → coeff m f = coeff m g
m : σ →₀ ℕ
hm : m ∈ support (f - g)
hc : k ≤ ↑m x
h : m ∈ support f ∪ support g
⊢ False
[PROOFSTEP]
simp only [mem_support_iff, Ne.def, coeff_sub, sub_eq_zero] at hm
[GOAL]
R : Type u
S : Type v
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m✝ : σ
s : σ →₀ ℕ
inst✝ : CommRing R
p q : MvPolynomial σ R
x : σ
f g : MvPolynomial σ R
k : ℕ
h✝ : 0 < k
hf : ∀ (m : σ →₀ ℕ), m ∈ support f → k ≤ ↑m x → coeff m f = coeff m g
hg : ∀ (m : σ →₀ ℕ), m ∈ support g → k ≤ ↑m x → coeff m f = coeff m g
m : σ →₀ ℕ
hc : k ≤ ↑m x
h : m ∈ support f ∪ support g
hm : ¬coeff m f = coeff m g
⊢ False
[PROOFSTEP]
cases' Finset.mem_union.1 h with cf cg
[GOAL]
case inl
R : Type u
S : Type v
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m✝ : σ
s : σ →₀ ℕ
inst✝ : CommRing R
p q : MvPolynomial σ R
x : σ
f g : MvPolynomial σ R
k : ℕ
h✝ : 0 < k
hf : ∀ (m : σ →₀ ℕ), m ∈ support f → k ≤ ↑m x → coeff m f = coeff m g
hg : ∀ (m : σ →₀ ℕ), m ∈ support g → k ≤ ↑m x → coeff m f = coeff m g
m : σ →₀ ℕ
hc : k ≤ ↑m x
h : m ∈ support f ∪ support g
hm : ¬coeff m f = coeff m g
cf : m ∈ support f
⊢ False
[PROOFSTEP]
exact hm (hf m cf hc)
[GOAL]
case inr
R : Type u
S : Type v
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m✝ : σ
s : σ →₀ ℕ
inst✝ : CommRing R
p q : MvPolynomial σ R
x : σ
f g : MvPolynomial σ R
k : ℕ
h✝ : 0 < k
hf : ∀ (m : σ →₀ ℕ), m ∈ support f → k ≤ ↑m x → coeff m f = coeff m g
hg : ∀ (m : σ →₀ ℕ), m ∈ support g → k ≤ ↑m x → coeff m f = coeff m g
m : σ →₀ ℕ
hc : k ≤ ↑m x
h : m ∈ support f ∪ support g
hm : ¬coeff m f = coeff m g
cg : m ∈ support g
⊢ False
[PROOFSTEP]
exact hm (hg m cg hc)
[GOAL]
R : Type u
S : Type v
σ : Type u_1
a✝ a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝ : CommRing R
p q a : MvPolynomial σ R
⊢ totalDegree (-a) = totalDegree a
[PROOFSTEP]
simp only [totalDegree, support_neg]
[GOAL]
R : Type u
S : Type v
σ : Type u_1
a✝ a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝ : CommRing R
p q a b : MvPolynomial σ R
⊢ totalDegree (a - b) = totalDegree (a + -b)
[PROOFSTEP]
rw [sub_eq_add_neg]
[GOAL]
R : Type u
S : Type v
σ : Type u_1
a✝ a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝ : CommRing R
p q a b : MvPolynomial σ R
⊢ max (totalDegree a) (totalDegree (-b)) = max (totalDegree a) (totalDegree b)
[PROOFSTEP]
rw [totalDegree_neg]