internlm/Lean-Github huggingface dataset:
Theorem: ℤα.im_sub_nearest
Proof state before:
a b c : ℤα
x y : ℝ
this : |y - ↑(round ((2⁻¹ * rt7)⁻¹ * y)) * (2⁻¹ * rt7)| ≤ 2⁻¹ * (2⁻¹ * rt7)
⊢ rt7 * (↑(ofNat 1) / ↑4) = |rt7 * (↑(ofNat 1) / ↑4)|
Tactic:
symm
Proof state after:
a b c : ℤα
x y : ℝ
this : |y - ↑(round ((2⁻¹ * rt7)⁻¹ * y)) * (2⁻¹ * rt7)| ≤ 2⁻¹ * (2⁻¹ * rt7)
⊢ |rt7 * (↑(ofNat 1) / ↑4)| = rt7 * (↑(ofNat 1) / ↑4)
Theorem: ℤα.im_sub_nearest
Proof state before:
a b c : ℤα
x y : ℝ
this : |y - ↑(round ((2⁻¹ * rt7)⁻¹ * y)) * (2⁻¹ * rt7)| ≤ 2⁻¹ * (2⁻¹ * rt7)
⊢ |rt7 * (↑(ofNat 1) / ↑4)| = rt7 * (↑(ofNat 1) / ↑4)
Tactic:
apply abs_of_pos
Proof state after:
case h
a b c : ℤα
x y : ℝ
this : |y - ↑(round ((2⁻¹ * rt7)⁻¹ * y)) * (2⁻¹ * rt7)| ≤ 2⁻¹ * (2⁻¹ * rt7)
⊢ 0 < rt7 * (↑(ofNat 1) / ↑4)
Theorem: ℤα.im_sub_nearest
Proof state before:
case h
a b c : ℤα
x y : ℝ
this : |y - ↑(round ((2⁻¹ * rt7)⁻¹ * y)) * (2⁻¹ * rt7)| ≤ 2⁻¹ * (2⁻¹ * rt7)
⊢ 0 < rt7 * (↑(ofNat 1) / ↑4)
Tactic:
norm_num
Proof state after:
no goals
Theorem: ℤα.re_sub_nearest
Proof state before:
a b c : ℤα
z : ℂ
⊢ (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).re ^ 2 ≤ 2⁻¹ ^ 2
Tactic:
rw [sq_le_sq]
Proof state after:
a b c : ℤα
z : ℂ
⊢ |(z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).re| ≤ |2⁻¹|
Theorem: ℤα.re_sub_nearest
Proof state before:
a b c : ℤα
z : ℂ
⊢ |(z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).re| ≤ |2⁻¹|
Tactic:
cases' z with x y
Proof state after:
case mk
a b c : ℤα
x y : ℝ
⊢ |({ re := x, im := y } - OneHom.toFun (↑↑inclusion) (nearestℤα { re := x, im := y })).re| ≤ |2⁻¹|
Theorem: ℤα.re_sub_nearest
Proof state before:
case mk
a b c : ℤα
x y : ℝ
⊢ |({ re := x, im := y } - OneHom.toFun (↑↑inclusion) (nearestℤα { re := x, im := y })).re| ≤ |2⁻¹|
Tactic:
unfold nearestℤα
Proof state after:
case mk
a b c : ℤα
x y : ℝ
⊢ |({ re := x, im := y } -
          OneHom.toFun (↑↑inclusion)
            (let y_1 := round (2 * rt7⁻¹ * { re := x, im := y }.im);
            { z := round ({ re := x, im := y }.re - 2⁻¹ * ↑y_1), w := y_1 })).re| ≤
    |2⁻¹|
Theorem: ℤα.re_sub_nearest
Proof state before:
case mk
a b c : ℤα
x y : ℝ
⊢ |({ re := x, im := y } -
          OneHom.toFun (↑↑inclusion)
            (let y_1 := round (2 * rt7⁻¹ * { re := x, im := y }.im);
            { z := round ({ re := x, im := y }.re - 2⁻¹ * ↑y_1), w := y_1 })).re| ≤
    |2⁻¹|
