@danielsimonjr/mathts-functions 0.57.0 → 0.59.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1705 -399
- package/dist/typed/algebra.d.ts +23 -12
- package/dist/typed/algebra.d.ts.map +1 -1
- package/dist/typed/factorization/finite-field.d.ts +84 -0
- package/dist/typed/factorization/finite-field.d.ts.map +1 -0
- package/dist/typed/factorization/hensel.d.ts +38 -0
- package/dist/typed/factorization/hensel.d.ts.map +1 -0
- package/dist/typed/factorization/index.d.ts +72 -0
- package/dist/typed/factorization/index.d.ts.map +1 -0
- package/dist/typed/factorization/integer-poly.d.ts +82 -0
- package/dist/typed/factorization/integer-poly.d.ts.map +1 -0
- package/dist/typed/factorization/kronecker-factor.d.ts +48 -0
- package/dist/typed/factorization/kronecker-factor.d.ts.map +1 -0
- package/dist/typed/factorization/kronecker.d.ts +65 -0
- package/dist/typed/factorization/kronecker.d.ts.map +1 -0
- package/dist/typed/factorization/multi-poly.d.ts +107 -0
- package/dist/typed/factorization/multi-poly.d.ts.map +1 -0
- package/dist/typed/factorization/square-free.d.ts +37 -0
- package/dist/typed/factorization/square-free.d.ts.map +1 -0
- package/dist/typed/factorization/zassenhaus.d.ts +36 -0
- package/dist/typed/factorization/zassenhaus.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Univariate polynomial factorization over ℤ — the top-level Zassenhaus
|
|
3
|
+
* pipeline that ties together the factorization engine modules.
|
|
4
|
+
*
|
|
5
|
+
* Pipeline:
|
|
6
|
+
* 1. Strip integer content and sign (constant prefix).
|
|
7
|
+
* 2. Yun square-free decomposition (`squareFreeDecompose`).
|
|
8
|
+
* 3. For each square-free primitive part `g` (possibly non-monic):
|
|
9
|
+
* pick a prime `p` with `p ∤ lc(g)` and image square-free mod p (fewest
|
|
10
|
+
* modular factors among the first candidates), factor `g` mod p, choose
|
|
11
|
+
* `k` with `p^k` large enough (Landau–Mignotte, with the extra leading
|
|
12
|
+
* coefficient factor), build the monic integer associate of `g` mod p^k,
|
|
13
|
+
* Hensel-lift the mod-p factors, then recombine subsets by exact division
|
|
14
|
+
* over ℤ (the leading-coefficient method for non-monic `g`).
|
|
15
|
+
* 4. Emit each irreducible factor with the multiplicity of its square-free
|
|
16
|
+
* level; sort deterministically.
|
|
17
|
+
*
|
|
18
|
+
* Part of the univariate factorization engine
|
|
19
|
+
* (`functions/src/typed/factorization/`) — `bigint`-only by design.
|
|
20
|
+
*/
|
|
21
|
+
import { type IntPoly } from './integer-poly.js';
|
|
22
|
+
/** Result of factoring an integer polynomial: a constant times irreducibles. */
|
|
23
|
+
export type Factorization = {
|
|
24
|
+
constant: bigint;
|
|
25
|
+
factors: Array<{
|
|
26
|
+
poly: IntPoly;
|
|
27
|
+
mult: number;
|
|
28
|
+
}>;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Full univariate factorization of `f` over ℤ into a constant times
|
|
32
|
+
* irreducible primitive factors with multiplicities. Trivial inputs (zero,
|
|
33
|
+
* constant, degree ≤ 1) short-circuit.
|
|
34
|
+
*/
|
|
35
|
+
export declare function factorUnivariateZ(f: IntPoly): Factorization;
|
|
36
|
+
//# sourceMappingURL=zassenhaus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zassenhaus.d.ts","sourceRoot":"","sources":["../../../src/typed/factorization/zassenhaus.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAaL,KAAK,OAAO,EACb,MAAM,mBAAmB,CAAC;AAK3B,gFAAgF;AAChF,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,OAAO,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACjD,CAAC;AA2NF;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,OAAO,GAAG,aAAa,CA4B3D"}
|
package/package.json
CHANGED