Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions HexBerlekamp/DistinctDegree.lean
Original file line number Diff line number Diff line change
Expand Up @@ -714,12 +714,7 @@ private theorem unitPolynomial_dvd_any
have hidx : u.coeffs.size - 1 < u.coeffs.size := by
simpa [DensePoly.size] using Nat.sub_one_lt_of_lt hpos
have hlead_eq : u.leadingCoeff = u.coeff (u.size - 1) := by
unfold DensePoly.leadingCoeff DensePoly.coeff
change u.coeffs.back?.getD (0 : ZMod64 p) =
u.coeffs.getD (u.coeffs.size - 1) (Zero.zero : ZMod64 p)
rw [Array.back?_eq_getElem?, Array.getD_eq_getD_getElem?,
Array.getElem?_eq_getElem hidx]
rfl
simp [DensePoly.leadingCoeff, DensePoly.coeff, DensePoly.size]
have hlead_ne : u.leadingCoeff ≠ (Zero.zero : ZMod64 p) := by
rw [hlead_eq]
exact DensePoly.coeff_last_ne_zero_of_pos_size u hpos
Expand Down
7 changes: 1 addition & 6 deletions HexBerlekamp/RabinSoundness.lean
Original file line number Diff line number Diff line change
Expand Up @@ -2330,12 +2330,7 @@ theorem dvd_one_of_isUnitPolynomial
have hidx : u.coeffs.size - 1 < u.coeffs.size := by
simpa [DensePoly.size] using Nat.sub_one_lt_of_lt hpos
have hlead_eq : u.leadingCoeff = u.coeff (u.size - 1) := by
unfold DensePoly.leadingCoeff DensePoly.coeff
change u.coeffs.back?.getD (0 : ZMod64 p) =
u.coeffs.getD (u.coeffs.size - 1) (Zero.zero : ZMod64 p)
rw [Array.back?_eq_getElem?, Array.getD_eq_getD_getElem?,
Array.getElem?_eq_getElem hidx]
rfl
simp [DensePoly.leadingCoeff, DensePoly.coeff, DensePoly.size]
have hlead_ne : u.leadingCoeff ≠ (Zero.zero : ZMod64 p) := by
rw [hlead_eq]
exact DensePoly.coeff_last_ne_zero_of_pos_size u hpos
Expand Down
10 changes: 7 additions & 3 deletions HexBerlekampZassenhaus.lean
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kim Morrison
-/

import HexBerlekampZassenhaus.Basic
import HexBerlekampZassenhaus.CrossCheck
import HexBerlekampZassenhaus.SmallModSingleton
module

public import HexBerlekampZassenhaus.Basic
public import HexBerlekampZassenhaus.CrossCheck
public import HexBerlekampZassenhaus.SmallModSingleton

public section

/-!
The `HexBerlekampZassenhaus` library exposes the executable integer
Expand Down
Loading
Loading