Tactic:
dsimp
Proof state after:
case mk
a b c : ℤα
x y : ℝ
⊢ |x - (↑inclusion { z := round (x - 2⁻¹ * ↑(round (2 * rt7⁻¹ * y))), w := round (2 * rt7⁻¹ * y) }).re| ≤ |2⁻¹|
Theorem: ℤα.re_sub_nearest
Proof state before:
case mk
a b c : ℤα
x y : ℝ
⊢ |x - (↑inclusion { z := round (x - 2⁻¹ * ↑(round (2 * rt7⁻¹ * y))), w := round (2 * rt7⁻¹ * y) }).re| ≤ |2⁻¹|
Tactic:
rw [inclusion]
Proof state after:
case mk
a b c : ℤα
x y : ℝ
⊢ |x -
        (↑{ toMonoidHom := { toOneHom := { toFun := toℂ, map_one' := my_map_one }, map_mul' := my_map_mul },
                map_zero' := my_map_zero, map_add' := my_map_add }
            { z := round (x - 2⁻¹ * ↑(round (2 * rt7⁻¹ * y))), w := round (2 * rt7⁻¹ * y) }).re| ≤
    |2⁻¹|
Theorem: ℤα.re_sub_nearest
Proof state before:
case mk
a b c : ℤα
x y : ℝ
⊢ |x -
        (↑{ toMonoidHom := { toOneHom := { toFun := toℂ, map_one' := my_map_one }, map_mul' := my_map_mul },
                map_zero' := my_map_zero, map_add' := my_map_add }
            { z := round (x - 2⁻¹ * ↑(round (2 * rt7⁻¹ * y))), w := round (2 * rt7⁻¹ * y) }).re| ≤
    |2⁻¹|
Tactic:
simp only [RingHom.coe_mk, MonoidHom.coe_mk, OneHom.coe_mk]
Proof state after:
case mk
a b c : ℤα
x y : ℝ
⊢ |x - (toℂ { z := round (x - 2⁻¹ * ↑(round (2 * rt7⁻¹ * y))), w := round (2 * rt7⁻¹ * y) }).re| ≤ |2⁻¹|
Theorem: ℤα.re_sub_nearest
Proof state before:
case mk
a b c : ℤα
x y : ℝ
⊢ |x - (toℂ { z := round (x - 2⁻¹ * ↑(round (2 * rt7⁻¹ * y))), w := round (2 * rt7⁻¹ * y) }).re| ≤ |2⁻¹|
Tactic:
ring_nf
Proof state after:
case mk
a b c : ℤα
x y : ℝ
⊢ |x -
        (toℂ
            { z := round (x + ↑(round (rt7⁻¹ * y * 2)) * ↑(negOfNat 1) * (↑(ofNat 1) / ↑2)),
              w := round (rt7⁻¹ * y * 2) }).re| ≤
    |↑(ofNat 1) / ↑2|
Theorem: ℤα.re_sub_nearest
Proof state before:
case mk
a b c : ℤα
x y : ℝ
⊢ |x -
        (toℂ
            { z := round (x + ↑(round (rt7⁻¹ * y * 2)) * ↑(negOfNat 1) * (↑(ofNat 1) / ↑2)),
              w := round (rt7⁻¹ * y * 2) }).re| ≤
    |↑(ofNat 1) / ↑2|
Tactic:
have : |(1 / 2 : ℝ)| = 1 / 2 := by norm_num
Proof state after:
case mk
a b c : ℤα
x y : ℝ
this : |1 / 2| = 1 / 2
⊢ |x -
        (toℂ
            { z := round (x + ↑(round (rt7⁻¹ * y * 2)) * ↑(negOfNat 1) * (↑(ofNat 1) / ↑2)),
              w := round (rt7⁻¹ * y * 2) }).re| ≤
    |↑(ofNat 1) / ↑2|
Theorem: ℤα.re_sub_nearest
Proof state before:
a b c : ℤα
x y : ℝ
⊢ |1 / 2| = 1 / 2
Tactic:
norm_num
Proof state after:
no goals
Theorem: ℤα.norm_sub_nearestℤα_self_lt
Proof state before:
a b c : ℤα
z : ℂ
⊢ ↑normSq (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)) < 1
Tactic:
have hre := re_sub_nearest z
Proof state after:
a b c : ℤα
z : ℂ
hre : (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).re ^ 2 ≤ 2⁻¹ ^ 2
⊢ ↑normSq (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)) < 1
Theorem: ℤα.norm_sub_nearestℤα_self_lt
Proof state before:
a b c : ℤα
z : ℂ
hre : (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).re ^ 2 ≤ 2⁻¹ ^ 2
⊢ ↑normSq (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)) < 1
Tactic:
have him := im_sub_nearest z
Proof state after:
a b c : ℤα
z : ℂ
hre : (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).re ^ 2 ≤ 2⁻¹ ^ 2
him : (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).im ^ 2 ≤ (4⁻¹ * rt7) ^ 2
⊢ ↑normSq (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)) < 1
Theorem: ℤα.norm_sub_nearestℤα_self_lt
Proof state before:
a b c : ℤα
z : ℂ
hre : (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).re ^ 2 ≤ 2⁻¹ ^ 2
him : (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).im ^ 2 ≤ (4⁻¹ * rt7) ^ 2
⊢ ↑normSq (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)) < 1
Tactic:
unfold normSq
Proof state after:
a b c : ℤα
z : ℂ
hre : (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).re ^ 2 ≤ 2⁻¹ ^ 2
him : (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).im ^ 2 ≤ (4⁻¹ * rt7) ^ 2
⊢ ↑{ toZeroHom := { toFun := fun z => z.re * z.re + z.im * z.im, map_zero' := normSq.proof_1 },
          map_one' := normSq.proof_2, map_mul' := normSq.proof_3 }
      (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)) <
    1
