[GOAL]
⊢ Dense {x | Irrational x}
[PROOFSTEP]
refine' Real.isTopologicalBasis_Ioo_rat.dense_iff.2 _
[GOAL]
⊢ ∀ (o : Set ℝ), o ∈ ⋃ (a : ℚ) (b : ℚ) (_ : a < b), {Ioo ↑a ↑b} → Set.Nonempty o → Set.Nonempty (o ∩ {x | Irrational x})
[PROOFSTEP]
simp only [gt_iff_lt, Rat.cast_lt, not_lt, ge_iff_le, Rat.cast_le, mem_iUnion, mem_singleton_iff, exists_prop,
  forall_exists_index, and_imp]
[GOAL]
⊢ ∀ (o : Set ℝ) (x x_1 : ℚ), x < x_1 → o = Ioo ↑x ↑x_1 → Set.Nonempty o → Set.Nonempty (o ∩ {x | Irrational x})
[PROOFSTEP]
rintro _ a b hlt rfl _
[GOAL]
a b : ℚ
hlt : a < b
a✝ : Set.Nonempty (Ioo ↑a ↑b)
⊢ Set.Nonempty (Ioo ↑a ↑b ∩ {x | Irrational x})
[PROOFSTEP]
rw [inter_comm]
[GOAL]
a b : ℚ
hlt : a < b
a✝ : Set.Nonempty (Ioo ↑a ↑b)
⊢ Set.Nonempty ({x | Irrational x} ∩ Ioo ↑a ↑b)
[PROOFSTEP]
exact exists_irrational_btwn (Rat.cast_lt.2 hlt)
[GOAL]
x✝¹ : ℝ
x✝ : { x // Irrational x }
x : ℝ
hx : Irrational x
⊢ { val := x, property := hx } < { val := x + ↑1, property := (_ : Irrational (x + ↑1)) }
[PROOFSTEP]
simp
[GOAL]
x✝¹ : ℝ
x✝ : { x // Irrational x }
x : ℝ
hx : Irrational x
⊢ { val := x - ↑1, property := (_ : Irrational (x - ↑1)) } < { val := x, property := hx }
[PROOFSTEP]
simp
[GOAL]
x : ℝ
hx : Irrational x
n : ℕ
⊢ ∀ᶠ (ε : ℝ) in 𝓝 0, ∀ (m : ℤ), ε ≤ dist x (↑m / ↑n)
[PROOFSTEP]
have A : IsClosed (range (fun m => (n : ℝ)⁻¹ * m : ℤ → ℝ)) :=
  ((isClosedMap_smul₀ (n⁻¹ : ℝ)).comp Int.closedEmbedding_coe_real.isClosedMap).closed_range
[GOAL]
x : ℝ
hx : Irrational x
n : ℕ
A : IsClosed (range fun m => (↑n)⁻¹ * ↑m)
⊢ ∀ᶠ (ε : ℝ) in 𝓝 0, ∀ (m : ℤ), ε ≤ dist x (↑m / ↑n)
[PROOFSTEP]
have B : x ∉ range (fun m => (n : ℝ)⁻¹ * m : ℤ → ℝ) :=
  by
  rintro ⟨m, rfl⟩
  simp at hx
[GOAL]
x : ℝ
hx : Irrational x
n : ℕ
A : IsClosed (range fun m => (↑n)⁻¹ * ↑m)
⊢ ¬x ∈ range fun m => (↑n)⁻¹ * ↑m
[PROOFSTEP]
rintro ⟨m, rfl⟩
[GOAL]
case intro
n : ℕ
A : IsClosed (range fun m => (↑n)⁻¹ * ↑m)
m : ℤ
hx : Irrational ((fun m => (↑n)⁻¹ * ↑m) m)
⊢ False
[PROOFSTEP]
simp at hx
[GOAL]
x : ℝ
hx : Irrational x
n : ℕ
A : IsClosed (range fun m => (↑n)⁻¹ * ↑m)
B : ¬x ∈ range fun m => (↑n)⁻¹ * ↑m
⊢ ∀ᶠ (ε : ℝ) in 𝓝 0, ∀ (m : ℤ), ε ≤ dist x (↑m / ↑n)
[PROOFSTEP]
rcases Metric.mem_nhds_iff.1 (A.isOpen_compl.mem_nhds B) with ⟨ε, ε0, hε⟩
[GOAL]
case intro.intro
x : ℝ
hx : Irrational x
n : ℕ
A : IsClosed (range fun m => (↑n)⁻¹ * ↑m)
B : ¬x ∈ range fun m => (↑n)⁻¹ * ↑m
ε : ℝ
ε0 : ε > 0
hε : ball x ε ⊆ (range fun m => (↑n)⁻¹ * ↑m)ᶜ
⊢ ∀ᶠ (ε : ℝ) in 𝓝 0, ∀ (m : ℤ), ε ≤ dist x (↑m / ↑n)
[PROOFSTEP]
refine' (ge_mem_nhds ε0).mono fun δ hδ m => not_lt.1 fun hlt => _
[GOAL]
case intro.intro
x : ℝ
hx : Irrational x
n : ℕ
A : IsClosed (range fun m => (↑n)⁻¹ * ↑m)
B : ¬x ∈ range fun m => (↑n)⁻¹ * ↑m
ε : ℝ
ε0 : ε > 0
hε : ball x ε ⊆ (range fun m => (↑n)⁻¹ * ↑m)ᶜ
δ : ℝ
hδ : δ ≤ ε
m : ℤ
hlt : dist x (↑m / ↑n) < δ
⊢ False
[PROOFSTEP]
rw [dist_comm] at hlt
[GOAL]
case intro.intro
x : ℝ
hx : Irrational x
n : ℕ
A : IsClosed (range fun m => (↑n)⁻¹ * ↑m)
B : ¬x ∈ range fun m => (↑n)⁻¹ * ↑m
ε : ℝ
ε0 : ε > 0
hε : ball x ε ⊆ (range fun m => (↑n)⁻¹ * ↑m)ᶜ
δ : ℝ
hδ : δ ≤ ε
m : ℤ
hlt : dist (↑m / ↑n) x < δ
⊢ False
[PROOFSTEP]
refine' hε (ball_subset_ball hδ hlt) ⟨m, _⟩
[GOAL]
case intro.intro
x : ℝ
hx : Irrational x
n : ℕ
A : IsClosed (range fun m => (↑n)⁻¹ * ↑m)
B : ¬x ∈ range fun m => (↑n)⁻¹ * ↑m
ε : ℝ
ε0 : ε > 0
hε : ball x ε ⊆ (range fun m => (↑n)⁻¹ * ↑m)ᶜ
δ : ℝ
hδ : δ ≤ ε
m : ℤ
hlt : dist (↑m / ↑n) x < δ
⊢ (fun m => (↑n)⁻¹ * ↑m) m = ↑m / ↑n
[PROOFSTEP]
simp [div_eq_inv_mul]
[GOAL]
x : ℝ
hx : Irrational x
n : ℕ
ε : ℝ
H : ∀ (k : ℕ), k ≤ n → ∀ (m : ℤ), ε ≤ dist x (↑m / ↑k)
r : ℚ
hr : r.den ≤ n
⊢ ε ≤ dist x ↑r
[PROOFSTEP]
simpa only [Rat.cast_def] using H r.den hr r.num


[GOAL]
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c : CU X
n : ℕ
x : X
hx : x ∈ c.C
⊢ approx n c x = 0
[PROOFSTEP]
induction' n with n ihn generalizing c
[GOAL]
case zero
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
x : X
hx✝ : x ∈ c✝.C
c : CU X
hx : x ∈ c.C
⊢ approx Nat.zero c x = 0
[PROOFSTEP]
exact indicator_of_not_mem (fun (hU : x ∈ c.Uᶜ) => hU <| c.subset hx) _
[GOAL]
case succ
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
x : X
hx✝ : x ∈ c✝.C
n : ℕ
ihn : ∀ (c : CU X), x ∈ c.C → approx n c x = 0
c : CU X
hx : x ∈ c.C
⊢ approx (Nat.succ n) c x = 0
[PROOFSTEP]
simp only [approx]
[GOAL]
case succ
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
x : X
hx✝ : x ∈ c✝.C
n : ℕ
ihn : ∀ (c : CU X), x ∈ c.C → approx n c x = 0
c : CU X
hx : x ∈ c.C
⊢ midpoint ℝ (approx n (left c) x) (approx n (right c) x) = 0
[PROOFSTEP]
rw [ihn, ihn, midpoint_self]
[GOAL]
case succ.hx
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
x : X
hx✝ : x ∈ c✝.C
n : ℕ
ihn : ∀ (c : CU X), x ∈ c.C → approx n c x = 0
c : CU X
hx : x ∈ c.C
⊢ x ∈ (right c).C
case succ.hx
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
x : X
hx✝ : x ∈ c✝.C
n : ℕ
ihn : ∀ (c : CU X), x ∈ c.C → approx n c x = 0
c : CU X
hx : x ∈ c.C
⊢ x ∈ (left c).C
[PROOFSTEP]
exacts [c.subset_right_C hx, hx]
[GOAL]
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c : CU X
n : ℕ
x : X
hx : ¬x ∈ c.U
⊢ approx n c x = 1
[PROOFSTEP]
induction' n with n ihn generalizing c
[GOAL]
case zero
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
x : X
hx✝ : ¬x ∈ c✝.U
c : CU X
hx : ¬x ∈ c.U
⊢ approx Nat.zero c x = 1
[PROOFSTEP]
rw [← mem_compl_iff] at hx
[GOAL]
case zero
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
x : X
hx✝ : ¬x ∈ c✝.U
c : CU X
hx : x ∈ c.Uᶜ
⊢ approx Nat.zero c x = 1
[PROOFSTEP]
exact indicator_of_mem hx _
[GOAL]
case succ
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
x : X
hx✝ : ¬x ∈ c✝.U
n : ℕ
ihn : ∀ (c : CU X), ¬x ∈ c.U → approx n c x = 1
c : CU X
hx : ¬x ∈ c.U
⊢ approx (Nat.succ n) c x = 1
[PROOFSTEP]
simp only [approx]
[GOAL]
case succ
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
x : X
hx✝ : ¬x ∈ c✝.U
n : ℕ
ihn : ∀ (c : CU X), ¬x ∈ c.U → approx n c x = 1
c : CU X
hx : ¬x ∈ c.U
⊢ midpoint ℝ (approx n (left c) x) (approx n (right c) x) = 1
[PROOFSTEP]
rw [ihn, ihn, midpoint_self]
[GOAL]
case succ.hx
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
x : X
hx✝ : ¬x ∈ c✝.U
n : ℕ
ihn : ∀ (c : CU X), ¬x ∈ c.U → approx n c x = 1
c : CU X
hx : ¬x ∈ c.U
⊢ ¬x ∈ (right c).U
case succ.hx
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
x : X
hx✝ : ¬x ∈ c✝.U
n : ℕ
ihn : ∀ (c : CU X), ¬x ∈ c.U → approx n c x = 1
c : CU X
hx : ¬x ∈ c.U
⊢ ¬x ∈ (left c).U
[PROOFSTEP]
exacts [hx, fun hU => hx <| c.left_U_subset hU]
[GOAL]
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c : CU X
n : ℕ
x : X
⊢ 0 ≤ approx n c x
[PROOFSTEP]
induction' n with n ihn generalizing c
[GOAL]
case zero
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
x : X
c : CU X
⊢ 0 ≤ approx Nat.zero c x
[PROOFSTEP]
exact indicator_nonneg (fun _ _ => zero_le_one) _
[GOAL]
case succ
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
x : X
n : ℕ
ihn : ∀ (c : CU X), 0 ≤ approx n c x
c : CU X
⊢ 0 ≤ approx (Nat.succ n) c x
[PROOFSTEP]
simp only [approx, midpoint_eq_smul_add, invOf_eq_inv]
[GOAL]
case succ
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
x : X
n : ℕ
ihn : ∀ (c : CU X), 0 ≤ approx n c x
c : CU X
⊢ 0 ≤ 2⁻¹ • (approx n (left c) x + approx n (right c) x)
[PROOFSTEP]
refine' mul_nonneg (inv_nonneg.2 zero_le_two) (add_nonneg _ _)
[GOAL]
case succ.refine'_1
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
x : X
n : ℕ
ihn : ∀ (c : CU X), 0 ≤ approx n c x
c : CU X
⊢ 0 ≤ approx n (left c) x
[PROOFSTEP]
apply ihn
[GOAL]
case succ.refine'_2
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
x : X
n : ℕ
ihn : ∀ (c : CU X), 0 ≤ approx n c x
c : CU X
⊢ 0 ≤ approx n (right c) x
[PROOFSTEP]
apply ihn
[GOAL]
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c : CU X
n : ℕ
x : X
⊢ approx n c x ≤ 1
[PROOFSTEP]
induction' n with n ihn generalizing c
[GOAL]
case zero
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
x : X
c : CU X
⊢ approx Nat.zero c x ≤ 1
[PROOFSTEP]
exact indicator_apply_le' (fun _ => le_rfl) fun _ => zero_le_one
[GOAL]
case succ
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
x : X
n : ℕ
ihn : ∀ (c : CU X), approx n c x ≤ 1
c : CU X
⊢ approx (Nat.succ n) c x ≤ 1
[PROOFSTEP]
simp only [approx, midpoint_eq_smul_add, invOf_eq_inv, smul_eq_mul, ← div_eq_inv_mul]
[GOAL]
case succ
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
x : X
n : ℕ
ihn : ∀ (c : CU X), approx n c x ≤ 1
c : CU X
⊢ (approx n (left c) x + approx n (right c) x) / 2 ≤ 1
[PROOFSTEP]
have := add_le_add (ihn (left c)) (ihn (right c))
[GOAL]
case succ
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
x : X
n : ℕ
ihn : ∀ (c : CU X), approx n c x ≤ 1
c : CU X
this : approx n (left c) x + approx n (right c) x ≤ 1 + 1
⊢ (approx n (left c) x + approx n (right c) x) / 2 ≤ 1
[PROOFSTEP]
norm_num at this
[GOAL]
case succ
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
x : X
n : ℕ
ihn : ∀ (c : CU X), approx n c x ≤ 1
c : CU X
this : approx n (left c) x + approx n (right c) x ≤ 2
⊢ (approx n (left c) x + approx n (right c) x) / 2 ≤ 1
[PROOFSTEP]
exact Iff.mpr (div_le_one zero_lt_two) this
[GOAL]
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c₁ c₂ : CU X
h : c₁.U ⊆ c₂.C
n₁ n₂ : ℕ
x : X
⊢ approx n₂ c₂ x ≤ approx n₁ c₁ x
[PROOFSTEP]
by_cases hx : x ∈ c₁.U
[GOAL]
case pos
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c₁ c₂ : CU X
h : c₁.U ⊆ c₂.C
n₁ n₂ : ℕ
x : X
hx : x ∈ c₁.U
⊢ approx n₂ c₂ x ≤ approx n₁ c₁ x
[PROOFSTEP]
calc
  approx n₂ c₂ x = 0 := approx_of_mem_C _ _ (h hx)
  _ ≤ approx n₁ c₁ x := approx_nonneg _ _ _
[GOAL]
case neg
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c₁ c₂ : CU X
h : c₁.U ⊆ c₂.C
n₁ n₂ : ℕ
x : X
hx : ¬x ∈ c₁.U
⊢ approx n₂ c₂ x ≤ approx n₁ c₁ x
[PROOFSTEP]
calc
  approx n₂ c₂ x ≤ 1 := approx_le_one _ _ _
  _ = approx n₁ c₁ x := (approx_of_nmem_U _ _ hx).symm
[GOAL]
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c : CU X
n : ℕ
x : X
⊢ approx n c x ∈ Icc (approx n (right c) x) (approx n (left c) x)
[PROOFSTEP]
induction' n with n ihn generalizing c
[GOAL]
case zero
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
x : X
c : CU X
⊢ approx Nat.zero c x ∈ Icc (approx Nat.zero (right c) x) (approx Nat.zero (left c) x)
[PROOFSTEP]
exact ⟨le_rfl, indicator_le_indicator_of_subset (compl_subset_compl.2 c.left_U_subset) (fun _ => zero_le_one) _⟩
[GOAL]
case succ
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
x : X
n : ℕ
ihn : ∀ (c : CU X), approx n c x ∈ Icc (approx n (right c) x) (approx n (left c) x)
c : CU X
⊢ approx (Nat.succ n) c x ∈ Icc (approx (Nat.succ n) (right c) x) (approx (Nat.succ n) (left c) x)
[PROOFSTEP]
simp only [approx, mem_Icc]
[GOAL]
case succ
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
x : X
n : ℕ
ihn : ∀ (c : CU X), approx n c x ∈ Icc (approx n (right c) x) (approx n (left c) x)
c : CU X
⊢ midpoint ℝ (approx n (left (right c)) x) (approx n (right (right c)) x) ≤
      midpoint ℝ (approx n (left c) x) (approx n (right c) x) ∧
    midpoint ℝ (approx n (left c) x) (approx n (right c) x) ≤
      midpoint ℝ (approx n (left (left c)) x) (approx n (right (left c)) x)
[PROOFSTEP]
refine' ⟨midpoint_le_midpoint _ (ihn _).1, midpoint_le_midpoint (ihn _).2 _⟩
[GOAL]
case succ.refine'_1
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
x : X
n : ℕ
ihn : ∀ (c : CU X), approx n c x ∈ Icc (approx n (right c) x) (approx n (left c) x)
c : CU X
⊢ approx n (left (right c)) x ≤ approx n (left c) x
[PROOFSTEP]
apply approx_le_approx_of_U_sub_C
[GOAL]
case succ.refine'_2
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
x : X
n : ℕ
ihn : ∀ (c : CU X), approx n c x ∈ Icc (approx n (right c) x) (approx n (left c) x)
c : CU X
⊢ approx n (right c) x ≤ approx n (right (left c)) x
[PROOFSTEP]
apply approx_le_approx_of_U_sub_C
[GOAL]
case succ.refine'_1.h
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
x : X
n : ℕ
ihn : ∀ (c : CU X), approx n c x ∈ Icc (approx n (right c) x) (approx n (left c) x)
c : CU X
⊢ (left c).U ⊆ (left (right c)).C
case succ.refine'_2.h
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
x : X
n : ℕ
ihn : ∀ (c : CU X), approx n c x ∈ Icc (approx n (right c) x) (approx n (left c) x)
c : CU X
⊢ (right (left c)).U ⊆ (right c).C
[PROOFSTEP]
exacts [subset_closure, subset_closure]
[GOAL]
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c : CU X
n : ℕ
x : X
⊢ approx n c x ≤ approx (n + 1) c x
[PROOFSTEP]
induction' n with n ihn generalizing c
[GOAL]
case zero
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
x : X
c : CU X
⊢ approx Nat.zero c x ≤ approx (Nat.zero + 1) c x
[PROOFSTEP]
simp only [approx, right_U, right_le_midpoint]
[GOAL]
case zero
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
x : X
c : CU X
⊢ indicator c.Uᶜ 1 x ≤ indicator (left c).Uᶜ 1 x
[PROOFSTEP]
exact (approx_mem_Icc_right_left c 0 x).2
[GOAL]
case succ
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
x : X
n : ℕ
ihn : ∀ (c : CU X), approx n c x ≤ approx (n + 1) c x
c : CU X
⊢ approx (Nat.succ n) c x ≤ approx (Nat.succ n + 1) c x
[PROOFSTEP]
rw [approx, approx]
[GOAL]
case succ
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
x : X
n : ℕ
ihn : ∀ (c : CU X), approx n c x ≤ approx (n + 1) c x
c : CU X
⊢ midpoint ℝ (approx n (left c) x) (approx n (right c) x) ≤
    midpoint ℝ (approx (n + 1) (left c) x) (approx (n + 1) (right c) x)
[PROOFSTEP]
exact midpoint_le_midpoint (ihn _) (ihn _)
[GOAL]
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c : CU X
x : X
h : x ∈ c.C
⊢ CU.lim c x = 0
[PROOFSTEP]
simp only [CU.lim, approx_of_mem_C, h, ciSup_const]
[GOAL]
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c : CU X
x : X
h : ¬x ∈ c.U
⊢ CU.lim c x = 1
[PROOFSTEP]
simp only [CU.lim, approx_of_nmem_U c _ h, ciSup_const]
[GOAL]
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c : CU X
x : X
⊢ CU.lim c x = midpoint ℝ (CU.lim (left c) x) (CU.lim (right c) x)
[PROOFSTEP]
refine' tendsto_nhds_unique (c.tendsto_approx_atTop x) ((tendsto_add_atTop_iff_nat 1).1 _)
[GOAL]
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c : CU X
x : X
⊢ Tendsto (fun n => approx (n + 1) c x) atTop (𝓝 (midpoint ℝ (CU.lim (left c) x) (CU.lim (right c) x)))
[PROOFSTEP]
simp only [approx]
[GOAL]
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c : CU X
x : X
⊢ Tendsto (fun n => midpoint ℝ (approx (Nat.add n 0) (left c) x) (approx (Nat.add n 0) (right c) x)) atTop
    (𝓝 (midpoint ℝ (CU.lim (left c) x) (CU.lim (right c) x)))
[PROOFSTEP]
exact (c.left.tendsto_approx_atTop x).midpoint (c.right.tendsto_approx_atTop x)
[GOAL]
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c : CU X
⊢ Continuous (CU.lim c)
[PROOFSTEP]
obtain ⟨h0, h1234, h1⟩ : 0 < (2⁻¹ : ℝ) ∧ (2⁻¹ : ℝ) < 3 / 4 ∧ (3 / 4 : ℝ) < 1 := by norm_num
[GOAL]
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c : CU X
⊢ 0 < 2⁻¹ ∧ 2⁻¹ < 3 / 4 ∧ 3 / 4 < 1
[PROOFSTEP]
norm_num
[GOAL]
case intro.intro
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c : CU X
h0 : 0 < 2⁻¹
h1234 : 2⁻¹ < 3 / 4
h1 : 3 / 4 < 1
⊢ Continuous (CU.lim c)
[PROOFSTEP]
refine'
  continuous_iff_continuousAt.2 fun x =>
    (Metric.nhds_basis_closedBall_pow (h0.trans h1234) h1).tendsto_right_iff.2 fun n _ => _
[GOAL]
case intro.intro
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c : CU X
h0 : 0 < 2⁻¹
h1234 : 2⁻¹ < 3 / 4
h1 : 3 / 4 < 1
x : X
n : ℕ
x✝ : True
⊢ ∀ᶠ (x_1 : X) in 𝓝 x, CU.lim c x_1 ∈ Metric.closedBall (CU.lim c x) ((3 / 4) ^ n)
[PROOFSTEP]
simp only [Metric.mem_closedBall]
[GOAL]
case intro.intro
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c : CU X
h0 : 0 < 2⁻¹
h1234 : 2⁻¹ < 3 / 4
h1 : 3 / 4 < 1
x : X
n : ℕ
x✝ : True
⊢ ∀ᶠ (x_1 : X) in 𝓝 x, dist (CU.lim c x_1) (CU.lim c x) ≤ (3 / 4) ^ n
[PROOFSTEP]
induction' n with n ihn generalizing c
[GOAL]
case intro.intro.zero
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
h0 : 0 < 2⁻¹
h1234 : 2⁻¹ < 3 / 4
h1 : 3 / 4 < 1
x : X
x✝ : True
c : CU X
⊢ ∀ᶠ (x_1 : X) in 𝓝 x, dist (CU.lim c x_1) (CU.lim c x) ≤ (3 / 4) ^ Nat.zero
[PROOFSTEP]
refine' eventually_of_forall fun y => _
[GOAL]
case intro.intro.zero
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
h0 : 0 < 2⁻¹
h1234 : 2⁻¹ < 3 / 4
h1 : 3 / 4 < 1
x : X
x✝ : True
c : CU X
y : X
⊢ dist (CU.lim c y) (CU.lim c x) ≤ (3 / 4) ^ Nat.zero
[PROOFSTEP]
rw [pow_zero]
[GOAL]
case intro.intro.zero
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
h0 : 0 < 2⁻¹
h1234 : 2⁻¹ < 3 / 4
h1 : 3 / 4 < 1
x : X
x✝ : True
c : CU X
y : X
⊢ dist (CU.lim c y) (CU.lim c x) ≤ 1
[PROOFSTEP]
exact Real.dist_le_of_mem_Icc_01 (c.lim_mem_Icc _) (c.lim_mem_Icc _)
[GOAL]
case intro.intro.succ
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
h0 : 0 < 2⁻¹
h1234 : 2⁻¹ < 3 / 4
h1 : 3 / 4 < 1
x : X
x✝ : True
n : ℕ
ihn : ∀ (c : CU X), ∀ᶠ (x_1 : X) in 𝓝 x, dist (CU.lim c x_1) (CU.lim c x) ≤ (3 / 4) ^ n
c : CU X
⊢ ∀ᶠ (x_1 : X) in 𝓝 x, dist (CU.lim c x_1) (CU.lim c x) ≤ (3 / 4) ^ Nat.succ n
[PROOFSTEP]
by_cases hxl : x ∈ c.left.U
[GOAL]
case pos
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
h0 : 0 < 2⁻¹
h1234 : 2⁻¹ < 3 / 4
h1 : 3 / 4 < 1
x : X
x✝ : True
n : ℕ
ihn : ∀ (c : CU X), ∀ᶠ (x_1 : X) in 𝓝 x, dist (CU.lim c x_1) (CU.lim c x) ≤ (3 / 4) ^ n
c : CU X
hxl : x ∈ (left c).U
⊢ ∀ᶠ (x_1 : X) in 𝓝 x, dist (CU.lim c x_1) (CU.lim c x) ≤ (3 / 4) ^ Nat.succ n
[PROOFSTEP]
filter_upwards [IsOpen.mem_nhds c.left.open_U hxl, ihn c.left] with _ hyl hyd
[GOAL]
case h
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
h0 : 0 < 2⁻¹
h1234 : 2⁻¹ < 3 / 4
h1 : 3 / 4 < 1
x : X
x✝ : True
n : ℕ
ihn : ∀ (c : CU X), ∀ᶠ (x_1 : X) in 𝓝 x, dist (CU.lim c x_1) (CU.lim c x) ≤ (3 / 4) ^ n
c : CU X
hxl : x ∈ (left c).U
a✝ : X
hyl : a✝ ∈ (left c).U
hyd : dist (CU.lim (left c) a✝) (CU.lim (left c) x) ≤ (3 / 4) ^ n
⊢ dist (CU.lim c a✝) (CU.lim c x) ≤ (3 / 4) ^ Nat.succ n
[PROOFSTEP]
rw [pow_succ, c.lim_eq_midpoint, c.lim_eq_midpoint, c.right.lim_of_mem_C _ (c.left_U_subset_right_C hyl),
  c.right.lim_of_mem_C _ (c.left_U_subset_right_C hxl)]
[GOAL]
case h
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
h0 : 0 < 2⁻¹
h1234 : 2⁻¹ < 3 / 4
h1 : 3 / 4 < 1
x : X
x✝ : True
n : ℕ
ihn : ∀ (c : CU X), ∀ᶠ (x_1 : X) in 𝓝 x, dist (CU.lim c x_1) (CU.lim c x) ≤ (3 / 4) ^ n
c : CU X
hxl : x ∈ (left c).U
a✝ : X
hyl : a✝ ∈ (left c).U
hyd : dist (CU.lim (left c) a✝) (CU.lim (left c) x) ≤ (3 / 4) ^ n
⊢ dist (midpoint ℝ (CU.lim (left c) a✝) 0) (midpoint ℝ (CU.lim (left c) x) 0) ≤ 3 / 4 * (3 / 4) ^ n
[PROOFSTEP]
refine' (dist_midpoint_midpoint_le _ _ _ _).trans _
[GOAL]
case h
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
h0 : 0 < 2⁻¹
h1234 : 2⁻¹ < 3 / 4
h1 : 3 / 4 < 1
x : X
x✝ : True
n : ℕ
ihn : ∀ (c : CU X), ∀ᶠ (x_1 : X) in 𝓝 x, dist (CU.lim c x_1) (CU.lim c x) ≤ (3 / 4) ^ n
c : CU X
hxl : x ∈ (left c).U
a✝ : X
hyl : a✝ ∈ (left c).U
hyd : dist (CU.lim (left c) a✝) (CU.lim (left c) x) ≤ (3 / 4) ^ n
⊢ (dist (CU.lim (left c) a✝) (CU.lim (left c) x) + dist 0 0) / 2 ≤ 3 / 4 * (3 / 4) ^ n
[PROOFSTEP]
rw [dist_self, add_zero, div_eq_inv_mul]
[GOAL]
case h
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
h0 : 0 < 2⁻¹
h1234 : 2⁻¹ < 3 / 4
h1 : 3 / 4 < 1
x : X
x✝ : True
n : ℕ
ihn : ∀ (c : CU X), ∀ᶠ (x_1 : X) in 𝓝 x, dist (CU.lim c x_1) (CU.lim c x) ≤ (3 / 4) ^ n
c : CU X
hxl : x ∈ (left c).U
a✝ : X
hyl : a✝ ∈ (left c).U
hyd : dist (CU.lim (left c) a✝) (CU.lim (left c) x) ≤ (3 / 4) ^ n
⊢ 2⁻¹ * dist (CU.lim (left c) a✝) (CU.lim (left c) x) ≤ 3 / 4 * (3 / 4) ^ n
[PROOFSTEP]
gcongr
[GOAL]
case neg
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
h0 : 0 < 2⁻¹
h1234 : 2⁻¹ < 3 / 4
h1 : 3 / 4 < 1
x : X
x✝ : True
n : ℕ
ihn : ∀ (c : CU X), ∀ᶠ (x_1 : X) in 𝓝 x, dist (CU.lim c x_1) (CU.lim c x) ≤ (3 / 4) ^ n
c : CU X
hxl : ¬x ∈ (left c).U
⊢ ∀ᶠ (x_1 : X) in 𝓝 x, dist (CU.lim c x_1) (CU.lim c x) ≤ (3 / 4) ^ Nat.succ n
[PROOFSTEP]
replace hxl : x ∈ c.left.right.Cᶜ
[GOAL]
case hxl
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
h0 : 0 < 2⁻¹
h1234 : 2⁻¹ < 3 / 4
h1 : 3 / 4 < 1
x : X
x✝ : True
n : ℕ
ihn : ∀ (c : CU X), ∀ᶠ (x_1 : X) in 𝓝 x, dist (CU.lim c x_1) (CU.lim c x) ≤ (3 / 4) ^ n
c : CU X
hxl : ¬x ∈ (left c).U
⊢ x ∈ (right (left c)).Cᶜ
case neg
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
h0 : 0 < 2⁻¹
h1234 : 2⁻¹ < 3 / 4
h1 : 3 / 4 < 1
x : X
x✝ : True
n : ℕ
ihn : ∀ (c : CU X), ∀ᶠ (x_1 : X) in 𝓝 x, dist (CU.lim c x_1) (CU.lim c x) ≤ (3 / 4) ^ n
c : CU X
hxl : x ∈ (right (left c)).Cᶜ
⊢ ∀ᶠ (x_1 : X) in 𝓝 x, dist (CU.lim c x_1) (CU.lim c x) ≤ (3 / 4) ^ Nat.succ n
[PROOFSTEP]
exact compl_subset_compl.2 c.left.right.subset hxl
[GOAL]
case neg
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
h0 : 0 < 2⁻¹
h1234 : 2⁻¹ < 3 / 4
h1 : 3 / 4 < 1
x : X
x✝ : True
n : ℕ
ihn : ∀ (c : CU X), ∀ᶠ (x_1 : X) in 𝓝 x, dist (CU.lim c x_1) (CU.lim c x) ≤ (3 / 4) ^ n
c : CU X
hxl : x ∈ (right (left c)).Cᶜ
⊢ ∀ᶠ (x_1 : X) in 𝓝 x, dist (CU.lim c x_1) (CU.lim c x) ≤ (3 / 4) ^ Nat.succ n
[PROOFSTEP]
filter_upwards [IsOpen.mem_nhds (isOpen_compl_iff.2 c.left.right.closed_C) hxl, ihn c.left.right, ihn c.right] with y
  hyl hydl hydr
[GOAL]
case h
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
h0 : 0 < 2⁻¹
h1234 : 2⁻¹ < 3 / 4
h1 : 3 / 4 < 1
x : X
x✝ : True
n : ℕ
ihn : ∀ (c : CU X), ∀ᶠ (x_1 : X) in 𝓝 x, dist (CU.lim c x_1) (CU.lim c x) ≤ (3 / 4) ^ n
c : CU X
hxl : x ∈ (right (left c)).Cᶜ
y : X
hyl : y ∈ (right (left c)).Cᶜ
hydl : dist (CU.lim (right (left c)) y) (CU.lim (right (left c)) x) ≤ (3 / 4) ^ n
hydr : dist (CU.lim (right c) y) (CU.lim (right c) x) ≤ (3 / 4) ^ n
⊢ dist (CU.lim c y) (CU.lim c x) ≤ (3 / 4) ^ Nat.succ n
[PROOFSTEP]
replace hxl : x ∉ c.left.left.U
[GOAL]
case hxl
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
h0 : 0 < 2⁻¹
h1234 : 2⁻¹ < 3 / 4
h1 : 3 / 4 < 1
x : X
x✝ : True
n : ℕ
ihn : ∀ (c : CU X), ∀ᶠ (x_1 : X) in 𝓝 x, dist (CU.lim c x_1) (CU.lim c x) ≤ (3 / 4) ^ n
c : CU X
hxl : x ∈ (right (left c)).Cᶜ
y : X
hyl : y ∈ (right (left c)).Cᶜ
hydl : dist (CU.lim (right (left c)) y) (CU.lim (right (left c)) x) ≤ (3 / 4) ^ n
hydr : dist (CU.lim (right c) y) (CU.lim (right c) x) ≤ (3 / 4) ^ n
⊢ ¬x ∈ (left (left c)).U
case h
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
h0 : 0 < 2⁻¹
h1234 : 2⁻¹ < 3 / 4
h1 : 3 / 4 < 1
x : X
x✝ : True
n : ℕ
ihn : ∀ (c : CU X), ∀ᶠ (x_1 : X) in 𝓝 x, dist (CU.lim c x_1) (CU.lim c x) ≤ (3 / 4) ^ n
c : CU X
y : X
hyl : y ∈ (right (left c)).Cᶜ
hydl : dist (CU.lim (right (left c)) y) (CU.lim (right (left c)) x) ≤ (3 / 4) ^ n
hydr : dist (CU.lim (right c) y) (CU.lim (right c) x) ≤ (3 / 4) ^ n
hxl : ¬x ∈ (left (left c)).U
⊢ dist (CU.lim c y) (CU.lim c x) ≤ (3 / 4) ^ Nat.succ n
[PROOFSTEP]
exact compl_subset_compl.2 c.left.left_U_subset_right_C hxl
[GOAL]
case h
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
h0 : 0 < 2⁻¹
h1234 : 2⁻¹ < 3 / 4
h1 : 3 / 4 < 1
x : X
x✝ : True
n : ℕ
ihn : ∀ (c : CU X), ∀ᶠ (x_1 : X) in 𝓝 x, dist (CU.lim c x_1) (CU.lim c x) ≤ (3 / 4) ^ n
c : CU X
y : X
hyl : y ∈ (right (left c)).Cᶜ
hydl : dist (CU.lim (right (left c)) y) (CU.lim (right (left c)) x) ≤ (3 / 4) ^ n
hydr : dist (CU.lim (right c) y) (CU.lim (right c) x) ≤ (3 / 4) ^ n
hxl : ¬x ∈ (left (left c)).U
⊢ dist (CU.lim c y) (CU.lim c x) ≤ (3 / 4) ^ Nat.succ n
[PROOFSTEP]
replace hyl : y ∉ c.left.left.U
[GOAL]
case hyl
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
h0 : 0 < 2⁻¹
h1234 : 2⁻¹ < 3 / 4
h1 : 3 / 4 < 1
x : X
x✝ : True
n : ℕ
ihn : ∀ (c : CU X), ∀ᶠ (x_1 : X) in 𝓝 x, dist (CU.lim c x_1) (CU.lim c x) ≤ (3 / 4) ^ n
c : CU X
y : X
hyl : y ∈ (right (left c)).Cᶜ
hydl : dist (CU.lim (right (left c)) y) (CU.lim (right (left c)) x) ≤ (3 / 4) ^ n
hydr : dist (CU.lim (right c) y) (CU.lim (right c) x) ≤ (3 / 4) ^ n
hxl : ¬x ∈ (left (left c)).U
⊢ ¬y ∈ (left (left c)).U
case h
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
h0 : 0 < 2⁻¹
h1234 : 2⁻¹ < 3 / 4
h1 : 3 / 4 < 1
x : X
x✝ : True
n : ℕ
ihn : ∀ (c : CU X), ∀ᶠ (x_1 : X) in 𝓝 x, dist (CU.lim c x_1) (CU.lim c x) ≤ (3 / 4) ^ n
c : CU X
y : X
hydl : dist (CU.lim (right (left c)) y) (CU.lim (right (left c)) x) ≤ (3 / 4) ^ n
hydr : dist (CU.lim (right c) y) (CU.lim (right c) x) ≤ (3 / 4) ^ n
hxl : ¬x ∈ (left (left c)).U
hyl : ¬y ∈ (left (left c)).U
⊢ dist (CU.lim c y) (CU.lim c x) ≤ (3 / 4) ^ Nat.succ n
[PROOFSTEP]
exact compl_subset_compl.2 c.left.left_U_subset_right_C hyl
[GOAL]
case h
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
h0 : 0 < 2⁻¹
h1234 : 2⁻¹ < 3 / 4
h1 : 3 / 4 < 1
x : X
x✝ : True
n : ℕ
ihn : ∀ (c : CU X), ∀ᶠ (x_1 : X) in 𝓝 x, dist (CU.lim c x_1) (CU.lim c x) ≤ (3 / 4) ^ n
c : CU X
y : X
hydl : dist (CU.lim (right (left c)) y) (CU.lim (right (left c)) x) ≤ (3 / 4) ^ n
hydr : dist (CU.lim (right c) y) (CU.lim (right c) x) ≤ (3 / 4) ^ n
hxl : ¬x ∈ (left (left c)).U
hyl : ¬y ∈ (left (left c)).U
⊢ dist (CU.lim c y) (CU.lim c x) ≤ (3 / 4) ^ Nat.succ n
[PROOFSTEP]
simp only [pow_succ, c.lim_eq_midpoint, c.left.lim_eq_midpoint, c.left.left.lim_of_nmem_U _ hxl,
  c.left.left.lim_of_nmem_U _ hyl]
[GOAL]
case h
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
h0 : 0 < 2⁻¹
h1234 : 2⁻¹ < 3 / 4
h1 : 3 / 4 < 1
x : X
x✝ : True
n : ℕ
ihn : ∀ (c : CU X), ∀ᶠ (x_1 : X) in 𝓝 x, dist (CU.lim c x_1) (CU.lim c x) ≤ (3 / 4) ^ n
c : CU X
y : X
hydl : dist (CU.lim (right (left c)) y) (CU.lim (right (left c)) x) ≤ (3 / 4) ^ n
hydr : dist (CU.lim (right c) y) (CU.lim (right c) x) ≤ (3 / 4) ^ n
hxl : ¬x ∈ (left (left c)).U
hyl : ¬y ∈ (left (left c)).U
⊢ dist (midpoint ℝ (midpoint ℝ 1 (CU.lim (right (left c)) y)) (CU.lim (right c) y))
      (midpoint ℝ (midpoint ℝ 1 (CU.lim (right (left c)) x)) (CU.lim (right c) x)) ≤
    3 / 4 * (3 / 4) ^ n
[PROOFSTEP]
refine' (dist_midpoint_midpoint_le _ _ _ _).trans _
[GOAL]
case h
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
h0 : 0 < 2⁻¹
h1234 : 2⁻¹ < 3 / 4
h1 : 3 / 4 < 1
x : X
x✝ : True
n : ℕ
ihn : ∀ (c : CU X), ∀ᶠ (x_1 : X) in 𝓝 x, dist (CU.lim c x_1) (CU.lim c x) ≤ (3 / 4) ^ n
c : CU X
y : X
hydl : dist (CU.lim (right (left c)) y) (CU.lim (right (left c)) x) ≤ (3 / 4) ^ n
hydr : dist (CU.lim (right c) y) (CU.lim (right c) x) ≤ (3 / 4) ^ n
hxl : ¬x ∈ (left (left c)).U
hyl : ¬y ∈ (left (left c)).U
⊢ (dist (midpoint ℝ 1 (CU.lim (right (left c)) y)) (midpoint ℝ 1 (CU.lim (right (left c)) x)) +
        dist (CU.lim (right c) y) (CU.lim (right c) x)) /
      2 ≤
    3 / 4 * (3 / 4) ^ n
[PROOFSTEP]
refine' (div_le_div_of_le_of_nonneg (add_le_add_right (dist_midpoint_midpoint_le _ _ _ _) _) zero_le_two).trans _
[GOAL]
case h
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
h0 : 0 < 2⁻¹
h1234 : 2⁻¹ < 3 / 4
h1 : 3 / 4 < 1
x : X
x✝ : True
n : ℕ
ihn : ∀ (c : CU X), ∀ᶠ (x_1 : X) in 𝓝 x, dist (CU.lim c x_1) (CU.lim c x) ≤ (3 / 4) ^ n
c : CU X
y : X
hydl : dist (CU.lim (right (left c)) y) (CU.lim (right (left c)) x) ≤ (3 / 4) ^ n
hydr : dist (CU.lim (right c) y) (CU.lim (right c) x) ≤ (3 / 4) ^ n
hxl : ¬x ∈ (left (left c)).U
hyl : ¬y ∈ (left (left c)).U
⊢ ((dist 1 1 + dist (CU.lim (right (left c)) y) (CU.lim (right (left c)) x)) / 2 +
        dist (CU.lim (right c) y) (CU.lim (right c) x)) /
      2 ≤
    3 / 4 * (3 / 4) ^ n
[PROOFSTEP]
rw [dist_self, zero_add]
[GOAL]
case h
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
h0 : 0 < 2⁻¹
h1234 : 2⁻¹ < 3 / 4
h1 : 3 / 4 < 1
x : X
x✝ : True
n : ℕ
ihn : ∀ (c : CU X), ∀ᶠ (x_1 : X) in 𝓝 x, dist (CU.lim c x_1) (CU.lim c x) ≤ (3 / 4) ^ n
c : CU X
y : X
hydl : dist (CU.lim (right (left c)) y) (CU.lim (right (left c)) x) ≤ (3 / 4) ^ n
hydr : dist (CU.lim (right c) y) (CU.lim (right c) x) ≤ (3 / 4) ^ n
hxl : ¬x ∈ (left (left c)).U
hyl : ¬y ∈ (left (left c)).U
⊢ (dist (CU.lim (right (left c)) y) (CU.lim (right (left c)) x) / 2 + dist (CU.lim (right c) y) (CU.lim (right c) x)) /
      2 ≤
    3 / 4 * (3 / 4) ^ n
[PROOFSTEP]
set r := (3 / 4 : ℝ) ^ n
[GOAL]
case h
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
h0 : 0 < 2⁻¹
h1234 : 2⁻¹ < 3 / 4
h1 : 3 / 4 < 1
x : X
x✝ : True
n : ℕ
c : CU X
y : X
hxl : ¬x ∈ (left (left c)).U
hyl : ¬y ∈ (left (left c)).U
r : ℝ := (3 / 4) ^ n
ihn : ∀ (c : CU X), ∀ᶠ (x_1 : X) in 𝓝 x, dist (CU.lim c x_1) (CU.lim c x) ≤ r
hydl : dist (CU.lim (right (left c)) y) (CU.lim (right (left c)) x) ≤ r
hydr : dist (CU.lim (right c) y) (CU.lim (right c) x) ≤ r
⊢ (dist (CU.lim (right (left c)) y) (CU.lim (right (left c)) x) / 2 + dist (CU.lim (right c) y) (CU.lim (right c) x)) /
      2 ≤
    3 / 4 * r
[PROOFSTEP]
calc
  _ ≤ (r / 2 + r) / 2 := by gcongr
  _ = _ := by field_simp; ring
[GOAL]
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
h0 : 0 < 2⁻¹
h1234 : 2⁻¹ < 3 / 4
h1 : 3 / 4 < 1
x : X
x✝ : True
n : ℕ
c : CU X
y : X
hxl : ¬x ∈ (left (left c)).U
hyl : ¬y ∈ (left (left c)).U
r : ℝ := (3 / 4) ^ n
ihn : ∀ (c : CU X), ∀ᶠ (x_1 : X) in 𝓝 x, dist (CU.lim c x_1) (CU.lim c x) ≤ r
hydl : dist (CU.lim (right (left c)) y) (CU.lim (right (left c)) x) ≤ r
hydr : dist (CU.lim (right c) y) (CU.lim (right c) x) ≤ r
⊢ (dist (CU.lim (right (left c)) y) (CU.lim (right (left c)) x) / 2 + dist (CU.lim (right c) y) (CU.lim (right c) x)) /
      2 ≤
    (r / 2 + r) / 2
[PROOFSTEP]
gcongr
[GOAL]
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
h0 : 0 < 2⁻¹
h1234 : 2⁻¹ < 3 / 4
h1 : 3 / 4 < 1
x : X
x✝ : True
n : ℕ
c : CU X
y : X
hxl : ¬x ∈ (left (left c)).U
hyl : ¬y ∈ (left (left c)).U
r : ℝ := (3 / 4) ^ n
ihn : ∀ (c : CU X), ∀ᶠ (x_1 : X) in 𝓝 x, dist (CU.lim c x_1) (CU.lim c x) ≤ r
hydl : dist (CU.lim (right (left c)) y) (CU.lim (right (left c)) x) ≤ r
hydr : dist (CU.lim (right c) y) (CU.lim (right c) x) ≤ r
⊢ (r / 2 + r) / 2 = 3 / 4 * r
[PROOFSTEP]
field_simp
[GOAL]
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c✝ : CU X
h0 : 0 < 2⁻¹
h1234 : 2⁻¹ < 3 / 4
h1 : 3 / 4 < 1
x : X
x✝ : True
n : ℕ
c : CU X
y : X
hxl : ¬x ∈ (left (left c)).U
hyl : ¬y ∈ (left (left c)).U
r : ℝ := (3 / 4) ^ n
ihn : ∀ (c : CU X), ∀ᶠ (x_1 : X) in 𝓝 x, dist (CU.lim c x_1) (CU.lim c x) ≤ r
hydl : dist (CU.lim (right (left c)) y) (CU.lim (right (left c)) x) ≤ r
hydr : dist (CU.lim (right c) y) (CU.lim (right c) x) ≤ r
⊢ (3 ^ n * 4 ^ n + 3 ^ n * (4 ^ n * 2)) * (4 * 4 ^ n) = 3 * 3 ^ n * (4 ^ n * 2 * 4 ^ n * 2)
[PROOFSTEP]
ring
[GOAL]
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
s t : Set X
hs : IsClosed s
ht : IsClosed t
hd : Disjoint s t
⊢ ∃ f, EqOn (↑f) 0 s ∧ EqOn (↑f) 1 t ∧ ∀ (x : X), ↑f x ∈ Icc 0 1
[PROOFSTEP]
set c : Urysohns.CU X := ⟨s, tᶜ, hs, ht.isOpen_compl, disjoint_left.1 hd⟩
[GOAL]
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
s t : Set X
hs : IsClosed s
ht : IsClosed t
hd : Disjoint s t
c : Urysohns.CU X :=
  { C := s, U := tᶜ, closed_C := hs, open_U := (_ : IsOpen tᶜ), subset := (_ : ∀ ⦃a : X⦄, a ∈ s → ¬a ∈ t) }
⊢ ∃ f, EqOn (↑f) 0 s ∧ EqOn (↑f) 1 t ∧ ∀ (x : X), ↑f x ∈ Icc 0 1
[PROOFSTEP]
exact ⟨⟨c.lim, c.continuous_lim⟩, c.lim_of_mem_C, fun x hx => c.lim_of_nmem_U _ fun h => h hx, c.lim_mem_Icc⟩


[GOAL]
α : Type u_1
G : Type u_2
A : Type u_3
S✝ : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A
s✝ S : Set G
s : G
hs : s ∈ S⁻¹
⊢ s ∈ ↑(closure S)
[PROOFSTEP]
rw [SetLike.mem_coe, ← Subgroup.inv_mem_iff]
[GOAL]
α : Type u_1
G : Type u_2
A : Type u_3
S✝ : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A
s✝ S : Set G
s : G
hs : s ∈ S⁻¹
⊢ s⁻¹ ∈ closure S
[PROOFSTEP]
exact subset_closure (mem_inv.mp hs)
[GOAL]
α : Type u_1
G : Type u_2
A : Type u_3
S✝ : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A
s S : Set G
⊢ (closure S).toSubmonoid = Submonoid.closure (S ∪ S⁻¹)
[PROOFSTEP]
refine le_antisymm (fun x hx => ?_) (Submonoid.closure_le.2 ?_)
[GOAL]
case refine_1
α : Type u_1
G : Type u_2
A : Type u_3
S✝ : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A
s S : Set G
x : G
hx : x ∈ (closure S).toSubmonoid
⊢ x ∈ Submonoid.closure (S ∪ S⁻¹)
[PROOFSTEP]
refine'
  closure_induction hx (fun x hx => Submonoid.closure_mono (subset_union_left S S⁻¹) (Submonoid.subset_closure hx))
    (Submonoid.one_mem _) (fun x y hx hy => Submonoid.mul_mem _ hx hy) fun x hx => _
[GOAL]
case refine_1
α : Type u_1
G : Type u_2
A : Type u_3
S✝ : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A
s S : Set G
x✝ : G
hx✝ : x✝ ∈ (closure S).toSubmonoid
x : G
hx : x ∈ Submonoid.closure (S ∪ S⁻¹)
⊢ x⁻¹ ∈ Submonoid.closure (S ∪ S⁻¹)
[PROOFSTEP]
rwa [← Submonoid.mem_closure_inv, Set.union_inv, inv_inv, Set.union_comm]
[GOAL]
case refine_2
α : Type u_1
G : Type u_2
A : Type u_3
S✝ : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A
s S : Set G
⊢ S ∪ S⁻¹ ⊆ ↑(closure S).toSubmonoid
[PROOFSTEP]
simp only [true_and_iff, coe_toSubmonoid, union_subset_iff, subset_closure, inv_subset_closure]
[GOAL]
α : Type u_1
G : Type u_2
A : Type u_3
S : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A
s✝ s : Set G
⊢ closure s⁻¹ = closure s
[PROOFSTEP]
simp only [← toSubmonoid_eq, closure_toSubmonoid, inv_inv, union_comm]
[GOAL]
α : Type u_1
G : Type u_2
A : Type u_3
S✝ : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A
s : Set G
ι : Sort u_5
S : ι → Subgroup G
C : G → Prop
x : G
hx : x ∈ ⨆ (i : ι), S i
hp : ∀ (i : ι) (x : G), x ∈ S i → C x
h1 : C 1
hmul : ∀ (x y : G), C x → C y → C (x * y)
⊢ C x
[PROOFSTEP]
rw [iSup_eq_closure] at hx
[GOAL]
α : Type u_1
G : Type u_2
A : Type u_3
S✝ : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A
s : Set G
ι : Sort u_5
S : ι → Subgroup G
C : G → Prop
x : G
hx : x ∈ closure (⋃ (i : ι), ↑(S i))
hp : ∀ (i : ι) (x : G), x ∈ S i → C x
h1 : C 1
hmul : ∀ (x y : G), C x → C y → C (x * y)
⊢ C x
[PROOFSTEP]
refine' closure_induction'' hx (fun x hx => _) (fun x hx => _) h1 hmul
[GOAL]
case refine'_1
α : Type u_1
G : Type u_2
A : Type u_3
S✝ : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A
s : Set G
ι : Sort u_5
S : ι → Subgroup G
C : G → Prop
x✝ : G
hx✝ : x✝ ∈ closure (⋃ (i : ι), ↑(S i))
hp : ∀ (i : ι) (x : G), x ∈ S i → C x
h1 : C 1
hmul : ∀ (x y : G), C x → C y → C (x * y)
x : G
hx : x ∈ ⋃ (i : ι), ↑(S i)
⊢ C x
[PROOFSTEP]
obtain ⟨i, hi⟩ := Set.mem_iUnion.mp hx
[GOAL]
case refine'_1.intro
α : Type u_1
G : Type u_2
A : Type u_3
S✝ : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A
s : Set G
ι : Sort u_5
S : ι → Subgroup G
C : G → Prop
x✝ : G
hx✝ : x✝ ∈ closure (⋃ (i : ι), ↑(S i))
hp : ∀ (i : ι) (x : G), x ∈ S i → C x
h1 : C 1
hmul : ∀ (x y : G), C x → C y → C (x * y)
x : G
hx : x ∈ ⋃ (i : ι), ↑(S i)
i : ι
hi : x ∈ ↑(S i)
⊢ C x
[PROOFSTEP]
exact hp _ _ hi
[GOAL]
case refine'_2
α : Type u_1
G : Type u_2
A : Type u_3
S✝ : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A
s : Set G
ι : Sort u_5
S : ι → Subgroup G
C : G → Prop
x✝ : G
hx✝ : x✝ ∈ closure (⋃ (i : ι), ↑(S i))
hp : ∀ (i : ι) (x : G), x ∈ S i → C x
h1 : C 1
hmul : ∀ (x y : G), C x → C y → C (x * y)
x : G
hx : x ∈ ⋃ (i : ι), ↑(S i)
⊢ C x⁻¹
[PROOFSTEP]
obtain ⟨i, hi⟩ := Set.mem_iUnion.mp hx
[GOAL]
case refine'_2.intro
α : Type u_1
G : Type u_2
A : Type u_3
S✝ : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A
s : Set G
ι : Sort u_5
S : ι → Subgroup G
C : G → Prop
x✝ : G
hx✝ : x✝ ∈ closure (⋃ (i : ι), ↑(S i))
hp : ∀ (i : ι) (x : G), x ∈ S i → C x
h1 : C 1
hmul : ∀ (x y : G), C x → C y → C (x * y)
x : G
hx : x ∈ ⋃ (i : ι), ↑(S i)
i : ι
hi : x ∈ ↑(S i)
⊢ C x⁻¹
[PROOFSTEP]
exact hp _ _ (inv_mem hi)
[GOAL]
α : Type u_1
G : Type u_2
A : Type u_3
S✝ : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A
s : Set G
ι : Sort u_5
S : ι → Subgroup G
C : (x : G) → x ∈ ⨆ (i : ι), S i → Prop
hp : ∀ (i : ι) (x : G) (hx : x ∈ S i), C x (_ : x ∈ ⨆ (i : ι), S i)
h1 : C 1 (_ : 1 ∈ ⨆ (i : ι), S i)
hmul :
  ∀ (x y : G) (hx : x ∈ ⨆ (i : ι), S i) (hy : y ∈ ⨆ (i : ι), S i),
    C x hx → C y hy → C (x * y) (_ : x * y ∈ ⨆ (i : ι), S i)
x : G
hx : x ∈ ⨆ (i : ι), S i
⊢ C x hx
[PROOFSTEP]
suffices : ∃ h, C x h
[GOAL]
α : Type u_1
G : Type u_2
A : Type u_3
S✝ : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A
s : Set G
ι : Sort u_5
S : ι → Subgroup G
C : (x : G) → x ∈ ⨆ (i : ι), S i → Prop
hp : ∀ (i : ι) (x : G) (hx : x ∈ S i), C x (_ : x ∈ ⨆ (i : ι), S i)
h1 : C 1 (_ : 1 ∈ ⨆ (i : ι), S i)
hmul :
  ∀ (x y : G) (hx : x ∈ ⨆ (i : ι), S i) (hy : y ∈ ⨆ (i : ι), S i),
    C x hx → C y hy → C (x * y) (_ : x * y ∈ ⨆ (i : ι), S i)
x : G
hx : x ∈ ⨆ (i : ι), S i
this : ∃ h, C x h
⊢ C x hx
case this
α : Type u_1
G : Type u_2
A : Type u_3
S✝ : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A
s : Set G
ι : Sort u_5
S : ι → Subgroup G
C : (x : G) → x ∈ ⨆ (i : ι), S i → Prop
hp : ∀ (i : ι) (x : G) (hx : x ∈ S i), C x (_ : x ∈ ⨆ (i : ι), S i)
h1 : C 1 (_ : 1 ∈ ⨆ (i : ι), S i)
hmul :
  ∀ (x y : G) (hx : x ∈ ⨆ (i : ι), S i) (hy : y ∈ ⨆ (i : ι), S i),
    C x hx → C y hy → C (x * y) (_ : x * y ∈ ⨆ (i : ι), S i)
x : G
hx : x ∈ ⨆ (i : ι), S i
⊢ ∃ h, C x h
[PROOFSTEP]
exact this.snd
[GOAL]
case this
α : Type u_1
G : Type u_2
A : Type u_3
S✝ : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A
s : Set G
ι : Sort u_5
S : ι → Subgroup G
C : (x : G) → x ∈ ⨆ (i : ι), S i → Prop
hp : ∀ (i : ι) (x : G) (hx : x ∈ S i), C x (_ : x ∈ ⨆ (i : ι), S i)
h1 : C 1 (_ : 1 ∈ ⨆ (i : ι), S i)
hmul :
  ∀ (x y : G) (hx : x ∈ ⨆ (i : ι), S i) (hy : y ∈ ⨆ (i : ι), S i),
    C x hx → C y hy → C (x * y) (_ : x * y ∈ ⨆ (i : ι), S i)
x : G
hx : x ∈ ⨆ (i : ι), S i
⊢ ∃ h, C x h
[PROOFSTEP]
refine' iSup_induction S (C := fun x => ∃ h, C x h) hx (fun i x hx => _) _ fun x y => _
[GOAL]
case this.refine'_1
α : Type u_1
G : Type u_2
A : Type u_3
S✝ : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A
s : Set G
ι : Sort u_5
S : ι → Subgroup G
C : (x : G) → x ∈ ⨆ (i : ι), S i → Prop
hp : ∀ (i : ι) (x : G) (hx : x ∈ S i), C x (_ : x ∈ ⨆ (i : ι), S i)
h1 : C 1 (_ : 1 ∈ ⨆ (i : ι), S i)
hmul :
  ∀ (x y : G) (hx : x ∈ ⨆ (i : ι), S i) (hy : y ∈ ⨆ (i : ι), S i),
    C x hx → C y hy → C (x * y) (_ : x * y ∈ ⨆ (i : ι), S i)
x✝ : G
hx✝ : x✝ ∈ ⨆ (i : ι), S i
i : ι
x : G
hx : x ∈ S i
⊢ (fun x => ∃ h, C x h) x
[PROOFSTEP]
exact ⟨_, hp i _ hx⟩
[GOAL]
case this.refine'_2
α : Type u_1
G : Type u_2
A : Type u_3
S✝ : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A
s : Set G
ι : Sort u_5
S : ι → Subgroup G
C : (x : G) → x ∈ ⨆ (i : ι), S i → Prop
hp : ∀ (i : ι) (x : G) (hx : x ∈ S i), C x (_ : x ∈ ⨆ (i : ι), S i)
h1 : C 1 (_ : 1 ∈ ⨆ (i : ι), S i)
hmul :
  ∀ (x y : G) (hx : x ∈ ⨆ (i : ι), S i) (hy : y ∈ ⨆ (i : ι), S i),
    C x hx → C y hy → C (x * y) (_ : x * y ∈ ⨆ (i : ι), S i)
x : G
hx : x ∈ ⨆ (i : ι), S i
⊢ (fun x => ∃ h, C x h) 1
[PROOFSTEP]
exact ⟨_, h1⟩
[GOAL]
case this.refine'_3
α : Type u_1
G : Type u_2
A : Type u_3
S✝ : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A
s : Set G
ι : Sort u_5
S : ι → Subgroup G
C : (x : G) → x ∈ ⨆ (i : ι), S i → Prop
hp : ∀ (i : ι) (x : G) (hx : x ∈ S i), C x (_ : x ∈ ⨆ (i : ι), S i)
h1 : C 1 (_ : 1 ∈ ⨆ (i : ι), S i)
hmul :
  ∀ (x y : G) (hx : x ∈ ⨆ (i : ι), S i) (hy : y ∈ ⨆ (i : ι), S i),
    C x hx → C y hy → C (x * y) (_ : x * y ∈ ⨆ (i : ι), S i)
x✝ : G
hx : x✝ ∈ ⨆ (i : ι), S i
x y : G
⊢ (fun x => ∃ h, C x h) x → (fun x => ∃ h, C x h) y → (fun x => ∃ h, C x h) (x * y)
[PROOFSTEP]
rintro ⟨_, Cx⟩ ⟨_, Cy⟩
[GOAL]
case this.refine'_3.intro.intro
α : Type u_1
G : Type u_2
A : Type u_3
S✝ : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A
s : Set G
ι : Sort u_5
S : ι → Subgroup G
C : (x : G) → x ∈ ⨆ (i : ι), S i → Prop
hp : ∀ (i : ι) (x : G) (hx : x ∈ S i), C x (_ : x ∈ ⨆ (i : ι), S i)
h1 : C 1 (_ : 1 ∈ ⨆ (i : ι), S i)
hmul :
  ∀ (x y : G) (hx : x ∈ ⨆ (i : ι), S i) (hy : y ∈ ⨆ (i : ι), S i),
    C x hx → C y hy → C (x * y) (_ : x * y ∈ ⨆ (i : ι), S i)
x✝ : G
hx : x✝ ∈ ⨆ (i : ι), S i
x y : G
w✝¹ : x ∈ ⨆ (i : ι), S i
Cx : C x w✝¹
w✝ : y ∈ ⨆ (i : ι), S i
Cy : C y w✝
⊢ ∃ h, C (x * y) h
[PROOFSTEP]
refine' ⟨_, hmul _ _ _ _ Cx Cy⟩
[GOAL]
α : Type u_1
G : Type u_2
A : Type u_3
S : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A
s : Set G
H K : Subgroup G
⊢ closure ↑H ⊔ closure ↑K ≤ H ⊔ K
[PROOFSTEP]
rw [closure_eq, closure_eq]
[GOAL]
α : Type u_1
G : Type u_2
A : Type u_3
S : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A
s✝ s : Set G
N : Subgroup G
hN : Normal N
⊢ s * ↑N = ↑N * s
[PROOFSTEP]
ext x
[GOAL]
case h
α : Type u_1
G : Type u_2
A : Type u_3
S : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A
s✝ s : Set G
N : Subgroup G
hN : Normal N
x : G
⊢ x ∈ s * ↑N ↔ x ∈ ↑N * s
[PROOFSTEP]
refine (exists_congr fun y => ?_).trans exists_swap
[GOAL]
case h
α : Type u_1
G : Type u_2
A : Type u_3
S : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A
s✝ s : Set G
N : Subgroup G
hN : Normal N
x y : G
⊢ (∃ b, y ∈ s ∧ b ∈ ↑N ∧ (fun x x_1 => x * x_1) y b = x) ↔ ∃ y_1, y_1 ∈ ↑N ∧ y ∈ s ∧ (fun x x_1 => x * x_1) y_1 y = x
[PROOFSTEP]
simp only [exists_and_left, @and_left_comm _ (y ∈ s), ← eq_inv_mul_iff_mul_eq (b := y), ←
  eq_mul_inv_iff_mul_eq (c := y), exists_eq_right, SetLike.mem_coe, hN.mem_comm_iff]
[GOAL]
α : Type u_1
G : Type u_2
A : Type u_3
S : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A
s : Set G
H N : Subgroup G
hN : Normal N
⊢ ↑(H ⊔ N) = ↑H * ↑N
[PROOFSTEP]
rw [sup_eq_closure]
[GOAL]
α : Type u_1
G : Type u_2
A : Type u_3
S : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A
s : Set G
H N : Subgroup G
hN : Normal N
⊢ ↑(closure (↑H * ↑N)) = ↑H * ↑N
[PROOFSTEP]
refine Set.Subset.antisymm (fun x hx => ?_) subset_closure
[GOAL]
α : Type u_1
G : Type u_2
A : Type u_3
S : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A
s : Set G
H N : Subgroup G
hN : Normal N
x : G
hx : x ∈ ↑(closure (↑H * ↑N))
⊢ x ∈ ↑H * ↑N
[PROOFSTEP]
refine closure_induction'' (p := fun x => x ∈ (H : Set G) * (N : Set G)) hx ?_ ?_ ?_ ?_
[GOAL]
case refine_1
α : Type u_1
G : Type u_2
A : Type u_3
S : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A
s : Set G
H N : Subgroup G
hN : Normal N
x : G
hx : x ∈ ↑(closure (↑H * ↑N))
⊢ ∀ (x : G), x ∈ ↑H * ↑N → (fun x => x ∈ ↑H * ↑N) x
[PROOFSTEP]
rintro _ ⟨x, y, hx, hy, rfl⟩
[GOAL]
case refine_1.intro.intro.intro.intro
α : Type u_1
G : Type u_2
A : Type u_3
S : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A
s : Set G
H N : Subgroup G
hN : Normal N
x✝ : G
hx✝ : x✝ ∈ ↑(closure (↑H * ↑N))
x y : G
hx : x ∈ ↑H
hy : y ∈ ↑N
⊢ (fun x x_1 => x * x_1) x y ∈ ↑H * ↑N
[PROOFSTEP]
exact mul_mem_mul hx hy
[GOAL]
case refine_2
α : Type u_1
G : Type u_2
A : Type u_3
S : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A
s : Set G
H N : Subgroup G
hN : Normal N
x : G
hx : x ∈ ↑(closure (↑H * ↑N))
⊢ ∀ (x : G), x ∈ ↑H * ↑N → (fun x => x ∈ ↑H * ↑N) x⁻¹
[PROOFSTEP]
rintro _ ⟨x, y, hx, hy, rfl⟩
[GOAL]
case refine_2.intro.intro.intro.intro
α : Type u_1
G : Type u_2
A : Type u_3
S : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A
s : Set G
H N : Subgroup G
hN : Normal N
x✝ : G
hx✝ : x✝ ∈ ↑(closure (↑H * ↑N))
x y : G
hx : x ∈ ↑H
hy : y ∈ ↑N
⊢ ((fun x x_1 => x * x_1) x y)⁻¹ ∈ ↑H * ↑N
[PROOFSTEP]
simpa only [mul_inv_rev, mul_assoc, inv_inv, inv_mul_cancel_left] using
  mul_mem_mul (inv_mem hx) (hN.conj_mem _ (inv_mem hy) x)
[GOAL]
case refine_3
α : Type u_1
G : Type u_2
A : Type u_3
S : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A
s : Set G
H N : Subgroup G
hN : Normal N
x : G
hx : x ∈ ↑(closure (↑H * ↑N))
⊢ (fun x => x ∈ ↑H * ↑N) 1
[PROOFSTEP]
exact ⟨1, 1, one_mem _, one_mem _, mul_one 1⟩
[GOAL]
case refine_4
α : Type u_1
G : Type u_2
A : Type u_3
S : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A
s : Set G
H N : Subgroup G
hN : Normal N
x : G
hx : x ∈ ↑(closure (↑H * ↑N))
⊢ ∀ (x y : G), (fun x => x ∈ ↑H * ↑N) x → (fun x => x ∈ ↑H * ↑N) y → (fun x => x ∈ ↑H * ↑N) (x * y)
[PROOFSTEP]
rintro _ _ ⟨x, y, hx, hy, rfl⟩ ⟨x', y', hx', hy', rfl⟩
[GOAL]
case refine_4.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u_1
G : Type u_2
A : Type u_3
S : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A
s : Set G
H N : Subgroup G
hN : Normal N
x✝ : G
hx✝ : x✝ ∈ ↑(closure (↑H * ↑N))
x y : G
hx : x ∈ ↑H
hy : y ∈ ↑N
x' y' : G
hx' : x' ∈ ↑H
hy' : y' ∈ ↑N
⊢ (fun x x_1 => x * x_1) x y * (fun x x_1 => x * x_1) x' y' ∈ ↑H * ↑N
[PROOFSTEP]
refine ⟨x * x', x'⁻¹ * y * x' * y', mul_mem hx hx', mul_mem ?_ hy', ?_⟩
[GOAL]
case refine_4.intro.intro.intro.intro.intro.intro.intro.intro.refine_1
α : Type u_1
G : Type u_2
A : Type u_3
S : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A
s : Set G
H N : Subgroup G
hN : Normal N
x✝ : G
hx✝ : x✝ ∈ ↑(closure (↑H * ↑N))
x y : G
hx : x ∈ ↑H
hy : y ∈ ↑N
x' y' : G
hx' : x' ∈ ↑H
hy' : y' ∈ ↑N
⊢ x'⁻¹ * y * x' ∈ N
[PROOFSTEP]
simpa using hN.conj_mem _ hy x'⁻¹
[GOAL]
case refine_4.intro.intro.intro.intro.intro.intro.intro.intro.refine_2
α : Type u_1
G : Type u_2
A : Type u_3
S : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A
s : Set G
H N : Subgroup G
hN : Normal N
x✝ : G
hx✝ : x✝ ∈ ↑(closure (↑H * ↑N))
x y : G
hx : x ∈ ↑H
hy : y ∈ ↑N
x' y' : G
hx' : x' ∈ ↑H
hy' : y' ∈ ↑N
⊢ (fun x x_1 => x * x_1) (x * x') (x'⁻¹ * y * x' * y') = (fun x x_1 => x * x_1) x y * (fun x x_1 => x * x_1) x' y'
[PROOFSTEP]
simp only [mul_assoc, mul_inv_cancel_left]
[GOAL]
α : Type u_1
G : Type u_2
A : Type u_3
S : Type u_4
inst✝² : Group G
inst✝¹ : AddGroup A
s : Set G
N H : Subgroup G
inst✝ : Normal N
⊢ ↑(N ⊔ H) = ↑N * ↑H
[PROOFSTEP]
rw [← set_mul_normal_comm, sup_comm, mul_normal]
[GOAL]
α : Type u_1
G : Type u_2
A✝ : Type u_3
S : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A✝
s : Set G
A B C : Subgroup G
h : A ≤ C
⊢ ↑A * ↑(B ⊓ C) = ↑A * ↑B ⊓ ↑C
[PROOFSTEP]
ext
[GOAL]
case h
α : Type u_1
G : Type u_2
A✝ : Type u_3
S : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A✝
s : Set G
A B C : Subgroup G
h : A ≤ C
x✝ : G
⊢ x✝ ∈ ↑A * ↑(B ⊓ C) ↔ x✝ ∈ ↑A * ↑B ⊓ ↑C
[PROOFSTEP]
simp only [coe_inf, Set.inf_eq_inter, Set.mem_mul, Set.mem_inter_iff]
[GOAL]
case h
α : Type u_1
G : Type u_2
A✝ : Type u_3
S : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A✝
s : Set G
A B C : Subgroup G
h : A ≤ C
x✝ : G
⊢ (∃ x y, x ∈ ↑A ∧ (y ∈ ↑B ∧ y ∈ ↑C) ∧ x * y = x✝) ↔ (∃ x y, x ∈ ↑A ∧ y ∈ ↑B ∧ x * y = x✝) ∧ x✝ ∈ ↑C
[PROOFSTEP]
constructor
[GOAL]
case h.mp
α : Type u_1
G : Type u_2
A✝ : Type u_3
S : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A✝
s : Set G
A B C : Subgroup G
h : A ≤ C
x✝ : G
⊢ (∃ x y, x ∈ ↑A ∧ (y ∈ ↑B ∧ y ∈ ↑C) ∧ x * y = x✝) → (∃ x y, x ∈ ↑A ∧ y ∈ ↑B ∧ x * y = x✝) ∧ x✝ ∈ ↑C
[PROOFSTEP]
rintro ⟨y, z, hy, ⟨hzB, hzC⟩, rfl⟩
[GOAL]
case h.mp.intro.intro.intro.intro.intro
α : Type u_1
G : Type u_2
A✝ : Type u_3
S : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A✝
s : Set G
A B C : Subgroup G
h : A ≤ C
y z : G
hy : y ∈ ↑A
hzB : z ∈ ↑B
hzC : z ∈ ↑C
⊢ (∃ x y_1, x ∈ ↑A ∧ y_1 ∈ ↑B ∧ x * y_1 = y * z) ∧ y * z ∈ ↑C
[PROOFSTEP]
refine' ⟨_, mul_mem (h hy) hzC⟩
[GOAL]
case h.mp.intro.intro.intro.intro.intro
α : Type u_1
G : Type u_2
A✝ : Type u_3
S : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A✝
s : Set G
A B C : Subgroup G
h : A ≤ C
y z : G
hy : y ∈ ↑A
hzB : z ∈ ↑B
hzC : z ∈ ↑C
⊢ ∃ x y_1, x ∈ ↑A ∧ y_1 ∈ ↑B ∧ x * y_1 = y * z
[PROOFSTEP]
exact ⟨y, z, hy, hzB, rfl⟩
[GOAL]
case h.mpr
α : Type u_1
G : Type u_2
A✝ : Type u_3
S : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A✝
s : Set G
A B C : Subgroup G
h : A ≤ C
x✝ : G
⊢ (∃ x y, x ∈ ↑A ∧ y ∈ ↑B ∧ x * y = x✝) ∧ x✝ ∈ ↑C → ∃ x y, x ∈ ↑A ∧ (y ∈ ↑B ∧ y ∈ ↑C) ∧ x * y = x✝
[PROOFSTEP]
rintro ⟨⟨y, z, hy, hz, rfl⟩, hyz⟩
[GOAL]
case h.mpr.intro.intro.intro.intro.intro
α : Type u_1
G : Type u_2
A✝ : Type u_3
S : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A✝
s : Set G
A B C : Subgroup G
h : A ≤ C
y z : G
hy : y ∈ ↑A
hz : z ∈ ↑B
hyz : y * z ∈ ↑C
⊢ ∃ x y_1, x ∈ ↑A ∧ (y_1 ∈ ↑B ∧ y_1 ∈ ↑C) ∧ x * y_1 = y * z
[PROOFSTEP]
refine' ⟨y, z, hy, ⟨hz, _⟩, rfl⟩
[GOAL]
case h.mpr.intro.intro.intro.intro.intro
α : Type u_1
G : Type u_2
A✝ : Type u_3
S : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A✝
s : Set G
A B C : Subgroup G
h : A ≤ C
y z : G
hy : y ∈ ↑A
hz : z ∈ ↑B
hyz : y * z ∈ ↑C
⊢ z ∈ ↑C
[PROOFSTEP]
suffices y⁻¹ * (y * z) ∈ C by simpa
[GOAL]
α : Type u_1
G : Type u_2
A✝ : Type u_3
S : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A✝
s : Set G
A B C : Subgroup G
h : A ≤ C
y z : G
hy : y ∈ ↑A
hz : z ∈ ↑B
hyz : y * z ∈ ↑C
this : y⁻¹ * (y * z) ∈ C
⊢ z ∈ ↑C
[PROOFSTEP]
simpa
[GOAL]
case h.mpr.intro.intro.intro.intro.intro
α : Type u_1
G : Type u_2
A✝ : Type u_3
S : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A✝
s : Set G
A B C : Subgroup G
h : A ≤ C
y z : G
hy : y ∈ ↑A
hz : z ∈ ↑B
hyz : y * z ∈ ↑C
⊢ y⁻¹ * (y * z) ∈ C
[PROOFSTEP]
exact mul_mem (inv_mem (h hy)) hyz
[GOAL]
α : Type u_1
G : Type u_2
A✝ : Type u_3
S : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A✝
s : Set G
A B C : Subgroup G
h : C ≤ A
⊢ ↑(A ⊓ B) * ↑C = ↑A ⊓ ↑B * ↑C
[PROOFSTEP]
ext
[GOAL]
case h
α : Type u_1
G : Type u_2
A✝ : Type u_3
S : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A✝
s : Set G
A B C : Subgroup G
h : C ≤ A
x✝ : G
⊢ x✝ ∈ ↑(A ⊓ B) * ↑C ↔ x✝ ∈ ↑A ⊓ ↑B * ↑C
[PROOFSTEP]
simp only [coe_inf, Set.inf_eq_inter, Set.mem_mul, Set.mem_inter_iff]
[GOAL]
case h
α : Type u_1
G : Type u_2
A✝ : Type u_3
S : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A✝
s : Set G
A B C : Subgroup G
h : C ≤ A
x✝ : G
⊢ (∃ x y, (x ∈ ↑A ∧ x ∈ ↑B) ∧ y ∈ ↑C ∧ x * y = x✝) ↔ x✝ ∈ ↑A ∧ ∃ x y, x ∈ ↑B ∧ y ∈ ↑C ∧ x * y = x✝
[PROOFSTEP]
constructor
[GOAL]
case h.mp
α : Type u_1
G : Type u_2
A✝ : Type u_3
S : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A✝
s : Set G
A B C : Subgroup G
h : C ≤ A
x✝ : G
⊢ (∃ x y, (x ∈ ↑A ∧ x ∈ ↑B) ∧ y ∈ ↑C ∧ x * y = x✝) → x✝ ∈ ↑A ∧ ∃ x y, x ∈ ↑B ∧ y ∈ ↑C ∧ x * y = x✝
[PROOFSTEP]
rintro ⟨y, z, ⟨hyA, hyB⟩, hz, rfl⟩
[GOAL]
case h.mp.intro.intro.intro.intro.intro
α : Type u_1
G : Type u_2
A✝ : Type u_3
S : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A✝
s : Set G
A B C : Subgroup G
h : C ≤ A
y z : G
hyA : y ∈ ↑A
hyB : y ∈ ↑B
hz : z ∈ ↑C
⊢ y * z ∈ ↑A ∧ ∃ x y_1, x ∈ ↑B ∧ y_1 ∈ ↑C ∧ x * y_1 = y * z
[PROOFSTEP]
refine' ⟨A.mul_mem hyA (h hz), _⟩
[GOAL]
case h.mp.intro.intro.intro.intro.intro
α : Type u_1
G : Type u_2
A✝ : Type u_3
S : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A✝
s : Set G
A B C : Subgroup G
h : C ≤ A
y z : G
hyA : y ∈ ↑A
hyB : y ∈ ↑B
hz : z ∈ ↑C
⊢ ∃ x y_1, x ∈ ↑B ∧ y_1 ∈ ↑C ∧ x * y_1 = y * z
[PROOFSTEP]
exact ⟨y, z, hyB, hz, rfl⟩
[GOAL]
case h.mpr
α : Type u_1
G : Type u_2
A✝ : Type u_3
S : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A✝
s : Set G
A B C : Subgroup G
h : C ≤ A
x✝ : G
⊢ (x✝ ∈ ↑A ∧ ∃ x y, x ∈ ↑B ∧ y ∈ ↑C ∧ x * y = x✝) → ∃ x y, (x ∈ ↑A ∧ x ∈ ↑B) ∧ y ∈ ↑C ∧ x * y = x✝
[PROOFSTEP]
rintro ⟨hyz, y, z, hy, hz, rfl⟩
[GOAL]
case h.mpr.intro.intro.intro.intro.intro
α : Type u_1
G : Type u_2
A✝ : Type u_3
S : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A✝
s : Set G
A B C : Subgroup G
h : C ≤ A
y z : G
hy : y ∈ ↑B
hz : z ∈ ↑C
hyz : y * z ∈ ↑A
⊢ ∃ x y_1, (x ∈ ↑A ∧ x ∈ ↑B) ∧ y_1 ∈ ↑C ∧ x * y_1 = y * z
[PROOFSTEP]
refine' ⟨y, z, ⟨_, hy⟩, hz, rfl⟩
[GOAL]
case h.mpr.intro.intro.intro.intro.intro
α : Type u_1
G : Type u_2
A✝ : Type u_3
S : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A✝
s : Set G
A B C : Subgroup G
h : C ≤ A
y z : G
hy : y ∈ ↑B
hz : z ∈ ↑C
hyz : y * z ∈ ↑A
⊢ y ∈ ↑A
[PROOFSTEP]
suffices y * z * z⁻¹ ∈ A by simpa
[GOAL]
α : Type u_1
G : Type u_2
A✝ : Type u_3
S : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A✝
s : Set G
A B C : Subgroup G
h : C ≤ A
y z : G
hy : y ∈ ↑B
hz : z ∈ ↑C
hyz : y * z ∈ ↑A
this : y * z * z⁻¹ ∈ A
⊢ y ∈ ↑A
[PROOFSTEP]
simpa
[GOAL]
case h.mpr.intro.intro.intro.intro.intro
α : Type u_1
G : Type u_2
A✝ : Type u_3
S : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A✝
s : Set G
A B C : Subgroup G
h : C ≤ A
y z : G
hy : y ∈ ↑B
hz : z ∈ ↑C
hyz : y * z ∈ ↑A
⊢ y * z * z⁻¹ ∈ A
[PROOFSTEP]
exact mul_mem hyz (inv_mem (h hz))
[GOAL]
α : Type u_1
G : Type u_2
A : Type u_3
S : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A
s : Set G
H K : Subgroup G
hH : Normal H
hK : Normal K
n : G
hmem : n ∈ H ⊔ K
g : G
⊢ g * n * g⁻¹ ∈ H ⊔ K
[PROOFSTEP]
rw [← SetLike.mem_coe, normal_mul] at hmem ⊢
[GOAL]
α : Type u_1
G : Type u_2
A : Type u_3
S : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A
s : Set G
H K : Subgroup G
hH : Normal H
hK : Normal K
n : G
hmem : n ∈ ↑H * ↑K
g : G
⊢ g * n * g⁻¹ ∈ ↑H * ↑K
[PROOFSTEP]
rcases hmem with ⟨h, k, hh, hk, rfl⟩
[GOAL]
case intro.intro.intro.intro
α : Type u_1
G : Type u_2
A : Type u_3
S : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A
s : Set G
H K : Subgroup G
hH : Normal H
hK : Normal K
g h k : G
hh : h ∈ ↑H
hk : k ∈ ↑K
⊢ g * (fun x x_1 => x * x_1) h k * g⁻¹ ∈ ↑H * ↑K
[PROOFSTEP]
refine ⟨g * h * g⁻¹, g * k * g⁻¹, hH.conj_mem h hh g, hK.conj_mem k hk g, ?_⟩
[GOAL]
case intro.intro.intro.intro
α : Type u_1
G : Type u_2
A : Type u_3
S : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A
s : Set G
H K : Subgroup G
hH : Normal H
hK : Normal K
g h k : G
hh : h ∈ ↑H
hk : k ∈ ↑K
⊢ (fun x x_1 => x * x_1) (g * h * g⁻¹) (g * k * g⁻¹) = g * (fun x x_1 => x * x_1) h k * g⁻¹
[PROOFSTEP]
simp only [mul_assoc, inv_mul_cancel_left]
[GOAL]
α : Type u_1
G : Type u_2
A : Type u_3
S : Type u_4
inst✝¹ : Group G
inst✝ : AddGroup A
s✝ : Set G
g : G
h : Gᵐᵒᵖ
s : Set G
⊢ (fun y => h • y) '' ((fun x => g * x) ⁻¹' s) = (fun x => g * x) ⁻¹' ((fun y => h • y) '' s)
[PROOFSTEP]
simp [preimage_preimage, mul_assoc]
  -- porting note: deprecate?
[GOAL]
α : Type u_1
G : Type u_2
A : Type u_3
S✝ : Type u_4
inst✝³ : Group G
inst✝² : AddGroup A
s : Set G
inst✝¹ : Monoid α
inst✝ : MulDistribMulAction α G
S : Subgroup G
⊢ 1 • S = S
[PROOFSTEP]
change S.map _ = S
[GOAL]
α : Type u_1
G : Type u_2
A : Type u_3
S✝ : Type u_4
inst✝³ : Group G
inst✝² : AddGroup A
s : Set G
inst✝¹ : Monoid α
inst✝ : MulDistribMulAction α G
S : Subgroup G
⊢ map (↑(MulDistribMulAction.toMonoidEnd α G) 1) S = S
[PROOFSTEP]
simpa only [map_one] using S.map_id
[GOAL]
α : Type u_1
G : Type u_2
A : Type u_3
S : Type u_4
inst✝³ : Group G
inst✝² : AddGroup A
s : Set G
inst✝¹ : Monoid α
inst✝ : MulDistribMulAction α G
P H : Subgroup G
hP : P ≤ H
h : { x // x ∈ H }
⊢ ↑MulAut.conj ↑h • P ≤ H
[PROOFSTEP]
rintro - ⟨g, hg, rfl⟩
[GOAL]
case intro.intro
α : Type u_1
G : Type u_2
A : Type u_3
S : Type u_4
inst✝³ : Group G
inst✝² : AddGroup A
s : Set G
inst✝¹ : Monoid α
inst✝ : MulDistribMulAction α G
P H : Subgroup G
hP : P ≤ H
h : { x // x ∈ H }
g : G
hg : g ∈ ↑P
⊢ ↑(↑(MulDistribMulAction.toMonoidEnd ((fun x => MulAut G) ↑h) G) (↑MulAut.conj ↑h)) g ∈ H
[PROOFSTEP]
exact H.mul_mem (H.mul_mem h.2 (hP hg)) (H.inv_mem h.2)
[GOAL]
α : Type u_1
G : Type u_2
A : Type u_3
S : Type u_4
inst✝³ : Group G
inst✝² : AddGroup A
s : Set G
inst✝¹ : Monoid α
inst✝ : MulDistribMulAction α G
P H : Subgroup G
hP : P ≤ H
h : { x // x ∈ H }
⊢ ↑MulAut.conj h • subgroupOf P H = subgroupOf (↑MulAut.conj ↑h • P) H
[PROOFSTEP]
refine' le_antisymm _ _
[GOAL]
case refine'_1
α : Type u_1
G : Type u_2
A : Type u_3
S : Type u_4
inst✝³ : Group G
inst✝² : AddGroup A
s : Set G
inst✝¹ : Monoid α
inst✝ : MulDistribMulAction α G
P H : Subgroup G
hP : P ≤ H
h : { x // x ∈ H }
⊢ ↑MulAut.conj h • subgroupOf P H ≤ subgroupOf (↑MulAut.conj ↑h • P) H
[PROOFSTEP]
rintro - ⟨g, hg, rfl⟩
[GOAL]
case refine'_1.intro.intro
α : Type u_1
G : Type u_2
A : Type u_3
S : Type u_4
inst✝³ : Group G
inst✝² : AddGroup A
s : Set G
inst✝¹ : Monoid α
inst✝ : MulDistribMulAction α G
P H : Subgroup G
hP : P ≤ H
h g : { x // x ∈ H }
hg : g ∈ ↑(subgroupOf P H)
⊢ ↑(↑(MulDistribMulAction.toMonoidEnd ((fun x => MulAut { x // x ∈ H }) h) { x // x ∈ H }) (↑MulAut.conj h)) g ∈
    subgroupOf (↑MulAut.conj ↑h • P) H
[PROOFSTEP]
exact ⟨g, hg, rfl⟩
[GOAL]
case refine'_2
α : Type u_1
G : Type u_2
A : Type u_3
S : Type u_4
inst✝³ : Group G
inst✝² : AddGroup A
s : Set G
inst✝¹ : Monoid α
inst✝ : MulDistribMulAction α G
P H : Subgroup G
hP : P ≤ H
h : { x // x ∈ H }
⊢ subgroupOf (↑MulAut.conj ↑h • P) H ≤ ↑MulAut.conj h • subgroupOf P H
[PROOFSTEP]
rintro p ⟨g, hg, hp⟩
[GOAL]
case refine'_2.intro.intro
α : Type u_1
G : Type u_2
A : Type u_3
S : Type u_4
inst✝³ : Group G
inst✝² : AddGroup A
s : Set G
inst✝¹ : Monoid α
inst✝ : MulDistribMulAction α G
P H : Subgroup G
hP : P ≤ H
h p : { x // x ∈ H }
g : G
hg : g ∈ ↑P
hp : ↑(↑(MulDistribMulAction.toMonoidEnd ((fun x => MulAut G) ↑h) G) (↑MulAut.conj ↑h)) g = ↑(Subgroup.subtype H) p
⊢ p ∈ ↑MulAut.conj h • subgroupOf P H
[PROOFSTEP]
exact ⟨⟨g, hP hg⟩, hg, Subtype.ext hp⟩
[GOAL]
α : Type u_1
G : Type u_2
A : Type u_3
S✝ : Type u_4
inst✝³ : Group G
inst✝² : AddGroup A
s : Set G
inst✝¹ : Group α
inst✝ : MulDistribMulAction α G
a : α
S T : Subgroup G
⊢ a • (S ⊓ T) = a • S ⊓ a • T
[PROOFSTEP]
simp [SetLike.ext_iff, mem_pointwise_smul_iff_inv_smul_mem]
[GOAL]
α : Type u_1
G : Type u_2
A : Type u_3
S : Type u_4
inst✝³ : Group G
inst✝² : AddGroup A
s : Set G
inst✝¹ : Group α
inst✝ : MulDistribMulAction α G
H : Subgroup G
h : G
hh : h ∈ H
this : {x | x ∈ H} = ↑H
⊢ ↑H * {h} = ↑H
[PROOFSTEP]
simpa [preimage, mul_mem_cancel_right (inv_mem hh)]
[GOAL]
α : Type u_1
G : Type u_2
A : Type u_3
S : Type u_4
inst✝³ : Group G
inst✝² : AddGroup A
s : Set G
inst✝¹ : Group α
inst✝ : MulDistribMulAction α G
H : Subgroup G
h : G
hh : h ∈ H
this : {x | x ∈ H} = ↑H
⊢ {h} * ↑H = ↑H
[PROOFSTEP]
simpa [preimage, mul_mem_cancel_left (inv_mem hh)]
[GOAL]
α : Type u_1
G : Type u_2
A : Type u_3
S✝ : Type u_4
inst✝³ : Group G
inst✝² : AddGroup A
s : Set G
inst✝¹ : Monoid α
inst✝ : DistribMulAction α A
S : AddSubgroup A
⊢ 1 • S = S
[PROOFSTEP]
change S.map _ = S
[GOAL]
α : Type u_1
G : Type u_2
A : Type u_3
S✝ : Type u_4
inst✝³ : Group G
inst✝² : AddGroup A
s : Set G
inst✝¹ : Monoid α
inst✝ : DistribMulAction α A
S : AddSubgroup A
⊢ map (↑(DistribMulAction.toAddMonoidEnd α A) 1) S = S
[PROOFSTEP]
simpa only [map_one] using S.map_id


[GOAL]
z w : ℂ
H : z = w
⊢ z.re = w.re ∧ z.im = w.im
[PROOFSTEP]
simp [H]
[GOAL]
z w : ℝ
⊢ z = w → ↑z = ↑w
[PROOFSTEP]
apply congrArg
[GOAL]
r s : ℝ
⊢ (↑(r + s)).re = (↑r + ↑s).re ∧ (↑(r + s)).im = (↑r + ↑s).im
[PROOFSTEP]
simp [ofReal']
[GOAL]
r : ℝ
⊢ (↑(bit0 r)).re = (bit0 ↑r).re ∧ (↑(bit0 r)).im = (bit0 ↑r).im
[PROOFSTEP]
simp [bit0]
[GOAL]
r : ℝ
⊢ (↑(bit1 r)).re = (bit1 ↑r).re ∧ (↑(bit1 r)).im = (bit1 ↑r).im
[PROOFSTEP]
simp [bit1]
[GOAL]
r : ℝ
⊢ (↑(-r)).re = (-↑r).re ∧ (↑(-r)).im = (-↑r).im
[PROOFSTEP]
simp [ofReal']
[GOAL]
r s : ℝ
⊢ (↑(r * s)).re = (↑r * ↑s).re ∧ (↑(r * s)).im = (↑r * ↑s).im
[PROOFSTEP]
simp [ofReal']
[GOAL]
r : ℝ
z : ℂ
⊢ (↑r * z).re = r * z.re
[PROOFSTEP]
simp [ofReal']
[GOAL]
r : ℝ
z : ℂ
⊢ (↑r * z).im = r * z.im
[PROOFSTEP]
simp [ofReal']
[GOAL]
⊢ (I * I).re = (-1).re ∧ (I * I).im = (-1).im
[PROOFSTEP]
simp
[GOAL]
z : ℂ
⊢ (I * z).re = { re := -z.im, im := z.re }.re ∧ (I * z).im = { re := -z.im, im := z.re }.im
[PROOFSTEP]
simp
[GOAL]
a b : ℝ
⊢ { re := a, im := b }.re = (↑a + ↑b * I).re ∧ { re := a, im := b }.im = (↑a + ↑b * I).im
[PROOFSTEP]
simp [ofReal']
[GOAL]
z : ℂ
⊢ (↑z.re + ↑z.im * I).re = z.re ∧ (↑z.re + ↑z.im * I).im = z.im
[PROOFSTEP]
simp [ofReal']
[GOAL]
z : ℂ
⊢ (z * I).re = -z.im
[PROOFSTEP]
simp
[GOAL]
z : ℂ
⊢ (z * I).im = z.re
[PROOFSTEP]
simp
[GOAL]
z : ℂ
⊢ (I * z).re = -z.im
[PROOFSTEP]
simp
[GOAL]
z : ℂ
⊢ (I * z).im = z.re
[PROOFSTEP]
simp
[GOAL]
p : ℝ × ℝ
⊢ ↑equivRealProd.symm p = ↑p.fst + ↑p.snd * I
[PROOFSTEP]
ext
[GOAL]
case a
p : ℝ × ℝ
⊢ (↑equivRealProd.symm p).re = (↑p.fst + ↑p.snd * I).re
[PROOFSTEP]
simp [Complex.equivRealProd, ofReal']
[GOAL]
case a
p : ℝ × ℝ
⊢ (↑equivRealProd.symm p).im = (↑p.fst + ↑p.snd * I).im
[PROOFSTEP]
simp [Complex.equivRealProd, ofReal']
[GOAL]
R : Type u_1
inst✝ : SMul R ℝ
r : R
z : ℂ
⊢ (r • z).re = r • z.re
[PROOFSTEP]
simp [(· • ·), SMul.smul]
[GOAL]
R : Type u_1
inst✝ : SMul R ℝ
r : R
z : ℂ
⊢ (r • z).im = r • z.im
[PROOFSTEP]
simp [(· • ·), SMul.smul]
[GOAL]
⊢ ∀ (a b c : ℂ), a + b + c = a + (b + c)
[PROOFSTEP]
intros
[GOAL]
a✝ b✝ c✝ : ℂ
⊢ a✝ + b✝ + c✝ = a✝ + (b✝ + c✝)
[PROOFSTEP]
ext
[GOAL]
case a
a✝ b✝ c✝ : ℂ
⊢ (a✝ + b✝ + c✝).re = (a✝ + (b✝ + c✝)).re
[PROOFSTEP]
simp [add_assoc]
[GOAL]
case a
a✝ b✝ c✝ : ℂ
⊢ (a✝ + b✝ + c✝).im = (a✝ + (b✝ + c✝)).im
[PROOFSTEP]
simp [add_assoc]
[GOAL]
⊢ ∀ (a : ℂ), 0 + a = a
[PROOFSTEP]
intros
[GOAL]
a✝ : ℂ
⊢ 0 + a✝ = a✝
[PROOFSTEP]
ext
[GOAL]
case a
a✝ : ℂ
⊢ (0 + a✝).re = a✝.re
[PROOFSTEP]
simp
[GOAL]
case a
a✝ : ℂ
⊢ (0 + a✝).im = a✝.im
[PROOFSTEP]
simp
[GOAL]
⊢ ∀ (a : ℂ), a + 0 = a
[PROOFSTEP]
intros
[GOAL]
a✝ : ℂ
⊢ a✝ + 0 = a✝
[PROOFSTEP]
ext
[GOAL]
case a
a✝ : ℂ
⊢ (a✝ + 0).re = a✝.re
[PROOFSTEP]
simp
[GOAL]
case a
a✝ : ℂ
⊢ (a✝ + 0).im = a✝.im
[PROOFSTEP]
simp
[GOAL]
⊢ ∀ (x : ℂ), (fun n z => n • z) 0 x = 0
[PROOFSTEP]
intros
[GOAL]
x✝ : ℂ
⊢ (fun n z => n • z) 0 x✝ = 0
[PROOFSTEP]
ext
[GOAL]
case a
x✝ : ℂ
⊢ ((fun n z => n • z) 0 x✝).re = 0.re
[PROOFSTEP]
simp [smul_re, smul_im]
[GOAL]
case a
x✝ : ℂ
⊢ ((fun n z => n • z) 0 x✝).im = 0.im
[PROOFSTEP]
simp [smul_re, smul_im]
[GOAL]
⊢ ∀ (n : ℕ) (x : ℂ), (fun n z => n • z) (n + 1) x = x + (fun n z => n • z) n x
[PROOFSTEP]
intros
[GOAL]
n✝ : ℕ
x✝ : ℂ
⊢ (fun n z => n • z) (n✝ + 1) x✝ = x✝ + (fun n z => n • z) n✝ x✝
[PROOFSTEP]
ext
[GOAL]
case a
n✝ : ℕ
x✝ : ℂ
⊢ ((fun n z => n • z) (n✝ + 1) x✝).re = (x✝ + (fun n z => n • z) n✝ x✝).re
[PROOFSTEP]
simp [AddMonoid.nsmul_succ, add_mul, add_comm, smul_re, smul_im]
[GOAL]
case a
n✝ : ℕ
x✝ : ℂ
⊢ ((fun n z => n • z) (n✝ + 1) x✝).im = (x✝ + (fun n z => n • z) n✝ x✝).im
[PROOFSTEP]
simp [AddMonoid.nsmul_succ, add_mul, add_comm, smul_re, smul_im]
[GOAL]
⊢ ∀ (a : ℂ), (fun n z => n • z) 0 a = 0
[PROOFSTEP]
intros
[GOAL]
a✝ : ℂ
⊢ (fun n z => n • z) 0 a✝ = 0
[PROOFSTEP]
ext
[GOAL]
case a
a✝ : ℂ
⊢ ((fun n z => n • z) 0 a✝).re = 0.re
[PROOFSTEP]
simp [smul_re, smul_im]
[GOAL]
case a
a✝ : ℂ
⊢ ((fun n z => n • z) 0 a✝).im = 0.im
[PROOFSTEP]
simp [smul_re, smul_im]
[GOAL]
⊢ ∀ (n : ℕ) (a : ℂ), (fun n z => n • z) (Int.ofNat (Nat.succ n)) a = a + (fun n z => n • z) (Int.ofNat n) a
[PROOFSTEP]
intros
[GOAL]
n✝ : ℕ
a✝ : ℂ
⊢ (fun n z => n • z) (Int.ofNat (Nat.succ n✝)) a✝ = a✝ + (fun n z => n • z) (Int.ofNat n✝) a✝
[PROOFSTEP]
ext
[GOAL]
case a
n✝ : ℕ
a✝ : ℂ
⊢ ((fun n z => n • z) (Int.ofNat (Nat.succ n✝)) a✝).re = (a✝ + (fun n z => n • z) (Int.ofNat n✝) a✝).re
[PROOFSTEP]
simp [SubNegMonoid.zsmul_succ', add_mul, add_comm, smul_re, smul_im]
[GOAL]
case a
n✝ : ℕ
a✝ : ℂ
⊢ ((fun n z => n • z) (Int.ofNat (Nat.succ n✝)) a✝).im = (a✝ + (fun n z => n • z) (Int.ofNat n✝) a✝).im
[PROOFSTEP]
simp [SubNegMonoid.zsmul_succ', add_mul, add_comm, smul_re, smul_im]
[GOAL]
⊢ ∀ (n : ℕ) (a : ℂ), (fun n z => n • z) (Int.negSucc n) a = -(fun n z => n • z) (↑(Nat.succ n)) a
[PROOFSTEP]
intros
[GOAL]
n✝ : ℕ
a✝ : ℂ
⊢ (fun n z => n • z) (Int.negSucc n✝) a✝ = -(fun n z => n • z) (↑(Nat.succ n✝)) a✝
[PROOFSTEP]
ext
[GOAL]
case a
n✝ : ℕ
a✝ : ℂ
⊢ ((fun n z => n • z) (Int.negSucc n✝) a✝).re = (-(fun n z => n • z) (↑(Nat.succ n✝)) a✝).re
[PROOFSTEP]
simp [zsmul_neg', add_mul, smul_re, smul_im]
[GOAL]
case a
n✝ : ℕ
a✝ : ℂ
⊢ ((fun n z => n • z) (Int.negSucc n✝) a✝).im = (-(fun n z => n • z) (↑(Nat.succ n✝)) a✝).im
[PROOFSTEP]
simp [zsmul_neg', add_mul, smul_re, smul_im]
[GOAL]
⊢ ∀ (a : ℂ), -a + a = 0
[PROOFSTEP]
intros
[GOAL]
a✝ : ℂ
⊢ -a✝ + a✝ = 0
[PROOFSTEP]
ext
[GOAL]
case a
a✝ : ℂ
⊢ (-a✝ + a✝).re = 0.re
[PROOFSTEP]
simp
[GOAL]
case a
a✝ : ℂ
⊢ (-a✝ + a✝).im = 0.im
[PROOFSTEP]
simp
[GOAL]
⊢ ∀ (a b : ℂ), a + b = b + a
[PROOFSTEP]
intros
[GOAL]
a✝ b✝ : ℂ
⊢ a✝ + b✝ = b✝ + a✝
[PROOFSTEP]
ext
[GOAL]
case a
a✝ b✝ : ℂ
⊢ (a✝ + b✝).re = (b✝ + a✝).re
[PROOFSTEP]
simp [add_comm]
[GOAL]
case a
a✝ b✝ : ℂ
⊢ (a✝ + b✝).im = (b✝ + a✝).im
[PROOFSTEP]
simp [add_comm]
[GOAL]
src✝ : AddCommGroup ℂ := addCommGroup
⊢ NatCast.natCast 0 = 0
[PROOFSTEP]
ext
[GOAL]
case a
src✝ : AddCommGroup ℂ := addCommGroup
⊢ (NatCast.natCast 0).re = 0.re
[PROOFSTEP]
simp [Nat.cast, AddMonoidWithOne.natCast_zero]
[GOAL]
case a
src✝ : AddCommGroup ℂ := addCommGroup
⊢ (NatCast.natCast 0).im = 0.im
[PROOFSTEP]
simp [Nat.cast, AddMonoidWithOne.natCast_zero]
[GOAL]
src✝ : AddCommGroup ℂ := addCommGroup
x✝ : ℕ
⊢ NatCast.natCast (x✝ + 1) = NatCast.natCast x✝ + 1
[PROOFSTEP]
ext
[GOAL]
case a
src✝ : AddCommGroup ℂ := addCommGroup
x✝ : ℕ
⊢ (NatCast.natCast (x✝ + 1)).re = (NatCast.natCast x✝ + 1).re
[PROOFSTEP]
simp [Nat.cast, AddMonoidWithOne.natCast_succ]
[GOAL]
case a
src✝ : AddCommGroup ℂ := addCommGroup
x✝ : ℕ
⊢ (NatCast.natCast (x✝ + 1)).im = (NatCast.natCast x✝ + 1).im
[PROOFSTEP]
simp [Nat.cast, AddMonoidWithOne.natCast_succ]
[GOAL]
src✝ : AddCommGroup ℂ := addCommGroup
x✝ : ℕ
⊢ IntCast.intCast ↑x✝ = ↑x✝
[PROOFSTEP]
ext
[GOAL]
case a
src✝ : AddCommGroup ℂ := addCommGroup
x✝ : ℕ
⊢ (IntCast.intCast ↑x✝).re = (↑x✝).re
[PROOFSTEP]
rfl
[GOAL]
case a
src✝ : AddCommGroup ℂ := addCommGroup
x✝ : ℕ
⊢ (IntCast.intCast ↑x✝).im = (↑x✝).im
[PROOFSTEP]
rfl
[GOAL]
src✝ : AddCommGroup ℂ := addCommGroup
n : ℕ
⊢ IntCast.intCast (Int.negSucc n) = -↑(n + 1)
[PROOFSTEP]
ext
[GOAL]
case a
src✝ : AddCommGroup ℂ := addCommGroup
n : ℕ
⊢ (IntCast.intCast (Int.negSucc n)).re = (-↑(n + 1)).re
[PROOFSTEP]
simp [AddGroupWithOne.intCast_negSucc]
[GOAL]
case a
src✝ : AddCommGroup ℂ := addCommGroup
n : ℕ
⊢ -1 + -↑n = -(↑(n + 1)).re
[PROOFSTEP]
show -(1 : ℝ) + (-n) = -(↑(n + 1))
[GOAL]
case a
src✝ : AddCommGroup ℂ := addCommGroup
n : ℕ
⊢ -1 + -↑n = -↑(n + 1)
[PROOFSTEP]
simp [Nat.cast_add, add_comm]
[GOAL]
case a
src✝ : AddCommGroup ℂ := addCommGroup
n : ℕ
⊢ (IntCast.intCast (Int.negSucc n)).im = (-↑(n + 1)).im
[PROOFSTEP]
simp [AddGroupWithOne.intCast_negSucc]
[GOAL]
case a
src✝ : AddCommGroup ℂ := addCommGroup
n : ℕ
⊢ (↑(n + 1)).im = 0
[PROOFSTEP]
show im ⟨n, 0⟩ = 0
[GOAL]
case a
src✝ : AddCommGroup ℂ := addCommGroup
n : ℕ
⊢ { re := ↑n, im := 0 }.im = 0
[PROOFSTEP]
rfl
[GOAL]
src✝ : AddGroupWithOne ℂ := Complex.addGroupWithOne
⊢ ∀ (a b : ℂ), a + b = b + a
[PROOFSTEP]
intros
[GOAL]
src✝ : AddGroupWithOne ℂ := Complex.addGroupWithOne
a✝ b✝ : ℂ
⊢ a✝ + b✝ = b✝ + a✝
[PROOFSTEP]
ext
[GOAL]
case a
src✝ : AddGroupWithOne ℂ := Complex.addGroupWithOne
a✝ b✝ : ℂ
⊢ (a✝ + b✝).re = (b✝ + a✝).re
[PROOFSTEP]
simp [add_comm]
[GOAL]
case a
src✝ : AddGroupWithOne ℂ := Complex.addGroupWithOne
a✝ b✝ : ℂ
⊢ (a✝ + b✝).im = (b✝ + a✝).im
[PROOFSTEP]
simp [add_comm]
[GOAL]
src✝ : AddGroupWithOne ℂ := Complex.addGroupWithOne
⊢ ∀ (a b c : ℂ), a * (b + c) = a * b + a * c
[PROOFSTEP]
intros
[GOAL]
src✝ : AddGroupWithOne ℂ := Complex.addGroupWithOne
a✝ b✝ c✝ : ℂ
⊢ a✝ * (b✝ + c✝) = a✝ * b✝ + a✝ * c✝
[PROOFSTEP]
ext
[GOAL]
case a
src✝ : AddGroupWithOne ℂ := Complex.addGroupWithOne
a✝ b✝ c✝ : ℂ
⊢ (a✝ * (b✝ + c✝)).re = (a✝ * b✝ + a✝ * c✝).re
[PROOFSTEP]
simp [mul_re, mul_im]
[GOAL]
case a
src✝ : AddGroupWithOne ℂ := Complex.addGroupWithOne
a✝ b✝ c✝ : ℂ
⊢ (a✝ * (b✝ + c✝)).im = (a✝ * b✝ + a✝ * c✝).im
[PROOFSTEP]
simp [mul_re, mul_im]
[GOAL]
case a
src✝ : AddGroupWithOne ℂ := Complex.addGroupWithOne
a✝ b✝ c✝ : ℂ
⊢ a✝.re * (b✝.re + c✝.re) - a✝.im * (b✝.im + c✝.im) = a✝.re * b✝.re - a✝.im * b✝.im + (a✝.re * c✝.re - a✝.im * c✝.im)
[PROOFSTEP]
ring
[GOAL]
case a
src✝ : AddGroupWithOne ℂ := Complex.addGroupWithOne
a✝ b✝ c✝ : ℂ
⊢ a✝.re * (b✝.im + c✝.im) + a✝.im * (b✝.re + c✝.re) = a✝.re * b✝.im + a✝.im * b✝.re + (a✝.re * c✝.im + a✝.im * c✝.re)
[PROOFSTEP]
ring
[GOAL]
src✝ : AddGroupWithOne ℂ := Complex.addGroupWithOne
⊢ ∀ (a b c : ℂ), (a + b) * c = a * c + b * c
[PROOFSTEP]
intros
[GOAL]
src✝ : AddGroupWithOne ℂ := Complex.addGroupWithOne
a✝ b✝ c✝ : ℂ
⊢ (a✝ + b✝) * c✝ = a✝ * c✝ + b✝ * c✝
[PROOFSTEP]
ext
[GOAL]
case a
src✝ : AddGroupWithOne ℂ := Complex.addGroupWithOne
a✝ b✝ c✝ : ℂ
⊢ ((a✝ + b✝) * c✝).re = (a✝ * c✝ + b✝ * c✝).re
[PROOFSTEP]
simp [mul_re, mul_im]
[GOAL]
case a
src✝ : AddGroupWithOne ℂ := Complex.addGroupWithOne
a✝ b✝ c✝ : ℂ
⊢ ((a✝ + b✝) * c✝).im = (a✝ * c✝ + b✝ * c✝).im
[PROOFSTEP]
simp [mul_re, mul_im]
[GOAL]
case a
src✝ : AddGroupWithOne ℂ := Complex.addGroupWithOne
a✝ b✝ c✝ : ℂ
⊢ (a✝.re + b✝.re) * c✝.re - (a✝.im + b✝.im) * c✝.im = a✝.re * c✝.re - a✝.im * c✝.im + (b✝.re * c✝.re - b✝.im * c✝.im)
[PROOFSTEP]
ring
[GOAL]
case a
src✝ : AddGroupWithOne ℂ := Complex.addGroupWithOne
a✝ b✝ c✝ : ℂ
⊢ (a✝.re + b✝.re) * c✝.im + (a✝.im + b✝.im) * c✝.re = a✝.re * c✝.im + a✝.im * c✝.re + (b✝.re * c✝.im + b✝.im * c✝.re)
[PROOFSTEP]
ring
[GOAL]
src✝ : AddGroupWithOne ℂ := Complex.addGroupWithOne
⊢ ∀ (a : ℂ), 0 * a = 0
[PROOFSTEP]
intros
[GOAL]
src✝ : AddGroupWithOne ℂ := Complex.addGroupWithOne
a✝ : ℂ
⊢ 0 * a✝ = 0
[PROOFSTEP]
ext
[GOAL]
case a
src✝ : AddGroupWithOne ℂ := Complex.addGroupWithOne
a✝ : ℂ
⊢ (0 * a✝).re = 0.re
[PROOFSTEP]
simp [zero_mul]
[GOAL]
case a
src✝ : AddGroupWithOne ℂ := Complex.addGroupWithOne
a✝ : ℂ
⊢ (0 * a✝).im = 0.im
[PROOFSTEP]
simp [zero_mul]
[GOAL]
src✝ : AddGroupWithOne ℂ := Complex.addGroupWithOne
⊢ ∀ (a : ℂ), a * 0 = 0
[PROOFSTEP]
intros
[GOAL]
src✝ : AddGroupWithOne ℂ := Complex.addGroupWithOne
a✝ : ℂ
⊢ a✝ * 0 = 0
[PROOFSTEP]
ext
[GOAL]
case a
src✝ : AddGroupWithOne ℂ := Complex.addGroupWithOne
a✝ : ℂ
⊢ (a✝ * 0).re = 0.re
[PROOFSTEP]
simp [mul_zero]
[GOAL]
case a
src✝ : AddGroupWithOne ℂ := Complex.addGroupWithOne
a✝ : ℂ
⊢ (a✝ * 0).im = 0.im
[PROOFSTEP]
simp [mul_zero]
[GOAL]
src✝ : AddGroupWithOne ℂ := Complex.addGroupWithOne
⊢ ∀ (a b c : ℂ), a * b * c = a * (b * c)
[PROOFSTEP]
intros
[GOAL]
src✝ : AddGroupWithOne ℂ := Complex.addGroupWithOne
a✝ b✝ c✝ : ℂ
⊢ a✝ * b✝ * c✝ = a✝ * (b✝ * c✝)
[PROOFSTEP]
ext
[GOAL]
case a
src✝ : AddGroupWithOne ℂ := Complex.addGroupWithOne
a✝ b✝ c✝ : ℂ
⊢ (a✝ * b✝ * c✝).re = (a✝ * (b✝ * c✝)).re
[PROOFSTEP]
simp [mul_assoc]
[GOAL]
case a
src✝ : AddGroupWithOne ℂ := Complex.addGroupWithOne
a✝ b✝ c✝ : ℂ
⊢ (a✝ * b✝ * c✝).im = (a✝ * (b✝ * c✝)).im
[PROOFSTEP]
simp [mul_assoc]
[GOAL]
case a
src✝ : AddGroupWithOne ℂ := Complex.addGroupWithOne
a✝ b✝ c✝ : ℂ
⊢ (a✝.re * b✝.re - a✝.im * b✝.im) * c✝.re - (a✝.re * b✝.im + a✝.im * b✝.re) * c✝.im =
    a✝.re * (b✝.re * c✝.re - b✝.im * c✝.im) - a✝.im * (b✝.re * c✝.im + b✝.im * c✝.re)
[PROOFSTEP]
ring
[GOAL]
case a
src✝ : AddGroupWithOne ℂ := Complex.addGroupWithOne
a✝ b✝ c✝ : ℂ
⊢ (a✝.re * b✝.re - a✝.im * b✝.im) * c✝.im + (a✝.re * b✝.im + a✝.im * b✝.re) * c✝.re =
    a✝.re * (b✝.re * c✝.im + b✝.im * c✝.re) + a✝.im * (b✝.re * c✝.re - b✝.im * c✝.im)
[PROOFSTEP]
ring
[GOAL]
src✝ : AddGroupWithOne ℂ := Complex.addGroupWithOne
⊢ ∀ (a : ℂ), 1 * a = a
[PROOFSTEP]
intros
[GOAL]
src✝ : AddGroupWithOne ℂ := Complex.addGroupWithOne
a✝ : ℂ
⊢ 1 * a✝ = a✝
[PROOFSTEP]
ext
[GOAL]
case a
src✝ : AddGroupWithOne ℂ := Complex.addGroupWithOne
a✝ : ℂ
⊢ (1 * a✝).re = a✝.re
[PROOFSTEP]
simp [one_mul]
[GOAL]
case a
src✝ : AddGroupWithOne ℂ := Complex.addGroupWithOne
a✝ : ℂ
⊢ (1 * a✝).im = a✝.im
[PROOFSTEP]
simp [one_mul]
[GOAL]
src✝ : AddGroupWithOne ℂ := Complex.addGroupWithOne
⊢ ∀ (a : ℂ), a * 1 = a
[PROOFSTEP]
intros
[GOAL]
src✝ : AddGroupWithOne ℂ := Complex.addGroupWithOne
a✝ : ℂ
⊢ a✝ * 1 = a✝
[PROOFSTEP]
ext
[GOAL]
case a
src✝ : AddGroupWithOne ℂ := Complex.addGroupWithOne
a✝ : ℂ
⊢ (a✝ * 1).re = a✝.re
[PROOFSTEP]
simp [mul_one]
[GOAL]
case a
src✝ : AddGroupWithOne ℂ := Complex.addGroupWithOne
a✝ : ℂ
⊢ (a✝ * 1).im = a✝.im
[PROOFSTEP]
simp [mul_one]
[GOAL]
src✝ : AddGroupWithOne ℂ := Complex.addGroupWithOne
⊢ ∀ (a b : ℂ), a * b = b * a
[PROOFSTEP]
intros
[GOAL]
src✝ : AddGroupWithOne ℂ := Complex.addGroupWithOne
a✝ b✝ : ℂ
⊢ a✝ * b✝ = b✝ * a✝
[PROOFSTEP]
ext
[GOAL]
case a
src✝ : AddGroupWithOne ℂ := Complex.addGroupWithOne
a✝ b✝ : ℂ
⊢ (a✝ * b✝).re = (b✝ * a✝).re
[PROOFSTEP]
simp [mul_comm]
[GOAL]
case a
src✝ : AddGroupWithOne ℂ := Complex.addGroupWithOne
a✝ b✝ : ℂ
⊢ (a✝ * b✝).im = (b✝ * a✝).im
[PROOFSTEP]
simp [mul_comm]
[GOAL]
case a
src✝ : AddGroupWithOne ℂ := Complex.addGroupWithOne
a✝ b✝ : ℂ
⊢ a✝.re * b✝.im + b✝.re * a✝.im = b✝.re * a✝.im + a✝.re * b✝.im
[PROOFSTEP]
ring
[GOAL]
⊢ Ring ℂ
[PROOFSTEP]
infer_instance
[GOAL]
n : ℕ
⊢ I ^ bit0 n = (-1) ^ n
[PROOFSTEP]
rw [pow_bit0', Complex.I_mul_I]
[GOAL]
n : ℕ
⊢ I ^ bit1 n = (-1) ^ n * I
[PROOFSTEP]
rw [pow_bit1', Complex.I_mul_I]
[GOAL]
x : ℂ
⊢ star (star x) = x
[PROOFSTEP]
simp only [eta, neg_neg]
[GOAL]
a b : ℂ
⊢ star (a * b) = star b * star a
[PROOFSTEP]
ext
[GOAL]
case a
a b : ℂ
⊢ (star (a * b)).re = (star b * star a).re
[PROOFSTEP]
simp [add_comm]
[GOAL]
case a
a b : ℂ
⊢ (star (a * b)).im = (star b * star a).im
[PROOFSTEP]
simp [add_comm]
[GOAL]
case a
a b : ℂ
⊢ a.re * b.re - a.im * b.im = b.re * a.re - b.im * a.im
[PROOFSTEP]
ring
[GOAL]
case a
a b : ℂ
⊢ -(a.re * b.im) + -(a.im * b.re) = -(b.re * a.im) + -(b.im * a.re)
[PROOFSTEP]
ring
[GOAL]
a b : ℂ
⊢ star (a + b) = star a + star b
[PROOFSTEP]
ext
[GOAL]
case a
a b : ℂ
⊢ (star (a + b)).re = (star a + star b).re
[PROOFSTEP]
simp [add_comm]
[GOAL]
case a
a b : ℂ
⊢ (star (a + b)).im = (star a + star b).im
[PROOFSTEP]
simp [add_comm]
[GOAL]
r : ℝ
⊢ (↑(starRingEnd ℂ) ↑r).re = (↑r).re ∧ (↑(starRingEnd ℂ) ↑r).im = (↑r).im
[PROOFSTEP]
simp [star]
[GOAL]
⊢ (↑(starRingEnd ℂ) I).re = (-I).re ∧ (↑(starRingEnd ℂ) I).im = (-I).im
[PROOFSTEP]
simp
[GOAL]
z : ℂ
⊢ (↑(starRingEnd ℂ) (bit0 z)).re = (bit0 (↑(starRingEnd ℂ) z)).re ∧
    (↑(starRingEnd ℂ) (bit0 z)).im = (bit0 (↑(starRingEnd ℂ) z)).im
[PROOFSTEP]
simp [bit0]
[GOAL]
z : ℂ
⊢ (↑(starRingEnd ℂ) (bit1 z)).re = (bit1 (↑(starRingEnd ℂ) z)).re ∧
    (↑(starRingEnd ℂ) (bit1 z)).im = (bit1 (↑(starRingEnd ℂ) z)).im
[PROOFSTEP]
simp [bit0]
[GOAL]
⊢ (↑(starRingEnd ℂ) (-I)).re = I.re ∧ (↑(starRingEnd ℂ) (-I)).im = I.im
[PROOFSTEP]
simp
[GOAL]
z : ℂ
x✝ : ∃ r, z = ↑r
h : ℝ
e : z = ↑h
⊢ ↑(starRingEnd ℂ) z = z
[PROOFSTEP]
rw [e, conj_ofReal]
[GOAL]
z : ℂ
⊢ (∃ r, z = ↑r) → ↑z.re = z
[PROOFSTEP]
rintro ⟨r, rfl⟩
[GOAL]
case intro
r : ℝ
⊢ ↑(↑r).re = ↑r
[PROOFSTEP]
simp [ofReal']
[GOAL]
⊢ (fun z => z.re * z.re + z.im * z.im) 0 = 0
[PROOFSTEP]
simp
[GOAL]
⊢ ZeroHom.toFun { toFun := fun z => z.re * z.re + z.im * z.im, map_zero' := (_ : 0 * 0 + 0 * 0 = 0) } 1 = 1
[PROOFSTEP]
simp
[GOAL]
z w : ℂ
⊢ ZeroHom.toFun { toFun := fun z => z.re * z.re + z.im * z.im, map_zero' := (_ : 0 * 0 + 0 * 0 = 0) } (z * w) =
    ZeroHom.toFun { toFun := fun z => z.re * z.re + z.im * z.im, map_zero' := (_ : 0 * 0 + 0 * 0 = 0) } z *
      ZeroHom.toFun { toFun := fun z => z.re * z.re + z.im * z.im, map_zero' := (_ : 0 * 0 + 0 * 0 = 0) } w
[PROOFSTEP]
dsimp
[GOAL]
z w : ℂ
⊢ (z.re * w.re - z.im * w.im) * (z.re * w.re - z.im * w.im) +
      (z.re * w.im + z.im * w.re) * (z.re * w.im + z.im * w.re) =
    (z.re * z.re + z.im * z.im) * (w.re * w.re + w.im * w.im)
[PROOFSTEP]
ring
[GOAL]
r : ℝ
⊢ ↑normSq ↑r = r * r
[PROOFSTEP]
simp [normSq, ofReal']
[GOAL]
x y : ℝ
⊢ ↑normSq (↑x + ↑y * I) = x ^ 2 + y ^ 2
[PROOFSTEP]
rw [← mk_eq_add_mul_I, normSq_mk, sq, sq]
[GOAL]
z : ℂ
⊢ ↑(↑normSq z) = ↑(starRingEnd ℂ) z * z
[PROOFSTEP]
ext
[GOAL]
case a
z : ℂ
⊢ (↑(↑normSq z)).re = (↑(starRingEnd ℂ) z * z).re
[PROOFSTEP]
simp [normSq, mul_comm, ofReal']
[GOAL]
case a
z : ℂ
⊢ (↑(↑normSq z)).im = (↑(starRingEnd ℂ) z * z).im
[PROOFSTEP]
simp [normSq, mul_comm, ofReal']
[GOAL]
⊢ ↑normSq I = 1
[PROOFSTEP]
simp [normSq]
[GOAL]
x : ℝ
hx : x ∈ Ici 0
⊢ ↑normSq ↑(Real.sqrt x) = x
[PROOFSTEP]
rw [normSq_ofReal, Real.mul_self_sqrt hx]
[GOAL]
z : ℂ
⊢ ↑normSq (-z) = ↑normSq z
[PROOFSTEP]
simp [normSq]
[GOAL]
z : ℂ
⊢ ↑normSq (↑(starRingEnd ℂ) z) = ↑normSq z
[PROOFSTEP]
simp [normSq]
[GOAL]
z w : ℂ
⊢ ↑normSq (z + w) = ↑normSq z + ↑normSq w + 2 * (z * ↑(starRingEnd ℂ) w).re
[PROOFSTEP]
dsimp [normSq]
[GOAL]
z w : ℂ
⊢ (z.re + w.re) * (z.re + w.re) + (z.im + w.im) * (z.im + w.im) =
    z.re * z.re + z.im * z.im + (w.re * w.re + w.im * w.im) + 2 * (z.re * w.re - z.im * -w.im)
[PROOFSTEP]
ring
[GOAL]
z : ℂ
⊢ (z * ↑(starRingEnd ℂ) z).re = (↑(↑normSq z)).re ∧ (z * ↑(starRingEnd ℂ) z).im = (↑(↑normSq z)).im
[PROOFSTEP]
simp [normSq, mul_comm, sub_eq_neg_add, add_comm, ofReal']
[GOAL]
z : ℂ
⊢ (z + ↑(starRingEnd ℂ) z).re = (↑(2 * z.re)).re ∧ (z + ↑(starRingEnd ℂ) z).im = (↑(2 * z.re)).im
[PROOFSTEP]
simp [two_mul, ofReal']
[GOAL]
⊢ I ^ 2 = -1
[PROOFSTEP]
rw [sq, I_mul_I]
[GOAL]
r s : ℝ
⊢ (↑(r - s)).re = (↑r - ↑s).re ∧ (↑(r - s)).im = (↑r - ↑s).im
[PROOFSTEP]
simp [ofReal']
[GOAL]
r : ℝ
n : ℕ
⊢ ↑(r ^ n) = ↑r ^ n
[PROOFSTEP]
induction n
[GOAL]
case zero
r : ℝ
⊢ ↑(r ^ Nat.zero) = ↑r ^ Nat.zero
[PROOFSTEP]
simp [*, ofReal_mul, pow_succ]
[GOAL]
case succ
r : ℝ
n✝ : ℕ
n_ih✝ : ↑(r ^ n✝) = ↑r ^ n✝
⊢ ↑(r ^ Nat.succ n✝) = ↑r ^ Nat.succ n✝
[PROOFSTEP]
simp [*, ofReal_mul, pow_succ]
[GOAL]
z : ℂ
⊢ (z - ↑(starRingEnd ℂ) z).re = (↑(2 * z.im) * I).re ∧ (z - ↑(starRingEnd ℂ) z).im = (↑(2 * z.im) * I).im
[PROOFSTEP]
simp [two_mul, sub_eq_add_neg, ofReal']
[GOAL]
z w : ℂ
⊢ ↑normSq (z - w) = ↑normSq z + ↑normSq w - 2 * (z * ↑(starRingEnd ℂ) w).re
[PROOFSTEP]
rw [sub_eq_add_neg, normSq_add]
[GOAL]
z w : ℂ
⊢ ↑normSq z + ↑normSq (-w) + 2 * (z * ↑(starRingEnd ℂ) (-w)).re =
    ↑normSq z + ↑normSq w - 2 * (z * ↑(starRingEnd ℂ) w).re
[PROOFSTEP]
simp only [RingHom.map_neg, mul_neg, neg_re, normSq_neg]
[GOAL]
z w : ℂ
⊢ ↑normSq z + ↑normSq w + -(2 * (z * ↑(starRingEnd ℂ) w).re) = ↑normSq z + ↑normSq w - 2 * (z * ↑(starRingEnd ℂ) w).re
[PROOFSTEP]
ring
[GOAL]
z : ℂ
⊢ z⁻¹.re = z.re / ↑normSq z
[PROOFSTEP]
simp [inv_def, division_def, ofReal']
[GOAL]
z : ℂ
⊢ z⁻¹.im = -z.im / ↑normSq z
[PROOFSTEP]
simp [inv_def, division_def, ofReal']
[GOAL]
r : ℝ
⊢ (↑r⁻¹).re = (↑r)⁻¹.re ∧ (↑r⁻¹).im = (↑r)⁻¹.im
[PROOFSTEP]
simp [ofReal']
[GOAL]
⊢ 0⁻¹ = 0
[PROOFSTEP]
rw [← ofReal_zero, ← ofReal_inv, inv_zero]
[GOAL]
z : ℂ
h : z ≠ 0
⊢ z * z⁻¹ = 1
[PROOFSTEP]
rw [inv_def, ← mul_assoc, mul_conj, ← ofReal_mul, mul_inv_cancel (mt normSq_eq_zero.1 h), ofReal_one]
[GOAL]
n : ℕ
⊢ (↑n).re = ↑n
[PROOFSTEP]
rw [← ofReal_nat_cast, ofReal_re]
[GOAL]
n : ℕ
⊢ (↑n).im = 0
[PROOFSTEP]
rw [← ofReal_nat_cast, ofReal_im]
[GOAL]
n : ℤ
⊢ (↑n).re = ↑n
[PROOFSTEP]
rw [← ofReal_int_cast, ofReal_re]
[GOAL]
n : ℤ
⊢ (↑n).im = 0
[PROOFSTEP]
rw [← ofReal_int_cast, ofReal_im]
[GOAL]
q : ℚ
⊢ (↑q).im = 0
[PROOFSTEP]
show (Rat.castRec q : ℂ).im = 0
[GOAL]
q : ℚ
⊢ (Rat.castRec q).im = 0
[PROOFSTEP]
cases q
[GOAL]
case mk'
num✝ : ℤ
den✝ : ℕ
den_nz✝ : den✝ ≠ 0
reduced✝ : Nat.coprime (Int.natAbs num✝) den✝
⊢ (Rat.castRec (Rat.mk' num✝ den✝)).im = 0
[PROOFSTEP]
simp [Rat.castRec]
[GOAL]
q : ℚ
⊢ (↑q).re = ↑q
[PROOFSTEP]
show (Rat.castRec q : ℂ).re = _
[GOAL]
q : ℚ
⊢ (Rat.castRec q).re = ↑q
[PROOFSTEP]
cases q
[GOAL]
case mk'
num✝ : ℤ
den✝ : ℕ
den_nz✝ : den✝ ≠ 0
reduced✝ : Nat.coprime (Int.natAbs num✝) den✝
⊢ (Rat.castRec (Rat.mk' num✝ den✝)).re = ↑(Rat.mk' num✝ den✝)
[PROOFSTEP]
simp [Rat.castRec, normSq, Rat.mk_eq_divInt, Rat.mkRat_eq_div, div_eq_mul_inv, *]
[GOAL]
n : ℚ
z : ℂ
⊢ ((fun n z => n • z) n z).re = (↑n * z).re ∧ ((fun n z => n • z) n z).im = (↑n * z).im
[PROOFSTEP]
simp [Rat.smul_def, smul_re, smul_im]
[GOAL]
n : ℤ
⊢ I ^ bit0 n = (-1) ^ n
[PROOFSTEP]
rw [zpow_bit0', I_mul_I]
[GOAL]
n : ℤ
⊢ I ^ bit1 n = (-1) ^ n * I
[PROOFSTEP]
rw [zpow_bit1', I_mul_I]
[GOAL]
z w : ℂ
⊢ (z / w).re = z.re * w.re / ↑normSq w + z.im * w.im / ↑normSq w
[PROOFSTEP]
simp [div_eq_mul_inv, mul_assoc, sub_eq_add_neg]
[GOAL]
z w : ℂ
⊢ (z / w).im = z.im * w.re / ↑normSq w - z.re * w.im / ↑normSq w
[PROOFSTEP]
simp [div_eq_mul_inv, mul_assoc, sub_eq_add_neg, add_comm]
[GOAL]
z : ℂ
⊢ -(z * I) * I = z
[PROOFSTEP]
simp [mul_assoc]
[GOAL]
⊢ I⁻¹ = -I
[PROOFSTEP]
rw [inv_eq_one_div, div_I, one_mul]
[GOAL]
n : ℕ
h : ↑n = 0
⊢ n = 0
[PROOFSTEP]
rwa [← ofReal_nat_cast, ofReal_eq_zero, Nat.cast_eq_zero] at h
[GOAL]
z : ℂ
⊢ ↑z.re = (z + ↑(starRingEnd ℂ) z) / 2
[PROOFSTEP]
have : (↑(↑2 : ℝ) : ℂ) = (2 : ℂ) := by rfl
[GOAL]
z : ℂ
⊢ ↑2 = 2
[PROOFSTEP]
rfl
[GOAL]
z : ℂ
this : ↑2 = 2
⊢ ↑z.re = (z + ↑(starRingEnd ℂ) z) / 2
[PROOFSTEP]
simp only [add_conj, ofReal_mul, ofReal_one, ofReal_bit0, this, mul_div_cancel_left (z.re : ℂ) two_ne_zero]
[GOAL]
z : ℂ
⊢ ↑z.im = (z - ↑(starRingEnd ℂ) z) / (2 * I)
[PROOFSTEP]
have : (↑2 : ℝ) * I = 2 * I := by rfl
[GOAL]
z : ℂ
⊢ ↑2 * I = 2 * I
[PROOFSTEP]
rfl
[GOAL]
z : ℂ
this : ↑2 * I = 2 * I
⊢ ↑z.im = (z - ↑(starRingEnd ℂ) z) / (2 * I)
[PROOFSTEP]
simp only [sub_conj, ofReal_mul, ofReal_one, ofReal_bit0, mul_right_comm, this,
  mul_div_cancel_left _ (mul_ne_zero two_ne_zero I_ne_zero : 2 * I ≠ 0)]
[GOAL]
z : ℂ
⊢ Real.sqrt (↑normSq (↑(starRingEnd ℂ) z)) = Real.sqrt (↑normSq z)
[PROOFSTEP]
simp
[GOAL]
z : ℂ
⊢ |z.re| ≤ Real.sqrt (↑normSq z)
[PROOFSTEP]
rw [mul_self_le_mul_self_iff (abs_nonneg z.re) (abs_nonneg' _), abs_mul_abs_self, mul_self_abs]
[GOAL]
z : ℂ
⊢ z.re * z.re ≤ ↑normSq z
[PROOFSTEP]
apply re_sq_le_normSq
[GOAL]
z w : ℂ
⊢ Real.sqrt (↑normSq (z * w)) = Real.sqrt (↑normSq z) * Real.sqrt (↑normSq w)
[PROOFSTEP]
rw [normSq_mul, Real.sqrt_mul (normSq_nonneg _)]
[GOAL]
z w : ℂ
⊢ Real.sqrt (↑normSq (z + w)) * Real.sqrt (↑normSq (z + w)) ≤
    (Real.sqrt (↑normSq z) + Real.sqrt (↑normSq w)) * (Real.sqrt (↑normSq z) + Real.sqrt (↑normSq w))
[PROOFSTEP]
rw [mul_self_abs, add_mul_self_eq, mul_self_abs, mul_self_abs, add_right_comm, normSq_add, add_le_add_iff_left,
  mul_assoc, mul_le_mul_left (zero_lt_two' ℝ), ← Real.sqrt_mul <| normSq_nonneg z, ← normSq_conj w, ← map_mul]
[GOAL]
z w : ℂ
⊢ (z * ↑(starRingEnd ℂ) w).re ≤ Real.sqrt (↑normSq (z * ↑(starRingEnd ℂ) w))
[PROOFSTEP]
exact re_le_abs (z * conj w)
[GOAL]
r : ℝ
⊢ ↑abs ↑r = |r|
[PROOFSTEP]
simp [Complex.abs, normSq_ofReal, Real.sqrt_mul_self_eq_abs]
[GOAL]
n : ℕ
⊢ ↑abs ↑n = ↑abs ↑↑n
[PROOFSTEP]
rw [ofReal_nat_cast]
[GOAL]
z : ℂ
⊢ ↑abs z ^ 2 - z.re ^ 2 = z.im ^ 2
[PROOFSTEP]
rw [sq_abs, normSq_apply, ← sq, ← sq, add_sub_cancel']
[GOAL]
z : ℂ
⊢ ↑abs z ^ 2 - z.im ^ 2 = z.re ^ 2
[PROOFSTEP]
rw [← sq_abs_sub_sq_re, sub_sub_cancel]
[GOAL]
⊢ ↑abs I = 1
[PROOFSTEP]
simp [Complex.abs]
[GOAL]
⊢ ↑abs 2 = ↑abs ↑2
[PROOFSTEP]
rfl
[GOAL]
⊢ 0 ≤ 2
[PROOFSTEP]
norm_num
[GOAL]
⊢ range ↑abs ⊆ Ici 0
[PROOFSTEP]
simp only [range_subset_iff, Ici, mem_setOf_eq, map_nonneg, forall_const]
[GOAL]
z : ℂ
⊢ z.re ^ 2 ≤ ↑normSq z
[PROOFSTEP]
rw [normSq_apply, ← sq]
[GOAL]
z : ℂ
⊢ z.re ^ 2 ≤ z.re ^ 2 + z.im * z.im
[PROOFSTEP]
exact le_add_of_nonneg_right (mul_self_nonneg _)
[GOAL]
z : ℂ
⊢ z.im ^ 2 ≤ ↑normSq z
[PROOFSTEP]
rw [normSq_apply, ← sq, ← sq]
[GOAL]
z : ℂ
⊢ z.im ^ 2 ≤ z.re ^ 2 + z.im ^ 2
[PROOFSTEP]
exact le_add_of_nonneg_left (sq_nonneg _)
[GOAL]
z : ℂ
⊢ |z.re| < ↑abs z ↔ z.im ≠ 0
[PROOFSTEP]
rw [Complex.abs, AbsoluteValue.coe_mk, MulHom.coe_mk, Real.lt_sqrt (abs_nonneg _), normSq_apply, _root_.sq_abs, ← sq,
  lt_add_iff_pos_right, mul_self_pos]
[GOAL]
z : ℂ
⊢ |z.im| < ↑abs z ↔ z.re ≠ 0
[PROOFSTEP]
simpa using @abs_re_lt_abs (z * I)
[GOAL]
z : ℂ
⊢ ↑abs z ≤ |z.re| + |z.im|
[PROOFSTEP]
simpa [re_add_im] using Complex.abs.add_le z.re (z.im * I)
[GOAL]
⊢ 1 ≠ 0
[PROOFSTEP]
apply one_ne_zero
[GOAL]
z : ℂ
⊢ ↑abs z ≤ Real.sqrt 2 * max |z.re| |z.im|
[PROOFSTEP]
cases' z with x y
[GOAL]
case mk
x y : ℝ
⊢ ↑abs { re := x, im := y } ≤ Real.sqrt 2 * max |{ re := x, im := y }.re| |{ re := x, im := y }.im|
[PROOFSTEP]
simp only [abs_apply, normSq_mk, ← sq]
[GOAL]
case mk
x y : ℝ
⊢ Real.sqrt (x ^ 2 + y ^ 2) ≤ Real.sqrt 2 * max |x| |y|
[PROOFSTEP]
by_cases hle : |x| ≤ |y|
[GOAL]
case pos
x y : ℝ
hle : |x| ≤ |y|
⊢ Real.sqrt (x ^ 2 + y ^ 2) ≤ Real.sqrt 2 * max |x| |y|
[PROOFSTEP]
calc
  Real.sqrt (x ^ 2 + y ^ 2) ≤ Real.sqrt (y ^ 2 + y ^ 2) := Real.sqrt_le_sqrt (add_le_add_right (sq_le_sq.2 hle) _)
  _ = Real.sqrt 2 * max |x| |y| := by rw [max_eq_right hle, ← two_mul, Real.sqrt_mul two_pos.le, Real.sqrt_sq_eq_abs]
[GOAL]
x y : ℝ
hle : |x| ≤ |y|
⊢ Real.sqrt (y ^ 2 + y ^ 2) = Real.sqrt 2 * max |x| |y|
[PROOFSTEP]
rw [max_eq_right hle, ← two_mul, Real.sqrt_mul two_pos.le, Real.sqrt_sq_eq_abs]
[GOAL]
case neg
x y : ℝ
hle : ¬|x| ≤ |y|
⊢ Real.sqrt (x ^ 2 + y ^ 2) ≤ Real.sqrt 2 * max |x| |y|
[PROOFSTEP]
have hle' := le_of_not_le hle
[GOAL]
case neg
x y : ℝ
hle : ¬|x| ≤ |y|
hle' : |y| ≤ |x|
⊢ Real.sqrt (x ^ 2 + y ^ 2) ≤ Real.sqrt 2 * max |x| |y|
[PROOFSTEP]
rw [add_comm]
[GOAL]
case neg
x y : ℝ
hle : ¬|x| ≤ |y|
hle' : |y| ≤ |x|
⊢ Real.sqrt (y ^ 2 + x ^ 2) ≤ Real.sqrt 2 * max |x| |y|
[PROOFSTEP]
calc
  Real.sqrt (y ^ 2 + x ^ 2) ≤ Real.sqrt (x ^ 2 + x ^ 2) := Real.sqrt_le_sqrt (add_le_add_right (sq_le_sq.2 hle') _)
  _ = Real.sqrt 2 * max |x| |y| := by rw [max_eq_left hle', ← two_mul, Real.sqrt_mul two_pos.le, Real.sqrt_sq_eq_abs]
[GOAL]
x y : ℝ
hle : ¬|x| ≤ |y|
hle' : |y| ≤ |x|
⊢ Real.sqrt (x ^ 2 + x ^ 2) = Real.sqrt 2 * max |x| |y|
[PROOFSTEP]
rw [max_eq_left hle', ← two_mul, Real.sqrt_mul two_pos.le, Real.sqrt_sq_eq_abs]
[GOAL]
z : ℂ
hz : z = 0
⊢ |z.re / ↑abs z| ≤ 1
[PROOFSTEP]
simp [hz, zero_le_one]
[GOAL]
z : ℂ
hz : ¬z = 0
⊢ |z.re / ↑abs z| ≤ 1
[PROOFSTEP]
simp_rw [_root_.abs_div, abs_abs, div_le_iff (AbsoluteValue.pos Complex.abs hz), one_mul, abs_re_le_abs]
[GOAL]
z : ℂ
hz : z = 0
⊢ |z.im / ↑abs z| ≤ 1
[PROOFSTEP]
simp [hz, zero_le_one]
[GOAL]
z : ℂ
hz : ¬z = 0
⊢ |z.im / ↑abs z| ≤ 1
[PROOFSTEP]
simp_rw [_root_.abs_div, abs_abs, div_le_iff (AbsoluteValue.pos Complex.abs hz), one_mul, abs_im_le_abs]
[GOAL]
n : ℕ
⊢ ↑abs ↑n = ↑n
[PROOFSTEP]
rw [← ofReal_nat_cast, abs_of_nonneg (Nat.cast_nonneg n)]
[GOAL]
n : ℤ
⊢ |↑n| = ↑abs ↑n
[PROOFSTEP]
rw [← ofReal_int_cast, abs_ofReal]
[GOAL]
x : ℂ
⊢ ↑normSq x = ↑abs x ^ 2
[PROOFSTEP]
simp [abs, sq, abs_def, Real.mul_self_sqrt (normSq_nonneg _)]
[GOAL]
f : CauSeq ℂ ↑abs
ε : ℝ
ε0 : ε > 0
i : ℕ
H : ∀ (j : ℕ), j ≥ i → ↑abs (↑f j - ↑f i) < ε
j : ℕ
ij : j ≥ i
⊢ abs' ((fun n => (↑f n).re) j - (fun n => (↑f n).re) i) ≤ ↑abs (↑f j - ↑f i)
[PROOFSTEP]
simpa using abs_re_le_abs (f j - f i)
[GOAL]
f : CauSeq ℂ ↑abs
ε : ℝ
ε0 : ε > 0
i : ℕ
H : ∀ (j : ℕ), j ≥ i → ↑abs (↑f j - ↑f i) < ε
j : ℕ
ij : j ≥ i
⊢ abs' ((fun n => (↑f n).im) j - (fun n => (↑f n).im) i) ≤ ↑abs (↑f j - ↑f i)
[PROOFSTEP]
simpa using abs_im_le_abs (f j - f i)
[GOAL]
f : CauSeq ℂ ↑abs
ε : ℝ
ε0 : ε > 0
i : ℕ
H :
  ∀ (j : ℕ),
    j ≥ i →
      abs'
            (↑({ val := fun n => (↑f n).re, property := (_ : IsCauSeq abs' fun n => (↑f n).re) } -
                  CauSeq.const abs'
                    (CauSeq.lim { val := fun n => (↑f n).re, property := (_ : IsCauSeq abs' fun n => (↑f n).re) }))
              j) <
          ε / 2 ∧
        abs'
            (↑({ val := fun n => (↑f n).im, property := (_ : IsCauSeq abs' fun n => (↑f n).im) } -
                  CauSeq.const abs'
                    (CauSeq.lim { val := fun n => (↑f n).im, property := (_ : IsCauSeq abs' fun n => (↑f n).im) }))
              j) <
          ε / 2
j : ℕ
ij : j ≥ i
⊢ ↑abs (↑(f - CauSeq.const (↑abs) (limAux f)) j) < ε
[PROOFSTEP]
cases' H _ ij with H₁ H₂
[GOAL]
case intro
f : CauSeq ℂ ↑abs
ε : ℝ
ε0 : ε > 0
i : ℕ
H :
  ∀ (j : ℕ),
    j ≥ i →
      abs'
            (↑({ val := fun n => (↑f n).re, property := (_ : IsCauSeq abs' fun n => (↑f n).re) } -
                  CauSeq.const abs'
                    (CauSeq.lim { val := fun n => (↑f n).re, property := (_ : IsCauSeq abs' fun n => (↑f n).re) }))
              j) <
          ε / 2 ∧
        abs'
            (↑({ val := fun n => (↑f n).im, property := (_ : IsCauSeq abs' fun n => (↑f n).im) } -
                  CauSeq.const abs'
                    (CauSeq.lim { val := fun n => (↑f n).im, property := (_ : IsCauSeq abs' fun n => (↑f n).im) }))
              j) <
          ε / 2
j : ℕ
ij : j ≥ i
H₁ :
  abs'
      (↑({ val := fun n => (↑f n).re, property := (_ : IsCauSeq abs' fun n => (↑f n).re) } -
            CauSeq.const abs'
              (CauSeq.lim { val := fun n => (↑f n).re, property := (_ : IsCauSeq abs' fun n => (↑f n).re) }))
        j) <
    ε / 2
H₂ :
  abs'
      (↑({ val := fun n => (↑f n).im, property := (_ : IsCauSeq abs' fun n => (↑f n).im) } -
            CauSeq.const abs'
              (CauSeq.lim { val := fun n => (↑f n).im, property := (_ : IsCauSeq abs' fun n => (↑f n).im) }))
        j) <
    ε / 2
⊢ ↑abs (↑(f - CauSeq.const (↑abs) (limAux f)) j) < ε
[PROOFSTEP]
apply lt_of_le_of_lt (abs_le_abs_re_add_abs_im _)
[GOAL]
case intro
f : CauSeq ℂ ↑abs
ε : ℝ
ε0 : ε > 0
i : ℕ
H :
  ∀ (j : ℕ),
    j ≥ i →
      abs'
            (↑({ val := fun n => (↑f n).re, property := (_ : IsCauSeq abs' fun n => (↑f n).re) } -
                  CauSeq.const abs'
                    (CauSeq.lim { val := fun n => (↑f n).re, property := (_ : IsCauSeq abs' fun n => (↑f n).re) }))
              j) <
          ε / 2 ∧
        abs'
            (↑({ val := fun n => (↑f n).im, property := (_ : IsCauSeq abs' fun n => (↑f n).im) } -
                  CauSeq.const abs'
                    (CauSeq.lim { val := fun n => (↑f n).im, property := (_ : IsCauSeq abs' fun n => (↑f n).im) }))
              j) <
          ε / 2
j : ℕ
ij : j ≥ i
H₁ :
  abs'
      (↑({ val := fun n => (↑f n).re, property := (_ : IsCauSeq abs' fun n => (↑f n).re) } -
            CauSeq.const abs'
              (CauSeq.lim { val := fun n => (↑f n).re, property := (_ : IsCauSeq abs' fun n => (↑f n).re) }))
        j) <
    ε / 2
H₂ :
  abs'
      (↑({ val := fun n => (↑f n).im, property := (_ : IsCauSeq abs' fun n => (↑f n).im) } -
            CauSeq.const abs'
              (CauSeq.lim { val := fun n => (↑f n).im, property := (_ : IsCauSeq abs' fun n => (↑f n).im) }))
        j) <
    ε / 2
⊢ abs' (↑(f - CauSeq.const (↑abs) (limAux f)) j).re + abs' (↑(f - CauSeq.const (↑abs) (limAux f)) j).im < ε
[PROOFSTEP]
dsimp [limAux] at *
[GOAL]
case intro
f : CauSeq ℂ ↑abs
ε : ℝ
ε0 : ε > 0
i : ℕ
H :
  ∀ (j : ℕ),
    j ≥ i →
      abs' ((↑f j).re - CauSeq.lim { val := fun n => (↑f n).re, property := (_ : IsCauSeq abs' fun n => (↑f n).re) }) <
          ε / 2 ∧
        abs'
            ((↑f j).im - CauSeq.lim { val := fun n => (↑f n).im, property := (_ : IsCauSeq abs' fun n => (↑f n).im) }) <
          ε / 2
j : ℕ
ij : j ≥ i
H₁ :
  abs' ((↑f j).re - CauSeq.lim { val := fun n => (↑f n).re, property := (_ : IsCauSeq abs' fun n => (↑f n).re) }) <
    ε / 2
H₂ :
  abs' ((↑f j).im - CauSeq.lim { val := fun n => (↑f n).im, property := (_ : IsCauSeq abs' fun n => (↑f n).im) }) <
    ε / 2
⊢ abs' ((↑f j).re - CauSeq.lim (cauSeqRe f)) + abs' ((↑f j).im - CauSeq.lim (cauSeqIm f)) < ε
[PROOFSTEP]
have := add_lt_add H₁ H₂
[GOAL]
case intro
f : CauSeq ℂ ↑abs
ε : ℝ
ε0 : ε > 0
i : ℕ
H :
  ∀ (j : ℕ),
    j ≥ i →
      abs' ((↑f j).re - CauSeq.lim { val := fun n => (↑f n).re, property := (_ : IsCauSeq abs' fun n => (↑f n).re) }) <
          ε / 2 ∧
        abs'
            ((↑f j).im - CauSeq.lim { val := fun n => (↑f n).im, property := (_ : IsCauSeq abs' fun n => (↑f n).im) }) <
          ε / 2
j : ℕ
ij : j ≥ i
H₁ :
  abs' ((↑f j).re - CauSeq.lim { val := fun n => (↑f n).re, property := (_ : IsCauSeq abs' fun n => (↑f n).re) }) <
    ε / 2
H₂ :
  abs' ((↑f j).im - CauSeq.lim { val := fun n => (↑f n).im, property := (_ : IsCauSeq abs' fun n => (↑f n).im) }) <
    ε / 2
this :
  abs' ((↑f j).re - CauSeq.lim { val := fun n => (↑f n).re, property := (_ : IsCauSeq abs' fun n => (↑f n).re) }) +
      abs' ((↑f j).im - CauSeq.lim { val := fun n => (↑f n).im, property := (_ : IsCauSeq abs' fun n => (↑f n).im) }) <
    ε / 2 + ε / 2
⊢ abs' ((↑f j).re - CauSeq.lim (cauSeqRe f)) + abs' ((↑f j).im - CauSeq.lim (cauSeqIm f)) < ε
[PROOFSTEP]
rwa [add_halves] at this
[GOAL]
f : CauSeq ℂ ↑abs
x✝ : ℕ
⊢ (↑(CauSeq.const (↑abs) (limAux f)) x✝).re =
    (↑(CauSeq.const (↑abs) (↑(CauSeq.lim (cauSeqRe f)) + ↑(CauSeq.lim (cauSeqIm f)) * I)) x✝).re
[PROOFSTEP]
simp [limAux, cauSeqRe, ofReal']
[GOAL]
f : CauSeq ℂ ↑abs
x✝ : ℕ
⊢ (↑(CauSeq.const (↑abs) (limAux f)) x✝).im =
    (↑(CauSeq.const (↑abs) (↑(CauSeq.lim (cauSeqRe f)) + ↑(CauSeq.lim (cauSeqIm f)) * I)) x✝).im
[PROOFSTEP]
simp [limAux, cauSeqIm, ofReal']
[GOAL]
f : CauSeq ℂ ↑abs
⊢ CauSeq.lim (cauSeqRe f) = (CauSeq.lim f).re
[PROOFSTEP]
rw [lim_eq_lim_im_add_lim_re]
[GOAL]
f : CauSeq ℂ ↑abs
⊢ CauSeq.lim (cauSeqRe f) = (↑(CauSeq.lim (cauSeqRe f)) + ↑(CauSeq.lim (cauSeqIm f)) * I).re
[PROOFSTEP]
simp [ofReal']
[GOAL]
f : CauSeq ℂ ↑abs
⊢ CauSeq.lim (cauSeqIm f) = (CauSeq.lim f).im
[PROOFSTEP]
rw [lim_eq_lim_im_add_lim_re]
[GOAL]
f : CauSeq ℂ ↑abs
⊢ CauSeq.lim (cauSeqIm f) = (↑(CauSeq.lim (cauSeqRe f)) + ↑(CauSeq.lim (cauSeqIm f)) * I).im
[PROOFSTEP]
simp [ofReal']
[GOAL]
f : CauSeq ℂ ↑abs
ε : ℝ
ε0 : ε > 0
i : ℕ
hi : ∀ (j : ℕ), j ≥ i → ↑abs (↑f j - ↑f i) < ε
j : ℕ
hj : j ≥ i
⊢ ↑abs ((fun n => ↑(starRingEnd ℂ) (↑f n)) j - (fun n => ↑(starRingEnd ℂ) (↑f n)) i) < ε
[PROOFSTEP]
rw [← RingHom.map_sub, abs_conj]
[GOAL]
f : CauSeq ℂ ↑abs
ε : ℝ
ε0 : ε > 0
i : ℕ
hi : ∀ (j : ℕ), j ≥ i → ↑abs (↑f j - ↑f i) < ε
j : ℕ
hj : j ≥ i
⊢ ↑abs (↑f j - ↑f i) < ε
[PROOFSTEP]
exact hi j hj
[GOAL]
f : CauSeq ℂ ↑abs
⊢ (CauSeq.lim (cauSeqConj f)).re = (↑(starRingEnd ℂ) (CauSeq.lim f)).re
[PROOFSTEP]
simp [cauSeqConj, (lim_re _).symm, cauSeqRe]
[GOAL]
f : CauSeq ℂ ↑abs
⊢ (CauSeq.lim (cauSeqConj f)).im = (↑(starRingEnd ℂ) (CauSeq.lim f)).im
[PROOFSTEP]
simp [cauSeqConj, (lim_im _).symm, cauSeqIm, (lim_neg _).symm]
[GOAL]
f : CauSeq ℂ ↑abs
⊢ CauSeq.lim { val := fun n => -(↑f n).im, property := (_ : (fun f => IsCauSeq abs' f) fun n => -(↑f n).im) } =
    CauSeq.lim (-{ val := fun n => (↑f n).im, property := (_ : IsCauSeq abs' fun n => (↑f n).im) })
[PROOFSTEP]
rfl