[GOAL]
n k : ℕ
h : MinFacHelper n k
⊢ 1 < n
[PROOFSTEP]
have : 2 < minFac n := h.1.trans_le h.2.2
[GOAL]
n k : ℕ
h : MinFacHelper n k
this : 2 < minFac n
⊢ 1 < n
[PROOFSTEP]
rcases eq_zero_or_pos n with rfl | h
[GOAL]
case inl
k : ℕ
h : MinFacHelper 0 k
this : 2 < minFac 0
⊢ 1 < 0
[PROOFSTEP]
contradiction
[GOAL]
case inr
n k : ℕ
h✝ : MinFacHelper n k
this : 2 < minFac n
h : n > 0
⊢ 1 < n
[PROOFSTEP]
rcases(succ_le_of_lt h).eq_or_lt with rfl | h
[GOAL]
case inr.inl
k : ℕ
h✝ : MinFacHelper (succ 0) k
this : 2 < minFac (succ 0)
h : succ 0 > 0
⊢ 1 < succ 0
[PROOFSTEP]
contradiction
[GOAL]
case inr.inr
n k : ℕ
h✝¹ : MinFacHelper n k
this : 2 < minFac n
h✝ : n > 0
h : succ 0 < n
⊢ 1 < n
[PROOFSTEP]
exact h
[GOAL]
n : ℕ
h1 : ble 2 n = true
h2 : 1 = n % 2
⊢ MinFacHelper n 3
[PROOFSTEP]
refine ⟨by norm_num, by norm_num, ?_⟩
[GOAL]
n : ℕ
h1 : ble 2 n = true
h2 : 1 = n % 2
⊢ 2 < 3
[PROOFSTEP]
norm_num
[GOAL]
n : ℕ
h1 : ble 2 n = true
h2 : 1 = n % 2
⊢ 3 % 2 = 1
[PROOFSTEP]
norm_num
[GOAL]
n : ℕ
h1 : ble 2 n = true
h2 : 1 = n % 2
⊢ 3 ≤ minFac n
[PROOFSTEP]
refine (le_minFac'.mpr λ p hp hpn ↦ ?_).resolve_left (Nat.ne_of_gt (Nat.le_of_ble_eq_true h1))
[GOAL]
n : ℕ
h1 : ble 2 n = true
h2 : 1 = n % 2
p : ℕ
hp : 2 ≤ p
hpn : p ∣ n
⊢ 3 ≤ p
[PROOFSTEP]
rcases hp.eq_or_lt with rfl | h
[GOAL]
case inl
n : ℕ
h1 : ble 2 n = true
h2 : 1 = n % 2
hp : 2 ≤ 2
hpn : 2 ∣ n
⊢ 3 ≤ 2
[PROOFSTEP]
simp [(Nat.dvd_iff_mod_eq_zero ..).1 hpn] at h2
[GOAL]
case inr
n : ℕ
h1 : ble 2 n = true
h2 : 1 = n % 2
p : ℕ
hp : 2 ≤ p
hpn : p ∣ n
h : 2 < p
⊢ 3 ≤ p
[PROOFSTEP]
exact h
[GOAL]
n k k' : ℕ
e : k + 2 = k'
h : MinFacHelper n k
np : minFac n ≠ k
⊢ MinFacHelper n k'
[PROOFSTEP]
rw [← e]
[GOAL]
n k k' : ℕ
e : k + 2 = k'
h : MinFacHelper n k
np : minFac n ≠ k
⊢ MinFacHelper n (k + 2)
[PROOFSTEP]
refine ⟨Nat.lt_add_right _ _ _ h.1, ?_, ?_⟩
[GOAL]
case refine_1
n k k' : ℕ
e : k + 2 = k'
h : MinFacHelper n k
np : minFac n ≠ k
⊢ (k + 2) % 2 = 1
[PROOFSTEP]
rw [add_mod, mod_self, add_zero, mod_mod]
[GOAL]
case refine_1
n k k' : ℕ
e : k + 2 = k'
h : MinFacHelper n k
np : minFac n ≠ k
⊢ k % 2 = 1
[PROOFSTEP]
exact h.2.1
[GOAL]
case refine_2
n k k' : ℕ
e : k + 2 = k'
h : MinFacHelper n k
np : minFac n ≠ k
⊢ k + 2 ≤ minFac n
[PROOFSTEP]
rcases h.2.2.eq_or_lt with rfl | h2
[GOAL]
case refine_2.inl
n k' : ℕ
e : minFac n + 2 = k'
h : MinFacHelper n (minFac n)
np : minFac n ≠ minFac n
⊢ minFac n + 2 ≤ minFac n
[PROOFSTEP]
exact (np rfl).elim
[GOAL]
case refine_2.inr
n k k' : ℕ
e : k + 2 = k'
h : MinFacHelper n k
np : minFac n ≠ k
h2 : k < minFac n
⊢ k + 2 ≤ minFac n
[PROOFSTEP]
rcases(succ_le_of_lt h2).eq_or_lt with h2 | h2
[GOAL]
case refine_2.inr.inl
n k k' : ℕ
e : k + 2 = k'
h : MinFacHelper n k
np : minFac n ≠ k
h2✝ : k < minFac n
h2 : succ k = minFac n
⊢ k + 2 ≤ minFac n
[PROOFSTEP]
refine ((h.1.trans_le h.2.2).ne ?_).elim
[GOAL]
case refine_2.inr.inl
n k k' : ℕ
e : k + 2 = k'
h : MinFacHelper n k
np : minFac n ≠ k
h2✝ : k < minFac n
h2 : succ k = minFac n
⊢ 2 = minFac n
[PROOFSTEP]
have h3 : 2 ∣ minFac n
[GOAL]
case h3
n k k' : ℕ
e : k + 2 = k'
h : MinFacHelper n k
np : minFac n ≠ k
h2✝ : k < minFac n
h2 : succ k = minFac n
⊢ 2 ∣ minFac n
[PROOFSTEP]
rw [Nat.dvd_iff_mod_eq_zero, ← h2, succ_eq_add_one, add_mod, h.2.1]
[GOAL]
case h3
n k k' : ℕ
e : k + 2 = k'
h : MinFacHelper n k
np : minFac n ≠ k
h2✝ : k < minFac n
h2 : succ k = minFac n
⊢ (1 + 1 % 2) % 2 = 0
[PROOFSTEP]
norm_num
[GOAL]
case refine_2.inr.inl
n k k' : ℕ
e : k + 2 = k'
h : MinFacHelper n k
np : minFac n ≠ k
h2✝ : k < minFac n
h2 : succ k = minFac n
h3 : 2 ∣ minFac n
⊢ 2 = minFac n
[PROOFSTEP]
rw [dvd_prime <| minFac_prime h.one_lt.ne'] at h3
[GOAL]
case refine_2.inr.inl
n k k' : ℕ
e : k + 2 = k'
h : MinFacHelper n k
np : minFac n ≠ k
h2✝ : k < minFac n
h2 : succ k = minFac n
h3 : 2 = 1 ∨ 2 = minFac n
⊢ 2 = minFac n
[PROOFSTEP]
norm_num at h3
[GOAL]
case refine_2.inr.inl
n k k' : ℕ
e : k + 2 = k'
h : MinFacHelper n k
np : minFac n ≠ k
h2✝ : k < minFac n
h2 : succ k = minFac n
h3 : 2 = minFac n
⊢ 2 = minFac n
[PROOFSTEP]
exact h3
[GOAL]
case refine_2.inr.inr
n k k' : ℕ
e : k + 2 = k'
h : MinFacHelper n k
np : minFac n ≠ k
h2✝ : k < minFac n
h2 : succ k < minFac n
⊢ k + 2 ≤ minFac n
[PROOFSTEP]
exact h2
[GOAL]
n k k' : ℕ
e : k + 2 = k'
nk : ¬Nat.Prime k
h : MinFacHelper n k
⊢ MinFacHelper n k'
[PROOFSTEP]
refine minFacHelper_1 e h λ h2 ↦ ?_
[GOAL]
n k k' : ℕ
e : k + 2 = k'
nk : ¬Nat.Prime k
h : MinFacHelper n k
h2 : minFac n = k
⊢ False
[PROOFSTEP]
rw [← h2] at nk
[GOAL]
n k k' : ℕ
e : k + 2 = k'
nk : ¬Nat.Prime (minFac n)
h : MinFacHelper n k
h2 : minFac n = k
⊢ False
[PROOFSTEP]
exact nk <| minFac_prime h.one_lt.ne'
[GOAL]
n k k' : ℕ
e : k + 2 = k'
nk : beq (n % k) 0 = false
h : MinFacHelper n k
⊢ MinFacHelper n k'
[PROOFSTEP]
refine minFacHelper_1 e h λ h2 ↦ ?_
[GOAL]
n k k' : ℕ
e : k + 2 = k'
nk : beq (n % k) 0 = false
h : MinFacHelper n k
h2 : minFac n = k
⊢ False
[PROOFSTEP]
have nk := Nat.ne_of_beq_eq_false nk
[GOAL]
n k k' : ℕ
e : k + 2 = k'
nk✝ : beq (n % k) 0 = false
h : MinFacHelper n k
h2 : minFac n = k
nk : ¬n % k = 0
⊢ False
[PROOFSTEP]
rw [← Nat.dvd_iff_mod_eq_zero, ← h2] at nk
[GOAL]
n k k' : ℕ
e : k + 2 = k'
nk✝ : beq (n % k) 0 = false
h : MinFacHelper n k
h2 : minFac n = k
nk : ¬minFac n ∣ n
⊢ False
[PROOFSTEP]
exact nk <| minFac_dvd n
[GOAL]
a : ℕ
h : a % 2 = 0
⊢ minFac a = ↑2
[PROOFSTEP]
rw [cast_ofNat, minFac_eq_two_iff, Nat.dvd_iff_mod_eq_zero, h]
[GOAL]
n k : ℕ
h1 : MinFacHelper n k
h2 : 0 = n % k
⊢ IsNat (minFac n) k
[PROOFSTEP]
rw [eq_comm, ← Nat.dvd_iff_mod_eq_zero] at h2
[GOAL]
n k : ℕ
h1 : MinFacHelper n k
h2 : k ∣ n
⊢ IsNat (minFac n) k
[PROOFSTEP]
exact ⟨le_antisymm (minFac_le_of_dvd h1.1.le h2) h1.2.2⟩
[GOAL]
n k : ℕ
h1 : MinFacHelper n k
h2 : ble (k * k) n = false
⊢ IsNat (minFac n) n
[PROOFSTEP]
refine ⟨(Nat.prime_def_minFac.mp ?_).2⟩
[GOAL]
n k : ℕ
h1 : MinFacHelper n k
h2 : ble (k * k) n = false
⊢ Nat.Prime n
[PROOFSTEP]
rw [Nat.prime_def_le_sqrt]
[GOAL]
n k : ℕ
h1 : MinFacHelper n k
h2 : ble (k * k) n = false
⊢ 2 ≤ n ∧ ∀ (m : ℕ), 2 ≤ m → m ≤ sqrt n → ¬m ∣ n
[PROOFSTEP]
refine ⟨h1.one_lt, λ m hm hmn h2mn ↦ ?_⟩
[GOAL]
n k : ℕ
h1 : MinFacHelper n k
h2 : ble (k * k) n = false
m : ℕ
hm : 2 ≤ m
hmn : m ≤ sqrt n
h2mn : m ∣ n
⊢ False
[PROOFSTEP]
exact
  lt_irrefl m <|
    calc
      m ≤ sqrt n := hmn
      _ < k := (sqrt_lt.mpr (ble_eq_false.mp h2))
      _ ≤ n.minFac := h1.2.2
      _ ≤ m := Nat.minFac_le_of_dvd hm h2mn


[GOAL]
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I I' : Ideal R
J J' : Ideal S
⊢ ∀ {a b : R × S},
    a ∈ {x | x.fst ∈ I ∧ x.snd ∈ J} → b ∈ {x | x.fst ∈ I ∧ x.snd ∈ J} → a + b ∈ {x | x.fst ∈ I ∧ x.snd ∈ J}
[PROOFSTEP]
rintro ⟨a₁, a₂⟩ ⟨b₁, b₂⟩ ⟨ha₁, ha₂⟩ ⟨hb₁, hb₂⟩
[GOAL]
case mk.mk.intro.intro
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I I' : Ideal R
J J' : Ideal S
a₁ : R
a₂ : S
b₁ : R
b₂ : S
ha₁ : (a₁, a₂).fst ∈ I
ha₂ : (a₁, a₂).snd ∈ J
hb₁ : (b₁, b₂).fst ∈ I
hb₂ : (b₁, b₂).snd ∈ J
⊢ (a₁, a₂) + (b₁, b₂) ∈ {x | x.fst ∈ I ∧ x.snd ∈ J}
[PROOFSTEP]
exact ⟨I.add_mem ha₁ hb₁, J.add_mem ha₂ hb₂⟩
[GOAL]
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I I' : Ideal R
J J' : Ideal S
⊢ 0 ∈
    { carrier := {x | x.fst ∈ I ∧ x.snd ∈ J},
        add_mem' :=
          (_ :
            ∀ {a b : R × S},
              a ∈ {x | x.fst ∈ I ∧ x.snd ∈ J} →
                b ∈ {x | x.fst ∈ I ∧ x.snd ∈ J} → a + b ∈ {x | x.fst ∈ I ∧ x.snd ∈ J}) }.carrier
[PROOFSTEP]
simp
[GOAL]
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I I' : Ideal R
J J' : Ideal S
⊢ ∀ (c : R × S) {x : R × S},
    x ∈
        {
              toAddSubsemigroup :=
                { carrier := {x | x.fst ∈ I ∧ x.snd ∈ J},
                  add_mem' :=
                    (_ :
                      ∀ {a b : R × S},
                        a ∈ {x | x.fst ∈ I ∧ x.snd ∈ J} →
                          b ∈ {x | x.fst ∈ I ∧ x.snd ∈ J} → a + b ∈ {x | x.fst ∈ I ∧ x.snd ∈ J}) },
              zero_mem' := (_ : 0 ∈ I ∧ 0 ∈ J) }.toAddSubsemigroup.carrier →
      c • x ∈
        {
              toAddSubsemigroup :=
                { carrier := {x | x.fst ∈ I ∧ x.snd ∈ J},
                  add_mem' :=
                    (_ :
                      ∀ {a b : R × S},
                        a ∈ {x | x.fst ∈ I ∧ x.snd ∈ J} →
                          b ∈ {x | x.fst ∈ I ∧ x.snd ∈ J} → a + b ∈ {x | x.fst ∈ I ∧ x.snd ∈ J}) },
              zero_mem' := (_ : 0 ∈ I ∧ 0 ∈ J) }.toAddSubsemigroup.carrier
[PROOFSTEP]
rintro ⟨a₁, a₂⟩ ⟨b₁, b₂⟩ ⟨hb₁, hb₂⟩
[GOAL]
case mk.mk.intro
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I I' : Ideal R
J J' : Ideal S
a₁ : R
a₂ : S
b₁ : R
b₂ : S
hb₁ : (b₁, b₂).fst ∈ I
hb₂ : (b₁, b₂).snd ∈ J
⊢ (a₁, a₂) • (b₁, b₂) ∈
    {
          toAddSubsemigroup :=
            { carrier := {x | x.fst ∈ I ∧ x.snd ∈ J},
              add_mem' :=
                (_ :
                  ∀ {a b : R × S},
                    a ∈ {x | x.fst ∈ I ∧ x.snd ∈ J} →
                      b ∈ {x | x.fst ∈ I ∧ x.snd ∈ J} → a + b ∈ {x | x.fst ∈ I ∧ x.snd ∈ J}) },
          zero_mem' := (_ : 0 ∈ I ∧ 0 ∈ J) }.toAddSubsemigroup.carrier
[PROOFSTEP]
exact ⟨I.mul_mem_left _ hb₁, J.mul_mem_left _ hb₂⟩
[GOAL]
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I I' : Ideal R
J J' : Ideal S
⊢ ∀ (x : R × S), x ∈ prod ⊤ ⊤ ↔ x ∈ ⊤
[PROOFSTEP]
simp
[GOAL]
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' : Ideal S
I : Ideal (R × S)
⊢ I = prod (map (RingHom.fst R S) I) (map (RingHom.snd R S) I)
[PROOFSTEP]
apply Ideal.ext
[GOAL]
case h
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' : Ideal S
I : Ideal (R × S)
⊢ ∀ (x : R × S), x ∈ I ↔ x ∈ prod (map (RingHom.fst R S) I) (map (RingHom.snd R S) I)
[PROOFSTEP]
rintro ⟨r, s⟩
[GOAL]
case h.mk
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' : Ideal S
I : Ideal (R × S)
r : R
s : S
⊢ (r, s) ∈ I ↔ (r, s) ∈ prod (map (RingHom.fst R S) I) (map (RingHom.snd R S) I)
[PROOFSTEP]
rw [mem_prod, mem_map_iff_of_surjective (RingHom.fst R S) Prod.fst_surjective,
  mem_map_iff_of_surjective (RingHom.snd R S) Prod.snd_surjective]
[GOAL]
case h.mk
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' : Ideal S
I : Ideal (R × S)
r : R
s : S
⊢ (r, s) ∈ I ↔ (∃ x, x ∈ I ∧ ↑(RingHom.fst R S) x = r) ∧ ∃ x, x ∈ I ∧ ↑(RingHom.snd R S) x = s
[PROOFSTEP]
refine' ⟨fun h => ⟨⟨_, ⟨h, rfl⟩⟩, ⟨_, ⟨h, rfl⟩⟩⟩, _⟩
[GOAL]
case h.mk
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' : Ideal S
I : Ideal (R × S)
r : R
s : S
⊢ ((∃ x, x ∈ I ∧ ↑(RingHom.fst R S) x = r) ∧ ∃ x, x ∈ I ∧ ↑(RingHom.snd R S) x = s) → (r, s) ∈ I
[PROOFSTEP]
rintro ⟨⟨⟨r, s'⟩, ⟨h₁, rfl⟩⟩, ⟨⟨r', s⟩, ⟨h₂, rfl⟩⟩⟩
[GOAL]
case h.mk.intro.intro.mk.intro.intro.mk.intro
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' : Ideal S
I : Ideal (R × S)
r : R
s' : S
h₁ : (r, s') ∈ I
r' : R
s : S
h₂ : (r', s) ∈ I
⊢ (↑(RingHom.fst R S) (r, s'), ↑(RingHom.snd R S) (r', s)) ∈ I
[PROOFSTEP]
simpa using I.add_mem (I.mul_mem_left (1, 0) h₁) (I.mul_mem_left (0, 1) h₂)
[GOAL]
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J✝ J' : Ideal S
I : Ideal R
J : Ideal S
⊢ map (RingHom.fst R S) (prod I J) = I
[PROOFSTEP]
ext x
[GOAL]
case h
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J✝ J' : Ideal S
I : Ideal R
J : Ideal S
x : R
⊢ x ∈ map (RingHom.fst R S) (prod I J) ↔ x ∈ I
[PROOFSTEP]
rw [mem_map_iff_of_surjective (RingHom.fst R S) Prod.fst_surjective]
[GOAL]
case h
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J✝ J' : Ideal S
I : Ideal R
J : Ideal S
x : R
⊢ (∃ x_1, x_1 ∈ prod I J ∧ ↑(RingHom.fst R S) x_1 = x) ↔ x ∈ I
[PROOFSTEP]
exact
  ⟨by
    rintro ⟨x, ⟨h, rfl⟩⟩
    exact h.1, fun h => ⟨⟨x, 0⟩, ⟨⟨h, Ideal.zero_mem _⟩, rfl⟩⟩⟩
[GOAL]
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J✝ J' : Ideal S
I : Ideal R
J : Ideal S
x : R
⊢ (∃ x_1, x_1 ∈ prod I J ∧ ↑(RingHom.fst R S) x_1 = x) → x ∈ I
[PROOFSTEP]
rintro ⟨x, ⟨h, rfl⟩⟩
[GOAL]
case intro.intro
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J✝ J' : Ideal S
I : Ideal R
J : Ideal S
x : R × S
h : x ∈ prod I J
⊢ ↑(RingHom.fst R S) x ∈ I
[PROOFSTEP]
exact h.1
[GOAL]
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J✝ J' : Ideal S
I : Ideal R
J : Ideal S
⊢ map (RingHom.snd R S) (prod I J) = J
[PROOFSTEP]
ext x
[GOAL]
case h
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J✝ J' : Ideal S
I : Ideal R
J : Ideal S
x : S
⊢ x ∈ map (RingHom.snd R S) (prod I J) ↔ x ∈ J
[PROOFSTEP]
rw [mem_map_iff_of_surjective (RingHom.snd R S) Prod.snd_surjective]
[GOAL]
case h
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J✝ J' : Ideal S
I : Ideal R
J : Ideal S
x : S
⊢ (∃ x_1, x_1 ∈ prod I J ∧ ↑(RingHom.snd R S) x_1 = x) ↔ x ∈ J
[PROOFSTEP]
exact
  ⟨by
    rintro ⟨x, ⟨h, rfl⟩⟩
    exact h.2, fun h => ⟨⟨0, x⟩, ⟨⟨Ideal.zero_mem _, h⟩, rfl⟩⟩⟩
[GOAL]
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J✝ J' : Ideal S
I : Ideal R
J : Ideal S
x : S
⊢ (∃ x_1, x_1 ∈ prod I J ∧ ↑(RingHom.snd R S) x_1 = x) → x ∈ J
[PROOFSTEP]
rintro ⟨x, ⟨h, rfl⟩⟩
[GOAL]
case intro.intro
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J✝ J' : Ideal S
I : Ideal R
J : Ideal S
x : R × S
h : x ∈ prod I J
⊢ ↑(RingHom.snd R S) x ∈ J
[PROOFSTEP]
exact h.2
[GOAL]
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I I' : Ideal R
J J' : Ideal S
⊢ map (↑RingEquiv.prodComm) (prod I J) = prod J I
[PROOFSTEP]
refine' Trans.trans (ideal_prod_eq _) _
[GOAL]
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I I' : Ideal R
J J' : Ideal S
⊢ prod (map (RingHom.fst S R) (map (↑RingEquiv.prodComm) (prod I J)))
      (map (RingHom.snd S R) (map (↑RingEquiv.prodComm) (prod I J))) =
    prod J I
[PROOFSTEP]
simp [map_map]
[GOAL]
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J✝ J' : Ideal S
x✝ : Ideal R × Ideal S
I : Ideal R
J : Ideal S
⊢ (fun I => (map (RingHom.fst R S) I, map (RingHom.snd R S) I)) ((fun I => prod I.fst I.snd) (I, J)) = (I, J)
[PROOFSTEP]
simp
[GOAL]
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I'✝ : Ideal R
J✝ J'✝ : Ideal S
I I' : Ideal R
J J' : Ideal S
⊢ prod I J = prod I' J' ↔ I = I' ∧ J = J'
[PROOFSTEP]
simp only [← idealProdEquiv_symm_apply, idealProdEquiv.symm.injective.eq_iff, Prod.mk.inj_iff]
[GOAL]
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' : Ideal S
I : Ideal R
h : IsPrime (prod I ⊤)
⊢ IsPrime I
[PROOFSTEP]
constructor
[GOAL]
case ne_top'
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' : Ideal S
I : Ideal R
h : IsPrime (prod I ⊤)
⊢ I ≠ ⊤
[PROOFSTEP]
contrapose! h
[GOAL]
case ne_top'
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' : Ideal S
I : Ideal R
h : I = ⊤
⊢ ¬IsPrime (prod I ⊤)
[PROOFSTEP]
rw [h, prod_top_top, isPrime_iff]
[GOAL]
case ne_top'
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' : Ideal S
I : Ideal R
h : I = ⊤
⊢ ¬(⊤ ≠ ⊤ ∧ ∀ {x y : R × S}, x * y ∈ ⊤ → x ∈ ⊤ ∨ y ∈ ⊤)
[PROOFSTEP]
simp [isPrime_iff, h]
[GOAL]
case mem_or_mem'
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' : Ideal S
I : Ideal R
h : IsPrime (prod I ⊤)
⊢ ∀ {x y : R}, x * y ∈ I → x ∈ I ∨ y ∈ I
[PROOFSTEP]
intro x y hxy
[GOAL]
case mem_or_mem'
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' : Ideal S
I : Ideal R
h : IsPrime (prod I ⊤)
x y : R
hxy : x * y ∈ I
⊢ x ∈ I ∨ y ∈ I
[PROOFSTEP]
have : (⟨x, 1⟩ : R × S) * ⟨y, 1⟩ ∈ prod I ⊤ :=
  by
  rw [Prod.mk_mul_mk, mul_one, mem_prod]
  exact ⟨hxy, trivial⟩
[GOAL]
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' : Ideal S
I : Ideal R
h : IsPrime (prod I ⊤)
x y : R
hxy : x * y ∈ I
⊢ (x, 1) * (y, 1) ∈ prod I ⊤
[PROOFSTEP]
rw [Prod.mk_mul_mk, mul_one, mem_prod]
[GOAL]
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' : Ideal S
I : Ideal R
h : IsPrime (prod I ⊤)
x y : R
hxy : x * y ∈ I
⊢ x * y ∈ I ∧ 1 ∈ ⊤
[PROOFSTEP]
exact ⟨hxy, trivial⟩
[GOAL]
case mem_or_mem'
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' : Ideal S
I : Ideal R
h : IsPrime (prod I ⊤)
x y : R
hxy : x * y ∈ I
this : (x, 1) * (y, 1) ∈ prod I ⊤
⊢ x ∈ I ∨ y ∈ I
[PROOFSTEP]
simpa using h.mem_or_mem this
[GOAL]
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' I : Ideal S
h : IsPrime (prod ⊤ I)
⊢ IsPrime I
[PROOFSTEP]
apply @isPrime_of_isPrime_prod_top _ R
[GOAL]
case h
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' I : Ideal S
h : IsPrime (prod ⊤ I)
⊢ IsPrime (prod I ⊤)
[PROOFSTEP]
rw [← map_prodComm_prod]
[GOAL]
case h
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' I : Ideal S
h : IsPrime (prod ⊤ I)
⊢ IsPrime (map (↑RingEquiv.prodComm) (prod ⊤ I))
[PROOFSTEP]
exact map_isPrime_of_equiv _
[GOAL]
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' : Ideal S
I : Ideal R
h : IsPrime I
⊢ IsPrime (prod I ⊤)
[PROOFSTEP]
constructor
[GOAL]
case ne_top'
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' : Ideal S
I : Ideal R
h : IsPrime I
⊢ prod I ⊤ ≠ ⊤
[PROOFSTEP]
rcases h with ⟨h, -⟩
[GOAL]
case ne_top'.mk
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' : Ideal S
I : Ideal R
h : I ≠ ⊤
⊢ prod I ⊤ ≠ ⊤
[PROOFSTEP]
contrapose! h
[GOAL]
case ne_top'.mk
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' : Ideal S
I : Ideal R
h : prod I ⊤ = ⊤
⊢ I = ⊤
[PROOFSTEP]
rw [← prod_top_top, prod.ext_iff] at h
[GOAL]
case ne_top'.mk
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' : Ideal S
I : Ideal R
h : I = ⊤ ∧ ⊤ = ⊤
⊢ I = ⊤
[PROOFSTEP]
exact h.1
[GOAL]
case mem_or_mem'
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' : Ideal S
I : Ideal R
h : IsPrime I
⊢ ∀ {x y : R × S}, x * y ∈ prod I ⊤ → x ∈ prod I ⊤ ∨ y ∈ prod I ⊤
[PROOFSTEP]
rintro ⟨r₁, s₁⟩ ⟨r₂, s₂⟩ ⟨h₁, _⟩
[GOAL]
case mem_or_mem'.mk.mk.intro
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' : Ideal S
I : Ideal R
h : IsPrime I
r₁ : R
s₁ : S
r₂ : R
s₂ : S
h₁ : ((r₁, s₁) * (r₂, s₂)).fst ∈ I
right✝ : ((r₁, s₁) * (r₂, s₂)).snd ∈ ⊤
⊢ (r₁, s₁) ∈ prod I ⊤ ∨ (r₂, s₂) ∈ prod I ⊤
[PROOFSTEP]
cases' h.mem_or_mem h₁ with h h
[GOAL]
case mem_or_mem'.mk.mk.intro.inl
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' : Ideal S
I : Ideal R
h✝ : IsPrime I
r₁ : R
s₁ : S
r₂ : R
s₂ : S
h₁ : ((r₁, s₁) * (r₂, s₂)).fst ∈ I
right✝ : ((r₁, s₁) * (r₂, s₂)).snd ∈ ⊤
h : (r₁, s₁).fst ∈ I
⊢ (r₁, s₁) ∈ prod I ⊤ ∨ (r₂, s₂) ∈ prod I ⊤
[PROOFSTEP]
exact Or.inl ⟨h, trivial⟩
[GOAL]
case mem_or_mem'.mk.mk.intro.inr
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' : Ideal S
I : Ideal R
h✝ : IsPrime I
r₁ : R
s₁ : S
r₂ : R
s₂ : S
h₁ : ((r₁, s₁) * (r₂, s₂)).fst ∈ I
right✝ : ((r₁, s₁) * (r₂, s₂)).snd ∈ ⊤
h : (r₂, s₂).fst ∈ I
⊢ (r₁, s₁) ∈ prod I ⊤ ∨ (r₂, s₂) ∈ prod I ⊤
[PROOFSTEP]
exact Or.inr ⟨h, trivial⟩
[GOAL]
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' I : Ideal S
h : IsPrime I
⊢ IsPrime (prod ⊤ I)
[PROOFSTEP]
letI : IsPrime (prod I (⊤ : Ideal R)) := isPrime_ideal_prod_top
[GOAL]
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' I : Ideal S
h : IsPrime I
this : IsPrime (prod I ⊤) := isPrime_ideal_prod_top
⊢ IsPrime (prod ⊤ I)
[PROOFSTEP]
rw [← map_prodComm_prod]
[GOAL]
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' I : Ideal S
h : IsPrime I
this : IsPrime (prod I ⊤) := isPrime_ideal_prod_top
⊢ IsPrime (map (↑RingEquiv.prodComm) (prod I ⊤))
[PROOFSTEP]
apply map_isPrime_of_equiv _
[GOAL]
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J✝ J' : Ideal S
I : Ideal R
J : Ideal S
⊢ IsPrime (prod I J) → I = ⊤ ∨ J = ⊤
[PROOFSTEP]
contrapose!
[GOAL]
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J✝ J' : Ideal S
I : Ideal R
J : Ideal S
⊢ I ≠ ⊤ ∧ J ≠ ⊤ → ¬IsPrime (prod I J)
[PROOFSTEP]
simp only [ne_top_iff_one, isPrime_iff, not_and, not_forall, not_or]
[GOAL]
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J✝ J' : Ideal S
I : Ideal R
J : Ideal S
⊢ ¬1 ∈ I ∧ ¬1 ∈ J → ¬1 ∈ prod I J → ∃ x x_1 h, ¬x ∈ prod I J ∧ ¬x_1 ∈ prod I J
[PROOFSTEP]
exact fun ⟨hI, hJ⟩ _ => ⟨⟨0, 1⟩, ⟨1, 0⟩, by simp, by simp [hJ], by simp [hI]⟩
[GOAL]
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J✝ J' : Ideal S
I : Ideal R
J : Ideal S
x✝¹ : ¬1 ∈ I ∧ ¬1 ∈ J
x✝ : ¬1 ∈ prod I J
hI : ¬1 ∈ I
hJ : ¬1 ∈ J
⊢ (0, 1) * (1, 0) ∈ prod I J
[PROOFSTEP]
simp
[GOAL]
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J✝ J' : Ideal S
I : Ideal R
J : Ideal S
x✝¹ : ¬1 ∈ I ∧ ¬1 ∈ J
x✝ : ¬1 ∈ prod I J
hI : ¬1 ∈ I
hJ : ¬1 ∈ J
⊢ ¬(0, 1) ∈ prod I J
[PROOFSTEP]
simp [hJ]
[GOAL]
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J✝ J' : Ideal S
I : Ideal R
J : Ideal S
x✝¹ : ¬1 ∈ I ∧ ¬1 ∈ J
x✝ : ¬1 ∈ prod I J
hI : ¬1 ∈ I
hJ : ¬1 ∈ J
⊢ ¬(1, 0) ∈ prod I J
[PROOFSTEP]
simp [hI]
[GOAL]
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' : Ideal S
I : Ideal (R × S)
⊢ IsPrime I ↔ (∃ p, IsPrime p ∧ I = prod p ⊤) ∨ ∃ p, IsPrime p ∧ I = prod ⊤ p
[PROOFSTEP]
constructor
[GOAL]
case mp
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' : Ideal S
I : Ideal (R × S)
⊢ IsPrime I → (∃ p, IsPrime p ∧ I = prod p ⊤) ∨ ∃ p, IsPrime p ∧ I = prod ⊤ p
[PROOFSTEP]
rw [ideal_prod_eq I]
[GOAL]
case mp
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' : Ideal S
I : Ideal (R × S)
⊢ IsPrime (prod (map (RingHom.fst R S) I) (map (RingHom.snd R S) I)) →
    (∃ p, IsPrime p ∧ prod (map (RingHom.fst R S) I) (map (RingHom.snd R S) I) = prod p ⊤) ∨
      ∃ p, IsPrime p ∧ prod (map (RingHom.fst R S) I) (map (RingHom.snd R S) I) = prod ⊤ p
[PROOFSTEP]
intro hI
[GOAL]
case mp
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' : Ideal S
I : Ideal (R × S)
hI : IsPrime (prod (map (RingHom.fst R S) I) (map (RingHom.snd R S) I))
⊢ (∃ p, IsPrime p ∧ prod (map (RingHom.fst R S) I) (map (RingHom.snd R S) I) = prod p ⊤) ∨
    ∃ p, IsPrime p ∧ prod (map (RingHom.fst R S) I) (map (RingHom.snd R S) I) = prod ⊤ p
[PROOFSTEP]
rcases ideal_prod_prime_aux hI with (h | h)
[GOAL]
case mp.inl
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' : Ideal S
I : Ideal (R × S)
hI : IsPrime (prod (map (RingHom.fst R S) I) (map (RingHom.snd R S) I))
h : map (RingHom.fst R S) I = ⊤
⊢ (∃ p, IsPrime p ∧ prod (map (RingHom.fst R S) I) (map (RingHom.snd R S) I) = prod p ⊤) ∨
    ∃ p, IsPrime p ∧ prod (map (RingHom.fst R S) I) (map (RingHom.snd R S) I) = prod ⊤ p
[PROOFSTEP]
right
[GOAL]
case mp.inl.h
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' : Ideal S
I : Ideal (R × S)
hI : IsPrime (prod (map (RingHom.fst R S) I) (map (RingHom.snd R S) I))
h : map (RingHom.fst R S) I = ⊤
⊢ ∃ p, IsPrime p ∧ prod (map (RingHom.fst R S) I) (map (RingHom.snd R S) I) = prod ⊤ p
[PROOFSTEP]
rw [h] at hI ⊢
[GOAL]
case mp.inl.h
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' : Ideal S
I : Ideal (R × S)
hI : IsPrime (prod ⊤ (map (RingHom.snd R S) I))
h : map (RingHom.fst R S) I = ⊤
⊢ ∃ p, IsPrime p ∧ prod ⊤ (map (RingHom.snd R S) I) = prod ⊤ p
[PROOFSTEP]
exact ⟨_, ⟨isPrime_of_isPrime_prod_top' hI, rfl⟩⟩
[GOAL]
case mp.inr
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' : Ideal S
I : Ideal (R × S)
hI : IsPrime (prod (map (RingHom.fst R S) I) (map (RingHom.snd R S) I))
h : map (RingHom.snd R S) I = ⊤
⊢ (∃ p, IsPrime p ∧ prod (map (RingHom.fst R S) I) (map (RingHom.snd R S) I) = prod p ⊤) ∨
    ∃ p, IsPrime p ∧ prod (map (RingHom.fst R S) I) (map (RingHom.snd R S) I) = prod ⊤ p
[PROOFSTEP]
left
[GOAL]
case mp.inr.h
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' : Ideal S
I : Ideal (R × S)
hI : IsPrime (prod (map (RingHom.fst R S) I) (map (RingHom.snd R S) I))
h : map (RingHom.snd R S) I = ⊤
⊢ ∃ p, IsPrime p ∧ prod (map (RingHom.fst R S) I) (map (RingHom.snd R S) I) = prod p ⊤
[PROOFSTEP]
rw [h] at hI ⊢
[GOAL]
case mp.inr.h
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' : Ideal S
I : Ideal (R × S)
hI : IsPrime (prod (map (RingHom.fst R S) I) ⊤)
h : map (RingHom.snd R S) I = ⊤
⊢ ∃ p, IsPrime p ∧ prod (map (RingHom.fst R S) I) ⊤ = prod p ⊤
[PROOFSTEP]
exact ⟨_, ⟨isPrime_of_isPrime_prod_top hI, rfl⟩⟩
[GOAL]
case mpr
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' : Ideal S
I : Ideal (R × S)
⊢ ((∃ p, IsPrime p ∧ I = prod p ⊤) ∨ ∃ p, IsPrime p ∧ I = prod ⊤ p) → IsPrime I
[PROOFSTEP]
rintro (⟨p, ⟨h, rfl⟩⟩ | ⟨p, ⟨h, rfl⟩⟩)
[GOAL]
case mpr.inl.intro.intro
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I I' : Ideal R
J J' : Ideal S
p : Ideal R
h : IsPrime p
⊢ IsPrime (prod p ⊤)
[PROOFSTEP]
exact isPrime_ideal_prod_top
[GOAL]
case mpr.inr.intro.intro
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I I' : Ideal R
J J' p : Ideal S
h : IsPrime p
⊢ IsPrime (prod ⊤ p)
[PROOFSTEP]
exact isPrime_ideal_prod_top'


[GOAL]
α : Type u_1
β : Type u_2
m✝ : MeasurableSpace α
μ✝ ν : Measure α
inst✝ : ConditionallyCompleteLinearOrder β
x : β
f✝ : α → β
m : MeasurableSpace α
μ : Measure α
f : α → β
⊢ essSup f μ = sInf {a | ↑↑μ {x | a < f x} = 0}
[PROOFSTEP]
dsimp [essSup, limsup, limsSup]
[GOAL]
α : Type u_1
β : Type u_2
m✝ : MeasurableSpace α
μ✝ ν : Measure α
inst✝ : ConditionallyCompleteLinearOrder β
x : β
f✝ : α → β
m : MeasurableSpace α
μ : Measure α
f : α → β
⊢ sInf {a | ∀ᶠ (n : β) in map f (Measure.ae μ), n ≤ a} = sInf {a | ↑↑μ {x | a < f x} = 0}
[PROOFSTEP]
simp only [eventually_map, ae_iff, not_le]
[GOAL]
α : Type u_1
β : Type u_2
m✝ : MeasurableSpace α
μ✝ ν : Measure α
inst✝ : ConditionallyCompleteLinearOrder β
x : β
f✝ : α → β
m : MeasurableSpace α
μ : Measure α
f : α → β
⊢ essInf f μ = sSup {a | ↑↑μ {x | f x < a} = 0}
[PROOFSTEP]
dsimp [essInf, liminf, limsInf]
[GOAL]
α : Type u_1
β : Type u_2
m✝ : MeasurableSpace α
μ✝ ν : Measure α
inst✝ : ConditionallyCompleteLinearOrder β
x : β
f✝ : α → β
m : MeasurableSpace α
μ : Measure α
f : α → β
⊢ sSup {a | ∀ᶠ (n : β) in map f (Measure.ae μ), a ≤ n} = sSup {a | ↑↑μ {x | f x < a} = 0}
[PROOFSTEP]
simp only [eventually_map, ae_iff, not_le]
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝³ : ConditionallyCompleteLinearOrder β
x : β
f : α → β
inst✝² : TopologicalSpace β
inst✝¹ : FirstCountableTopology β
inst✝ : OrderTopology β
hf : autoParam (IsBoundedUnder (fun x x_1 => x ≤ x_1) (Measure.ae μ) f) _auto✝
⊢ ↑↑μ {y | essSup f μ < f y} = 0
[PROOFSTEP]
simp_rw [← not_le]
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝³ : ConditionallyCompleteLinearOrder β
x : β
f : α → β
inst✝² : TopologicalSpace β
inst✝¹ : FirstCountableTopology β
inst✝ : OrderTopology β
hf : autoParam (IsBoundedUnder (fun x x_1 => x ≤ x_1) (Measure.ae μ) f) _auto✝
⊢ ↑↑μ {y | ¬f y ≤ essSup f μ} = 0
[PROOFSTEP]
exact ae_le_essSup hf
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝³ : ConditionallyCompleteLinearOrder β
x : β
f : α → β
inst✝² : TopologicalSpace β
inst✝¹ : FirstCountableTopology β
inst✝ : OrderTopology β
hf : autoParam (IsBoundedUnder (fun x x_1 => x ≥ x_1) (Measure.ae μ) f) _auto✝
⊢ ↑↑μ {y | f y < essInf f μ} = 0
[PROOFSTEP]
simp_rw [← not_le]
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝³ : ConditionallyCompleteLinearOrder β
x : β
f : α → β
inst✝² : TopologicalSpace β
inst✝¹ : FirstCountableTopology β
inst✝ : OrderTopology β
hf : autoParam (IsBoundedUnder (fun x x_1 => x ≥ x_1) (Measure.ae μ) f) _auto✝
⊢ ↑↑μ {y | ¬essInf f μ ≤ f y} = 0
[PROOFSTEP]
exact ae_essInf_le hf
[GOAL]
α : Type u_1
β : Type u_2
m✝ : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
m : MeasurableSpace α
f : α → β
⊢ ⊥ ∈ {a | ∀ᶠ (n : β) in map f (Measure.ae 0), n ≤ a}
[PROOFSTEP]
simp [Set.mem_setOf_eq, EventuallyLE, ae_iff]
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
f : α → β
c : β
hf : f ≤ᵐ[μ] fun x => c
⊢ essSup f μ ≤ c
[PROOFSTEP]
refine' (essSup_mono_ae hf).trans _
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
f : α → β
c : β
hf : f ≤ᵐ[μ] fun x => c
⊢ essSup (fun x => c) μ ≤ c
[PROOFSTEP]
by_cases hμ : μ = 0
[GOAL]
case pos
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
f : α → β
c : β
hf : f ≤ᵐ[μ] fun x => c
hμ : μ = 0
⊢ essSup (fun x => c) μ ≤ c
[PROOFSTEP]
simp [hμ]
[GOAL]
case neg
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
f : α → β
c : β
hf : f ≤ᵐ[μ] fun x => c
hμ : ¬μ = 0
⊢ essSup (fun x => c) μ ≤ c
[PROOFSTEP]
rwa [essSup_const]
[GOAL]
α : Type u_1
β : Type u_2
m✝ : MeasurableSpace α
μ✝ ν : Measure α
inst✝¹ : CompleteLattice β
m : MeasurableSpace α
γ : Type u_3
inst✝ : CompleteLattice γ
f : α → β
μ : Measure α
g : β ≃o γ
⊢ ↑g (essSup f μ) = essSup (fun x => ↑g (f x)) μ
[PROOFSTEP]
refine' OrderIso.limsup_apply g _ _ _ _
[GOAL]
case refine'_1
α : Type u_1
β : Type u_2
m✝ : MeasurableSpace α
μ✝ ν : Measure α
inst✝¹ : CompleteLattice β
m : MeasurableSpace α
γ : Type u_3
inst✝ : CompleteLattice γ
f : α → β
μ : Measure α
g : β ≃o γ
⊢ IsBoundedUnder (fun x x_1 => x ≤ x_1) (Measure.ae μ) f
case refine'_2
α : Type u_1
β : Type u_2
m✝ : MeasurableSpace α
μ✝ ν : Measure α
inst✝¹ : CompleteLattice β
m : MeasurableSpace α
γ : Type u_3
inst✝ : CompleteLattice γ
f : α → β
μ : Measure α
g : β ≃o γ
⊢ IsCoboundedUnder (fun x x_1 => x ≤ x_1) (Measure.ae μ) f
case refine'_3
α : Type u_1
β : Type u_2
m✝ : MeasurableSpace α
μ✝ ν : Measure α
inst✝¹ : CompleteLattice β
m : MeasurableSpace α
γ : Type u_3
inst✝ : CompleteLattice γ
f : α → β
μ : Measure α
g : β ≃o γ
⊢ IsBoundedUnder (fun x x_1 => x ≤ x_1) (Measure.ae μ) fun x => ↑g (f x)
case refine'_4
α : Type u_1
β : Type u_2
m✝ : MeasurableSpace α
μ✝ ν : Measure α
inst✝¹ : CompleteLattice β
m : MeasurableSpace α
γ : Type u_3
inst✝ : CompleteLattice γ
f : α → β
μ : Measure α
g : β ≃o γ
⊢ IsCoboundedUnder (fun x x_1 => x ≤ x_1) (Measure.ae μ) fun x => ↑g (f x)
[PROOFSTEP]
all_goals isBoundedDefault
[GOAL]
case refine'_1
α : Type u_1
β : Type u_2
m✝ : MeasurableSpace α
μ✝ ν : Measure α
inst✝¹ : CompleteLattice β
m : MeasurableSpace α
γ : Type u_3
inst✝ : CompleteLattice γ
f : α → β
μ : Measure α
g : β ≃o γ
⊢ IsBoundedUnder (fun x x_1 => x ≤ x_1) (Measure.ae μ) f
[PROOFSTEP]
isBoundedDefault
[GOAL]
case refine'_2
α : Type u_1
β : Type u_2
m✝ : MeasurableSpace α
μ✝ ν : Measure α
inst✝¹ : CompleteLattice β
m : MeasurableSpace α
γ : Type u_3
inst✝ : CompleteLattice γ
f : α → β
μ : Measure α
g : β ≃o γ
⊢ IsCoboundedUnder (fun x x_1 => x ≤ x_1) (Measure.ae μ) f
[PROOFSTEP]
isBoundedDefault
[GOAL]
case refine'_3
α : Type u_1
β : Type u_2
m✝ : MeasurableSpace α
μ✝ ν : Measure α
inst✝¹ : CompleteLattice β
m : MeasurableSpace α
γ : Type u_3
inst✝ : CompleteLattice γ
f : α → β
μ : Measure α
g : β ≃o γ
⊢ IsBoundedUnder (fun x x_1 => x ≤ x_1) (Measure.ae μ) fun x => ↑g (f x)
[PROOFSTEP]
isBoundedDefault
[GOAL]
case refine'_4
α : Type u_1
β : Type u_2
m✝ : MeasurableSpace α
μ✝ ν : Measure α
inst✝¹ : CompleteLattice β
m : MeasurableSpace α
γ : Type u_3
inst✝ : CompleteLattice γ
f : α → β
μ : Measure α
g : β ≃o γ
⊢ IsCoboundedUnder (fun x x_1 => x ≤ x_1) (Measure.ae μ) fun x => ↑g (f x)
[PROOFSTEP]
isBoundedDefault
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
f : α → β
hμν : ν ≪ μ
⊢ essSup f ν ≤ essSup f μ
[PROOFSTEP]
refine' limsup_le_limsup_of_le (Measure.ae_le_iff_absolutelyContinuous.mpr hμν) _ _
[GOAL]
case refine'_1
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
f : α → β
hμν : ν ≪ μ
⊢ IsCoboundedUnder (fun x x_1 => x ≤ x_1) (Measure.ae ν) f
case refine'_2
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
f : α → β
hμν : ν ≪ μ
⊢ IsBoundedUnder (fun x x_1 => x ≤ x_1) (Measure.ae μ) f
[PROOFSTEP]
all_goals isBoundedDefault
[GOAL]
case refine'_1
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
f : α → β
hμν : ν ≪ μ
⊢ IsCoboundedUnder (fun x x_1 => x ≤ x_1) (Measure.ae ν) f
[PROOFSTEP]
isBoundedDefault
[GOAL]
case refine'_2
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
f : α → β
hμν : ν ≪ μ
⊢ IsBoundedUnder (fun x x_1 => x ≤ x_1) (Measure.ae μ) f
[PROOFSTEP]
isBoundedDefault
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
f : α → β
hμν : μ ≪ ν
⊢ essInf f ν ≤ essInf f μ
[PROOFSTEP]
refine' liminf_le_liminf_of_le (Measure.ae_le_iff_absolutelyContinuous.mpr hμν) _ _
[GOAL]
case refine'_1
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
f : α → β
hμν : μ ≪ ν
⊢ IsBoundedUnder (fun x x_1 => x ≥ x_1) (Measure.ae ν) f
case refine'_2
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
f : α → β
hμν : μ ≪ ν
⊢ IsCoboundedUnder (fun x x_1 => x ≥ x_1) (Measure.ae μ) f
[PROOFSTEP]
all_goals isBoundedDefault
[GOAL]
case refine'_1
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
f : α → β
hμν : μ ≪ ν
⊢ IsBoundedUnder (fun x x_1 => x ≥ x_1) (Measure.ae ν) f
[PROOFSTEP]
isBoundedDefault
[GOAL]
case refine'_2
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
f : α → β
hμν : μ ≪ ν
⊢ IsCoboundedUnder (fun x x_1 => x ≥ x_1) (Measure.ae μ) f
[PROOFSTEP]
isBoundedDefault
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
f : α → β
c : ℝ≥0∞
hc : c ≠ 0
⊢ essSup f (c • μ) = essSup f μ
[PROOFSTEP]
simp_rw [essSup]
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
f : α → β
c : ℝ≥0∞
hc : c ≠ 0
⊢ limsup f (Measure.ae (c • μ)) = limsup f (Measure.ae μ)
[PROOFSTEP]
suffices h_smul : (c • μ).ae = μ.ae
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
f : α → β
c : ℝ≥0∞
hc : c ≠ 0
h_smul : Measure.ae (c • μ) = Measure.ae μ
⊢ limsup f (Measure.ae (c • μ)) = limsup f (Measure.ae μ)
[PROOFSTEP]
rw [h_smul]
[GOAL]
case h_smul
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
f : α → β
c : ℝ≥0∞
hc : c ≠ 0
⊢ Measure.ae (c • μ) = Measure.ae μ
[PROOFSTEP]
ext1
[GOAL]
case h_smul.a
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
f : α → β
c : ℝ≥0∞
hc : c ≠ 0
s✝ : Set α
⊢ s✝ ∈ Measure.ae (c • μ) ↔ s✝ ∈ Measure.ae μ
[PROOFSTEP]
simp_rw [mem_ae_iff]
[GOAL]
case h_smul.a
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
f : α → β
c : ℝ≥0∞
hc : c ≠ 0
s✝ : Set α
⊢ ↑↑(c • μ) s✝ᶜ = 0 ↔ ↑↑μ s✝ᶜ = 0
[PROOFSTEP]
simp [hc]
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
γ : Type u_3
mγ : MeasurableSpace γ
f : α → γ
g : γ → β
hf : AEMeasurable f
⊢ essSup (g ∘ f) μ ≤ essSup g (Measure.map f μ)
[PROOFSTEP]
refine' limsSup_le_limsSup_of_le (fun t => _) (by isBoundedDefault) (by isBoundedDefault)
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
γ : Type u_3
mγ : MeasurableSpace γ
f : α → γ
g : γ → β
hf : AEMeasurable f
⊢ IsCobounded (fun x x_1 => x ≤ x_1) (map (g ∘ f) (Measure.ae μ))
[PROOFSTEP]
isBoundedDefault
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
γ : Type u_3
mγ : MeasurableSpace γ
f : α → γ
g : γ → β
hf : AEMeasurable f
⊢ IsBounded (fun x x_1 => x ≤ x_1) (map g (Measure.ae (Measure.map f μ)))
[PROOFSTEP]
isBoundedDefault
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
γ : Type u_3
mγ : MeasurableSpace γ
f : α → γ
g : γ → β
hf : AEMeasurable f
t : Set β
⊢ t ∈ map g (Measure.ae (Measure.map f μ)) → t ∈ map (g ∘ f) (Measure.ae μ)
[PROOFSTEP]
simp_rw [Filter.mem_map]
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
γ : Type u_3
mγ : MeasurableSpace γ
f : α → γ
g : γ → β
hf : AEMeasurable f
t : Set β
⊢ g ⁻¹' t ∈ Measure.ae (Measure.map f μ) → g ∘ f ⁻¹' t ∈ Measure.ae μ
[PROOFSTEP]
have : g ∘ f ⁻¹' t = f ⁻¹' (g ⁻¹' t) := by
  ext1 x
  simp_rw [Set.mem_preimage, Function.comp]
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
γ : Type u_3
mγ : MeasurableSpace γ
f : α → γ
g : γ → β
hf : AEMeasurable f
t : Set β
⊢ g ∘ f ⁻¹' t = f ⁻¹' (g ⁻¹' t)
[PROOFSTEP]
ext1 x
[GOAL]
case h
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
γ : Type u_3
mγ : MeasurableSpace γ
f : α → γ
g : γ → β
hf : AEMeasurable f
t : Set β
x : α
⊢ x ∈ g ∘ f ⁻¹' t ↔ x ∈ f ⁻¹' (g ⁻¹' t)
[PROOFSTEP]
simp_rw [Set.mem_preimage, Function.comp]
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
γ : Type u_3
mγ : MeasurableSpace γ
f : α → γ
g : γ → β
hf : AEMeasurable f
t : Set β
this : g ∘ f ⁻¹' t = f ⁻¹' (g ⁻¹' t)
⊢ g ⁻¹' t ∈ Measure.ae (Measure.map f μ) → g ∘ f ⁻¹' t ∈ Measure.ae μ
[PROOFSTEP]
rw [this]
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
γ : Type u_3
mγ : MeasurableSpace γ
f : α → γ
g : γ → β
hf : AEMeasurable f
t : Set β
this : g ∘ f ⁻¹' t = f ⁻¹' (g ⁻¹' t)
⊢ g ⁻¹' t ∈ Measure.ae (Measure.map f μ) → f ⁻¹' (g ⁻¹' t) ∈ Measure.ae μ
[PROOFSTEP]
exact fun h => mem_ae_of_mem_ae_map hf h
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
γ : Type u_3
mγ : MeasurableSpace γ
f : α → γ
g : γ → β
hf : MeasurableEmbedding f
⊢ essSup g (Measure.map f μ) = essSup (g ∘ f) μ
[PROOFSTEP]
refine' le_antisymm _ (essSup_comp_le_essSup_map_measure hf.measurable.aemeasurable)
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
γ : Type u_3
mγ : MeasurableSpace γ
f : α → γ
g : γ → β
hf : MeasurableEmbedding f
⊢ essSup g (Measure.map f μ) ≤ essSup (g ∘ f) μ
[PROOFSTEP]
refine' limsSup_le_limsSup (by isBoundedDefault) (by isBoundedDefault) (fun c h_le => _)
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
γ : Type u_3
mγ : MeasurableSpace γ
f : α → γ
g : γ → β
hf : MeasurableEmbedding f
⊢ IsCobounded (fun x x_1 => x ≤ x_1) (map g (Measure.ae (Measure.map f μ)))
[PROOFSTEP]
isBoundedDefault
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
γ : Type u_3
mγ : MeasurableSpace γ
f : α → γ
g : γ → β
hf : MeasurableEmbedding f
⊢ IsBounded (fun x x_1 => x ≤ x_1) (map (g ∘ f) (Measure.ae μ))
[PROOFSTEP]
isBoundedDefault
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
γ : Type u_3
mγ : MeasurableSpace γ
f : α → γ
g : γ → β
hf : MeasurableEmbedding f
c : β
h_le : ∀ᶠ (n : β) in map (g ∘ f) (Measure.ae μ), n ≤ c
⊢ ∀ᶠ (n : β) in map g (Measure.ae (Measure.map f μ)), n ≤ c
[PROOFSTEP]
rw [eventually_map] at h_le ⊢
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
γ : Type u_3
mγ : MeasurableSpace γ
f : α → γ
g : γ → β
hf : MeasurableEmbedding f
c : β
h_le : ∀ᵐ (a : α) ∂μ, (g ∘ f) a ≤ c
⊢ ∀ᵐ (a : γ) ∂Measure.map f μ, g a ≤ c
[PROOFSTEP]
exact hf.ae_map_iff.mpr h_le
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝⁵ : CompleteLattice β
γ : Type u_3
mγ : MeasurableSpace γ
f : α → γ
g : γ → β
inst✝⁴ : MeasurableSpace β
inst✝³ : TopologicalSpace β
inst✝² : SecondCountableTopology β
inst✝¹ : OrderClosedTopology β
inst✝ : OpensMeasurableSpace β
hg : Measurable g
hf : AEMeasurable f
⊢ essSup g (Measure.map f μ) = essSup (g ∘ f) μ
[PROOFSTEP]
refine' le_antisymm _ (essSup_comp_le_essSup_map_measure hf)
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝⁵ : CompleteLattice β
γ : Type u_3
mγ : MeasurableSpace γ
f : α → γ
g : γ → β
inst✝⁴ : MeasurableSpace β
inst✝³ : TopologicalSpace β
inst✝² : SecondCountableTopology β
inst✝¹ : OrderClosedTopology β
inst✝ : OpensMeasurableSpace β
hg : Measurable g
hf : AEMeasurable f
⊢ essSup g (Measure.map f μ) ≤ essSup (g ∘ f) μ
[PROOFSTEP]
refine' limsSup_le_limsSup (by isBoundedDefault) (by isBoundedDefault) (fun c h_le => _)
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝⁵ : CompleteLattice β
γ : Type u_3
mγ : MeasurableSpace γ
f : α → γ
g : γ → β
inst✝⁴ : MeasurableSpace β
inst✝³ : TopologicalSpace β
inst✝² : SecondCountableTopology β
inst✝¹ : OrderClosedTopology β
inst✝ : OpensMeasurableSpace β
hg : Measurable g
hf : AEMeasurable f
⊢ IsCobounded (fun x x_1 => x ≤ x_1) (map g (Measure.ae (Measure.map f μ)))
[PROOFSTEP]
isBoundedDefault
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝⁵ : CompleteLattice β
γ : Type u_3
mγ : MeasurableSpace γ
f : α → γ
g : γ → β
inst✝⁴ : MeasurableSpace β
inst✝³ : TopologicalSpace β
inst✝² : SecondCountableTopology β
inst✝¹ : OrderClosedTopology β
inst✝ : OpensMeasurableSpace β
hg : Measurable g
hf : AEMeasurable f
⊢ IsBounded (fun x x_1 => x ≤ x_1) (map (g ∘ f) (Measure.ae μ))
[PROOFSTEP]
isBoundedDefault
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝⁵ : CompleteLattice β
γ : Type u_3
mγ : MeasurableSpace γ
f : α → γ
g : γ → β
inst✝⁴ : MeasurableSpace β
inst✝³ : TopologicalSpace β
inst✝² : SecondCountableTopology β
inst✝¹ : OrderClosedTopology β
inst✝ : OpensMeasurableSpace β
hg : Measurable g
hf : AEMeasurable f
c : β
h_le : ∀ᶠ (n : β) in map (g ∘ f) (Measure.ae μ), n ≤ c
⊢ ∀ᶠ (n : β) in map g (Measure.ae (Measure.map f μ)), n ≤ c
[PROOFSTEP]
rw [eventually_map] at h_le ⊢
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝⁵ : CompleteLattice β
γ : Type u_3
mγ : MeasurableSpace γ
f : α → γ
g : γ → β
inst✝⁴ : MeasurableSpace β
inst✝³ : TopologicalSpace β
inst✝² : SecondCountableTopology β
inst✝¹ : OrderClosedTopology β
inst✝ : OpensMeasurableSpace β
hg : Measurable g
hf : AEMeasurable f
c : β
h_le : ∀ᵐ (a : α) ∂μ, (g ∘ f) a ≤ c
⊢ ∀ᵐ (a : γ) ∂Measure.map f μ, g a ≤ c
[PROOFSTEP]
rw [ae_map_iff hf (measurableSet_le hg measurable_const)]
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝⁵ : CompleteLattice β
γ : Type u_3
mγ : MeasurableSpace γ
f : α → γ
g : γ → β
inst✝⁴ : MeasurableSpace β
inst✝³ : TopologicalSpace β
inst✝² : SecondCountableTopology β
inst✝¹ : OrderClosedTopology β
inst✝ : OpensMeasurableSpace β
hg : Measurable g
hf : AEMeasurable f
c : β
h_le : ∀ᵐ (a : α) ∂μ, (g ∘ f) a ≤ c
⊢ ∀ᵐ (x : α) ∂μ, g (f x) ≤ c
[PROOFSTEP]
exact h_le
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝⁵ : CompleteLattice β
γ : Type u_3
mγ : MeasurableSpace γ
f : α → γ
g : γ → β
inst✝⁴ : MeasurableSpace β
inst✝³ : TopologicalSpace β
inst✝² : SecondCountableTopology β
inst✝¹ : OrderClosedTopology β
inst✝ : OpensMeasurableSpace β
hg : AEMeasurable g
hf : AEMeasurable f
⊢ essSup g (Measure.map f μ) = essSup (g ∘ f) μ
[PROOFSTEP]
rw [essSup_congr_ae hg.ae_eq_mk, essSup_map_measure_of_measurable hg.measurable_mk hf]
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝⁵ : CompleteLattice β
γ : Type u_3
mγ : MeasurableSpace γ
f : α → γ
g : γ → β
inst✝⁴ : MeasurableSpace β
inst✝³ : TopologicalSpace β
inst✝² : SecondCountableTopology β
inst✝¹ : OrderClosedTopology β
inst✝ : OpensMeasurableSpace β
hg : AEMeasurable g
hf : AEMeasurable f
⊢ essSup (AEMeasurable.mk g hg ∘ f) μ = essSup (g ∘ f) μ
[PROOFSTEP]
refine' essSup_congr_ae _
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝⁵ : CompleteLattice β
γ : Type u_3
mγ : MeasurableSpace γ
f : α → γ
g : γ → β
inst✝⁴ : MeasurableSpace β
inst✝³ : TopologicalSpace β
inst✝² : SecondCountableTopology β
inst✝¹ : OrderClosedTopology β
inst✝ : OpensMeasurableSpace β
hg : AEMeasurable g
hf : AEMeasurable f
⊢ AEMeasurable.mk g hg ∘ f =ᵐ[μ] g ∘ f
[PROOFSTEP]
have h_eq := ae_of_ae_map hf hg.ae_eq_mk
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝⁵ : CompleteLattice β
γ : Type u_3
mγ : MeasurableSpace γ
f : α → γ
g : γ → β
inst✝⁴ : MeasurableSpace β
inst✝³ : TopologicalSpace β
inst✝² : SecondCountableTopology β
inst✝¹ : OrderClosedTopology β
inst✝ : OpensMeasurableSpace β
hg : AEMeasurable g
hf : AEMeasurable f
h_eq : ∀ᵐ (x : α) ∂μ, g (f x) = AEMeasurable.mk g hg (f x)
⊢ AEMeasurable.mk g hg ∘ f =ᵐ[μ] g ∘ f
[PROOFSTEP]
rw [← EventuallyEq] at h_eq
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝⁵ : CompleteLattice β
γ : Type u_3
mγ : MeasurableSpace γ
f : α → γ
g : γ → β
inst✝⁴ : MeasurableSpace β
inst✝³ : TopologicalSpace β
inst✝² : SecondCountableTopology β
inst✝¹ : OrderClosedTopology β
inst✝ : OpensMeasurableSpace β
hg : AEMeasurable g
hf : AEMeasurable f
h_eq : (fun x => g (f x)) =ᵐ[μ] fun x => AEMeasurable.mk g hg (f x)
⊢ AEMeasurable.mk g hg ∘ f =ᵐ[μ] g ∘ f
[PROOFSTEP]
exact h_eq.symm
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : 0 ≤ᵐ[Measure.restrict μ s] f
hs : MeasurableSet s
hs_not_null : ↑↑μ s ≠ 0
⊢ essSup (indicator s f) μ = essSup f (Measure.restrict μ s)
[PROOFSTEP]
refine'
  le_antisymm _
    (limsSup_le_limsSup_of_le (map_restrict_ae_le_map_indicator_ae hs) (by isBoundedDefault) (by isBoundedDefault))
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : 0 ≤ᵐ[Measure.restrict μ s] f
hs : MeasurableSet s
hs_not_null : ↑↑μ s ≠ 0
⊢ IsCobounded (fun x x_1 => x ≤ x_1) (map f (Measure.ae (Measure.restrict μ s)))
[PROOFSTEP]
isBoundedDefault
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : 0 ≤ᵐ[Measure.restrict μ s] f
hs : MeasurableSet s
hs_not_null : ↑↑μ s ≠ 0
⊢ IsBounded (fun x x_1 => x ≤ x_1) (map (indicator s f) (Measure.ae μ))
[PROOFSTEP]
isBoundedDefault
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : 0 ≤ᵐ[Measure.restrict μ s] f
hs : MeasurableSet s
hs_not_null : ↑↑μ s ≠ 0
⊢ essSup (indicator s f) μ ≤ essSup f (Measure.restrict μ s)
[PROOFSTEP]
refine' limsSup_le_limsSup (by isBoundedDefault) (by isBoundedDefault) (fun c h_restrict_le => _)
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : 0 ≤ᵐ[Measure.restrict μ s] f
hs : MeasurableSet s
hs_not_null : ↑↑μ s ≠ 0
⊢ IsCobounded (fun x x_1 => x ≤ x_1) (map (indicator s f) (Measure.ae μ))
[PROOFSTEP]
isBoundedDefault
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : 0 ≤ᵐ[Measure.restrict μ s] f
hs : MeasurableSet s
hs_not_null : ↑↑μ s ≠ 0
⊢ IsBounded (fun x x_1 => x ≤ x_1) (map f (Measure.ae (Measure.restrict μ s)))
[PROOFSTEP]
isBoundedDefault
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : 0 ≤ᵐ[Measure.restrict μ s] f
hs : MeasurableSet s
hs_not_null : ↑↑μ s ≠ 0
c : β
h_restrict_le : ∀ᶠ (n : β) in map f (Measure.ae (Measure.restrict μ s)), n ≤ c
⊢ ∀ᶠ (n : β) in map (indicator s f) (Measure.ae μ), n ≤ c
[PROOFSTEP]
rw [eventually_map] at h_restrict_le ⊢
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : 0 ≤ᵐ[Measure.restrict μ s] f
hs : MeasurableSet s
hs_not_null : ↑↑μ s ≠ 0
c : β
h_restrict_le : ∀ᵐ (a : α) ∂Measure.restrict μ s, f a ≤ c
⊢ ∀ᵐ (a : α) ∂μ, indicator s f a ≤ c
[PROOFSTEP]
rw [ae_restrict_iff' hs] at h_restrict_le
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : 0 ≤ᵐ[Measure.restrict μ s] f
hs : MeasurableSet s
hs_not_null : ↑↑μ s ≠ 0
c : β
h_restrict_le : ∀ᵐ (x : α) ∂μ, x ∈ s → f x ≤ c
⊢ ∀ᵐ (a : α) ∂μ, indicator s f a ≤ c
[PROOFSTEP]
have hc : 0 ≤ c := by
  rsuffices ⟨x, hx⟩ : ∃ x, 0 ≤ f x ∧ f x ≤ c
  exact hx.1.trans hx.2
  refine' Frequently.exists _
  · exact μ.ae
  rw [EventuallyLE, ae_restrict_iff' hs] at hf
  have hs' : ∃ᵐ x ∂μ, x ∈ s := by
    contrapose! hs_not_null
    rw [not_frequently, ae_iff] at hs_not_null
    suffices {a : α | ¬a ∉ s} = s by rwa [← this]
    simp
  refine' hs'.mp (hf.mp (h_restrict_le.mono fun x hxs_imp_c hxf_nonneg hxs => _))
  rw [Pi.zero_apply] at hxf_nonneg
  exact ⟨hxf_nonneg hxs, hxs_imp_c hxs⟩
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : 0 ≤ᵐ[Measure.restrict μ s] f
hs : MeasurableSet s
hs_not_null : ↑↑μ s ≠ 0
c : β
h_restrict_le : ∀ᵐ (x : α) ∂μ, x ∈ s → f x ≤ c
⊢ 0 ≤ c
[PROOFSTEP]
rsuffices ⟨x, hx⟩ : ∃ x, 0 ≤ f x ∧ f x ≤ c
[GOAL]
case intro
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : 0 ≤ᵐ[Measure.restrict μ s] f
hs : MeasurableSet s
hs_not_null : ↑↑μ s ≠ 0
c : β
h_restrict_le : ∀ᵐ (x : α) ∂μ, x ∈ s → f x ≤ c
x : α
hx : 0 ≤ f x ∧ f x ≤ c
⊢ 0 ≤ c
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : 0 ≤ᵐ[Measure.restrict μ s] f
hs : MeasurableSet s
hs_not_null : ↑↑μ s ≠ 0
c : β
h_restrict_le : ∀ᵐ (x : α) ∂μ, x ∈ s → f x ≤ c
⊢ ∃ x, 0 ≤ f x ∧ f x ≤ c
[PROOFSTEP]
exact hx.1.trans hx.2
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : 0 ≤ᵐ[Measure.restrict μ s] f
hs : MeasurableSet s
hs_not_null : ↑↑μ s ≠ 0
c : β
h_restrict_le : ∀ᵐ (x : α) ∂μ, x ∈ s → f x ≤ c
⊢ ∃ x, 0 ≤ f x ∧ f x ≤ c
[PROOFSTEP]
refine' Frequently.exists _
[GOAL]
case refine'_1
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : 0 ≤ᵐ[Measure.restrict μ s] f
hs : MeasurableSet s
hs_not_null : ↑↑μ s ≠ 0
c : β
h_restrict_le : ∀ᵐ (x : α) ∂μ, x ∈ s → f x ≤ c
⊢ Filter α
[PROOFSTEP]
exact μ.ae
[GOAL]
case refine'_2
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : 0 ≤ᵐ[Measure.restrict μ s] f
hs : MeasurableSet s
hs_not_null : ↑↑μ s ≠ 0
c : β
h_restrict_le : ∀ᵐ (x : α) ∂μ, x ∈ s → f x ≤ c
⊢ ∃ᵐ (x : α) ∂μ, 0 ≤ f x ∧ f x ≤ c
[PROOFSTEP]
rw [EventuallyLE, ae_restrict_iff' hs] at hf
[GOAL]
case refine'_2
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : ∀ᵐ (x : α) ∂μ, x ∈ s → OfNat.ofNat 0 x ≤ f x
hs : MeasurableSet s
hs_not_null : ↑↑μ s ≠ 0
c : β
h_restrict_le : ∀ᵐ (x : α) ∂μ, x ∈ s → f x ≤ c
⊢ ∃ᵐ (x : α) ∂μ, 0 ≤ f x ∧ f x ≤ c
[PROOFSTEP]
have hs' : ∃ᵐ x ∂μ, x ∈ s := by
  contrapose! hs_not_null
  rw [not_frequently, ae_iff] at hs_not_null
  suffices {a : α | ¬a ∉ s} = s by rwa [← this]
  simp
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : ∀ᵐ (x : α) ∂μ, x ∈ s → OfNat.ofNat 0 x ≤ f x
hs : MeasurableSet s
hs_not_null : ↑↑μ s ≠ 0
c : β
h_restrict_le : ∀ᵐ (x : α) ∂μ, x ∈ s → f x ≤ c
⊢ ∃ᵐ (x : α) ∂μ, x ∈ s
[PROOFSTEP]
contrapose! hs_not_null
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : ∀ᵐ (x : α) ∂μ, x ∈ s → OfNat.ofNat 0 x ≤ f x
hs : MeasurableSet s
c : β
h_restrict_le : ∀ᵐ (x : α) ∂μ, x ∈ s → f x ≤ c
hs_not_null : ¬∃ᵐ (x : α) ∂μ, x ∈ s
⊢ ↑↑μ s = 0
[PROOFSTEP]
rw [not_frequently, ae_iff] at hs_not_null
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : ∀ᵐ (x : α) ∂μ, x ∈ s → OfNat.ofNat 0 x ≤ f x
hs : MeasurableSet s
c : β
h_restrict_le : ∀ᵐ (x : α) ∂μ, x ∈ s → f x ≤ c
hs_not_null : ↑↑μ {a | ¬¬a ∈ s} = 0
⊢ ↑↑μ s = 0
[PROOFSTEP]
suffices {a : α | ¬a ∉ s} = s by rwa [← this]
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : ∀ᵐ (x : α) ∂μ, x ∈ s → OfNat.ofNat 0 x ≤ f x
hs : MeasurableSet s
c : β
h_restrict_le : ∀ᵐ (x : α) ∂μ, x ∈ s → f x ≤ c
hs_not_null : ↑↑μ {a | ¬¬a ∈ s} = 0
this : {a | ¬¬a ∈ s} = s
⊢ ↑↑μ s = 0
[PROOFSTEP]
rwa [← this]
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : ∀ᵐ (x : α) ∂μ, x ∈ s → OfNat.ofNat 0 x ≤ f x
hs : MeasurableSet s
c : β
h_restrict_le : ∀ᵐ (x : α) ∂μ, x ∈ s → f x ≤ c
hs_not_null : ↑↑μ {a | ¬¬a ∈ s} = 0
⊢ {a | ¬¬a ∈ s} = s
[PROOFSTEP]
simp
[GOAL]
case refine'_2
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : ∀ᵐ (x : α) ∂μ, x ∈ s → OfNat.ofNat 0 x ≤ f x
hs : MeasurableSet s
hs_not_null : ↑↑μ s ≠ 0
c : β
h_restrict_le : ∀ᵐ (x : α) ∂μ, x ∈ s → f x ≤ c
hs' : ∃ᵐ (x : α) ∂μ, x ∈ s
⊢ ∃ᵐ (x : α) ∂μ, 0 ≤ f x ∧ f x ≤ c
[PROOFSTEP]
refine' hs'.mp (hf.mp (h_restrict_le.mono fun x hxs_imp_c hxf_nonneg hxs => _))
[GOAL]
case refine'_2
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : ∀ᵐ (x : α) ∂μ, x ∈ s → OfNat.ofNat 0 x ≤ f x
hs : MeasurableSet s
hs_not_null : ↑↑μ s ≠ 0
c : β
h_restrict_le : ∀ᵐ (x : α) ∂μ, x ∈ s → f x ≤ c
hs' : ∃ᵐ (x : α) ∂μ, x ∈ s
x : α
hxs_imp_c : x ∈ s → f x ≤ c
hxf_nonneg : x ∈ s → OfNat.ofNat 0 x ≤ f x
hxs : x ∈ s
⊢ 0 ≤ f x ∧ f x ≤ c
[PROOFSTEP]
rw [Pi.zero_apply] at hxf_nonneg
[GOAL]
case refine'_2
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : ∀ᵐ (x : α) ∂μ, x ∈ s → OfNat.ofNat 0 x ≤ f x
hs : MeasurableSet s
hs_not_null : ↑↑μ s ≠ 0
c : β
h_restrict_le : ∀ᵐ (x : α) ∂μ, x ∈ s → f x ≤ c
hs' : ∃ᵐ (x : α) ∂μ, x ∈ s
x : α
hxs_imp_c : x ∈ s → f x ≤ c
hxf_nonneg : x ∈ s → 0 ≤ f x
hxs : x ∈ s
⊢ 0 ≤ f x ∧ f x ≤ c
[PROOFSTEP]
exact ⟨hxf_nonneg hxs, hxs_imp_c hxs⟩
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : 0 ≤ᵐ[Measure.restrict μ s] f
hs : MeasurableSet s
hs_not_null : ↑↑μ s ≠ 0
c : β
h_restrict_le : ∀ᵐ (x : α) ∂μ, x ∈ s → f x ≤ c
hc : 0 ≤ c
⊢ ∀ᵐ (a : α) ∂μ, indicator s f a ≤ c
[PROOFSTEP]
refine' h_restrict_le.mono fun x hxc => _
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : 0 ≤ᵐ[Measure.restrict μ s] f
hs : MeasurableSet s
hs_not_null : ↑↑μ s ≠ 0
c : β
h_restrict_le : ∀ᵐ (x : α) ∂μ, x ∈ s → f x ≤ c
hc : 0 ≤ c
x : α
hxc : x ∈ s → f x ≤ c
⊢ indicator s f x ≤ c
[PROOFSTEP]
by_cases hxs : x ∈ s
[GOAL]
case pos
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : 0 ≤ᵐ[Measure.restrict μ s] f
hs : MeasurableSet s
hs_not_null : ↑↑μ s ≠ 0
c : β
h_restrict_le : ∀ᵐ (x : α) ∂μ, x ∈ s → f x ≤ c
hc : 0 ≤ c
x : α
hxc : x ∈ s → f x ≤ c
hxs : x ∈ s
⊢ indicator s f x ≤ c
[PROOFSTEP]
simpa [hxs] using hxc hxs
[GOAL]
case neg
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : 0 ≤ᵐ[Measure.restrict μ s] f
hs : MeasurableSet s
hs_not_null : ↑↑μ s ≠ 0
c : β
h_restrict_le : ∀ᵐ (x : α) ∂μ, x ∈ s → f x ≤ c
hc : 0 ≤ c
x : α
hxc : x ∈ s → f x ≤ c
hxs : ¬x ∈ s
⊢ indicator s f x ≤ c
[PROOFSTEP]
simpa [hxs] using hc
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
f✝ : α → ℝ≥0∞
ι : Type u_3
inst✝¹ : Countable ι
inst✝ : LinearOrder ι
f : ι → α → ℝ≥0∞
⊢ essSup (fun x => liminf (fun n => f n x) atTop) μ ≤ liminf (fun n => essSup (fun x => f n x) μ) atTop
[PROOFSTEP]
simp_rw [essSup]
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
f✝ : α → ℝ≥0∞
ι : Type u_3
inst✝¹ : Countable ι
inst✝ : LinearOrder ι
f : ι → α → ℝ≥0∞
⊢ limsup (fun x => liminf (fun n => f n x) atTop) (Measure.ae μ) ≤
    liminf (fun n => limsup (fun x => f n x) (Measure.ae μ)) atTop
[PROOFSTEP]
exact ENNReal.limsup_liminf_le_liminf_limsup fun a b => f b a
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
f✝ : α → ℝ≥0∞
f : α → ℝ≥0
hf : IsBoundedUnder (fun x x_1 => x ≤ x_1) (Measure.ae μ) f
r : ℝ≥0∞
⊢ r ≤
      ⨅ (a : ℝ≥0) (_ : a ∈ fun x => sets (map f (Measure.ae μ)) {x_1 | (fun x_2 => (fun x x_3 => x ≤ x_3) x_2 x) x_1}),
        ↑a ↔
    r ≤ essSup (fun x => ↑(f x)) μ
[PROOFSTEP]
simp [essSup, limsup, limsSup, eventually_map, ENNReal.forall_ennreal]
[GOAL]
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
f✝ : α → ℝ≥0∞
f : α → ℝ≥0
hf : IsBoundedUnder (fun x x_1 => x ≤ x_1) (Measure.ae μ) f
r : ℝ≥0∞
⊢ (∀ (i : ℝ≥0), (i ∈ fun x => sets (map f (Measure.ae μ)) {x_1 | x_1 ≤ x}) → r ≤ ↑i) ↔
    ∀ (r_1 : ℝ≥0), (∀ᵐ (a : α) ∂μ, f a ≤ r_1) → r ≤ ↑r_1
[PROOFSTEP]
rfl


[GOAL]
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Ring B'
inst✝¹ : Algebra A B
inst✝ : Algebra A B'
x : B
hx : IsIntegral A x
⊢ Monic (minpoly A x)
[PROOFSTEP]
delta minpoly
[GOAL]
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Ring B'
inst✝¹ : Algebra A B
inst✝ : Algebra A B'
x : B
hx : IsIntegral A x
⊢ Monic
    (if hx : IsIntegral A x then
      WellFounded.min (_ : WellFounded fun p q => degree p < degree q)
        (fun x_1 => Monic x_1 ∧ eval₂ (algebraMap A B) x x_1 = 0) hx
    else 0)
[PROOFSTEP]
rw [dif_pos hx]
[GOAL]
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Ring B'
inst✝¹ : Algebra A B
inst✝ : Algebra A B'
x : B
hx : IsIntegral A x
⊢ Monic
    (WellFounded.min (_ : WellFounded fun p q => degree p < degree q)
      (fun x_1 => Monic x_1 ∧ eval₂ (algebraMap A B) x x_1 = 0) hx)
[PROOFSTEP]
exact (degree_lt_wf.min_mem _ hx).1
[GOAL]
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Ring B'
inst✝¹ : Algebra A B
inst✝ : Algebra A B'
x✝ : B
f : B →ₐ[A] B'
hf : Injective ↑f
x : B
⊢ minpoly A (↑f x) = minpoly A x
[PROOFSTEP]
refine' dif_ctx_congr (isIntegral_algHom_iff _ hf) (fun _ => _) fun _ => rfl
[GOAL]
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Ring B'
inst✝¹ : Algebra A B
inst✝ : Algebra A B'
x✝¹ : B
f : B →ₐ[A] B'
hf : Injective ↑f
x : B
x✝ : IsIntegral A x
⊢ WellFounded.min (_ : WellFounded fun p q => degree p < degree q)
      (fun x_1 => Monic x_1 ∧ eval₂ (algebraMap A ((fun x => B') x)) (↑f x) x_1 = 0) (_ : IsIntegral A (↑f x)) =
    WellFounded.min (_ : WellFounded fun p q => degree p < degree q)
      (fun x_1 => Monic x_1 ∧ eval₂ (algebraMap A B) x x_1 = 0) x✝
[PROOFSTEP]
simp_rw [← Polynomial.aeval_def, aeval_algHom, AlgHom.comp_apply, _root_.map_eq_zero_iff f hf]
[GOAL]
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Ring B'
inst✝¹ : Algebra A B
inst✝ : Algebra A B'
x : B
⊢ ↑(Polynomial.aeval x) (minpoly A x) = 0
[PROOFSTEP]
delta minpoly
[GOAL]
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Ring B'
inst✝¹ : Algebra A B
inst✝ : Algebra A B'
x : B
⊢ ↑(Polynomial.aeval x)
      (if hx : IsIntegral A x then
        WellFounded.min (_ : WellFounded fun p q => degree p < degree q)
          (fun x_1 => Monic x_1 ∧ eval₂ (algebraMap A B) x x_1 = 0) hx
      else 0) =
    0
[PROOFSTEP]
split_ifs with hx
[GOAL]
case pos
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Ring B'
inst✝¹ : Algebra A B
inst✝ : Algebra A B'
x : B
hx : IsIntegral A x
⊢ ↑(Polynomial.aeval x)
      (if hx : IsIntegral A x then
        WellFounded.min (_ : WellFounded fun p q => degree p < degree q)
          (fun x_1 => Monic x_1 ∧ eval₂ (algebraMap A B) x x_1 = 0) hx
      else 0) =
    0
[PROOFSTEP]
rw [dif_pos hx]
[GOAL]
case pos
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Ring B'
inst✝¹ : Algebra A B
inst✝ : Algebra A B'
x : B
hx : IsIntegral A x
⊢ ↑(Polynomial.aeval x)
      (WellFounded.min (_ : WellFounded fun p q => degree p < degree q)
        (fun x_1 => Monic x_1 ∧ eval₂ (algebraMap A B) x x_1 = 0) hx) =
    0
[PROOFSTEP]
exact (degree_lt_wf.min_mem _ hx).2
[GOAL]
case neg
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Ring B'
inst✝¹ : Algebra A B
inst✝ : Algebra A B'
x : B
hx : ¬IsIntegral A x
⊢ ↑(Polynomial.aeval x)
      (if hx : IsIntegral A x then
        WellFounded.min (_ : WellFounded fun p q => degree p < degree q)
          (fun x_1 => Monic x_1 ∧ eval₂ (algebraMap A B) x x_1 = 0) hx
      else 0) =
    0
[PROOFSTEP]
rw [dif_neg hx]
[GOAL]
case neg
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Ring B'
inst✝¹ : Algebra A B
inst✝ : Algebra A B'
x : B
hx : ¬IsIntegral A x
⊢ ↑(Polynomial.aeval x) 0 = 0
[PROOFSTEP]
exact aeval_zero _
[GOAL]
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁵ : CommRing A
inst✝⁴ : Ring B
inst✝³ : Ring B'
inst✝² : Algebra A B
inst✝¹ : Algebra A B'
x : B
inst✝ : Nontrivial B
⊢ minpoly A x ≠ 1
[PROOFSTEP]
intro h
[GOAL]
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁵ : CommRing A
inst✝⁴ : Ring B
inst✝³ : Ring B'
inst✝² : Algebra A B
inst✝¹ : Algebra A B'
x : B
inst✝ : Nontrivial B
h : minpoly A x = 1
⊢ False
[PROOFSTEP]
refine' (one_ne_zero : (1 : B) ≠ 0) _
[GOAL]
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁵ : CommRing A
inst✝⁴ : Ring B
inst✝³ : Ring B'
inst✝² : Algebra A B
inst✝¹ : Algebra A B'
x : B
inst✝ : Nontrivial B
h : minpoly A x = 1
⊢ 1 = 0
[PROOFSTEP]
simpa using congr_arg (Polynomial.aeval x) h
[GOAL]
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁷ : CommRing A
inst✝⁶ : Ring B
inst✝⁵ : Ring B'
inst✝⁴ : Algebra A B
inst✝³ : Algebra A B'
x : B
inst✝² : Nontrivial B
R : Type u_4
inst✝¹ : Semiring R
inst✝ : Nontrivial R
f : A →+* R
⊢ map f (minpoly A x) ≠ 1
[PROOFSTEP]
by_cases hx : IsIntegral A x
[GOAL]
case pos
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁷ : CommRing A
inst✝⁶ : Ring B
inst✝⁵ : Ring B'
inst✝⁴ : Algebra A B
inst✝³ : Algebra A B'
x : B
inst✝² : Nontrivial B
R : Type u_4
inst✝¹ : Semiring R
inst✝ : Nontrivial R
f : A →+* R
hx : IsIntegral A x
⊢ map f (minpoly A x) ≠ 1
[PROOFSTEP]
exact mt ((monic hx).eq_one_of_map_eq_one f) (ne_one A x)
[GOAL]
case neg
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁷ : CommRing A
inst✝⁶ : Ring B
inst✝⁵ : Ring B'
inst✝⁴ : Algebra A B
inst✝³ : Algebra A B'
x : B
inst✝² : Nontrivial B
R : Type u_4
inst✝¹ : Semiring R
inst✝ : Nontrivial R
f : A →+* R
hx : ¬IsIntegral A x
⊢ map f (minpoly A x) ≠ 1
[PROOFSTEP]
rw [eq_zero hx, Polynomial.map_zero]
[GOAL]
case neg
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁷ : CommRing A
inst✝⁶ : Ring B
inst✝⁵ : Ring B'
inst✝⁴ : Algebra A B
inst✝³ : Algebra A B'
x : B
inst✝² : Nontrivial B
R : Type u_4
inst✝¹ : Semiring R
inst✝ : Nontrivial R
f : A →+* R
hx : ¬IsIntegral A x
⊢ 0 ≠ 1
[PROOFSTEP]
exact zero_ne_one
[GOAL]
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁵ : CommRing A
inst✝⁴ : Ring B
inst✝³ : Ring B'
inst✝² : Algebra A B
inst✝¹ : Algebra A B'
x : B
inst✝ : Nontrivial B
⊢ ¬IsUnit (minpoly A x)
[PROOFSTEP]
haveI : Nontrivial A := (algebraMap A B).domain_nontrivial
[GOAL]
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁵ : CommRing A
inst✝⁴ : Ring B
inst✝³ : Ring B'
inst✝² : Algebra A B
inst✝¹ : Algebra A B'
x : B
inst✝ : Nontrivial B
this : Nontrivial A
⊢ ¬IsUnit (minpoly A x)
[PROOFSTEP]
by_cases hx : IsIntegral A x
[GOAL]
case pos
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁵ : CommRing A
inst✝⁴ : Ring B
inst✝³ : Ring B'
inst✝² : Algebra A B
inst✝¹ : Algebra A B'
x : B
inst✝ : Nontrivial B
this : Nontrivial A
hx : IsIntegral A x
⊢ ¬IsUnit (minpoly A x)
[PROOFSTEP]
exact mt (monic hx).eq_one_of_isUnit (ne_one A x)
[GOAL]
case neg
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁵ : CommRing A
inst✝⁴ : Ring B
inst✝³ : Ring B'
inst✝² : Algebra A B
inst✝¹ : Algebra A B'
x : B
inst✝ : Nontrivial B
this : Nontrivial A
hx : ¬IsIntegral A x
⊢ ¬IsUnit (minpoly A x)
[PROOFSTEP]
rw [eq_zero hx]
[GOAL]
case neg
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁵ : CommRing A
inst✝⁴ : Ring B
inst✝³ : Ring B'
inst✝² : Algebra A B
inst✝¹ : Algebra A B'
x : B
inst✝ : Nontrivial B
this : Nontrivial A
hx : ¬IsIntegral A x
⊢ ¬IsUnit 0
[PROOFSTEP]
exact not_isUnit_zero
[GOAL]
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Ring B'
inst✝¹ : Algebra A B
inst✝ : Algebra A B'
x : B
hx : degree (minpoly A x) = 1
⊢ x ∈ RingHom.range (algebraMap A B)
[PROOFSTEP]
have h : IsIntegral A x := by
  by_contra h
  rw [eq_zero h, degree_zero, ← WithBot.coe_one] at hx
  exact ne_of_lt (show ⊥ < ↑1 from WithBot.bot_lt_coe 1) hx
[GOAL]
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Ring B'
inst✝¹ : Algebra A B
inst✝ : Algebra A B'
x : B
hx : degree (minpoly A x) = 1
⊢ IsIntegral A x
[PROOFSTEP]
by_contra h
[GOAL]
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Ring B'
inst✝¹ : Algebra A B
inst✝ : Algebra A B'
x : B
hx : degree (minpoly A x) = 1
h : ¬IsIntegral A x
⊢ False
[PROOFSTEP]
rw [eq_zero h, degree_zero, ← WithBot.coe_one] at hx
[GOAL]
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Ring B'
inst✝¹ : Algebra A B
inst✝ : Algebra A B'
x : B
hx : ⊥ = ↑1
h : ¬IsIntegral A x
⊢ False
[PROOFSTEP]
exact ne_of_lt (show ⊥ < ↑1 from WithBot.bot_lt_coe 1) hx
[GOAL]
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Ring B'
inst✝¹ : Algebra A B
inst✝ : Algebra A B'
x : B
hx : degree (minpoly A x) = 1
h : IsIntegral A x
⊢ x ∈ RingHom.range (algebraMap A B)
[PROOFSTEP]
have key := minpoly.aeval A x
[GOAL]
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Ring B'
inst✝¹ : Algebra A B
inst✝ : Algebra A B'
x : B
hx : degree (minpoly A x) = 1
h : IsIntegral A x
key : ↑(Polynomial.aeval x) (minpoly A x) = 0
⊢ x ∈ RingHom.range (algebraMap A B)
[PROOFSTEP]
rw [eq_X_add_C_of_degree_eq_one hx, (minpoly.monic h).leadingCoeff, C_1, one_mul, aeval_add, aeval_C, aeval_X, ←
  eq_neg_iff_add_eq_zero, ← RingHom.map_neg] at key
[GOAL]
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Ring B'
inst✝¹ : Algebra A B
inst✝ : Algebra A B'
x : B
hx : degree (minpoly A x) = 1
h : IsIntegral A x
key : x = ↑(algebraMap A B) (-coeff (minpoly A x) 0)
⊢ x ∈ RingHom.range (algebraMap A B)
[PROOFSTEP]
exact ⟨-(minpoly A x).coeff 0, key.symm⟩
[GOAL]
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Ring B'
inst✝¹ : Algebra A B
inst✝ : Algebra A B'
x : B
p : A[X]
pmonic : Monic p
hp : ↑(Polynomial.aeval x) p = 0
⊢ degree (minpoly A x) ≤ degree p
[PROOFSTEP]
delta minpoly
[GOAL]
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Ring B'
inst✝¹ : Algebra A B
inst✝ : Algebra A B'
x : B
p : A[X]
pmonic : Monic p
hp : ↑(Polynomial.aeval x) p = 0
⊢ degree
      (if hx : IsIntegral A x then
        WellFounded.min (_ : WellFounded fun p q => degree p < degree q)
          (fun x_1 => Monic x_1 ∧ eval₂ (algebraMap A B) x x_1 = 0) hx
      else 0) ≤
    degree p
[PROOFSTEP]
split_ifs with hx
[GOAL]
case pos
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Ring B'
inst✝¹ : Algebra A B
inst✝ : Algebra A B'
x : B
p : A[X]
pmonic : Monic p
hp : ↑(Polynomial.aeval x) p = 0
hx : IsIntegral A x
⊢ degree
      (WellFounded.min (_ : WellFounded fun p q => degree p < degree q)
        (fun x_1 => Monic x_1 ∧ eval₂ (algebraMap A B) x x_1 = 0) hx) ≤
    degree p
[PROOFSTEP]
exact le_of_not_lt (degree_lt_wf.not_lt_min _ hx ⟨pmonic, hp⟩)
[GOAL]
case neg
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Ring B'
inst✝¹ : Algebra A B
inst✝ : Algebra A B'
x : B
p : A[X]
pmonic : Monic p
hp : ↑(Polynomial.aeval x) p = 0
hx : ¬IsIntegral A x
⊢ degree 0 ≤ degree p
[PROOFSTEP]
simp only [degree_zero, bot_le]
[GOAL]
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Ring B'
inst✝¹ : Algebra A B
inst✝ : Algebra A B'
x : B
p : A[X]
hm : Monic p
hp : ↑(Polynomial.aeval x) p = 0
hl : ∀ (q : A[X]), degree q < degree p → q = 0 ∨ ↑(Polynomial.aeval x) q ≠ 0
⊢ p = minpoly A x
[PROOFSTEP]
nontriviality A
[GOAL]
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Ring B'
inst✝¹ : Algebra A B
inst✝ : Algebra A B'
x : B
p : A[X]
hm : Monic p
hp : ↑(Polynomial.aeval x) p = 0
hl : ∀ (q : A[X]), degree q < degree p → q = 0 ∨ ↑(Polynomial.aeval x) q ≠ 0
✝ : Nontrivial A
⊢ p = minpoly A x
[PROOFSTEP]
have hx : IsIntegral A x := ⟨p, hm, hp⟩
[GOAL]
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Ring B'
inst✝¹ : Algebra A B
inst✝ : Algebra A B'
x : B
p : A[X]
hm : Monic p
hp : ↑(Polynomial.aeval x) p = 0
hl : ∀ (q : A[X]), degree q < degree p → q = 0 ∨ ↑(Polynomial.aeval x) q ≠ 0
✝ : Nontrivial A
hx : IsIntegral A x
⊢ p = minpoly A x
[PROOFSTEP]
obtain h | h := hl _ ((minpoly A x).degree_modByMonic_lt hm)
[GOAL]
case inl
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Ring B'
inst✝¹ : Algebra A B
inst✝ : Algebra A B'
x : B
p : A[X]
hm : Monic p
hp : ↑(Polynomial.aeval x) p = 0
hl : ∀ (q : A[X]), degree q < degree p → q = 0 ∨ ↑(Polynomial.aeval x) q ≠ 0
✝ : Nontrivial A
hx : IsIntegral A x
h : minpoly A x %ₘ p = 0
⊢ p = minpoly A x
case inr
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Ring B'
inst✝¹ : Algebra A B
inst✝ : Algebra A B'
x : B
p : A[X]
hm : Monic p
hp : ↑(Polynomial.aeval x) p = 0
hl : ∀ (q : A[X]), degree q < degree p → q = 0 ∨ ↑(Polynomial.aeval x) q ≠ 0
✝ : Nontrivial A
hx : IsIntegral A x
h : ↑(Polynomial.aeval x) (minpoly A x %ₘ p) ≠ 0
⊢ p = minpoly A x
[PROOFSTEP]
swap
[GOAL]
case inr
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Ring B'
inst✝¹ : Algebra A B
inst✝ : Algebra A B'
x : B
p : A[X]
hm : Monic p
hp : ↑(Polynomial.aeval x) p = 0
hl : ∀ (q : A[X]), degree q < degree p → q = 0 ∨ ↑(Polynomial.aeval x) q ≠ 0
✝ : Nontrivial A
hx : IsIntegral A x
h : ↑(Polynomial.aeval x) (minpoly A x %ₘ p) ≠ 0
⊢ p = minpoly A x
[PROOFSTEP]
exact (h <| (aeval_modByMonic_eq_self_of_root hm hp).trans <| aeval A x).elim
[GOAL]
case inl
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Ring B'
inst✝¹ : Algebra A B
inst✝ : Algebra A B'
x : B
p : A[X]
hm : Monic p
hp : ↑(Polynomial.aeval x) p = 0
hl : ∀ (q : A[X]), degree q < degree p → q = 0 ∨ ↑(Polynomial.aeval x) q ≠ 0
✝ : Nontrivial A
hx : IsIntegral A x
h : minpoly A x %ₘ p = 0
⊢ p = minpoly A x
[PROOFSTEP]
obtain ⟨r, hr⟩ := (dvd_iff_modByMonic_eq_zero hm).1 h
[GOAL]
case inl.intro
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Ring B'
inst✝¹ : Algebra A B
inst✝ : Algebra A B'
x : B
p : A[X]
hm : Monic p
hp : ↑(Polynomial.aeval x) p = 0
hl : ∀ (q : A[X]), degree q < degree p → q = 0 ∨ ↑(Polynomial.aeval x) q ≠ 0
✝ : Nontrivial A
hx : IsIntegral A x
h : minpoly A x %ₘ p = 0
r : A[X]
hr : minpoly A x = p * r
⊢ p = minpoly A x
[PROOFSTEP]
rw [hr]
[GOAL]
case inl.intro
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Ring B'
inst✝¹ : Algebra A B
inst✝ : Algebra A B'
x : B
p : A[X]
hm : Monic p
hp : ↑(Polynomial.aeval x) p = 0
hl : ∀ (q : A[X]), degree q < degree p → q = 0 ∨ ↑(Polynomial.aeval x) q ≠ 0
✝ : Nontrivial A
hx : IsIntegral A x
h : minpoly A x %ₘ p = 0
r : A[X]
hr : minpoly A x = p * r
⊢ p = p * r
[PROOFSTEP]
have hlead := congr_arg leadingCoeff hr
[GOAL]
case inl.intro
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Ring B'
inst✝¹ : Algebra A B
inst✝ : Algebra A B'
x : B
p : A[X]
hm : Monic p
hp : ↑(Polynomial.aeval x) p = 0
hl : ∀ (q : A[X]), degree q < degree p → q = 0 ∨ ↑(Polynomial.aeval x) q ≠ 0
✝ : Nontrivial A
hx : IsIntegral A x
h : minpoly A x %ₘ p = 0
r : A[X]
hr : minpoly A x = p * r
hlead : leadingCoeff (minpoly A x) = leadingCoeff (p * r)
⊢ p = p * r
[PROOFSTEP]
rw [mul_comm, leadingCoeff_mul_monic hm, (monic hx).leadingCoeff] at hlead
[GOAL]
case inl.intro
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Ring B'
inst✝¹ : Algebra A B
inst✝ : Algebra A B'
x : B
p : A[X]
hm : Monic p
hp : ↑(Polynomial.aeval x) p = 0
hl : ∀ (q : A[X]), degree q < degree p → q = 0 ∨ ↑(Polynomial.aeval x) q ≠ 0
✝ : Nontrivial A
hx : IsIntegral A x
h : minpoly A x %ₘ p = 0
r : A[X]
hr : minpoly A x = p * r
hlead : 1 = leadingCoeff r
⊢ p = p * r
[PROOFSTEP]
have : natDegree r ≤ 0 :=
  by
  have hr0 : r ≠ 0 := by
    rintro rfl
    exact ne_zero hx (mul_zero p ▸ hr)
  apply_fun natDegree at hr
  rw [hm.natDegree_mul' hr0] at hr
  apply Nat.le_of_add_le_add_left
  rw [add_zero]
  exact hr.symm.trans_le (natDegree_le_natDegree <| min A x hm hp)
[GOAL]
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Ring B'
inst✝¹ : Algebra A B
inst✝ : Algebra A B'
x : B
p : A[X]
hm : Monic p
hp : ↑(Polynomial.aeval x) p = 0
hl : ∀ (q : A[X]), degree q < degree p → q = 0 ∨ ↑(Polynomial.aeval x) q ≠ 0
✝ : Nontrivial A
hx : IsIntegral A x
h : minpoly A x %ₘ p = 0
r : A[X]
hr : minpoly A x = p * r
hlead : 1 = leadingCoeff r
⊢ natDegree r ≤ 0
[PROOFSTEP]
have hr0 : r ≠ 0 := by
  rintro rfl
  exact ne_zero hx (mul_zero p ▸ hr)
[GOAL]
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Ring B'
inst✝¹ : Algebra A B
inst✝ : Algebra A B'
x : B
p : A[X]
hm : Monic p
hp : ↑(Polynomial.aeval x) p = 0
hl : ∀ (q : A[X]), degree q < degree p → q = 0 ∨ ↑(Polynomial.aeval x) q ≠ 0
✝ : Nontrivial A
hx : IsIntegral A x
h : minpoly A x %ₘ p = 0
r : A[X]
hr : minpoly A x = p * r
hlead : 1 = leadingCoeff r
⊢ r ≠ 0
[PROOFSTEP]
rintro rfl
[GOAL]
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Ring B'
inst✝¹ : Algebra A B
inst✝ : Algebra A B'
x : B
p : A[X]
hm : Monic p
hp : ↑(Polynomial.aeval x) p = 0
hl : ∀ (q : A[X]), degree q < degree p → q = 0 ∨ ↑(Polynomial.aeval x) q ≠ 0
✝ : Nontrivial A
hx : IsIntegral A x
h : minpoly A x %ₘ p = 0
hr : minpoly A x = p * 0
hlead : 1 = leadingCoeff 0
⊢ False
[PROOFSTEP]
exact ne_zero hx (mul_zero p ▸ hr)
[GOAL]
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Ring B'
inst✝¹ : Algebra A B
inst✝ : Algebra A B'
x : B
p : A[X]
hm : Monic p
hp : ↑(Polynomial.aeval x) p = 0
hl : ∀ (q : A[X]), degree q < degree p → q = 0 ∨ ↑(Polynomial.aeval x) q ≠ 0
✝ : Nontrivial A
hx : IsIntegral A x
h : minpoly A x %ₘ p = 0
r : A[X]
hr : minpoly A x = p * r
hlead : 1 = leadingCoeff r
hr0 : r ≠ 0
⊢ natDegree r ≤ 0
[PROOFSTEP]
apply_fun natDegree at hr
[GOAL]
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Ring B'
inst✝¹ : Algebra A B
inst✝ : Algebra A B'
x : B
p : A[X]
hm : Monic p
hp : ↑(Polynomial.aeval x) p = 0
hl : ∀ (q : A[X]), degree q < degree p → q = 0 ∨ ↑(Polynomial.aeval x) q ≠ 0
✝ : Nontrivial A
hx : IsIntegral A x
h : minpoly A x %ₘ p = 0
r : A[X]
hlead : 1 = leadingCoeff r
hr0 : r ≠ 0
hr : natDegree (minpoly A x) = natDegree (p * r)
⊢ natDegree r ≤ 0
[PROOFSTEP]
rw [hm.natDegree_mul' hr0] at hr
[GOAL]
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Ring B'
inst✝¹ : Algebra A B
inst✝ : Algebra A B'
x : B
p : A[X]
hm : Monic p
hp : ↑(Polynomial.aeval x) p = 0
hl : ∀ (q : A[X]), degree q < degree p → q = 0 ∨ ↑(Polynomial.aeval x) q ≠ 0
✝ : Nontrivial A
hx : IsIntegral A x
h : minpoly A x %ₘ p = 0
r : A[X]
hlead : 1 = leadingCoeff r
hr0 : r ≠ 0
hr : natDegree (minpoly A x) = natDegree p + natDegree r
⊢ natDegree r ≤ 0
[PROOFSTEP]
apply Nat.le_of_add_le_add_left
[GOAL]
case h
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Ring B'
inst✝¹ : Algebra A B
inst✝ : Algebra A B'
x : B
p : A[X]
hm : Monic p
hp : ↑(Polynomial.aeval x) p = 0
hl : ∀ (q : A[X]), degree q < degree p → q = 0 ∨ ↑(Polynomial.aeval x) q ≠ 0
✝ : Nontrivial A
hx : IsIntegral A x
h : minpoly A x %ₘ p = 0
r : A[X]
hlead : 1 = leadingCoeff r
hr0 : r ≠ 0
hr : natDegree (minpoly A x) = natDegree p + natDegree r
⊢ ?a + natDegree r ≤ ?a + 0
case a
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Ring B'
inst✝¹ : Algebra A B
inst✝ : Algebra A B'
x : B
p : A[X]
hm : Monic p
hp : ↑(Polynomial.aeval x) p = 0
hl : ∀ (q : A[X]), degree q < degree p → q = 0 ∨ ↑(Polynomial.aeval x) q ≠ 0
✝ : Nontrivial A
hx : IsIntegral A x
h : minpoly A x %ₘ p = 0
r : A[X]
hlead : 1 = leadingCoeff r
hr0 : r ≠ 0
hr : natDegree (minpoly A x) = natDegree p + natDegree r
⊢ ℕ
[PROOFSTEP]
rw [add_zero]
[GOAL]
case h
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Ring B'
inst✝¹ : Algebra A B
inst✝ : Algebra A B'
x : B
p : A[X]
hm : Monic p
hp : ↑(Polynomial.aeval x) p = 0
hl : ∀ (q : A[X]), degree q < degree p → q = 0 ∨ ↑(Polynomial.aeval x) q ≠ 0
✝ : Nontrivial A
hx : IsIntegral A x
h : minpoly A x %ₘ p = 0
r : A[X]
hlead : 1 = leadingCoeff r
hr0 : r ≠ 0
hr : natDegree (minpoly A x) = natDegree p + natDegree r
⊢ ?h + natDegree r ≤ ?h
case h
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Ring B'
inst✝¹ : Algebra A B
inst✝ : Algebra A B'
x : B
p : A[X]
hm : Monic p
hp : ↑(Polynomial.aeval x) p = 0
hl : ∀ (q : A[X]), degree q < degree p → q = 0 ∨ ↑(Polynomial.aeval x) q ≠ 0
✝ : Nontrivial A
hx : IsIntegral A x
h : minpoly A x %ₘ p = 0
r : A[X]
hlead : 1 = leadingCoeff r
hr0 : r ≠ 0
hr : natDegree (minpoly A x) = natDegree p + natDegree r
⊢ ℕ
[PROOFSTEP]
exact hr.symm.trans_le (natDegree_le_natDegree <| min A x hm hp)
[GOAL]
case inl.intro
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Ring B'
inst✝¹ : Algebra A B
inst✝ : Algebra A B'
x : B
p : A[X]
hm : Monic p
hp : ↑(Polynomial.aeval x) p = 0
hl : ∀ (q : A[X]), degree q < degree p → q = 0 ∨ ↑(Polynomial.aeval x) q ≠ 0
✝ : Nontrivial A
hx : IsIntegral A x
h : minpoly A x %ₘ p = 0
r : A[X]
hr : minpoly A x = p * r
hlead : 1 = leadingCoeff r
this : natDegree r ≤ 0
⊢ p = p * r
[PROOFSTEP]
rw [eq_C_of_natDegree_le_zero this, ← Nat.eq_zero_of_le_zero this, ← leadingCoeff, ← hlead, C_1, mul_one]
[GOAL]
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁵ : CommRing A
inst✝⁴ : Ring B
inst✝³ : Ring B'
inst✝² : Algebra A B
inst✝¹ : Algebra A B'
x : B
inst✝ : Subsingleton B
⊢ minpoly A x = 1
[PROOFSTEP]
nontriviality A
[GOAL]
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁵ : CommRing A
inst✝⁴ : Ring B
inst✝³ : Ring B'
inst✝² : Algebra A B
inst✝¹ : Algebra A B'
x : B
inst✝ : Subsingleton B
✝ : Nontrivial A
⊢ minpoly A x = 1
[PROOFSTEP]
have := minpoly.min A x monic_one (Subsingleton.elim _ _)
[GOAL]
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁵ : CommRing A
inst✝⁴ : Ring B
inst✝³ : Ring B'
inst✝² : Algebra A B
inst✝¹ : Algebra A B'
x : B
inst✝ : Subsingleton B
✝ : Nontrivial A
this : degree (minpoly A x) ≤ degree 1
⊢ minpoly A x = 1
[PROOFSTEP]
rw [degree_one] at this
[GOAL]
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁵ : CommRing A
inst✝⁴ : Ring B
inst✝³ : Ring B'
inst✝² : Algebra A B
inst✝¹ : Algebra A B'
x : B
inst✝ : Subsingleton B
✝ : Nontrivial A
this : degree (minpoly A x) ≤ 0
⊢ minpoly A x = 1
[PROOFSTEP]
cases' le_or_lt (minpoly A x).degree 0 with h h
[GOAL]
case inl
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁵ : CommRing A
inst✝⁴ : Ring B
inst✝³ : Ring B'
inst✝² : Algebra A B
inst✝¹ : Algebra A B'
x : B
inst✝ : Subsingleton B
✝ : Nontrivial A
this : degree (minpoly A x) ≤ 0
h : degree (minpoly A x) ≤ 0
⊢ minpoly A x = 1
[PROOFSTEP]
rwa [(monic ⟨1, monic_one, by simp⟩ : (minpoly A x).Monic).degree_le_zero_iff_eq_one] at h
[GOAL]
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁵ : CommRing A
inst✝⁴ : Ring B
inst✝³ : Ring B'
inst✝² : Algebra A B
inst✝¹ : Algebra A B'
x : B
inst✝ : Subsingleton B
✝ : Nontrivial A
this : degree (minpoly A x) ≤ 0
h : degree (minpoly A x) ≤ 0
⊢ eval₂ (algebraMap A B) x 1 = 0
[PROOFSTEP]
simp
[GOAL]
case inr
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁵ : CommRing A
inst✝⁴ : Ring B
inst✝³ : Ring B'
inst✝² : Algebra A B
inst✝¹ : Algebra A B'
x : B
inst✝ : Subsingleton B
✝ : Nontrivial A
this : degree (minpoly A x) ≤ 0
h : 0 < degree (minpoly A x)
⊢ minpoly A x = 1
[PROOFSTEP]
exact (this.not_lt h).elim
[GOAL]
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝³ : CommRing A
inst✝² : Ring B
inst✝¹ : Algebra A B
x : B
inst✝ : Nontrivial B
hx : IsIntegral A x
⊢ 0 < natDegree (minpoly A x)
[PROOFSTEP]
rw [pos_iff_ne_zero]
[GOAL]
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝³ : CommRing A
inst✝² : Ring B
inst✝¹ : Algebra A B
x : B
inst✝ : Nontrivial B
hx : IsIntegral A x
⊢ natDegree (minpoly A x) ≠ 0
[PROOFSTEP]
intro ndeg_eq_zero
[GOAL]
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝³ : CommRing A
inst✝² : Ring B
inst✝¹ : Algebra A B
x : B
inst✝ : Nontrivial B
hx : IsIntegral A x
ndeg_eq_zero : natDegree (minpoly A x) = 0
⊢ False
[PROOFSTEP]
have eq_one : minpoly A x = 1 := by
  rw [eq_C_of_natDegree_eq_zero ndeg_eq_zero]
  convert C_1 (R := A)
  simpa only [ndeg_eq_zero.symm] using (monic hx).leadingCoeff
[GOAL]
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝³ : CommRing A
inst✝² : Ring B
inst✝¹ : Algebra A B
x : B
inst✝ : Nontrivial B
hx : IsIntegral A x
ndeg_eq_zero : natDegree (minpoly A x) = 0
⊢ minpoly A x = 1
[PROOFSTEP]
rw [eq_C_of_natDegree_eq_zero ndeg_eq_zero]
[GOAL]
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝³ : CommRing A
inst✝² : Ring B
inst✝¹ : Algebra A B
x : B
inst✝ : Nontrivial B
hx : IsIntegral A x
ndeg_eq_zero : natDegree (minpoly A x) = 0
⊢ ↑C (coeff (minpoly A x) 0) = 1
[PROOFSTEP]
convert C_1 (R := A)
[GOAL]
case h.e'_2.h.e'_6
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝³ : CommRing A
inst✝² : Ring B
inst✝¹ : Algebra A B
x : B
inst✝ : Nontrivial B
hx : IsIntegral A x
ndeg_eq_zero : natDegree (minpoly A x) = 0
⊢ coeff (minpoly A x) 0 = 1
[PROOFSTEP]
simpa only [ndeg_eq_zero.symm] using (monic hx).leadingCoeff
[GOAL]
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝³ : CommRing A
inst✝² : Ring B
inst✝¹ : Algebra A B
x : B
inst✝ : Nontrivial B
hx : IsIntegral A x
ndeg_eq_zero : natDegree (minpoly A x) = 0
eq_one : minpoly A x = 1
⊢ False
[PROOFSTEP]
simpa only [eq_one, AlgHom.map_one, one_ne_zero] using aeval A x
[GOAL]
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝² : CommRing A
inst✝¹ : Ring B
inst✝ : Algebra A B
x : B
a : A
hf : Injective ↑(algebraMap A B)
⊢ minpoly A (↑(algebraMap A B) a) = X - ↑C a
[PROOFSTEP]
nontriviality A
[GOAL]
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝² : CommRing A
inst✝¹ : Ring B
inst✝ : Algebra A B
x : B
a : A
hf : Injective ↑(algebraMap A B)
✝ : Nontrivial A
⊢ minpoly A (↑(algebraMap A B) a) = X - ↑C a
[PROOFSTEP]
refine' (unique' A _ (monic_X_sub_C a) _ _).symm
[GOAL]
case refine'_1
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝² : CommRing A
inst✝¹ : Ring B
inst✝ : Algebra A B
x : B
a : A
hf : Injective ↑(algebraMap A B)
✝ : Nontrivial A
⊢ ↑(Polynomial.aeval (↑(algebraMap A B) a)) (X - ↑C a) = 0
[PROOFSTEP]
rw [map_sub, aeval_C, aeval_X, sub_self]
[GOAL]
case refine'_2
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝² : CommRing A
inst✝¹ : Ring B
inst✝ : Algebra A B
x : B
a : A
hf : Injective ↑(algebraMap A B)
✝ : Nontrivial A
⊢ ∀ (q : A[X]), degree q < degree (X - ↑C a) → q = 0 ∨ ↑(Polynomial.aeval (↑(algebraMap A B) a)) q ≠ 0
[PROOFSTEP]
simp_rw [or_iff_not_imp_left]
[GOAL]
case refine'_2
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝² : CommRing A
inst✝¹ : Ring B
inst✝ : Algebra A B
x : B
a : A
hf : Injective ↑(algebraMap A B)
✝ : Nontrivial A
⊢ ∀ (q : A[X]), degree q < degree (X - ↑C a) → ¬q = 0 → ↑(Polynomial.aeval (↑(algebraMap A B) a)) q ≠ 0
[PROOFSTEP]
intro q hl h0
[GOAL]
case refine'_2
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝² : CommRing A
inst✝¹ : Ring B
inst✝ : Algebra A B
x : B
a : A
hf : Injective ↑(algebraMap A B)
✝ : Nontrivial A
q : A[X]
hl : degree q < degree (X - ↑C a)
h0 : ¬q = 0
⊢ ↑(Polynomial.aeval (↑(algebraMap A B) a)) q ≠ 0
[PROOFSTEP]
rw [← natDegree_lt_natDegree_iff h0, natDegree_X_sub_C, Nat.lt_one_iff] at hl
[GOAL]
case refine'_2
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝² : CommRing A
inst✝¹ : Ring B
inst✝ : Algebra A B
x : B
a : A
hf : Injective ↑(algebraMap A B)
✝ : Nontrivial A
q : A[X]
hl : natDegree q = 0
h0 : ¬q = 0
⊢ ↑(Polynomial.aeval (↑(algebraMap A B) a)) q ≠ 0
[PROOFSTEP]
rw [eq_C_of_natDegree_eq_zero hl] at h0 ⊢
[GOAL]
case refine'_2
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝² : CommRing A
inst✝¹ : Ring B
inst✝ : Algebra A B
x : B
a : A
hf : Injective ↑(algebraMap A B)
✝ : Nontrivial A
q : A[X]
hl : natDegree q = 0
h0 : ¬↑C (coeff q 0) = 0
⊢ ↑(Polynomial.aeval (↑(algebraMap A B) a)) (↑C (coeff q 0)) ≠ 0
[PROOFSTEP]
rwa [aeval_C, map_ne_zero_iff _ hf, ← C_ne_zero]
[GOAL]
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝² : CommRing A
inst✝¹ : Ring B
inst✝ : Algebra A B
x : B
a : A[X]
hx : IsIntegral A x
hamonic : Monic a
hdvd : DvdNotUnit a (minpoly A x)
⊢ ↑(Polynomial.aeval x) a ≠ 0
[PROOFSTEP]
refine' fun ha => (min A x hamonic ha).not_lt (degree_lt_degree _)
[GOAL]
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝² : CommRing A
inst✝¹ : Ring B
inst✝ : Algebra A B
x : B
a : A[X]
hx : IsIntegral A x
hamonic : Monic a
hdvd : DvdNotUnit a (minpoly A x)
ha : ↑(Polynomial.aeval x) a = 0
⊢ natDegree a < natDegree (minpoly A x)
[PROOFSTEP]
obtain ⟨_, c, hu, he⟩ := hdvd
[GOAL]
case intro.intro.intro
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝² : CommRing A
inst✝¹ : Ring B
inst✝ : Algebra A B
x : B
a : A[X]
hx : IsIntegral A x
hamonic : Monic a
ha : ↑(Polynomial.aeval x) a = 0
left✝ : a ≠ 0
c : A[X]
hu : ¬IsUnit c
he : minpoly A x = a * c
⊢ natDegree a < natDegree (minpoly A x)
[PROOFSTEP]
have hcm := hamonic.of_mul_monic_left (he.subst <| monic hx)
[GOAL]
case intro.intro.intro
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝² : CommRing A
inst✝¹ : Ring B
inst✝ : Algebra A B
x : B
a : A[X]
hx : IsIntegral A x
hamonic : Monic a
ha : ↑(Polynomial.aeval x) a = 0
left✝ : a ≠ 0
c : A[X]
hu : ¬IsUnit c
he : minpoly A x = a * c
hcm : Monic c
⊢ natDegree a < natDegree (minpoly A x)
[PROOFSTEP]
rw [he, hamonic.natDegree_mul hcm]
  -- TODO: port Nat.lt_add_of_zero_lt_left from lean3 core
[GOAL]
case intro.intro.intro
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝² : CommRing A
inst✝¹ : Ring B
inst✝ : Algebra A B
x : B
a : A[X]
hx : IsIntegral A x
hamonic : Monic a
ha : ↑(Polynomial.aeval x) a = 0
left✝ : a ≠ 0
c : A[X]
hu : ¬IsUnit c
he : minpoly A x = a * c
hcm : Monic c
⊢ natDegree a < natDegree a + natDegree c
[PROOFSTEP]
apply lt_add_of_pos_right
[GOAL]
case intro.intro.intro.h
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝² : CommRing A
inst✝¹ : Ring B
inst✝ : Algebra A B
x : B
a : A[X]
hx : IsIntegral A x
hamonic : Monic a
ha : ↑(Polynomial.aeval x) a = 0
left✝ : a ≠ 0
c : A[X]
hu : ¬IsUnit c
he : minpoly A x = a * c
hcm : Monic c
⊢ 0 < natDegree c
[PROOFSTEP]
refine (lt_of_not_le fun h => hu ?_)
[GOAL]
case intro.intro.intro.h
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝² : CommRing A
inst✝¹ : Ring B
inst✝ : Algebra A B
x : B
a : A[X]
hx : IsIntegral A x
hamonic : Monic a
ha : ↑(Polynomial.aeval x) a = 0
left✝ : a ≠ 0
c : A[X]
hu : ¬IsUnit c
he : minpoly A x = a * c
hcm : Monic c
h : natDegree c ≤ 0
⊢ IsUnit c
[PROOFSTEP]
rw [eq_C_of_natDegree_le_zero h, ← Nat.eq_zero_of_le_zero h, ← leadingCoeff, hcm.leadingCoeff, C_1]
[GOAL]
case intro.intro.intro.h
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝² : CommRing A
inst✝¹ : Ring B
inst✝ : Algebra A B
x : B
a : A[X]
hx : IsIntegral A x
hamonic : Monic a
ha : ↑(Polynomial.aeval x) a = 0
left✝ : a ≠ 0
c : A[X]
hu : ¬IsUnit c
he : minpoly A x = a * c
hcm : Monic c
h : natDegree c ≤ 0
⊢ IsUnit 1
[PROOFSTEP]
exact isUnit_one
[GOAL]
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Algebra A B
x : B
inst✝¹ : IsDomain A
inst✝ : IsDomain B
hx : IsIntegral A x
⊢ Irreducible (minpoly A x)
[PROOFSTEP]
refine' (irreducible_of_monic (monic hx) <| ne_one A x).2 fun f g hf hg he => _
[GOAL]
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Algebra A B
x : B
inst✝¹ : IsDomain A
inst✝ : IsDomain B
hx : IsIntegral A x
f g : A[X]
hf : Monic f
hg : Monic g
he : f * g = minpoly A x
⊢ f = 1 ∨ g = 1
[PROOFSTEP]
rw [← hf.isUnit_iff, ← hg.isUnit_iff]
[GOAL]
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Algebra A B
x : B
inst✝¹ : IsDomain A
inst✝ : IsDomain B
hx : IsIntegral A x
f g : A[X]
hf : Monic f
hg : Monic g
he : f * g = minpoly A x
⊢ IsUnit f ∨ IsUnit g
[PROOFSTEP]
by_contra' h
[GOAL]
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Algebra A B
x : B
inst✝¹ : IsDomain A
inst✝ : IsDomain B
hx : IsIntegral A x
f g : A[X]
hf : Monic f
hg : Monic g
he : f * g = minpoly A x
h : ¬IsUnit f ∧ ¬IsUnit g
⊢ False
[PROOFSTEP]
have heval := congr_arg (Polynomial.aeval x) he
[GOAL]
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Algebra A B
x : B
inst✝¹ : IsDomain A
inst✝ : IsDomain B
hx : IsIntegral A x
f g : A[X]
hf : Monic f
hg : Monic g
he : f * g = minpoly A x
h : ¬IsUnit f ∧ ¬IsUnit g
heval : ↑(Polynomial.aeval x) (f * g) = ↑(Polynomial.aeval x) (minpoly A x)
⊢ False
[PROOFSTEP]
rw [aeval A x, aeval_mul, mul_eq_zero] at heval
[GOAL]
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Algebra A B
x : B
inst✝¹ : IsDomain A
inst✝ : IsDomain B
hx : IsIntegral A x
f g : A[X]
hf : Monic f
hg : Monic g
he : f * g = minpoly A x
h : ¬IsUnit f ∧ ¬IsUnit g
heval : ↑(Polynomial.aeval x) f = 0 ∨ ↑(Polynomial.aeval x) g = 0
⊢ False
[PROOFSTEP]
cases' heval with heval heval
[GOAL]
case inl
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Algebra A B
x : B
inst✝¹ : IsDomain A
inst✝ : IsDomain B
hx : IsIntegral A x
f g : A[X]
hf : Monic f
hg : Monic g
he : f * g = minpoly A x
h : ¬IsUnit f ∧ ¬IsUnit g
heval : ↑(Polynomial.aeval x) f = 0
⊢ False
[PROOFSTEP]
exact aeval_ne_zero_of_dvdNotUnit_minpoly hx hf ⟨hf.ne_zero, g, h.2, he.symm⟩ heval
[GOAL]
case inr
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Algebra A B
x : B
inst✝¹ : IsDomain A
inst✝ : IsDomain B
hx : IsIntegral A x
f g : A[X]
hf : Monic f
hg : Monic g
he : f * g = minpoly A x
h : ¬IsUnit f ∧ ¬IsUnit g
heval : ↑(Polynomial.aeval x) g = 0
⊢ False
[PROOFSTEP]
refine' aeval_ne_zero_of_dvdNotUnit_minpoly hx hg ⟨hg.ne_zero, f, h.1, _⟩ heval
[GOAL]
case inr
A : Type u_1
B : Type u_2
B' : Type u_3
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : Algebra A B
x : B
inst✝¹ : IsDomain A
inst✝ : IsDomain B
hx : IsIntegral A x
f g : A[X]
hf : Monic f
hg : Monic g
he : f * g = minpoly A x
h : ¬IsUnit f ∧ ¬IsUnit g
heval : ↑(Polynomial.aeval x) g = 0
⊢ minpoly A x = g * f
[PROOFSTEP]
rw [mul_comm, he]


[GOAL]
R : Type u_1
A : Type u
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : TopologicalSpace R
inst✝¹ : TopologicalSpace A
inst✝ : TopologicalSemiring A
⊢ Continuous ↑(algebraMap R A) ↔ Continuous fun p => p.fst • p.snd
[PROOFSTEP]
refine' ⟨fun h => _, fun h => _⟩
[GOAL]
case refine'_1
R : Type u_1
A : Type u
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : TopologicalSpace R
inst✝¹ : TopologicalSpace A
inst✝ : TopologicalSemiring A
h : Continuous ↑(algebraMap R A)
⊢ Continuous fun p => p.fst • p.snd
[PROOFSTEP]
simp only [Algebra.smul_def]
[GOAL]
case refine'_1
R : Type u_1
A : Type u
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : TopologicalSpace R
inst✝¹ : TopologicalSpace A
inst✝ : TopologicalSemiring A
h : Continuous ↑(algebraMap R A)
⊢ Continuous fun p => ↑(algebraMap R A) p.fst * p.snd
[PROOFSTEP]
exact (h.comp continuous_fst).mul continuous_snd
[GOAL]
case refine'_2
R : Type u_1
A : Type u
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : TopologicalSpace R
inst✝¹ : TopologicalSpace A
inst✝ : TopologicalSemiring A
h : Continuous fun p => p.fst • p.snd
⊢ Continuous ↑(algebraMap R A)
[PROOFSTEP]
rw [algebraMap_eq_smul_one']
[GOAL]
case refine'_2
R : Type u_1
A : Type u
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : TopologicalSpace R
inst✝¹ : TopologicalSpace A
inst✝ : TopologicalSemiring A
h : Continuous fun p => p.fst • p.snd
⊢ Continuous fun r => r • 1
[PROOFSTEP]
exact h.comp (continuous_id.prod_mk continuous_const)
[GOAL]
R : Type u_1
inst✝⁴ : CommSemiring R
A : Type u
inst✝³ : TopologicalSpace A
inst✝² : Semiring A
inst✝¹ : Algebra R A
inst✝ : TopologicalSemiring A
s : Subalgebra R A
⊢ IsClosed ↑(topologicalClosure s)
[PROOFSTEP]
convert @isClosed_closure A _ s
[GOAL]
R : Type u_1
inst✝⁸ : CommSemiring R
A : Type u
inst✝⁷ : TopologicalSpace A
inst✝⁶ : Semiring A
inst✝⁵ : Algebra R A
inst✝⁴ : TopologicalSemiring A
s : Subalgebra R A
B : Type u_2
inst✝³ : TopologicalSpace B
inst✝² : Ring B
inst✝¹ : TopologicalRing B
inst✝ : Algebra R B
f : B →ₐ[R] A
f' : B ≃ₜ A
w : ↑f = ↑f'
⊢ comap f (topologicalClosure s) = topologicalClosure (comap f s)
[PROOFSTEP]
apply SetLike.ext'
[GOAL]
case h
R : Type u_1
inst✝⁸ : CommSemiring R
A : Type u
inst✝⁷ : TopologicalSpace A
inst✝⁶ : Semiring A
inst✝⁵ : Algebra R A
inst✝⁴ : TopologicalSemiring A
s : Subalgebra R A
B : Type u_2
inst✝³ : TopologicalSpace B
inst✝² : Ring B
inst✝¹ : TopologicalRing B
inst✝ : Algebra R B
f : B →ₐ[R] A
f' : B ≃ₜ A
w : ↑f = ↑f'
⊢ ↑(comap f (topologicalClosure s)) = ↑(topologicalClosure (comap f s))
[PROOFSTEP]
simp only [Subalgebra.topologicalClosure_coe]
[GOAL]
case h
R : Type u_1
inst✝⁸ : CommSemiring R
A : Type u
inst✝⁷ : TopologicalSpace A
inst✝⁶ : Semiring A
inst✝⁵ : Algebra R A
inst✝⁴ : TopologicalSemiring A
s : Subalgebra R A
B : Type u_2
inst✝³ : TopologicalSpace B
inst✝² : Ring B
inst✝¹ : TopologicalRing B
inst✝ : Algebra R B
f : B →ₐ[R] A
f' : B ≃ₜ A
w : ↑f = ↑f'
⊢ ↑(comap f (topologicalClosure s)) = closure ↑(comap f s)
[PROOFSTEP]
simp only [Subalgebra.coe_comap, Subsemiring.coe_comap, AlgHom.coe_toRingHom]
[GOAL]
case h
R : Type u_1
inst✝⁸ : CommSemiring R
A : Type u
inst✝⁷ : TopologicalSpace A
inst✝⁶ : Semiring A
inst✝⁵ : Algebra R A
inst✝⁴ : TopologicalSemiring A
s : Subalgebra R A
B : Type u_2
inst✝³ : TopologicalSpace B
inst✝² : Ring B
inst✝¹ : TopologicalRing B
inst✝ : Algebra R B
f : B →ₐ[R] A
f' : B ≃ₜ A
w : ↑f = ↑f'
⊢ ↑f ⁻¹' ↑(topologicalClosure s) = closure (↑f ⁻¹' ↑s)
[PROOFSTEP]
rw [w]
[GOAL]
case h
R : Type u_1
inst✝⁸ : CommSemiring R
A : Type u
inst✝⁷ : TopologicalSpace A
inst✝⁶ : Semiring A
inst✝⁵ : Algebra R A
inst✝⁴ : TopologicalSemiring A
s : Subalgebra R A
B : Type u_2
inst✝³ : TopologicalSpace B
inst✝² : Ring B
inst✝¹ : TopologicalRing B
inst✝ : Algebra R B
f : B →ₐ[R] A
f' : B ≃ₜ A
w : ↑f = ↑f'
⊢ ↑f' ⁻¹' ↑(topologicalClosure s) = closure (↑f' ⁻¹' ↑s)
[PROOFSTEP]
exact f'.preimage_closure _
[GOAL]
R : Type u_1
inst✝⁵ : CommRing R
A : Type u
inst✝⁴ : TopologicalSpace A
inst✝³ : Ring A
inst✝² : Algebra R A
inst✝¹ : TopologicalRing A
inst✝ : T2Space A
x y : A
hy : y ∈ {x}
z : A
hz : z ∈ {x}
⊢ y * z = z * y
[PROOFSTEP]
rw [mem_singleton_iff] at hy hz
[GOAL]
R : Type u_1
inst✝⁵ : CommRing R
A : Type u
inst✝⁴ : TopologicalSpace A
inst✝³ : Ring A
inst✝² : Algebra R A
inst✝¹ : TopologicalRing A
inst✝ : T2Space A
x y : A
hy : y = x
z : A
hz : z = x
⊢ y * z = z * y
[PROOFSTEP]
rw [hy, hz]
[GOAL]
A : Type ?u.199010
inst✝³ : DivisionRing A
inst✝² : TopologicalSpace A
inst✝¹ : ContinuousMul A
inst✝ : CharZero A
r : ℚ
⊢ Continuous fun x => r • x
[PROOFSTEP]
simpa only [Algebra.smul_def] using continuous_const.mul continuous_id