Theorem: ℤα.norm_sub_nearestℤα_self_lt
Proof state before:
a b c : ℤα
z : ℂ
hre : (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).re ^ 2 ≤ 2⁻¹ ^ 2
him : (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).im ^ 2 ≤ (4⁻¹ * rt7) ^ 2
⊢ ↑{ toZeroHom := { toFun := fun z => z.re * z.re + z.im * z.im, map_zero' := normSq.proof_1 },
          map_one' := normSq.proof_2, map_mul' := normSq.proof_3 }
      (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)) <
    1
Tactic:
dsimp
Proof state after:
a b c : ℤα
z : ℂ
hre : (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).re ^ 2 ≤ 2⁻¹ ^ 2
him : (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).im ^ 2 ≤ (4⁻¹ * rt7) ^ 2
⊢ (z.re - (↑inclusion (nearestℤα z)).re) * (z.re - (↑inclusion (nearestℤα z)).re) +
      (z.im - (↑inclusion (nearestℤα z)).im) * (z.im - (↑inclusion (nearestℤα z)).im) <
    1
Theorem: ℤα.norm_sub_nearestℤα_self_lt
Proof state before:
a b c : ℤα
z : ℂ
hre : (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).re ^ 2 ≤ 2⁻¹ ^ 2
him : (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).im ^ 2 ≤ (4⁻¹ * rt7) ^ 2
⊢ (z.re - (↑inclusion (nearestℤα z)).re) * (z.re - (↑inclusion (nearestℤα z)).re) +
      (z.im - (↑inclusion (nearestℤα z)).im) * (z.im - (↑inclusion (nearestℤα z)).im) <
    1
Tactic:
simp only [← pow_two]
Proof state after:
a b c : ℤα
z : ℂ
hre : (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).re ^ 2 ≤ 2⁻¹ ^ 2
him : (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).im ^ 2 ≤ (4⁻¹ * rt7) ^ 2
⊢ (z.re - (↑inclusion (nearestℤα z)).re) ^ 2 + (z.im - (↑inclusion (nearestℤα z)).im) ^ 2 < 1
Theorem: ℤα.norm_sub_nearestℤα_self_lt
Proof state before:
a b c : ℤα
z : ℂ
hre : (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).re ^ 2 ≤ 2⁻¹ ^ 2
him : (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).im ^ 2 ≤ (4⁻¹ * rt7) ^ 2
⊢ (z.re - (↑inclusion (nearestℤα z)).re) ^ 2 + (z.im - (↑inclusion (nearestℤα z)).im) ^ 2 < 1
Tactic:
have arith : (2 : ℝ)⁻¹ ^ 2 + (4⁻¹ * rt7) ^ 2 < 1 :=
  by
  ring_nf
  simp only [one_div, rt7_sq]
  norm_num
Proof state after:
a b c : ℤα
z : ℂ
hre : (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).re ^ 2 ≤ 2⁻¹ ^ 2
him : (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).im ^ 2 ≤ (4⁻¹ * rt7) ^ 2
arith : 2⁻¹ ^ 2 + (4⁻¹ * rt7) ^ 2 < 1
⊢ (z.re - (↑inclusion (nearestℤα z)).re) ^ 2 + (z.im - (↑inclusion (nearestℤα z)).im) ^ 2 < 1
Theorem: ℤα.norm_sub_nearestℤα_self_lt
Proof state before:
a b c : ℤα
z : ℂ
hre : (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).re ^ 2 ≤ 2⁻¹ ^ 2
him : (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).im ^ 2 ≤ (4⁻¹ * rt7) ^ 2
arith : 2⁻¹ ^ 2 + (4⁻¹ * rt7) ^ 2 < 1
⊢ (z.re - (↑inclusion (nearestℤα z)).re) ^ 2 + (z.im - (↑inclusion (nearestℤα z)).im) ^ 2 < 1
Tactic:
have near := add_le_add hre him
Proof state after:
a b c : ℤα
z : ℂ
hre : (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).re ^ 2 ≤ 2⁻¹ ^ 2
him : (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).im ^ 2 ≤ (4⁻¹ * rt7) ^ 2
arith : 2⁻¹ ^ 2 + (4⁻¹ * rt7) ^ 2 < 1
near :
  (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).re ^ 2 + (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).im ^ 2 ≤
    2⁻¹ ^ 2 + (4⁻¹ * rt7) ^ 2
