Theorem: Zspan.discreteTopology_pi_basisFun
File: Mathlib/Algebra/Module/Zlattice/Basic.lean

tactic: cases nonempty_fintype ι
state_before: E : Type u_1
ι : Type u_2
inst✝ : Finite ι
⊢ DiscreteTopology ↥(span ℤ (Set.range ⇑(Pi.basisFun ℝ ι)))
state_after: case intro
E : Type u_1
ι : Type u_2
inst✝ : Finite ι
val✝ : Fintype ι
⊢ DiscreteTopology ↥(span ℤ (Set.range ⇑(Pi.basisFun ℝ ι)))

tactic: refine discreteTopology_iff_isOpen_singleton_zero.mpr ⟨Metric.ball 0 1, Metric.isOpen_ball, ?_⟩
state_before: case intro
E : Type u_1
ι : Type u_2
inst✝ : Finite ι
val✝ : Fintype ι
⊢ DiscreteTopology ↥(span ℤ (Set.range ⇑(Pi.basisFun ℝ ι)))
state_after: case intro
E : Type u_1
ι : Type u_2
inst✝ : Finite ι
val✝ : Fintype ι
⊢ Subtype.val ⁻¹' Metric.ball 0 1 = {0}

tactic: ext x
state_before: case intro
E : Type u_1
ι : Type u_2
inst✝ : Finite ι
val✝ : Fintype ι
⊢ Subtype.val ⁻¹' Metric.ball 0 1 = {0}
state_after: case intro.h
E : Type u_1
ι : Type u_2
inst✝ : Finite ι
val✝ : Fintype ι
x : ↥(span ℤ (Set.range ⇑(Pi.basisFun ℝ ι)))
⊢ x ∈ Subtype.val ⁻¹' Metric.ball 0 1 ↔ x ∈ {0}

tactic: rw [Set.mem_preimage, mem_ball_zero_iff, pi_norm_lt_iff zero_lt_one, Set.mem_singleton_iff]
state_before: case intro.h
E : Type u_1
ι : Type u_2
inst✝ : Finite ι
val✝ : Fintype ι
x : ↥(span ℤ (Set.range ⇑(Pi.basisFun ℝ ι)))
⊢ x ∈ Subtype.val ⁻¹' Metric.ball 0 1 ↔ x ∈ {0}
state_after: case intro.h
E : Type u_1
ι : Type u_2
inst✝ : Finite ι
val✝ : Fintype ι
x : ↥(span ℤ (Set.range ⇑(Pi.basisFun ℝ ι)))
⊢ (∀ (i : ι), ‖↑x i‖ < 1) ↔ x = 0

tactic: simp_rw [← coe_eq_zero, Function.funext_iff, Pi.zero_apply, Real.norm_eq_abs]
state_before: case intro.h
E : Type u_1
ι : Type u_2
inst✝ : Finite ι
val✝ : Fintype ι
x : ↥(span ℤ (Set.range ⇑(Pi.basisFun ℝ ι)))
⊢ (∀ (i : ι), ‖↑x i‖ < 1) ↔ x = 0
state_after: case intro.h
E : Type u_1
ι : Type u_2
inst✝ : Finite ι
val✝ : Fintype ι
x : ↥(span ℤ (Set.range ⇑(Pi.basisFun ℝ ι)))
⊢ (∀ (i : ι), |↑x i| < 1) ↔ ∀ (a : ι), ↑x a = 0

tactic: refine forall_congr' (fun i => ?_)
state_before: case intro.h
E : Type u_1
ι : Type u_2
inst✝ : Finite ι
val✝ : Fintype ι
x : ↥(span ℤ (Set.range ⇑(Pi.basisFun ℝ ι)))
⊢ (∀ (i : ι), |↑x i| < 1) ↔ ∀ (a : ι), ↑x a = 0
state_after: case intro.h
E : Type u_1
ι : Type u_2
inst✝ : Finite ι
val✝ : Fintype ι
x : ↥(span ℤ (Set.range ⇑(Pi.basisFun ℝ ι)))
i : ι
⊢ |↑x i| < 1 ↔ ↑x i = 0

tactic: rsuffices ⟨y, hy⟩ : ∃ (y : ℤ), (y : ℝ) = (x : ι → ℝ) i
state_before: case intro.h
E : Type u_1
ι : Type u_2
inst✝ : Finite ι
val✝ : Fintype ι
x : ↥(span ℤ (Set.range ⇑(Pi.basisFun ℝ ι)))
i : ι
⊢ |↑x i| < 1 ↔ ↑x i = 0
state_after: case intro.h.intro
E : Type u_1
ι : Type u_2
inst✝ : Finite ι
val✝ : Fintype ι
x : ↥(span ℤ (Set.range ⇑(Pi.basisFun ℝ ι)))
i : ι
y : ℤ
hy : ↑y = ↑x i
⊢ |↑x i| < 1 ↔ ↑x i = 0

E : Type u_1
ι : Type u_2
inst✝ : Finite ι
val✝ : Fintype ι
x : ↥(span ℤ (Set.range ⇑(Pi.basisFun ℝ ι)))
i : ι
⊢ ∃ y, ↑y = ↑x i

tactic: exact ((Pi.basisFun ℝ ι).mem_span_iff_repr_mem ℤ x).mp (SetLike.coe_mem x) i
state_before: E : Type u_1
ι : Type u_2
inst✝ : Finite ι
val✝ : Fintype ι
x : ↥(span ℤ (Set.range ⇑(Pi.basisFun ℝ ι)))
i : ι
⊢ ∃ y, ↑y = ↑x i
state_after: no goals

tactic: rw [← hy, ← Int.cast_abs, ← Int.cast_one,  Int.cast_lt, Int.abs_lt_one_iff, Int.cast_eq_zero]
state_before: case intro.h.intro
E : Type u_1
ι : Type u_2
inst✝ : Finite ι
val✝ : Fintype ι
x : ↥(span ℤ (Set.range ⇑(Pi.basisFun ℝ ι)))
i : ι
y : ℤ
hy : ↑y = ↑x i
⊢ |↑x i| < 1 ↔ ↑x i = 0
state_after: no goals