Theorem: IsROrC.is_real_TFAE
File: Mathlib/Data/IsROrC/Basic.lean

tactic: tfae_have 1 → 4
state_before: K : Type u_1
E : Type ?u.3632144
inst✝ : IsROrC K
z : K
⊢ TFAE [↑(starRingEnd K) z = z, ∃ r, ↑r = z, ↑(↑re z) = z, ↑im z = 0]

tactic: tfae_have 4 → 3
state_before: K : Type u_1
E : Type ?u.3632144
inst✝ : IsROrC K
z : K
tfae_1_to_4 : ↑(starRingEnd K) z = z → ↑im z = 0
⊢ TFAE [↑(starRingEnd K) z = z, ∃ r, ↑r = z, ↑(↑re z) = z, ↑im z = 0]

tactic: tfae_have 3 → 2
state_before: K : Type u_1
E : Type ?u.3632144
inst✝ : IsROrC 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 [↑(starRingEnd K) z = z, ∃ r, ↑r = z, ↑(↑re z) = z, ↑im z = 0]

tactic: exact fun h => ⟨_, h⟩
state_before: case tfae_3_to_2
K : Type u_1
E : Type ?u.3632144
inst✝ : IsROrC 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.3632144
inst✝ : IsROrC 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 [↑(starRingEnd K) z = z, ∃ r, ↑r = z, ↑(↑re z) = z, ↑im z = 0]

tactic: tfae_have 2 → 1
state_before: K : Type u_1
E : Type ?u.3632144
inst✝ : IsROrC 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 [↑(starRingEnd K) z = z, ∃ r, ↑r = z, ↑(↑re z) = z, ↑im z = 0]

tactic: exact fun ⟨r, hr⟩ => hr ▸ conj_ofReal _
state_before: case tfae_2_to_1
K : Type u_1
E : Type ?u.3632144
inst✝ : IsROrC 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.3632144
inst✝ : IsROrC 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
⊢ TFAE [↑(starRingEnd K) z = z, ∃ r, ↑r = z, ↑(↑re z) = z, ↑im z = 0]

tactic: tfae_finish
state_before: K : Type u_1
E : Type ?u.3632144
inst✝ : IsROrC 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
⊢ TFAE [↑(starRingEnd K) z = z, ∃ r, ↑r = z, ↑(↑re z) = z, ↑im z = 0]

tactic: intro h
state_before: case tfae_1_to_4
K : Type u_1
E : Type ?u.3632144
inst✝ : IsROrC K
z : K
⊢ ↑(starRingEnd K) z = z → ↑im z = 0

tactic: rw [← @ofReal_inj K, im_eq_conj_sub, h, sub_self, MulZeroClass.mul_zero, zero_div,
  ofReal_zero]
state_before: case tfae_1_to_4
K : Type u_1
E : Type ?u.3632144
inst✝ : IsROrC K
z : K
h : ↑(starRingEnd K) z = z
⊢ ↑im z = 0

tactic: intro h
state_before: case tfae_4_to_3
K : Type u_1
E : Type ?u.3632144
inst✝ : IsROrC K
z : K
tfae_1_to_4 : ↑(starRingEnd K) z = z → ↑im z = 0
⊢ ↑im z = 0 → ↑(↑re z) = z

tactic: conv_rhs => rw [← re_add_im z, h, ofReal_zero, MulZeroClass.zero_mul, add_zero]
state_before: case tfae_4_to_3
K : Type u_1
E : Type ?u.3632144
inst✝ : IsROrC K
z : K
tfae_1_to_4 : ↑(starRingEnd K) z = z → ↑im z = 0
h : ↑im z = 0
⊢ ↑(↑re z) = z