⊢ (z.re - (↑inclusion (nearestℤα z)).re) ^ 2 + (z.im - (↑inclusion (nearestℤα z)).im) ^ 2 < 1
Theorem: ℤα.norm_sub_nearestℤα_self_lt
Proof state before:
a b c : ℤα
z : ℂ
hre : (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).re ^ 2 ≤ 2⁻¹ ^ 2
him : (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).im ^ 2 ≤ (4⁻¹ * rt7) ^ 2
arith : 2⁻¹ ^ 2 + (4⁻¹ * rt7) ^ 2 < 1
near :
  (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).re ^ 2 + (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).im ^ 2 ≤
    2⁻¹ ^ 2 + (4⁻¹ * rt7) ^ 2
⊢ (z.re - (↑inclusion (nearestℤα z)).re) ^ 2 + (z.im - (↑inclusion (nearestℤα z)).im) ^ 2 < 1
Tactic:
have := lt_of_le_of_lt near arith
Proof state after:
a b c : ℤα
z : ℂ
hre : (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).re ^ 2 ≤ 2⁻¹ ^ 2
him : (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).im ^ 2 ≤ (4⁻¹ * rt7) ^ 2
arith : 2⁻¹ ^ 2 + (4⁻¹ * rt7) ^ 2 < 1
near :
  (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).re ^ 2 + (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).im ^ 2 ≤
    2⁻¹ ^ 2 + (4⁻¹ * rt7) ^ 2
this : (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).re ^ 2 + (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).im ^ 2 < 1
⊢ (z.re - (↑inclusion (nearestℤα z)).re) ^ 2 + (z.im - (↑inclusion (nearestℤα z)).im) ^ 2 < 1
Theorem: ℤα.norm_sub_nearestℤα_self_lt
Proof state before:
a b c : ℤα
z : ℂ
hre : (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).re ^ 2 ≤ 2⁻¹ ^ 2
him : (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).im ^ 2 ≤ (4⁻¹ * rt7) ^ 2
arith : 2⁻¹ ^ 2 + (4⁻¹ * rt7) ^ 2 < 1
near :
  (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).re ^ 2 + (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).im ^ 2 ≤
    2⁻¹ ^ 2 + (4⁻¹ * rt7) ^ 2
