Theorem: RCLike.is_real_TFAE
File: Mathlib/Analysis/RCLike/Basic.lean

tactic: tfae_have 1 → 4
state_before: K : Type u_1
E : Type u_2
inst✝ : RCLike K
z : K
⊢ [(starRingEnd K) z = z, ∃ r, ↑r = z, ↑(re z) = z, im z = 0].TFAE
state_after: case tfae_1_to_4
K : Type u_1
E : Type u_2
inst✝ : RCLike K
z : K
⊢ (starRingEnd K) z = z → im z = 0

K : Type u_1
E : Type u_2
inst✝ : RCLike K
z : K
tfae_1_to_4 : (starRingEnd K) z = z → im z = 0
⊢ [(starRingEnd K) z = z, ∃ r, ↑r = z, ↑(re z) = z, im z = 0].TFAE

tactic: tfae_have 4 → 3
state_before: K : Type u_1
E : Type u_2
inst✝ : RCLike K
z : K
tfae_1_to_4 : (starRingEnd K) z = z → im z = 0
⊢ [(starRingEnd K) z = z, ∃ r, ↑r = z, ↑(re z) = z, im z = 0].TFAE
state_after: case tfae_4_to_3
K : Type u_1
E : Type u_2
inst✝ : RCLike K
z : K
tfae_1_to_4 : (starRingEnd K) z = z → im z = 0
⊢ im z = 0 → ↑(re z) = z

K : Type u_1
E : Type u_2
inst✝ : RCLike K
z : K
tfae_1_to_4 : (starRingEnd K) z = z → im z = 0
tfae_4_to_3 : im z = 0 → ↑(re z) = z
⊢ [(starRingEnd K) z = z, ∃ r, ↑r = z, ↑(re z) = z, im z = 0].TFAE

tactic: tfae_have 3 → 2
state_before: K : Type u_1
E : Type u_2
inst✝ : RCLike K
z : K
tfae_1_to_4 : (starRingEnd K) z = z → im z = 0
tfae_4_to_3 : im z = 0 → ↑(re z) = z
⊢ [(starRingEnd K) z = z, ∃ r, ↑r = z, ↑(re z) = z, im z = 0].TFAE
state_after: case tfae_3_to_2
K : Type u_1
E : Type u_2
inst✝ : RCLike K
z : K
tfae_1_to_4 : (starRingEnd K) z = z → im z = 0
tfae_4_to_3 : im z = 0 → ↑(re z) = z
⊢ ↑(re z) = z → ∃ r, ↑r = z

K : Type u_1
E : Type u_2
inst✝ : RCLike K
z : K
tfae_1_to_4 : (starRingEnd K) z = z → im z = 0
tfae_4_to_3 : im z = 0 → ↑(re z) = z
tfae_3_to_2 : ↑(re z) = z → ∃ r, ↑r = z
⊢ [(starRingEnd K) z = z, ∃ r, ↑r = z, ↑(re z) = z, im z = 0].TFAE

tactic: tfae_have 2 → 1
state_before: K : Type u_1
E : Type u_2
inst✝ : RCLike K
z : K
tfae_1_to_4 : (starRingEnd K) z = z → im z = 0
tfae_4_to_3 : im z = 0 → ↑(re z) = z
tfae_3_to_2 : ↑(re z) = z → ∃ r, ↑r = z
⊢ [(starRingEnd K) z = z, ∃ r, ↑r = z, ↑(re z) = z, im z = 0].TFAE
state_after: case tfae_2_to_1
K : Type u_1
E : Type u_2
inst✝ : RCLike K
z : K
tfae_1_to_4 : (starRingEnd K) z = z → im z = 0
tfae_4_to_3 : im z = 0 → ↑(re z) = z
tfae_3_to_2 : ↑(re z) = z → ∃ r, ↑r = z
⊢ (∃ r, ↑r = z) → (starRingEnd K) z = z

K : Type u_1
E : Type u_2
inst✝ : RCLike K
z : K
tfae_1_to_4 : (starRingEnd K) z = z → im z = 0
tfae_4_to_3 : im z = 0 → ↑(re z) = z
tfae_3_to_2 : ↑(re z) = z → ∃ r, ↑r = z
tfae_2_to_1 : (∃ r, ↑r = z) → (starRingEnd K) z = z
⊢ [(starRingEnd K) z = z, ∃ r, ↑r = z, ↑(re z) = z, im z = 0].TFAE

tactic: tfae_finish
state_before: K : Type u_1
E : Type u_2
inst✝ : RCLike K
z : K
tfae_1_to_4 : (starRingEnd K) z = z → im z = 0
tfae_4_to_3 : im z = 0 → ↑(re z) = z
tfae_3_to_2 : ↑(re z) = z → ∃ r, ↑r = z
tfae_2_to_1 : (∃ r, ↑r = z) → (starRingEnd K) z = z
⊢ [(starRingEnd K) z = z, ∃ r, ↑r = z, ↑(re z) = z, im z = 0].TFAE
state_after: no goals

tactic: intro h
state_before: case tfae_1_to_4
K : Type u_1
E : Type u_2
inst✝ : RCLike K
z : K
⊢ (starRingEnd K) z = z → im z = 0
state_after: case tfae_1_to_4
K : Type u_1
E : Type u_2
inst✝ : RCLike K
z : K
h : (starRingEnd K) z = z
⊢ im z = 0

tactic: rw [← @ofReal_inj K, im_eq_conj_sub, h, sub_self, mul_zero, zero_div,
  ofReal_zero]
state_before: case tfae_1_to_4
K : Type u_1
E : Type u_2
inst✝ : RCLike K
z : K
h : (starRingEnd K) z = z
⊢ im z = 0
state_after: no goals

tactic: intro h
state_before: case tfae_4_to_3
K : Type u_1
E : Type u_2
inst✝ : RCLike K
z : K
tfae_1_to_4 : (starRingEnd K) z = z → im z = 0
⊢ im z = 0 → ↑(re z) = z
state_after: case tfae_4_to_3
K : Type u_1
E : Type u_2
inst✝ : RCLike K
z : K
tfae_1_to_4 : (starRingEnd K) z = z → im z = 0
h : im z = 0
⊢ ↑(re z) = z

tactic: conv_rhs => rw [← re_add_im z, h, ofReal_zero, zero_mul, add_zero]
state_before: case tfae_4_to_3
K : Type u_1
E : Type u_2
inst✝ : RCLike K
z : K
tfae_1_to_4 : (starRingEnd K) z = z → im z = 0
h : im z = 0
⊢ ↑(re z) = z
state_after: no goals

tactic: exact fun h => ⟨_, h⟩
state_before: case tfae_3_to_2
K : Type u_1
E : Type u_2
inst✝ : RCLike K
z : K
tfae_1_to_4 : (starRingEnd K) z = z → im z = 0
tfae_4_to_3 : im z = 0 → ↑(re z) = z
⊢ ↑(re z) = z → ∃ r, ↑r = z
state_after: no goals

tactic: exact fun ⟨r, hr⟩ => hr ▸ conj_ofReal _
state_before: case tfae_2_to_1
K : Type u_1
E : Type u_2
inst✝ : RCLike K
z : K
tfae_1_to_4 : (starRingEnd K) z = z → im z = 0
tfae_4_to_3 : im z = 0 → ↑(re z) = z
tfae_3_to_2 : ↑(re z) = z → ∃ r, ↑r = z
⊢ (∃ r, ↑r = z) → (starRingEnd K) z = z
state_after: no goals