awhecmu/canonical-drafter-extract-mathlib huggingface dataset:
-- Lean 4 proof step from Mathlib.Algebra.Module.ZLattice.Basic (goal)
Goal:
K : Type u_1
inst : NormedField K
inst_1 : LinearOrder K
inst_2 : IsStrictOrderedRing K
inst_3 : HasSolidNorm K
inst_4 : FloorRing K
E : Type u_2
inst_5 : NormedAddCommGroup E
inst_6 : NormedSpace K E
inst_7 : FiniteDimensional K E
inst_8 : ProperSpace E
L : Submodule ℤ E
inst_9 : DiscreteTopology.{u_2} ↥L
hs : IsZLattice K L
this_1 : Module.Finite.{0, u_2} ℤ ↥L
this_2 : Module ℚ E
this_3 : IsAddTorsionFree E
b₀ : Basis (Free.ChooseBasisIndex ℤ ↥L) ℤ ↥L := Free.chooseBasis ℤ ↥L
b : Free.ChooseBasisIndex ℤ ↥L → E :=
  Function.comp (β := ↥L) (Subtype.val (p := fun (x : E) ↦ x ∈ L)) (⇑b₀ : (a : Free.ChooseBasisIndex ℤ ↥L) → ↥L)
this_4 : LinearIndependent ℤ b
h_spanL : span ℤ (Set.range b) = L
h_spanE : Eq (α := Submodule K E) (span K (Set.range b)) ⊤
h_card : Fintype.card.{u_2} (Free.ChooseBasisIndex ℤ ↥L) = (Set.range b).toFinset.card
t : Set E
ht_inc : t ⊆ Set.range b
ht_span : Eq (α := Submodule K E) (span K t) (span K (Set.range b))
ht_lin : LinearIndependent.{u_2, u_1, u_2} (ι := { x : E // x ∈ t }) K (Subtype.val (p := fun (x : E) ↦ x ∈ t))
e : Basis (↑t : Type u_2) K E := Basis.mk ht_lin ⋯
this : Fintype (↑t : Type u_2)
h : finrank K E < Fintype.card.{u_2} (Free.ChooseBasisIndex ℤ ↥L)
v : E
hv : v ∈ Set.range b \ Set.range (ι := (↑t : Type u_2)) (⇑e : (a : (↑t : Type u_2)) → E)
h_1 : LinearIndepOn.{u_2, 0, u_2} (ι := E) ℚ id (Set.range (ι := (↑t : Type u_2)) (⇑e : (a : (↑t : Type u_2)) → E))
h_mapsto :
  Set.MapsTo (fun (n : ℤ) ↦ fract e (n • v)) Set.univ
    (Metric.closedBall 0 (∑ i : (↑t : Type u_2), norm (E := E) ((e : (a : (↑t : Type u_2)) → E) i : E)) ∩ (↑L : Set E))
h_finite :
  (Metric.closedBall 0 (∑ i : (↑t : Type u_2), norm (E := E) ((e : (a : (↑t : Type u_2)) → E) i : E)) ∩
      (↑L : Set E)).Finite
n m : ℤ
h_ne : n ≠ m
h_eq : fract e (n • v) = fract e (m • v)
rwa : ¬HAdd.hAdd (α := ℚ) (-(↑n : ℚ)) (↑m : ℚ) = 0
⊢ HAdd.hAdd (α := ℚ) (-(↑n : ℚ)) (↑m : ℚ) ≠ 0
have rwa₁ : ¬Eq (α := ℚ) (-(↑n : ℚ)) (-(↑m : ℚ))
Tactic: rwa [Ne, add_eq_zero_iff_eq_neg.not, neg_inj, Rat.coe_int_inj, ← Ne]
-- Lean 4 proof step from Mathlib.Algebra.Module.ZLattice.Basic (goal)
Goal:
K : Type u_1
inst : NormedField K
inst_1 : LinearOrder K
inst_2 : IsStrictOrderedRing K
inst_3 : HasSolidNorm K
inst_4 : FloorRing K
E : Type u_2
inst_5 : NormedAddCommGroup E
inst_6 : NormedSpace K E
inst_7 : FiniteDimensional K E
inst_8 : ProperSpace E
L : Submodule ℤ E
inst_9 : DiscreteTopology.{u_2} ↥L
hs : IsZLattice K L
this_1 : Module.Finite.{0, u_2} ℤ ↥L
this_2 : Module ℚ E
this_3 : IsAddTorsionFree E
b₀ : Basis (Free.ChooseBasisIndex ℤ ↥L) ℤ ↥L := Free.chooseBasis ℤ ↥L
b : Free.ChooseBasisIndex ℤ ↥L → E :=
  Function.comp (β := ↥L) (Subtype.val (p := fun (x : E) ↦ x ∈ L)) (⇑b₀ : (a : Free.ChooseBasisIndex ℤ ↥L) → ↥L)
this_4 : LinearIndependent ℤ b
h_spanL : span ℤ (Set.range b) = L
h_spanE : Eq (α := Submodule K E) (span K (Set.range b)) ⊤
h_card : Fintype.card.{u_2} (Free.ChooseBasisIndex ℤ ↥L) = (Set.range b).toFinset.card
t : Set E
ht_inc : t ⊆ Set.range b
ht_span : Eq (α := Submodule K E) (span K t) (span K (Set.range b))
ht_lin : LinearIndependent.{u_2, u_1, u_2} (ι := { x : E // x ∈ t }) K (Subtype.val (p := fun (x : E) ↦ x ∈ t))
e : Basis (↑t : Type u_2) K E := Basis.mk ht_lin ⋯
this : Fintype (↑t : Type u_2)
h : finrank K E < Fintype.card.{u_2} (Free.ChooseBasisIndex ℤ ↥L)
v : E
hv : v ∈ Set.range b \ Set.range (ι := (↑t : Type u_2)) (⇑e : (a : (↑t : Type u_2)) → E)
h_1 : LinearIndepOn.{u_2, 0, u_2} (ι := E) ℚ id (Set.range (ι := (↑t : Type u_2)) (⇑e : (a : (↑t : Type u_2)) → E))
h_mapsto :
  Set.MapsTo (fun (n : ℤ) ↦ fract e (n • v)) Set.univ
    (Metric.closedBall 0 (∑ i : (↑t : Type u_2), norm (E := E) ((e : (a : (↑t : Type u_2)) → E) i : E)) ∩ (↑L : Set E))
h_finite :
  (Metric.closedBall 0 (∑ i : (↑t : Type u_2), norm (E := E) ((e : (a : (↑t : Type u_2)) → E) i : E)) ∩
      (↑L : Set E)).Finite
n m : ℤ
h_ne : n ≠ m
h_eq : fract e (n • v) = fract e (m • v)
rwa : ¬HAdd.hAdd (α := ℚ) (-(↑n : ℚ)) (↑m : ℚ) = 0
rwa₁ : ¬Eq (α := ℚ) (-(↑n : ℚ)) (-(↑m : ℚ))
⊢ HAdd.hAdd (α := ℚ) (-(↑n : ℚ)) (↑m : ℚ) ≠ 0
have rwa₂ : ¬Eq (α := ℚ) (↑n : ℚ) (↑m : ℚ)
Tactic: rwa [Ne, add_eq_zero_iff_eq_neg.not, neg_inj, Rat.coe_int_inj, ← Ne]
-- Lean 4 proof step from Mathlib.Algebra.Module.ZLattice.Basic (goal)
Goal:
K : Type u_1
inst : NormedField K
inst_1 : LinearOrder K
inst_2 : IsStrictOrderedRing K
inst_3 : HasSolidNorm K
inst_4 : FloorRing K
E : Type u_2
inst_5 : NormedAddCommGroup E
inst_6 : NormedSpace K E
inst_7 : FiniteDimensional K E
inst_8 : ProperSpace E
L : Submodule ℤ E
inst_9 : DiscreteTopology.{u_2} ↥L
hs : IsZLattice K L
this_1 : Module.Finite.{0, u_2} ℤ ↥L
this_2 : Module ℚ E
this_3 : IsAddTorsionFree E
b₀ : Basis (Free.ChooseBasisIndex ℤ ↥L) ℤ ↥L := Free.chooseBasis ℤ ↥L
b : Free.ChooseBasisIndex ℤ ↥L → E :=
  Function.comp (β := ↥L) (Subtype.val (p := fun (x : E) ↦ x ∈ L)) (⇑b₀ : (a : Free.ChooseBasisIndex ℤ ↥L) → ↥L)
this_4 : LinearIndependent ℤ b
h_spanL : span ℤ (Set.range b) = L
h_spanE : Eq (α := Submodule K E) (span K (Set.range b)) ⊤
h_card : Fintype.card.{u_2} (Free.ChooseBasisIndex ℤ ↥L) = (Set.range b).toFinset.card
t : Set E
ht_inc : t ⊆ Set.range b
ht_span : Eq (α := Submodule K E) (span K t) (span K (Set.range b))
ht_lin : LinearIndependent.{u_2, u_1, u_2} (ι := { x : E // x ∈ t }) K (Subtype.val (p := fun (x : E) ↦ x ∈ t))
e : Basis (↑t : Type u_2) K E := Basis.mk ht_lin ⋯
this : Fintype (↑t : Type u_2)
h : finrank K E < Fintype.card.{u_2} (Free.ChooseBasisIndex ℤ ↥L)
v : E
hv : v ∈ Set.range b \ Set.range (ι := (↑t : Type u_2)) (⇑e : (a : (↑t : Type u_2)) → E)
h_1 : LinearIndepOn.{u_2, 0, u_2} (ι := E) ℚ id (Set.range (ι := (↑t : Type u_2)) (⇑e : (a : (↑t : Type u_2)) → E))
h_mapsto :
  Set.MapsTo (fun (n : ℤ) ↦ fract e (n • v)) Set.univ
    (Metric.closedBall 0 (∑ i : (↑t : Type u_2), norm (E := E) ((e : (a : (↑t : Type u_2)) → E) i : E)) ∩ (↑L : Set E))
h_finite :
  (Metric.closedBall 0 (∑ i : (↑t : Type u_2), norm (E := E) ((e : (a : (↑t : Type u_2)) → E) i : E)) ∩
      (↑L : Set E)).Finite
n m : ℤ
h_ne : n ≠ m
h_eq : fract e (n • v) = fract e (m • v)
rwa : ¬HAdd.hAdd (α := ℚ) (-(↑n : ℚ)) (↑m : ℚ) = 0
rwa₁ : ¬Eq (α := ℚ) (-(↑n : ℚ)) (-(↑m : ℚ))
rwa₂ : ¬Eq (α := ℚ) (↑n : ℚ) (↑m : ℚ)
⊢ HAdd.hAdd (α := ℚ) (-(↑n : ℚ)) (↑m : ℚ) ≠ 0
have rwa₃ : ¬n = m
Tactic: rwa [Ne, add_eq_zero_iff_eq_neg.not, neg_inj, Rat.coe_int_inj, ← Ne]
-- Lean 4 proof step from Mathlib.Algebra.Module.ZLattice.Basic (hypothesis)
Goal:
K : Type u_1
inst : NormedField K
inst_1 : LinearOrder K
inst_2 : IsStrictOrderedRing K
inst_3 : HasSolidNorm K
inst_4 : FloorRing K
E : Type u_2
inst_5 : NormedAddCommGroup E
inst_6 : NormedSpace K E
inst_7 : FiniteDimensional K E
inst_8 : ProperSpace E
L : Submodule ℤ E
inst_9 : DiscreteTopology.{u_2} ↥L
hs : IsZLattice K L
this_1 : Module.Finite.{0, u_2} ℤ ↥L
this_2 : Module ℚ E
this_3 : IsAddTorsionFree E
b₀ : Basis (Free.ChooseBasisIndex ℤ ↥L) ℤ ↥L := Free.chooseBasis ℤ ↥L
b : Free.ChooseBasisIndex ℤ ↥L → E :=
  Function.comp (β := ↥L) (Subtype.val (p := fun (x : E) ↦ x ∈ L)) (⇑b₀ : (a : Free.ChooseBasisIndex ℤ ↥L) → ↥L)
this_4 : LinearIndependent ℤ b
h_spanL : span ℤ (Set.range b) = L
h_spanE : Eq (α := Submodule K E) (span K (Set.range b)) ⊤
h_card : Fintype.card.{u_2} (Free.ChooseBasisIndex ℤ ↥L) = (Set.range b).toFinset.card
t : Set E
ht_inc : t ⊆ Set.range b
ht_span : Eq (α := Submodule K E) (span K t) (span K (Set.range b))
ht_lin : LinearIndependent.{u_2, u_1, u_2} (ι := { x : E // x ∈ t }) K (Subtype.val (p := fun (x : E) ↦ x ∈ t))
e : Basis (↑t : Type u_2) K E := Basis.mk ht_lin ⋯
this : Fintype (↑t : Type u_2)
h : finrank K E < Fintype.card.{u_2} (Free.ChooseBasisIndex ℤ ↥L)
v : E
hv : v ∈ Set.range b \ Set.range (ι := (↑t : Type u_2)) (⇑e : (a : (↑t : Type u_2)) → E)
h_1 : LinearIndepOn.{u_2, 0, u_2} (ι := E) ℚ id (Set.range (ι := (↑t : Type u_2)) (⇑e : (a : (↑t : Type u_2)) → E))
h_mapsto :
  Set.MapsTo (fun (n : ℤ) ↦ fract e (n • v)) Set.univ
    (Metric.closedBall 0 (∑ i : (↑t : Type u_2), norm (E := E) ((e : (a : (↑t : Type u_2)) → E) i : E)) ∩ (↑L : Set E))
h_finite :
  (Metric.closedBall 0 (∑ i : (↑t : Type u_2), norm (E := E) ((e : (a : (↑t : Type u_2)) → E) i : E)) ∩
      (↑L : Set E)).Finite
n m : ℤ
h_ne : n ≠ m
h_eq : fract e (n • v) = fract e (m • v)
⊢ Membership.mem (γ := Submodule ℚ E) (span ℚ (Set.range (ι := (↑t : Type u_2)) (⇑e : (a : (↑t : Type u_2)) → E))) v
have h_nz : HAdd.hAdd (α := ℚ) (-(↑n : ℚ)) (↑m : ℚ) ≠ 0
Tactic: have h_nz : (-n + m : ℚ) ≠ 0 := by
      rwa [Ne, add_eq_zero_iff_eq_neg.not, neg_inj, Rat.coe_int_inj, ← Ne]
-- Lean 4 proof step from Mathlib.Algebra.Module.ZLattice.Basic (goal)
Goal:
K : Type u_1
inst : NormedField K
inst_1 : LinearOrder K
inst_2 : IsStrictOrderedRing K
inst_3 : HasSolidNorm K
inst_4 : FloorRing K
E : Type u_2
inst_5 : NormedAddCommGroup E
inst_6 : NormedSpace K E
inst_7 : FiniteDimensional K E
inst_8 : ProperSpace E
L : Submodule ℤ E
inst_9 : DiscreteTopology.{u_2} ↥L
hs : IsZLattice K L
this_1 : Module.Finite.{0, u_2} ℤ ↥L
this_2 : Module ℚ E
this_3 : IsAddTorsionFree E
b₀ : Basis (Free.ChooseBasisIndex ℤ ↥L) ℤ ↥L := Free.chooseBasis ℤ ↥L
b : Free.ChooseBasisIndex ℤ ↥L → E :=
  Function.comp (β := ↥L) (Subtype.val (p := fun (x : E) ↦ x ∈ L)) (⇑b₀ : (a : Free.ChooseBasisIndex ℤ ↥L) → ↥L)
this_4 : LinearIndependent ℤ b
h_spanL : span ℤ (Set.range b) = L
h_spanE : Eq (α := Submodule K E) (span K (Set.range b)) ⊤
h_card : Fintype.card.{u_2} (Free.ChooseBasisIndex ℤ ↥L) = (Set.range b).toFinset.card
t : Set E
ht_inc : t ⊆ Set.range b
ht_span : Eq (α := Submodule K E) (span K t) (span K (Set.range b))
ht_lin : LinearIndependent.{u_2, u_1, u_2} (ι := { x : E // x ∈ t }) K (Subtype.val (p := fun (x : E) ↦ x ∈ t))
e : Basis (↑t : Type u_2) K E := Basis.mk ht_lin ⋯
this : Fintype (↑t : Type u_2)
h : finrank K E < Fintype.card.{u_2} (Free.ChooseBasisIndex ℤ ↥L)
v : E
hv : v ∈ Set.range b \ Set.range (ι := (↑t : Type u_2)) (⇑e : (a : (↑t : Type u_2)) → E)
h_1 : LinearIndepOn.{u_2, 0, u_2} (ι := E) ℚ id (Set.range (ι := (↑t : Type u_2)) (⇑e : (a : (↑t : Type u_2)) → E))
h_mapsto :
  Set.MapsTo (fun (n : ℤ) ↦ fract e (n • v)) Set.univ
    (Metric.closedBall 0 (∑ i : (↑t : Type u_2), norm (E := E) ((e : (a : (↑t : Type u_2)) → E) i : E)) ∩ (↑L : Set E))
h_finite :
  (Metric.closedBall 0 (∑ i : (↑t : Type u_2), norm (E := E) ((e : (a : (↑t : Type u_2)) → E) i : E)) ∩
      (↑L : Set E)).Finite
n m : ℤ
h_ne : n ≠ m
h_eq : fract e (n • v) = fract e (m • v)
h_nz : HAdd.hAdd (α := ℚ) (-(↑n : ℚ)) (↑m : ℚ) ≠ 0
⊢ Membership.mem (γ := Submodule ℚ E) (span ℚ (Set.range (ι := (↑t : Type u_2)) (⇑e : (a : (↑t : Type u_2)) → E))) v
have refine_1 : Membership.mem (γ := Submodule ℚ E) (span ℚ (Set.range (ι := (↑t : Type u_2)) (⇑e : (a : (↑t : Type u_2)) → E)))
  (HAdd.hAdd (α := ℚ) (-(↑n : ℚ)) (↑m : ℚ) • v)
Tactic: apply (smul_mem_iff _ h_nz).mp
-- Lean 4 proof step from Mathlib.Algebra.Module.ZLattice.Basic (goal)
Goal:
K : Type u_1
inst : NormedField K
inst_1 : LinearOrder K
inst_2 : IsStrictOrderedRing K
inst_3 : HasSolidNorm K
inst_4 : FloorRing K
E : Type u_2
inst_5 : NormedAddCommGroup E
inst_6 : NormedSpace K E
inst_7 : FiniteDimensional K E
inst_8 : ProperSpace E
L : Submodule ℤ E
inst_9 : DiscreteTopology.{u_2} ↥L
hs : IsZLattice K L
this_1 : Module.Finite.{0, u_2} ℤ ↥L
this_2 : Module ℚ E
this_3 : IsAddTorsionFree E
b₀ : Basis (Free.ChooseBasisIndex ℤ ↥L) ℤ ↥L := Free.chooseBasis ℤ ↥L
b : Free.ChooseBasisIndex ℤ ↥L → E :=
  Function.comp (β := ↥L) (Subtype.val (p := fun (x : E) ↦ x ∈ L)) (⇑b₀ : (a : Free.ChooseBasisIndex ℤ ↥L) → ↥L)
this_4 : LinearIndependent ℤ b
h_spanL : span ℤ (Set.range b) = L
h_spanE : Eq (α := Submodule K E) (span K (Set.range b)) ⊤
h_card : Fintype.card.{u_2} (Free.ChooseBasisIndex ℤ ↥L) = (Set.range b).toFinset.card
t : Set E
ht_inc : t ⊆ Set.range b
ht_span : Eq (α := Submodule K E) (span K t) (span K (Set.range b))
ht_lin : LinearIndependent.{u_2, u_1, u_2} (ι := { x : E // x ∈ t }) K (Subtype.val (p := fun (x : E) ↦ x ∈ t))
e : Basis (↑t : Type u_2) K E := Basis.mk ht_lin ⋯
this : Fintype (↑t : Type u_2)
h : finrank K E < Fintype.card.{u_2} (Free.ChooseBasisIndex ℤ ↥L)
v : E
hv : v ∈ Set.range b \ Set.range (ι := (↑t : Type u_2)) (⇑e : (a : (↑t : Type u_2)) → E)
h_1 : LinearIndepOn.{u_2, 0, u_2} (ι := E) ℚ id (Set.range (ι := (↑t : Type u_2)) (⇑e : (a : (↑t : Type u_2)) → E))
h_mapsto :
  Set.MapsTo (fun (n : ℤ) ↦ fract e (n • v)) Set.univ
    (Metric.closedBall 0 (∑ i : (↑t : Type u_2), norm (E := E) ((e : (a : (↑t : Type u_2)) → E) i : E)) ∩ (↑L : Set E))
h_finite :
  (Metric.closedBall 0 (∑ i : (↑t : Type u_2), norm (E := E) ((e : (a : (↑t : Type u_2)) → E) i : E)) ∩
      (↑L : Set E)).Finite
n m : ℤ
h_ne : n ≠ m
h_eq : fract e (n • v) = fract e (m • v)
h_nz : HAdd.hAdd (α := ℚ) (-(↑n : ℚ)) (↑m : ℚ) ≠ 0
⊢ Membership.mem (γ := Submodule ℚ E) (span ℚ (Set.range (ι := (↑t : Type u_2)) (⇑e : (a : (↑t : Type u_2)) → E)))
    (HAdd.hAdd (α := ℚ) (-(↑n : ℚ)) (↑m : ℚ) • v)
have refine_1 : HAdd.hAdd (α := ℚ) (-(↑n : ℚ)) (↑m : ℚ) • v ∈
  (↑(span ℤ (Set.range (ι := (↑t : Type u_2)) (⇑e : (a : (↑t : Type u_2)) → E))) : Set E)
Tactic: refine span_subset_span ℤ ℚ _ ?_
-- Lean 4 proof step from Mathlib.Algebra.Module.ZLattice.Basic (goal)
Goal:
K : Type u_1
inst : NormedField K
inst_1 : LinearOrder K
inst_2 : IsStrictOrderedRing K
inst_3 : HasSolidNorm K
inst_4 : FloorRing K
E : Type u_2
inst_5 : NormedAddCommGroup E
inst_6 : NormedSpace K E
inst_7 : FiniteDimensional K E
inst_8 : ProperSpace E
L : Submodule ℤ E
inst_9 : DiscreteTopology.{u_2} ↥L
hs : IsZLattice K L
this_1 : Module.Finite.{0, u_2} ℤ ↥L
this_2 : Module ℚ E
this_3 : IsAddTorsionFree E
b₀ : Basis (Free.ChooseBasisIndex ℤ ↥L) ℤ ↥L := Free.chooseBasis ℤ ↥L
b : Free.ChooseBasisIndex ℤ ↥L → E :=
  Function.comp (β := ↥L) (Subtype.val (p := fun (x : E) ↦ x ∈ L)) (⇑b₀ : (a : Free.ChooseBasisIndex ℤ ↥L) → ↥L)
this_4 : LinearIndependent ℤ b
h_spanL : span ℤ (Set.range b) = L
h_spanE : Eq (α := Submodule K E) (span K (Set.range b)) ⊤
h_card : Fintype.card.{u_2} (Free.ChooseBasisIndex ℤ ↥L) = (Set.range b).toFinset.card
t : Set E
ht_inc : t ⊆ Set.range b
ht_span : Eq (α := Submodule K E) (span K t) (span K (Set.range b))
ht_lin : LinearIndependent.{u_2, u_1, u_2} (ι := { x : E // x ∈ t }) K (Subtype.val (p := fun (x : E) ↦ x ∈ t))
e : Basis (↑t : Type u_2) K E := Basis.mk ht_lin ⋯
this : Fintype (↑t : Type u_2)
h : finrank K E < Fintype.card.{u_2} (Free.ChooseBasisIndex ℤ ↥L)
v : E
hv : v ∈ Set.range b \ Set.range (ι := (↑t : Type u_2)) (⇑e : (a : (↑t : Type u_2)) → E)
h_1 : LinearIndepOn.{u_2, 0, u_2} (ι := E) ℚ id (Set.range (ι := (↑t : Type u_2)) (⇑e : (a : (↑t : Type u_2)) → E))
h_mapsto :
  Set.MapsTo (fun (n : ℤ) ↦ fract e (n • v)) Set.univ
    (Metric.closedBall 0 (∑ i : (↑t : Type u_2), norm (E := E) ((e : (a : (↑t : Type u_2)) → E) i : E)) ∩ (↑L : Set E))
h_finite :
  (Metric.closedBall 0 (∑ i : (↑t : Type u_2), norm (E := E) ((e : (a : (↑t : Type u_2)) → E) i : E)) ∩
      (↑L : Set E)).Finite
n m : ℤ
h_ne : n ≠ m
h_eq : fract e (n • v) = fract e (m • v)
h_nz : HAdd.hAdd (α := ℚ) (-(↑n : ℚ)) (↑m : ℚ) ≠ 0
⊢ HAdd.hAdd (α := ℚ) (-(↑n : ℚ)) (↑m : ℚ) • v ∈
    (↑(span ℤ (Set.range (ι := (↑t : Type u_2)) (⇑e : (a : (↑t : Type u_2)) → E))) : Set E)
have refine_1 : HSMul.hSMul (α := ℚ) (-(↑n : ℚ)) v + HSMul.hSMul (α := ℚ) (↑m : ℚ) v ∈
  (↑(span ℤ (Set.range (ι := (↑t : Type u_2)) (⇑e : (a : (↑t : Type u_2)) → E))) : Set E)
Tactic: rwa [add_smul, neg_smul, SetLike.mem_coe, ← fract_eq_fract, Int.cast_smul_eq_zsmul ℚ,
      Int.cast_smul_eq_zsmul ℚ]
-- Lean 4 proof step from Mathlib.Algebra.Module.ZLattice.Basic (goal)
Goal:
K : Type u_1
inst : NormedField K
inst_1 : LinearOrder K
inst_2 : IsStrictOrderedRing K
inst_3 : HasSolidNorm K
inst_4 : FloorRing K
E : Type u_2
inst_5 : NormedAddCommGroup E
inst_6 : NormedSpace K E
inst_7 : FiniteDimensional K E
inst_8 : ProperSpace E
L : Submodule ℤ E
inst_9 : DiscreteTopology.{u_2} ↥L
hs : IsZLattice K L
this_1 : Module.Finite.{0, u_2} ℤ ↥L
this_2 : Module ℚ E
this_3 : IsAddTorsionFree E
b₀ : Basis (Free.ChooseBasisIndex ℤ ↥L) ℤ ↥L := Free.chooseBasis ℤ ↥L
b : Free.ChooseBasisIndex ℤ ↥L → E :=
  Function.comp (β := ↥L) (Subtype.val (p := fun (x : E) ↦ x ∈ L)) (⇑b₀ : (a : Free.ChooseBasisIndex ℤ ↥L) → ↥L)
this_4 : LinearIndependent ℤ b
h_spanL : span ℤ (Set.range b) = L
h_spanE : Eq (α := Submodule K E) (span K (Set.range b)) ⊤
h_card : Fintype.card.{u_2} (Free.ChooseBasisIndex ℤ ↥L) = (Set.range b).toFinset.card
t : Set E
ht_inc : t ⊆ Set.range b
ht_span : Eq (α := Submodule K E) (span K t) (span K (Set.range b))
ht_lin : LinearIndependent.{u_2, u_1, u_2} (ι := { x : E // x ∈ t }) K (Subtype.val (p := fun (x : E) ↦ x ∈ t))
e : Basis (↑t : Type u_2) K E := Basis.mk ht_lin ⋯
this : Fintype (↑t : Type u_2)
h : finrank K E < Fintype.card.{u_2} (Free.ChooseBasisIndex ℤ ↥L)
v : E
hv : v ∈ Set.range b \ Set.range (ι := (↑t : Type u_2)) (⇑e : (a : (↑t : Type u_2)) → E)
h_1 : LinearIndepOn.{u_2, 0, u_2} (ι := E) ℚ id (Set.range (ι := (↑t : Type u_2)) (⇑e : (a : (↑t : Type u_2)) → E))
h_mapsto :
  Set.MapsTo (fun (n : ℤ) ↦ fract e (n • v)) Set.univ
    (Metric.closedBall 0 (∑ i : (↑t : Type u_2), norm (E := E) ((e : (a : (↑t : Type u_2)) → E) i : E)) ∩ (↑L : Set E))
h_finite :
  (Metric.closedBall 0 (∑ i : (↑t : Type u_2), norm (E := E) ((e : (a : (↑t : Type u_2)) → E) i : E)) ∩
      (↑L : Set E)).Finite
n m : ℤ
h_ne : n ≠ m
h_eq : fract e (n • v) = fract e (m • v)
h_nz : HAdd.hAdd (α := ℚ) (-(↑n : ℚ)) (↑m : ℚ) ≠ 0
refine_1 :
  HSMul.hSMul (α := ℚ) (-(↑n : ℚ)) v + HSMul.hSMul (α := ℚ) (↑m : ℚ) v ∈
    (↑(span ℤ (Set.range (ι := (↑t : Type u_2)) (⇑e : (a : (↑t : Type u_2)) → E))) : Set E)
⊢ HAdd.hAdd (α := ℚ) (-(↑n : ℚ)) (↑m : ℚ) • v ∈
    (↑(span ℤ (Set.range (ι := (↑t : Type u_2)) (⇑e : (a : (↑t : Type u_2)) → E))) : Set E)
have refine_1₁ : -HSMul.hSMul (α := ℚ) (↑n : ℚ) v + HSMul.hSMul (α := ℚ) (↑m : ℚ) v ∈
  (↑(span ℤ (Set.range (ι := (↑t : Type u_2)) (⇑e : (a : (↑t : Type u_2)) → E))) : Set E)
Tactic: rwa [add_smul, neg_smul, SetLike.mem_coe, ← fract_eq_fract, Int.cast_smul_eq_zsmul ℚ,
      Int.cast_smul_eq_zsmul ℚ]
-- Lean 4 proof step from Mathlib.Algebra.Module.ZLattice.Basic (goal)
Goal:
K : Type u_1
inst : NormedField K
inst_1 : LinearOrder K
inst_2 : IsStrictOrderedRing K
inst_3 : HasSolidNorm K
inst_4 : FloorRing K
E : Type u_2
inst_5 : NormedAddCommGroup E
inst_6 : NormedSpace K E
inst_7 : FiniteDimensional K E
inst_8 : ProperSpace E
L : Submodule ℤ E
inst_9 : DiscreteTopology.{u_2} ↥L
hs : IsZLattice K L
this_1 : Module.Finite.{0, u_2} ℤ ↥L
this_2 : Module ℚ E
this_3 : IsAddTorsionFree E
b₀ : Basis (Free.ChooseBasisIndex ℤ ↥L) ℤ ↥L := Free.chooseBasis ℤ ↥L
b : Free.ChooseBasisIndex ℤ ↥L → E :=
  Function.comp (β := ↥L) (Subtype.val (p := fun (x : E) ↦ x ∈ L)) (⇑b₀ : (a : Free.ChooseBasisIndex ℤ ↥L) → ↥L)
this_4 : LinearIndependent ℤ b
h_spanL : span ℤ (Set.range b) = L
h_spanE : Eq (α := Submodule K E) (span K (Set.range b)) ⊤
h_card : Fintype.card.{u_2} (Free.ChooseBasisIndex ℤ ↥L) = (Set.range b).toFinset.card
t : Set E
ht_inc : t ⊆ Set.range b
ht_span : Eq (α := Submodule K E) (span K t) (span K (Set.range b))
ht_lin : LinearIndependent.{u_2, u_1, u_2} (ι := { x : E // x ∈ t }) K (Subtype.val (p := fun (x : E) ↦ x ∈ t))
e : Basis (↑t : Type u_2) K E := Basis.mk ht_lin ⋯
this : Fintype (↑t : Type u_2)
h : finrank K E < Fintype.card.{u_2} (Free.ChooseBasisIndex ℤ ↥L)
v : E
hv : v ∈ Set.range b \ Set.range (ι := (↑t : Type u_2)) (⇑e : (a : (↑t : Type u_2)) → E)
h_1 : LinearIndepOn.{u_2, 0, u_2} (ι := E) ℚ id (Set.range (ι := (↑t : Type u_2)) (⇑e : (a : (↑t : Type u_2)) → E))
h_mapsto :
  Set.MapsTo (fun (n : ℤ) ↦ fract e (n • v)) Set.univ
    (Metric.closedBall 0 (∑ i : (↑t : Type u_2), norm (E := E) ((e : (a : (↑t : Type u_2)) → E) i : E)) ∩ (↑L : Set E))
h_finite :
  (Metric.closedBall 0 (∑ i : (↑t : Type u_2), norm (E := E) ((e : (a : (↑t : Type u_2)) → E) i : E)) ∩
      (↑L : Set E)).Finite
n m : ℤ
h_ne : n ≠ m
h_eq : fract e (n • v) = fract e (m • v)
h_nz : HAdd.hAdd (α := ℚ) (-(↑n : ℚ)) (↑m : ℚ) ≠ 0
refine_1 :
  HSMul.hSMul (α := ℚ) (-(↑n : ℚ)) v + HSMul.hSMul (α := ℚ) (↑m : ℚ) v ∈
    (↑(span ℤ (Set.range (ι := (↑t : Type u_2)) (⇑e : (a : (↑t : Type u_2)) → E))) : Set E)
refine_1₁ :
  -HSMul.hSMul (α := ℚ) (↑n : ℚ) v + HSMul.hSMul (α := ℚ) (↑m : ℚ) v ∈
    (↑(span ℤ (Set.range (ι := (↑t : Type u_2)) (⇑e : (a : (↑t : Type u_2)) → E))) : Set E)
⊢ HAdd.hAdd (α := ℚ) (-(↑n : ℚ)) (↑m : ℚ) • v ∈
    (↑(span ℤ (Set.range (ι := (↑t : Type u_2)) (⇑e : (a : (↑t : Type u_2)) → E))) : Set E)
have refine_1₂ : Membership.mem (γ := Submodule ℤ E) (span ℤ (Set.range (ι := (↑t : Type u_2)) (⇑e : (a : (↑t : Type u_2)) → E)))
  (-HSMul.hSMul (α := ℚ) (↑n : ℚ) v + HSMul.hSMul (α := ℚ) (↑m : ℚ) v)
Tactic: rwa [add_smul, neg_smul, SetLike.mem_coe, ← fract_eq_fract, Int.cast_smul_eq_zsmul ℚ,
      Int.cast_smul_eq_zsmul ℚ]
-- Lean 4 proof step from Mathlib.Algebra.Module.ZLattice.Basic (goal)
Goal:
K : Type u_1
inst : NormedField K
inst_1 : LinearOrder K
inst_2 : IsStrictOrderedRing K
inst_3 : HasSolidNorm K
inst_4 : FloorRing K
E : Type u_2
inst_5 : NormedAddCommGroup E
inst_6 : NormedSpace K E
inst_7 : FiniteDimensional K E
inst_8 : ProperSpace E
L : Submodule ℤ E
inst_9 : DiscreteTopology.{u_2} ↥L
hs : IsZLattice K L
this_1 : Module.Finite.{0, u_2} ℤ ↥L
this_2 : Module ℚ E
this_3 : IsAddTorsionFree E
b₀ : Basis (Free.ChooseBasisIndex ℤ ↥L) ℤ ↥L := Free.chooseBasis ℤ ↥L
b : Free.ChooseBasisIndex ℤ ↥L → E :=
  Function.comp (β := ↥L) (Subtype.val (p := fun (x : E) ↦ x ∈ L)) (⇑b₀ : (a : Free.ChooseBasisIndex ℤ ↥L) → ↥L)
this_4 : LinearIndependent ℤ b
h_spanL : span ℤ (Set.range b) = L
h_spanE : Eq (α := Submodule K E) (span K (Set.range b)) ⊤
h_card : Fintype.card.{u_2} (Free.ChooseBasisIndex ℤ ↥L) = (Set.range b).toFinset.card
t : Set E
ht_inc : t ⊆ Set.range b
ht_span : Eq (α := Submodule K E) (span K t) (span K (Set.range b))
ht_lin : LinearIndependent.{u_2, u_1, u_2} (ι := { x : E // x ∈ t }) K (Subtype.val (p := fun (x : E) ↦ x ∈ t))
e : Basis (↑t : Type u_2) K E := Basis.mk ht_lin ⋯
this : Fintype (↑t : Type u_2)
h : finrank K E < Fintype.card.{u_2} (Free.ChooseBasisIndex ℤ ↥L)
v : E
hv : v ∈ Set.range b \ Set.range (ι := (↑t : Type u_2)) (⇑e : (a : (↑t : Type u_2)) → E)
h_1 : LinearIndepOn.{u_2, 0, u_2} (ι := E) ℚ id (Set.range (ι := (↑t : Type u_2)) (⇑e : (a : (↑t : Type u_2)) → E))
h_mapsto :
  Set.MapsTo (fun (n : ℤ) ↦ fract e (n • v)) Set.univ
    (Metric.closedBall 0 (∑ i : (↑t : Type u_2), norm (E := E) ((e : (a : (↑t : Type u_2)) → E) i : E)) ∩ (↑L : Set E))
h_finite :
  (Metric.closedBall 0 (∑ i : (↑t : Type u_2), norm (E := E) ((e : (a : (↑t : Type u_2)) → E) i : E)) ∩
      (↑L : Set E)).Finite
n m : ℤ
h_ne : n ≠ m
h_eq : fract e (n • v) = fract e (m • v)
h_nz : HAdd.hAdd (α := ℚ) (-(↑n : ℚ)) (↑m : ℚ) ≠ 0
refine_1 :
  HSMul.hSMul (α := ℚ) (-(↑n : ℚ)) v + HSMul.hSMul (α := ℚ) (↑m : ℚ) v ∈
    (↑(span ℤ (Set.range (ι := (↑t : Type u_2)) (⇑e : (a : (↑t : Type u_2)) → E))) : Set E)
refine_1₁ :
  -HSMul.hSMul (α := ℚ) (↑n : ℚ) v + HSMul.hSMul (α := ℚ) (↑m : ℚ) v ∈
    (↑(span ℤ (Set.range (ι := (↑t : Type u_2)) (⇑e : (a : (↑t : Type u_2)) → E))) : Set E)
refine_1₂ :
  Membership.mem (γ := Submodule ℤ E) (span ℤ (Set.range (ι := (↑t : Type u_2)) (⇑e : (a : (↑t : Type u_2)) → E)))
    (-HSMul.hSMul (α := ℚ) (↑n : ℚ) v + HSMul.hSMul (α := ℚ) (↑m : ℚ) v)
⊢ HAdd.hAdd (α := ℚ) (-(↑n : ℚ)) (↑m : ℚ) • v ∈
    (↑(span ℤ (Set.range (ι := (↑t : Type u_2)) (⇑e : (a : (↑t : Type u_2)) → E))) : Set E)
have refine_1₃ : fract e (HSMul.hSMul (α := ℚ) (↑n : ℚ) v) = fract e (HSMul.hSMul (α := ℚ) (↑m : ℚ) v)
Tactic: rwa [add_smul, neg_smul, SetLike.mem_coe, ← fract_eq_fract, Int.cast_smul_eq_zsmul ℚ,
      Int.cast_smul_eq_zsmul ℚ]