this : (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).re ^ 2 + (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).im ^ 2 < 1
⊢ (z.re - (↑inclusion (nearestℤα z)).re) ^ 2 + (z.im - (↑inclusion (nearestℤα z)).im) ^ 2 < 1
Tactic:
clear near arith hre him
Proof state after:
a b c : ℤα
z : ℂ
this : (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).re ^ 2 + (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).im ^ 2 < 1
⊢ (z.re - (↑inclusion (nearestℤα z)).re) ^ 2 + (z.im - (↑inclusion (nearestℤα z)).im) ^ 2 < 1
Theorem: ℤα.norm_sub_nearestℤα_self_lt
Proof state before:
a b c : ℤα
z : ℂ
this : (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).re ^ 2 + (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).im ^ 2 < 1
⊢ (z.re - (↑inclusion (nearestℤα z)).re) ^ 2 + (z.im - (↑inclusion (nearestℤα z)).im) ^ 2 < 1
Tactic:
rwa [sub_re, sub_im] at this
Proof state after:
no goals
Theorem: ℤα.norm_sub_nearestℤα_self_lt
Proof state before:
a b c : ℤα
z : ℂ
hre : (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).re ^ 2 ≤ 2⁻¹ ^ 2
him : (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).im ^ 2 ≤ (4⁻¹ * rt7) ^ 2
⊢ 2⁻¹ ^ 2 + (4⁻¹ * rt7) ^ 2 < 1
Tactic:
ring_nf
Proof state after:
a b c : ℤα
z : ℂ
hre : (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).re ^ 2 ≤ 2⁻¹ ^ 2
him : (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).im ^ 2 ≤ (4⁻¹ * rt7) ^ 2
⊢ ↑(ofNat 1) / ↑4 + rt7 ^ 2 * (↑(ofNat 1) / ↑16) < 1
Theorem: ℤα.norm_sub_nearestℤα_self_lt
Proof state before:
a b c : ℤα
z : ℂ
hre : (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).re ^ 2 ≤ 2⁻¹ ^ 2
him : (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).im ^ 2 ≤ (4⁻¹ * rt7) ^ 2
⊢ ↑(ofNat 1) / ↑4 + rt7 ^ 2 * (↑(ofNat 1) / ↑16) < 1
Tactic:
simp only [one_div, rt7_sq]
Proof state after:
a b c : ℤα
z : ℂ
hre : (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).re ^ 2 ≤ 2⁻¹ ^ 2
him : (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).im ^ 2 ≤ (4⁻¹ * rt7) ^ 2
⊢ ↑(ofNat 1) / ↑4 + 7 * (↑(ofNat 1) / ↑16) < 1
Theorem: ℤα.norm_sub_nearestℤα_self_lt
Proof state before:
a b c : ℤα
z : ℂ
hre : (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).re ^ 2 ≤ 2⁻¹ ^ 2
him : (z - OneHom.toFun (↑↑inclusion) (nearestℤα z)).im ^ 2 ≤ (4⁻¹ * rt7) ^ 2
⊢ ↑(ofNat 1) / ↑4 + 7 * (↑(ofNat 1) / ↑16) < 1
Tactic:
norm_num
Proof state after:
no goals
Theorem: ℤα.div_add_mod
Proof state before:
a b c : ℤα
⊢ b * (a / b) + a % b = a
Tactic:
change b * div a b + mod a b = a
Proof state after:
a b c : ℤα
⊢ b * div a b + mod a b = a
Theorem: ℤα.div_add_mod
Proof state before:
a b c : ℤα
⊢ b * div a b + mod a b = a
Tactic:
simp [mod]
Proof state after:
no goals
Theorem: ℤα.normSq_mod_lt
Proof state before:
a b c : ℤα
h : b ≠ 0
⊢ natNorm (mod a b) < natNorm b
Tactic:
suffices Complex.normSq (mod a b) < normSq b
  by
  simp only [natNorm_coe] at this
  exact_mod_cast this
Proof state after:
a b c : ℤα
h : b ≠ 0
⊢ ↑normSq (OneHom.toFun (↑↑inclusion) (mod a b)) < ↑normSq (OneHom.toFun (↑↑inclusion) b)
Theorem: ℤα.normSq_mod_lt
Proof state before:
a b c : ℤα
h : b ≠ 0
⊢ ↑normSq (OneHom.toFun (↑↑inclusion) (mod a b)) < ↑normSq (OneHom.toFun (↑↑inclusion) b)
Tactic:
simp [mod, div]
Proof state after:
a b c : ℤα
h : b ≠ 0
⊢ ↑normSq (↑inclusion a - ↑inclusion b * ↑inclusion (nearestℤα (↑inclusion a / ↑inclusion b))) < ↑normSq (↑inclusion b)
Theorem: ℤα.normSq_mod_lt
Proof state before:
a b c : ℤα
h : b ≠ 0
⊢ ↑normSq (↑inclusion a - ↑inclusion b * ↑inclusion (nearestℤα (↑inclusion a / ↑inclusion b))) < ↑normSq (↑inclusion b)
Tactic:
have bound : Complex.normSq (a / b - nearestℤα (a / b)) < 1 :=
  norm_sub_nearestℤα_self_lt (a / b : ℂ)
Proof state after:
a b c : ℤα
h : b ≠ 0
bound :
  ↑normSq
      (OneHom.toFun (↑↑inclusion) a / OneHom.toFun (↑↑inclusion) b -
        OneHom.toFun (↑↑inclusion) (nearestℤα (OneHom.toFun (↑↑inclusion) a / OneHom.toFun (↑↑inclusion) b))) <
    1
⊢ ↑normSq (↑inclusion a - ↑inclusion b * ↑inclusion (nearestℤα (↑inclusion a / ↑inclusion b))) < ↑normSq (↑inclusion b)
Theorem: ℤα.normSq_mod_lt
Proof state before:
a b c : ℤα
h : b ≠ 0
bound :
  ↑normSq
      (OneHom.toFun (↑↑inclusion) a / OneHom.toFun (↑↑inclusion) b -
        OneHom.toFun (↑↑inclusion) (nearestℤα (OneHom.toFun (↑↑inclusion) a / OneHom.toFun (↑↑inclusion) b))) <
    1
⊢ ↑normSq (↑inclusion a - ↑inclusion b * ↑inclusion (nearestℤα (↑inclusion a / ↑inclusion b))) < ↑normSq (↑inclusion b)
Tactic:
have : (a / b : ℂ) - nearestℤα (a / b) = (a - nearestℤα (a / b) * b) * b⁻¹ :=
  by
  ring_nf
  have : (b : ℂ) * (b : ℂ)⁻¹ = 1 := by
    apply mul_inv_cancel
    norm_cast
    simpa [coe_eq_zero] using h
  congr
  rw [mul_comm (b : ℂ)]
  rw [_root_.mul_assoc]
  rw [this]
  rw [_root_.mul_one]
Proof state after:
a b c : ℤα
h : b ≠ 0
bound :
  ↑normSq
      (OneHom.toFun (↑↑inclusion) a / OneHom.toFun (↑↑inclusion) b -
        OneHom.toFun (↑↑inclusion) (nearestℤα (OneHom.toFun (↑↑inclusion) a / OneHom.toFun (↑↑inclusion) b))) <
    1
this :
  OneHom.toFun (↑↑inclusion) a / OneHom.toFun (↑↑inclusion) b -
      OneHom.toFun (↑↑inclusion) (nearestℤα (OneHom.toFun (↑↑inclusion) a / OneHom.toFun (↑↑inclusion) b)) =
    (OneHom.toFun (↑↑inclusion) a -
        OneHom.toFun (↑↑inclusion) (nearestℤα (OneHom.toFun (↑↑inclusion) a / OneHom.toFun (↑↑inclusion) b)) *
          OneHom.toFun (↑↑inclusion) b) *
      sorryAx ℂ true
⊢ ↑normSq (↑inclusion a - ↑inclusion b * ↑inclusion (nearestℤα (↑inclusion a / ↑inclusion b))) < ↑normSq (↑inclusion b)
Theorem: ℤα.normSq_mod_lt
Proof state before:
a b c : ℤα
h : b ≠ 0
bound :
  ↑normSq
      (OneHom.toFun (↑↑inclusion) a / OneHom.toFun (↑↑inclusion) b -
        OneHom.toFun (↑↑inclusion) (nearestℤα (OneHom.toFun (↑↑inclusion) a / OneHom.toFun (↑↑inclusion) b))) <
    1
this :
  OneHom.toFun (↑↑inclusion) a / OneHom.toFun (↑↑inclusion) b -
      OneHom.toFun (↑↑inclusion) (nearestℤα (OneHom.toFun (↑↑inclusion) a / OneHom.toFun (↑↑inclusion) b)) =
    (OneHom.toFun (↑↑inclusion) a -
        OneHom.toFun (↑↑inclusion) (nearestℤα (OneHom.toFun (↑↑inclusion) a / OneHom.toFun (↑↑inclusion) b)) *
          OneHom.toFun (↑↑inclusion) b) *
      sorryAx ℂ true
⊢ ↑normSq (↑inclusion a - ↑inclusion b * ↑inclusion (nearestℤα (↑inclusion a / ↑inclusion b))) < ↑normSq (↑inclusion b)
Tactic:
rw [this] at bound
Proof state after:
a b c : ℤα
h : b ≠ 0
bound :
  ↑normSq
      ((OneHom.toFun (↑↑inclusion) a -
          OneHom.toFun (↑↑inclusion) (nearestℤα (OneHom.toFun (↑↑inclusion) a / OneHom.toFun (↑↑inclusion) b)) *
            OneHom.toFun (↑↑inclusion) b) *
        sorryAx ℂ true) <
    1
this :
  OneHom.toFun (↑↑inclusion) a / OneHom.toFun (↑↑inclusion) b -
      OneHom.toFun (↑↑inclusion) (nearestℤα (OneHom.toFun (↑↑inclusion) a / OneHom.toFun (↑↑inclusion) b)) =
    (OneHom.toFun (↑↑inclusion) a -
        OneHom.toFun (↑↑inclusion) (nearestℤα (OneHom.toFun (↑↑inclusion) a / OneHom.toFun (↑↑inclusion) b)) *
          OneHom.toFun (↑↑inclusion) b) *
      sorryAx ℂ true
⊢ ↑normSq (↑inclusion a - ↑inclusion b * ↑inclusion (nearestℤα (↑inclusion a / ↑inclusion b))) < ↑normSq (↑inclusion b)
Theorem: ℤα.normSq_mod_lt
Proof state before:
a b c : ℤα
h : b ≠ 0
bound :
  ↑normSq
      ((OneHom.toFun (↑↑inclusion) a -
          OneHom.toFun (↑↑inclusion) (nearestℤα (OneHom.toFun (↑↑inclusion) a / OneHom.toFun (↑↑inclusion) b)) *
            OneHom.toFun (↑↑inclusion) b) *
        sorryAx ℂ true) <
    1
this :
  OneHom.toFun (↑↑inclusion) a / OneHom.toFun (↑↑inclusion) b -
      OneHom.toFun (↑↑inclusion) (nearestℤα (OneHom.toFun (↑↑inclusion) a / OneHom.toFun (↑↑inclusion) b)) =
    (OneHom.toFun (↑↑inclusion) a -
        OneHom.toFun (↑↑inclusion) (nearestℤα (OneHom.toFun (↑↑inclusion) a / OneHom.toFun (↑↑inclusion) b)) *
          OneHom.toFun (↑↑inclusion) b) *
      sorryAx ℂ true
⊢ ↑normSq (↑inclusion a - ↑inclusion b * ↑inclusion (nearestℤα (↑inclusion a / ↑inclusion b))) < ↑normSq (↑inclusion b)
Tactic:
clear this
Proof state after:
a b c : ℤα
h : b ≠ 0
bound :
  ↑normSq
      ((OneHom.toFun (↑↑inclusion) a -
          OneHom.toFun (↑↑inclusion) (nearestℤα (OneHom.toFun (↑↑inclusion) a / OneHom.toFun (↑↑inclusion) b)) *
            OneHom.toFun (↑↑inclusion) b) *
        sorryAx ℂ true) <
    1
⊢ ↑normSq (↑inclusion a - ↑inclusion b * ↑inclusion (nearestℤα (↑inclusion a / ↑inclusion b))) < ↑normSq (↑inclusion b)
Theorem: ℤα.normSq_mod_lt
Proof state before:
a b c : ℤα
h : b ≠ 0
bound :
  ↑normSq
      ((OneHom.toFun (↑↑inclusion) a -
          OneHom.toFun (↑↑inclusion) (nearestℤα (OneHom.toFun (↑↑inclusion) a / OneHom.toFun (↑↑inclusion) b)) *
            OneHom.toFun (↑↑inclusion) b) *
        sorryAx ℂ true) <
    1
⊢ ↑normSq (↑inclusion a - ↑inclusion b * ↑inclusion (nearestℤα (↑inclusion a / ↑inclusion b))) < ↑normSq (↑inclusion b)
Tactic:
rw [normSq_mul] at bound
Proof state after:
a b c : ℤα
h : b ≠ 0
bound :
  ↑normSq
        (OneHom.toFun (↑↑inclusion) a -
          OneHom.toFun (↑↑inclusion) (nearestℤα (OneHom.toFun (↑↑inclusion) a / OneHom.toFun (↑↑inclusion) b)) *
            OneHom.toFun (↑↑inclusion) b) *
      ↑normSq (sorryAx ℂ true) <
    1
⊢ ↑normSq (↑inclusion a - ↑inclusion b * ↑inclusion (nearestℤα (↑inclusion a / ↑inclusion b))) < ↑normSq (↑inclusion b)
Theorem: ℤα.normSq_mod_lt
Proof state before:
a b c : ℤα
h : b ≠ 0
this : ↑normSq (OneHom.toFun (↑↑inclusion) (mod a b)) < ↑normSq (OneHom.toFun (↑↑inclusion) b)
⊢ natNorm (mod a b) < natNorm b
Tactic:
simp only [natNorm_coe] at this
Proof state after:
a b c : ℤα
h : b ≠ 0
this : ↑(natNorm (mod a b)) < ↑(natNorm b)
⊢ natNorm (mod a b) < natNorm b
Theorem: ℤα.normSq_mod_lt
Proof state before:
a b c : ℤα
h : b ≠ 0
this : ↑(natNorm (mod a b)) < ↑(natNorm b)
⊢ natNorm (mod a b) < natNorm b
Tactic:
exact_mod_cast this
Proof state after:
no goals
Theorem: ℤα.normSq_mod_lt
Proof state before:
a b c : ℤα
h : b ≠ 0
bound :
  ↑normSq
      (OneHom.toFun (↑↑inclusion) a / OneHom.toFun (↑↑inclusion) b -
        OneHom.toFun (↑↑inclusion) (nearestℤα (OneHom.toFun (↑↑inclusion) a / OneHom.toFun (↑↑inclusion) b))) <
    1
⊢ OneHom.toFun (↑↑inclusion) a / OneHom.toFun (↑↑inclusion) b -
      OneHom.toFun (↑↑inclusion) (nearestℤα (OneHom.toFun (↑↑inclusion) a / OneHom.toFun (↑↑inclusion) b)) =
    (OneHom.toFun (↑↑inclusion) a -
        OneHom.toFun (↑↑inclusion) (nearestℤα (OneHom.toFun (↑↑inclusion) a / OneHom.toFun (↑↑inclusion) b)) *
          OneHom.toFun (↑↑inclusion) b) *
      sorryAx ℂ true
Tactic:
ring_nf
Proof state after:
a b c : ℤα
h : b ≠ 0
bound :
  ↑normSq
      (OneHom.toFun (↑↑inclusion) a / OneHom.toFun (↑↑inclusion) b -
        OneHom.toFun (↑↑inclusion) (nearestℤα (OneHom.toFun (↑↑inclusion) a / OneHom.toFun (↑↑inclusion) b))) <
    1
⊢ OneHom.toFun (↑↑inclusion) a * (OneHom.toFun (↑↑inclusion) b)⁻¹ -
      OneHom.toFun (↑↑inclusion) (nearestℤα (OneHom.toFun (↑↑inclusion) a * (OneHom.toFun (↑↑inclusion) b)⁻¹)) =
    OneHom.toFun (↑↑inclusion) a * sorryAx ℂ true -
      OneHom.toFun (↑↑inclusion) b *
          OneHom.toFun (↑↑inclusion) (nearestℤα (OneHom.toFun (↑↑inclusion) a * (OneHom.toFun (↑↑inclusion) b)⁻¹)) *
        sorryAx ℂ true
Theorem: ℤα.normSq_mod_lt
Proof state before:
a b c : ℤα
h : b ≠ 0
bound :
  ↑normSq
      (OneHom.toFun (↑↑inclusion) a / OneHom.toFun (↑↑inclusion) b -
        OneHom.toFun (↑↑inclusion) (nearestℤα (OneHom.toFun (↑↑inclusion) a / OneHom.toFun (↑↑inclusion) b))) <
    1
⊢ OneHom.toFun (↑↑inclusion) a * (OneHom.toFun (↑↑inclusion) b)⁻¹ -
      OneHom.toFun (↑↑inclusion) (nearestℤα (OneHom.toFun (↑↑inclusion) a * (OneHom.toFun (↑↑inclusion) b)⁻¹)) =
    OneHom.toFun (↑↑inclusion) a * sorryAx ℂ true -
      OneHom.toFun (↑↑inclusion) b *
          OneHom.toFun (↑↑inclusion) (nearestℤα (OneHom.toFun (↑↑inclusion) a * (OneHom.toFun (↑↑inclusion) b)⁻¹)) *
        sorryAx ℂ true
Tactic:
have : (b : ℂ) * (b : ℂ)⁻¹ = 1 := by
  apply mul_inv_cancel
  norm_cast
  simpa [coe_eq_zero] using h
Proof state after:
a b c : ℤα
h : b ≠ 0
bound :
  ↑normSq
      (OneHom.toFun (↑↑inclusion) a / OneHom.toFun (↑↑inclusion) b -
        OneHom.toFun (↑↑inclusion) (nearestℤα (OneHom.toFun (↑↑inclusion) a / OneHom.toFun (↑↑inclusion) b))) <
    1
this : OneHom.toFun (↑↑inclusion) b * (OneHom.toFun (↑↑inclusion) b)⁻¹ = 1
⊢ OneHom.toFun (↑↑inclusion) a * (OneHom.toFun (↑↑inclusion) b)⁻¹ -
      OneHom.toFun (↑↑inclusion) (nearestℤα (OneHom.toFun (↑↑inclusion) a * (OneHom.toFun (↑↑inclusion) b)⁻¹)) =
    OneHom.toFun (↑↑inclusion) a * sorryAx ℂ true -
      OneHom.toFun (↑↑inclusion) b *
          OneHom.toFun (↑↑inclusion) (nearestℤα (OneHom.toFun (↑↑inclusion) a * (OneHom.toFun (↑↑inclusion) b)⁻¹)) *
        sorryAx ℂ true